Enabling I2S Audio on Jetson Nano GPIO Header

This is not exactly an issue but just wanted to share the solution in enabling I2S4 audio on Jetson Nano. My setup is Jetson Nano Dev Kit with JP4.6.3 installed via sdkmanager. I also tried the SD card image of JP4.6.1.

It was supposed to be a simple :

sudo /opt/nvidia/jetson-io/jetson-io.py

and manually enable I2S4 audio on the GPIO 40-pin header. Save and reboot. I properly configured I2S4 Mux to ADMAIF1. Unfortunately, I could not enable the sound on my MAX98357A I2S module. On Jetson Orin, enabling the sound is easy.

I tried experimenting on different configurations using alsamixer -c 1. Unfortunately, I2S is still disabled.

I have exhausted almost all possible solutions from configuring device tree, flashing a new DTB, kernel config and recompile, etc. All w/o success. I found out that the only way to enable I2S4 is to enable the SFIO by ensuring that in running

sudo cat /sys/kernel/debug/tegra_gpio,

the result:

J: 2:1 f0 00 00 00 00 00 000000

f0 should 00

This can be done by reconfiguring the bootloader, recompiling and flashing which is messy. A simple solution is to clear CNF registering by interrupting the bootloader:

mw 0x6000d204 0

I got the idea from: Audio I2S on 40 Pin Connector - #17 by jonathanh

I2S finally works. I can play and hear audio on my speaker:

aplay test.wav
aplay -D hw:tegrasndt210ref,0 test.wav

Since this is manual register configuration, I have to make it more permanent. This can be done by changing the bootcmd from:

bootcmd=run distro_bootcmd 

by prepending the mw 0x6000d204 0

setenv bootcmd 'mw 0x6000d204 0; run distro_bootcmd'  

Other people encountering the same problem might find this useful.


Great! Thanks for your sharing to the community!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.