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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,634 Views
chandreshtank
Contributor I

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

Labels (1)
0 Kudos
Reply
3 Replies

1,150 Views
chandreshtank
Contributor I

I am sorry There for the typo, Kernel version used by us is 3.10.53 :

Starting kernel ...

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.53-gf197c23-dirty (chandresh@chandresh-desktop) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #42 SMP PREEMPT Tue Mar 20 19:33:09 IST 2018
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Endoluxe Cyclopse Board

Although, I have set fsl, mode = "i2s-master" in Device tree configuration, still i am not able to set the SSI interface in I2S master mode?

Could you please have a look at the question again?

Chandresh

0 Kudos
Reply

1,150 Views
igorpadykov
NXP Employee
NXP Employee

one can look at patch

http://permalink.gmane.org/gmane.linux.alsa.devel/127795 

Best regards
igor

0 Kudos
Reply

1,150 Views
igorpadykov
NXP Employee
NXP Employee

Hi Chandresh

unfortunately version 3.10.58 is not supported by nxp, may be recommended to try with L3.10.53:

linux-imx - i.MX Linux kernel 

then port changes to L 3.10.58. Best option would be use latest android releases described on

i.MX Software|NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply