Jetson Nano + TDM Audio Input

Hello,

I would like to interface an 8-channel audio ADC (CS5368) to the Jetson Nano.
As there is only one I2S data interface on the 40-pin GPIO header, the ADC must be put into a TDM mode to multiplex 8 audio channels into the same wires.

I have seen some discussions on this forum about doing this with the Jetson TX2, but not on the Jetson Nano.
Could you please explain if it is possible to use TDM interface on the Jetson Nano, and if so, is there a relevant application note to explain how to do this?

Thanks,

Ben

Hi Ben,

Yes, it is possible to use TDM mode on Jetson Nano (similar to TX2).

Unfortunately, we need to improve on the documentation. But we can help you on this.

  1. Please configure Pinmux for I2S4 :

[https://developer.nvidia.com/embedded/downloads#?search=Expansion%20Header%20configuration]

https://devtalk.nvidia.com/default/topic/1061108/jetson-nano/i2s-audio-output-not-working/post/5374074/#5374074.

  1. Configure I2S4 and DAI link (nvidia,dai-link-1) in TDM mode:
diff --git a/kernel-dts/tegra210-porg-p3448-common.dtsi b/kernel-dts/tegra210-porg-p3448-common.dtsi
index 9ff3f7a..e39a9e6 100644
--- a/kernel-dts/tegra210-porg-p3448-common.dtsi
+++ b/kernel-dts/tegra210-porg-p3448-common.dtsi
@@ -308,7 +308,7 @@
                       i2s@702d1300 {
                               regulator-supplies = "vddio-uart";
                               vddio-uart-supply = <&max77620_sd3>;
-                               fsync-width = <15>;
+                               fsync-width = <0>;
                               status = "okay";
                               /*
@@ -383,7 +383,7 @@
                       codec-dai = <&spdif_dit0>;
                       cpu-dai-name = "I2S4";
                       codec-dai-name = "dit-hifi";
-                       format = "i2s";
+                       format = "dsp_a";
                       bitclock-slave;
                       frame-slave;
                       bitclock-noninversion;
  1. Build, Flash

  2. After boot: Verify audio over I2S4 (quick internal loopback test)

# Enable internal loopback
amixer -c tegrasndt210ref cset name="I2S4 Loopback" on

# Map the I2S playback interface to a DMA interface
amixer -c tegrasndt210ref cset name="I2S4 Mux" "ADMAIF1"

# Map the I2S capture interface to a DMA interface
amixer -c tegrasndt210ref cset name="ADMAIF2 Mux" "I2S4"

# Start I2S capture (for 30 secs)
arecord -D hw:tegrasndt210ref,1 -c 8 -r 48000 -f S16_LE -d 30 cap.wav & 

# Start I2S capture (for 30 secs)
aplay -D hw:tegrasndt210ref,0 -c 8 -r 48000 -f S16_LE <sample.wav>

Refs:
[1] https://devtalk.nvidia.com/default/topic/1044183/jetson-tx2/tdm-mode-on-the-i2s-port/
[2] https://devtalk.nvidia.com/default/topic/1061108/jetson-nano/i2s-audio-output-not-working/post/5374074/#5374074

Thanks,
Sharad

Sharad - Many thanks for your help, I shall try this.

Hello,

I have followed the application note “Jetson Nano Developer Kit 40-Pin Expansion Header Configuration”, DA_09565-001.
Problem is that tafter I flash the Nano, it does not boot up. I see the NVIDIA logo, and it hangs at this point. I have tried with default pinmux files, and my modified ones, but the result is the same.

What should I try next?
Thanks,

Ben

Hello Ben,

Unfortunately, this is a known issue with the current pinmux spreadsheet for Nano. We are still working to fix this. Please see the following for a way to workaround this …

https://devtalk.nvidia.com/default/topic/1064238/jetson-nano/i2s-sound-in-jetpack4-2-2-l4t-r32-2-1/post/5389948/#5389948

Regards,
Jon