Hello,
I am trying to read and record eight channels of audio data (IN4..1 on two TLV320ADC6140s) via the first four SAI1 RX data lines (SAI1_RXD3..0) of an NXP i.MX 8M processor as per the following block diagram:
I can clock the data out of the two ICs via SDOUT and/or SDOUT2 in I2S or TDM mode. However, I can only record the data on SAI1_RXD0. I've used arecord and PyAudio, both work for one SAI RX data line.
I created a device tree overlay to add the required data lines:
fragment@4 {
target = <&pinctrl_sai1>;
__overlay__ {
fsl,pins = <
MX8MQ_IOMUXC_SAI1_RXC_SAI1_RX_BCLK 0xd6
MX8MQ_IOMUXC_SAI1_RXFS_SAI1_RX_SYNC 0xd6
MX8MQ_IOMUXC_SAI1_RXD0_SAI1_RX_DATA0 0xd6
MX8MQ_IOMUXC_SAI1_RXD1_SAI1_RX_DATA1 0xd6
MX8MQ_IOMUXC_SAI1_RXD2_SAI1_RX_DATA2 0xd6
MX8MQ_IOMUXC_SAI1_RXD3_SAI1_RX_DATA3 0xd6
>;
};
};
Relevant device tree snippets are as follows:
dummy_dai: dummy-dai {
compatible = "linux,snd-soc-dummy";
#sound-dai-cells = <0>;
status = "okay";
};
sound-header {
compatible = "simple-audio-card";
status = "okay";
simple-audio-card,name = "Prototype Test";
simple-audio-card,format = "i2s";
simple-audio-card,cpu {
sound-dai = <&sai1>;
};
simple-audio-card,codec {
#sound-dai-cells = <0>;
sound-dai = <&dummy_dai>;
};
};
As a partial workaround I can read and record the four input channels of the first TLV320ADC6140 by setting it up to output the four channels on SDOUT -> SAI1_RXD0, recording 2 x bits / channel and specifying two channels as an argument to arecord or PyAudio then unpacking the data afterwards. However, I am still missing the data from the second TLV320ADC6140 since I need at least two SAI1 receive data lines, one per TLV320ADC6140.
I'm not sure where to go from here in order to record the data I need. Are there other modifications required (device tree, driver, user space) to “tell” arecord / PyAudio to use more than one SAI data line?
Any information you may provide will be greatly appreciated.
Thank you and regards.