Jetson Nano Audio I2S not work

1, I have Jetson Nano Dev Kit that was flashed by “jetson-nano-jp461-sd-card-image”.
I opened Sound application and see that exist built-in audio in and out :

How to get it working ?

  1. After this I made enable I2S in 40-pin connector by launch Jetson‑IO. Connected to tested DAC CS4344 from Cirrus Logic as explained in DA-09753-001_v1.0.pdf
    Tried to play music by HDMI and it worked but no sound by I2S in 40-pin connector.
    What to do ?

Hi there @chaplin.u, nice to read you again!

I took the liberty of moving your post to the Jetson sub-category to give you better responses.


1 Like

Please check below L4T doc to see if an help: NVIDIA Jetson Linux Driver Package Software Features : Audio Setup and Development | NVIDIA Docs

I read it and not found any world about Analog IN/Output built-in in Nano.
What going on ? NVIDIA not know about provided capabilities ?
BTW not clear why I can connect USB device to Kit and it work but if I connect I2S device as explained in provided doc I need hard work with configs, settings , compilation and other sheet ?
You call it user friendly system ???

Looks like nobody knows here.
How to open technical support case ?

Hi chaplin.u

How to open technical support case ?
Thanks for your patience. You are at the right place and I will work with you to resolve the issue with DAC CS4344 on your Jetson nano board setup.

Jetson nano relies on external codec connected via 40 pin header (I2S), to support analog output. It doesn’t have any onboard codec.

40pin header pins can be used either as GPIO or as “special function I/O” (SFIO) such as I2C, I2S, etc. To provide compatibility with some off-the-shelf Raspberry Pi HATs such as Seeed Grove modules, SparkFun Qwiic products,the default configuration of these pins is set to GPIOs. And hence there are some extra steps involved if special functions such as I2S/I2C are used instead of GPIOs.

Incase of CS4344, no extra changes or configs required apart from jetson-io configs for I2S and AUD_MCLK.

  1. From the CS4344 datasheet, the D/A converter logic expects only I2S and MCLK from Jetson nano. Please enable both I2S and AUD_MCLK using Jetson-IO tool.

  2. Please give a try with below commands from target shell.

cat /proc/asound/cards → to get “ape sound card name”.

amixer -c “ape sound card name” cset name=“I2S4 Mux” “ADMAIF5”
speaker-test -D hw:“ape sound card name”,4 -r 48000 -c 2 -F S16_LE -t sine -f 1000 -l 5

  1. If there are no activity on the CS4344 speakers after (1) and (2), please probe the I2S and AUD_MCLK(7th pin) from the 40 pin header pins with oscilloscope or provide dump of "cat /sys/kernel/debug/clock/clock_tree | grep i2s " during the playback session active.
  1. As I wrote before I connected my card as explained in DA-09753-001_v1.0.pdf
  2. enabled with pins of 40 pin extension connector.
  3. answer to cat /proc/asound/cards was

0 [tegrahda ]: tegra-hda - tegra-hda
tegra-hda at 0x70038000 irq 83
1 [tegrasndt210ref]: tegra-snd-t210r - tegra-snd-t210ref-mobile-rt565x

first card is HDMA and second looks like my board.

4, After send amixer -c tegrasndt210ref cset name=“I2S4 Mux” "ADMAIF5 received a lot of parameters.
5. After send speaker-test -D hw:tegrasndt210ref,4 -r 48000 -c 2 -F S16_LE -t sine -f 1000 -l 5
I saw in oscilloscope activity in AUD_MCLK and SDO but signal looks weak.
6. Answer to cat: /sys/kernel/debug/clock/clock_tree: No such file or directory

Can you measure the exact frequency and voltage levels of the I2S signals and AUD_MCLK with the oscilloscope. This will give idea on what weak signals here turns out to be quantitatively. If possible attach the snap of the oscilloscope measurement of signals.

Also try measuring the same without the DAC CS4344 connected to the Jetson board.

** I connected my card as explained in DA-09753-001_v1.0.pdf
Sorry, I don’t see any link or attachment pointing to DA-09753-001_v1.0.pdf. Please provide me this doc access to check the connections.

Please use below to dump clock info during the usecase active session.
cat /sys/kernel/debug/clk/clk_summary

Ok, I will do it .
I think that problem is frequency. Signal looks to high. I mean instead of 1kHz it’s 1 MHz so I can’t hear it.

Sure, Will wait for your inputs.

on side note, from your speaker-test command, the I2S SCLK is expected to be @ 1.536MHz (48000 * 2 * 16=1536000)

In next couple days I will find good scope to make measure all needed parameters.
BTW How can I make reset of mixer to defaults ? I afraid that made wrong changes.

Only mixer control set during boot time is to connect ADMAIFx to I2Sx which are exposed outside board. Rest of the mixer are in reset state, “speaker-test” command parameter would decide the I2S rate. If this is not expected out of your board, then I can help you to find out the reason once we have the measurement of frequencies.

command cat /sys/kernel/debug/clk/clk_summary provided attached list.
freq.txt (56.5 KB)

I have a progress. After I run
amixer -c “ape sound card name” cset name=“I2S4 Mux” “MVC1”
amixer -c “ape sound card name” cset name=“MVC1 Mux” “ADMAIF1”
no was sound but after I tried again
amixer -c “ape sound card name” cset name=“I2S4 Mux” “ADMAIF5”
speaker-test -D hw:“ape sound card name”,4 -r 48000 -c 2 -F S16_LE -t sine -f 1000 -l 5
I hear sound of 1KHz !
I tried to play sound test by application “Sound” but it not work and also tried play mp3 file also no effect.

Looks like in standard image not exist drivers :
aplay -D hw:tegrasndt210ref,0 test.wav
aplay: test_wavefile:1014: can’t play WAVE-file format 0x0055 which is not PCM or FLOAT encoded

aplay -D hw:tegrasndt210ref,0 test.mp3
Playing raw data ‘test.mp3’ : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1299: Sample format non available
Available formats:
- S8
- S16_LE
- S24_LE
- S32_LE

Hi chaplin.u
Good to see some progress on your side.

Please note aplay tool is basic ALSA utility which can play only Wavefiles (MP3 is not supported with aplay).

I believe you are trying audio playback on Ubuntu GUI applications. If audio not working, then we need to cross the alsa configuration settings for userspace at target path file " /usr/share/alsa/init/postinit/00-tegra.conf "

Can you cross check it below entry was present on the above file.

CARDINFO{name}==“NVIDIA Jetson Nano APE”,
CTL{name}=“ADMAIF1 Mux”, CTL{value}=“I2S4”
CTL{name}=“I2S4 Mux”, CTL{value}=“ADMAIF1”

If above configs present then playing below command should work after device reboot. No need any extra mixer control. Also audio should work on GUI applications too with above configs.
speaker-test -D hw:“ tegrasndt210ref”,0 -r 48000 -c 2 -F S16_LE -t sine -f 1000 -l 5

in this place

exist 2 files but no card you talk about :
00-tegra.conf (6.0 KB)
01-tegra-rt565x.conf (3.2 KB)

This is the entry which can help for userspace.

CARDINFO{driver}==“tegra-snd-t210r”, \
CTL{name}=“I2S1 Loopback”, CTL{do_search}==“0”, \
CTL{name}=“I2S4 Loopback”, CTL{do_search}==“1”, \
CTL{name}=“ADMAIF1 Mux”, CTL{value}=“I2S4” \
CTL{name}=“I2S4 Mux”, CTL{value}=“ADMAIF1”

Expecting above should work for userspace audio, If not please edit 00-tegra.conf for the above entry and replace below entries

CARDINFO{driver}==“tegra-snd-t210r”, \
CTL{name}=“ADMAIF1 Mux”, CTL{value}=“I2S4” \
CTL{name}=“I2S4 Mux”, CTL{value}=“ADMAIF1”

When I try to play any WAV file
aplay -D hw:tegrasndt210ref,0 test.wav

I receive this message :

I corrected 00-tegra.conf (5.9 KB) ( removed 2 lines as you explained) but GUI

not work
If I did wrong please correct file and provide me.

The error “can’t play WAVE-file format 0x0055 which is not PCM or FLOAT encoded” clearly says something wrong with the test.wav format. For testing please continue using the “speaker-test -D hw:“ape sound card name”,4 -r 48000 -c 2 -F S16_LE -t sine -f 1000 -l 5” which should be sufficient for command line testing.

Can you provide me the output of below commands after rebooting the target.

#amixer -c “tegrasndt210ref” cget name=“I2S4 Mux”

#aplay -L

#alsactl init