AnsweredAssumed Answered

Audio Capture issue with INMP441 Digital Mic with I.MX6Q SSI interface in I2S master mode

Question asked by Chandresh Tank on Mar 21, 2018
Latest reply on Mar 22, 2018 by igorpadykov

Hello, 

 

In my board (with IMX6Q6AVT SoC), I am trying to capture audio from digital mic i.e INMP441 over I2S interface using SoC's SSI interface. the digital MIC INMP441 has no clock source and the processor's SoC has to act in I2S master mode. 

We are running Android KitKat with kernel version 3.10.58.

Here is my device tree configuration for SoundCard, SSI interface and Codec. I am using SGTL5000 sound card and I am SGTL5000 codec is used as a dummy codec to bring up the sound card and for that Inside SGTL5000 codec, i have removed all the I2C related calls to probe the SGLT codec so that SGTLsound card works. Currently in my board SGTL sound card is up and /proc/asound has card0 entry with capture interface present in /dev/snd/pcmC0D0c.    

 

ssi1: ssi@02028000 {
fsl,mode = "i2s-master";
compatible = "fsl,imx6q-ssi","fsl,imx21-ssi";
cell-index = <0>;
reg = <0x02028000 0x4000>;
interrupts = <0 46 0x04>;
clocks = <&clks 178>, <&clks 157>;
clock-names = "ipg", "baud";
dmas = <&sdma 37 1 0>,
<&sdma 38 1 0>;
dma-names = "rx", "tx";
status = "okay";
};


sound_sgtl5000: sound_sgtl5000 {
compatible = "fsl,imx6dl-nitrogen6_vm-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "for-INMP441";
cpu-dai = <&ssi1>;
audio-codec = <&codec_sg>;
audio-routing =
"MIC_IN", "Mic Jack";
mux-int-port = <1>;
mux-ext-port = <3>;
};

&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1_1>;
status = "okay";

codec_sg: sgtl5000@0a {
compatible = "fsl,sgtl5000";
//pinctrl-names = "default";
//pinctrl-0 = <&pinctrl_sgtl5000_1>;
reg = <0x0a>;
clocks = <&clks 201>;
//VDDA-supply = <&reg_2p5v>;
//VDDIO-supply = <&reg_3p3v>;
};
};

 

Also the HW pin connection is 

 in audmux port 2(First External port)

                  TXClock  -> Digital Microphone's I2S bit clock

                  TXFrame Sync -> Digital Microphone's I2S WS

                  RXD  -> Digital Microphone's I2S data

 

So i have the SSI interface in I2S master mode but SSI registers doesn't go in SSI master mode, Checking in /sound/soc/fsl/fsl_ssi.c, it seems that it doesn't set the SSI bus in I2S master mode anywhere. Is it by default? 

 

Can you tell me what i need to do in order to set the SSI interface in I2S master mode and receive I2S data from the digital Mic? 

I also heard browsing through the forum that Kernel 3.10 's SSI driver doens't support I2S master mode, Is that correct?  If so, do we have anything to patch that?

 

- Chandresh

Outcomes