Capture I2S signals

I’m trying to capture the WS, SCK and DATA0 signals of the I2S using scope.
According to schematic i’m using pins 16, 18 and 20 accordingly (which are going to GPIOs 110, 113, and 114).
I’ve created the the above mentioned GPIOs using the “export” command and set Direction as Out.
I’m using the “aplay” command line for ALSA to play an already made WAV file however nothing is been captured on my scope.
My questions:

  1. Can you please explain how to use and configure the I2S?
  2. The “aplay -l” list two sound cards on my 410c:
    a. card 1: DB410C, device 0: ADV7533 i2s-hifi-0
    b. card 1: DB410C, device 1: WCD multicodec-1
    Can you please explain about these two?
  3. Can you please explain how to configure for Master/Slave?


Hi @Ronen,

I am working on a guide to route I2S signals on LS expansion header. Please stay tuned :wink:


You can’t set them as gpio if you want them to work as i2s. Those are fundamentally different functions.

Hi Mani,

This is great, i’m anticipating for your guide.


Hi @doitright ,
I see. Can you please explain how to capture the I2S signals (FS, CLK, D0) using scope?

I would like to share an informative link with a detailed explanation for the I2S interfaces on the snapdragon 410c.
The below link is a private messaging exchange between @srini and myself. I hope you will find it helpfully for cracking the snapdragon 410c I2S interfaces issue :slight_smile:


@Mani - i may suggest that you will use the information gave by @srini with your guide.
Do you have an estimation for when it will be published?

hi @Ronen,

private discussions are , well, private… so we cannot access them. We really encourage everyone on this forum to use public discussions , especially for technical questions and support! These forums so far are very open minded, there is no wrong question to ask publicly!

Please get Srini’s agreement, and repost your conversation here, so that it can benefit everyone!


I’ve tried to share the private conversion only after I got @srini approval. This is fully understood.

Below please find the important section:

@Ronen Thanks for sharing the info! I knew the I2S internal structure beforehand but still configuring the mux for LS I2S is a nightmare and I might have an update later this week.

Thanks for your persistence!


Below please find a diagram i sketched to describe the I2S interfaces (based on @srini given information):

I’ll be glad If someone can help in understanding how to do the pinmux and/or the pinctrl node editing through device-tree?

According the below snapshot from snapdragon 410c schematic document - LS expansion connector already mapped to correct GPIOs thus i can’t understand why I2S data isn’t being seen on logic analyzer while ‘aplay’ WAV file on the WDC Internal Codec interface?

In Green - the HDMI codec lines
In Yellow - the LS expansion connector lines

Hello @Mani en @Ronen,

I’m too trying to get external I2S routed through the LS I2S interface. Without any luck so far.
@Mani I’m looking forward to your update!

I’m developing on a Dragonboard 410c with Android 6 and the Linux kernel version 3.10.49

I tried the sample stuff from
and that worked ok for me. (Using the ‘Audio Mezzanine Board’)
After that I reworked the tinymix (Android shell) commands to do the following:

tinymix “SEC_MI2S_RX Audio Mixer MultiMedia1” 1
tinymix “QUAT_MI2S_RX Audio Mixer MultiMedia1” 1
tinyplay /data/test2.wav

Was guessing, as also stated in this topic that PRI and TERT were used for the internal WCD codec.
Based on that, I concluded that the SEC_MI2S and the QUAT_MI2S should be available at the external I2S busses.

However, I also did not get lucky on getting I2S signals (Primary External I2S), nor on the data line (gp114/J8-20, resp qcom-gp/dragonboard)
nor on the bit-clock line (gp113/J8-18) both lines remained 0V when playing the wav file. Nothing.

What I tried, remove all other pin-func of all relevant lines (gp 110, 113, 114, 115) to only function as
I2S mode. (In kernel/arch/arm64/boot/dts/qcom/msm8916-pinctrl.dtsi) Rebuild, flashed and test. No luck.

What I see in the message above, that a reference is made to
"LPASS_CSR_GP_IO_MUX_MIC_CTL(0x07702000) is configured to 0x00420000 for QUAT"
however, I don’t see any LPASS_CSR of 07702000 stated in the Hardware Register Definition pdf.
Is this some kind of not-documented feature we are trying to get after?

As a conclusion, @Mani, I too looking forward to your tutorial, I understand this is much work.
Can I help? I have a setup with Dragonboard and scope, if you have a register of device-tree for test I
can test it.

Hope somebody finds the answer for this noted I2S bus feature which nobody? gets working.

Kind regards, Rik

Hi @RikNL @Ronen,

Below is the guide I have put together for enabling I2S on Low speed expansion header.

Hope this helps!


1 Like

Hi @Mani,

Yes this helps! Thanks for your thorough guide, I’m looking in to it. It clarify’s the primary external i2s port, that is very nice. Thanks for your help!


Looks very useful.
Let me ask this question though; since it appears like everything ends up working through the integrated codec, how would you configure it to interact with an external programmable codec, like a PCM1865 ADC or PCM5142 DAC? On a Hikey, I would set it up with simple-audio-card with the codec set to the external codec, which is controlled over i2c. This would allow the external codec to be controlled through alsa or tinymix.


For the case of using external codec to External Primary MI2S, below diff should be sufficient!

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 4c3dda5..0b10036 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -315,7 +315,7 @@
                                         sound-dai = <&lpass MI2S_PRIMARY>;
                                 codec {
-                                        sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
+                                        sound-dai = <&your_codec 0>;

Just define a node for your_codec beforehand. For reference you can see how ADV7533 (adv_bridge) is used.