I tried to interface the Texas Instrument TLV320ADC6140 on JetsonNano to record a TDM stream of 4 channels (32 bits 48kHz).
The kernel driver of this ADC was developed under kernel > 5.X, so I modified the tlv320adcx140 driver to be compatible with jetson nano kernel. You will find the driver sources attached.
I recompiled the jetson kernel and I didn’t get any errors.
I also modified the device tree of the jetson nano to:
Configure the pin muxing
Enable I2S and I2C on jetson nano board
Attach audio codec to correct I2S and I2C ports
You will also find attached the device tree “tegra210-porg-p3448-common.dtsi” (please take a look to “tegra_sound” and “hdr40_i2c1” paragraphs).
Next, I reflash the jetson nano SD card and I can see with dmesg command that the codec is correctly registered and I2C communication with the ADC is working.
When I run alsamixer, I can see all the codec kcontrol parameters.
Then I tried to configure I2S using amixer by typing these commands : >amixer -c tegrasndt210ref cset name =”I2S4 Mux” “ADMAIF1” >amixer -c tegrasndt210ref cset name =”I2S4 fsync width” 0 >amixer -c tegrasndt210ref cset name =”I2S4 codec master mode” “cbs-cfs” >amixer -c tegrasndt210ref cset name =”I2S4 codec frame mode” “dsp-a”
When I run the command :>arecord -D hw:tegrasndt210ref,0 -r 48000 -c 4 -f S32_LE test.wav, I do not see any clock coming out of the jetson nano and I have the following error : arecord: pcm_read:2103: read error: Input/output error
If the audio path is not configured correctly, then it is possible that the DAPM widget for the I2S will not be turned on and so you will not see the clocks running. I see ADMAIF Mux is not set correctly and also codec routing.
For capturing audio, map the I2S4 interface to the ADMAIF1 interface with below command.