I2S on (actual) Dragonboard 820C

There are two i2s audio interface on the SoC that are wired up for use;

GPIO 58-61 “Quaternary MI2S” aka “Audio PCM interface #4” aka “Audio MI2S interface #4” is routed to the 4 audio pins on the low speed connector.

GPIO 65-68 “Primary MI2S” aka “Audio PCM interface #1” aka “Audio MI2S interface #1” is routed to the QCA6174 for Bluetooth.

I need to get both of these interfaces operational. I’ve previously worked with the (very different) Hikey960, but its now time to get this working on Dragonboard. In addition to getting the i2s interfaces operational, there is probably also a need to send some kind of configuration to the QCA6174.

Has anybody worked with these interfaces on this hardware?

Has anybody had I2S working on this board?

@Loic @danielt @srini @anybody else… I need some help with this.

Main points;

  1. I need Quat MI2S for interfacing with external sound card such as https://github.com/96boards/mezzanine-community/tree/master/boards/gEDA/i2s-mezzanine
  • I do NOT need anybody to validate functionality on that specific card, as that would be impossible since there is only one known to be in existence presently sandwiched between one of my DB820C’s and a sensors mezzanine. It should be sufficient to validate using a dummy codec in a loopback configuration with a logic probe.
  1. I need Pri MI2S working. It is interfaced with the bluetooth codec.
  • In addition to getting the Pri MI2S activated, the bluetooth codec apparently needs to be configured using vendor specific HCI commands, which are not documented anywhere that I have been able to find.
  • Are there any points on the board where the i2s signals can be reached by a logic probe?

I have had some help from @srini here: https://bugs.96boards.org/show_bug.cgi?id=851 in the form of a patch to address requirement (1), but which I have not been able to get working.

Thanks

Regarding Bluetooth, you can have a look at the userspace’qcom aosp driver:
https://android.googlesource.com/platform/hardware/qcom/bt/+/refs/heads/master/msm8909/libbt-vendor/src/

At first glance, there is nothing specific to I2S config, except a SCO_INTERFACE_I2S flag. But if you google this flag you can find some related code:
https://android.googlesource.com/platform/hardware/broadcom/libbt/+/88d5442f4af5421ac5db7fa9c864b31e48f76948/src/hardware.c#936

With a definition of the hci vendor specific commands (bt_sco_param…).

So not sure it’s compatible with the MSM8996 QCA chip but it’s worth a try, I suppose you’ll have to send this HCI command from the ath/qcom hci kernel driver init…

Thanks @Loic

I’m actually starting to wonder if they’ve hidden the SCO configurations in the firmware. Pixel (original) has the same Snapdragon 82x and the same QCA6174, so that phone should have what is needed. The code indicates a dummy for SCO vendor command BT_VND_OP_SCO_CFG: msm8996/libbt-vendor/src/bt_vendor_qcom.c - platform/hardware/qcom/bt - Git at Google suggesting that it doesn’t actually do anything here.

Yes it’s entirely possible, this configuration could be part of the patchram/nvram which is loaded at startup and so defined as the default one. Though I assume vendor commands (HCI_VSC_WRITE_I2SPCM_INTERFACE_PARAM…) should still work for sco config.