IMX8MMini sai, alsa capture no pcm data

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

IMX8MMini sai, alsa capture no pcm data

381 Views
caozile
Contributor I

Hi:

  I used 8 digital mic to connect to the 4 RX pins of SAI5, and used arecord command to capture 8-channels PCM audio to the file, but only SAI5_Rx0 capture correct audio data, and the other 6 channels did not capture any data. May I ask what  need to be configured?

  Here is dts configuration:

sound-sai5 {
compatible = "simple-audio-card";
simple-audio-card,name = "sai5-audio";
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&mcpu>;
simple-audio-card,bitclock-master = <&mcpu>;
status = "okay";

mcpu: simple-audio-card,cpu {
sound-dai = <&sai5>;
};

simple-audio-card,codec {
sound-dai = <&dummycodec>;
};
};

dummycodec: codec@0 {
compatible = "snd-dummycodec";
#sound-dai-cells = <0>;
reg = <0>;
};

&sai5 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai5>;
assigned-clocks = <&clk IMX8MM_CLK_SAI5>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <49152000>;
clocks = <&clk IMX8MM_CLK_SAI5_IPG>, <&clk IMX8MM_CLK_DUMMY>,
<&clk IMX8MM_CLK_SAI5_ROOT>, <&clk IMX8MM_CLK_DUMMY>,
<&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>,
<&clk IMX8MM_AUDIO_PLL2_OUT>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
fsl,dataline = <0 0xf 0xf>;
fsl,sai-asynchronous;
//fsl,sai-mclk-direction-output;
status = "okay";
};

pinctrl_sai5: sai5grp {
fsl,pins = <
MX8MM_IOMUXC_SAI5_MCLK_SAI5_MCLK 0xd6
MX8MM_IOMUXC_SAI5_RXC_SAI5_RX_BCLK 0xd6
MX8MM_IOMUXC_SAI5_RXFS_SAI5_RX_SYNC 0xd6
MX8MM_IOMUXC_SAI5_RXD0_SAI5_RX_DATA0 0xd6
MX8MM_IOMUXC_SAI5_RXD1_SAI5_RX_DATA1 0xd6
MX8MM_IOMUXC_SAI5_RXD2_SAI5_RX_DATA2 0xd6
MX8MM_IOMUXC_SAI5_RXD3_SAI5_RX_DATA3 0xd6
>;
};

 

sound card:

root@imx8mmlpddr4evk:/tmp# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: imxspdif [imx-spdif], device 0: S/PDIF PCM snd-soc-dummy-dai-0 [S/PDIF PCM snd-soc-dummy-dai-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: btscoaudio [bt-sco-audio], device 0: 30020000.sai-bt-sco-pcm bt-sco-pcm-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: sai5audio [sai5-audio], device 0: 30050000.sai-amba_dummy_codec 3.codec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: sai1audio [sai1-audio], device 0: 30010000.sai-amba_dummy_codec 100000003.codec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

 

And my capture command:

arecord -Dhw:2,0 -c 8 -r 48000 -f S16_LE -t raw --period-size=1024 --buffer-size=4096 /tmp/mic.pcm

 

Please help me ,thanks

Tags (1)
0 Kudos
0 Replies