This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320ADC6140: Record multiple channels on multiple processor data lines

Part Number: TLV320ADC6140

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.

  • Hello Sandra,

    I am not completely sure but it seems what you are asking pertains to the NXP i.MX 8M processor and not the ADCs themselves, if it is that you are trying to open up those other datalines, what are you looking for to adjust with the ADCs?

    Otherwise I would bring this question to a forum regarding the other part unless I am misunderstanding your request for help

    Best Regards,

    Carson

    Low Power Audio Applications

  • Hello Carson,

    Thank you very much for your quick response.

    I did post the question to the NXP forum and their tech support provided information regarding configuration of the device tree which I had already implemented as well as information on embedded Linux for their processor.

    I have no problem configuring the TLV320ADC6140s from user space and I think the processor itself is configured properly. I'm missing something along the link between the device tree and the Linux recording software (device tree - Linux driver - ALSA - arecord) and I'm not sure where to ask my question.

    I saw the following link in your Audio forum which led me to think you also dealt with the Linux configuration side:

    https://e2e.ti.com/support/audio-group/audio/f/audio-forum/922655/tlv320adc3140-alsa-creating-dai-link-between-cpu-dai-and-multiple-codecs

    Regards,

    Sandra

  • Hey Sandra,

    Yes unfortunately we are unable to provide Linux support for our Audio ADCs beyond any provided drivers on the product pages

    Best Regards,

    Carson