Problems with i2s pins

We have been trying to output sounds from our Orin AGX i2s pins, but we observed some weird behaviours. Using an oscilloscope to check the output of each pin, we saw that our left right clock on pin 35 seems to be okay but not our byte clock on pin 12. Here is in yellow our byte clock vs the byte clock of another device:

We also don’t get any signal at all on the Din on pin 38. We configured our pins with sudo /opt/nvidia/jetson-io/jetson-io.py to use i2s and then run a simple sine with aplay test-sin.wav

Are we missing any additional step to setup our Orin correctly?

Hi simon_hick,
Can you help to dump the pinmux info with below command and attach the output.

cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups

As you mentioned on another device I2S2 SCLK (pin 12) clock was working fine, can you compare the output of above command between working and non-working board.

Hello mkumard,
I got this output on the non-working board: pinconf-groups.txt (39.3 KB)
Sadly the working board is not a Jetson but a NODEMCU ESP32, I’m not sure what would be the equivalent to this command if there is one.

Also, I am now using the Dout on pin 40 instead of pin 38 if I’m not mistaken since my goal is to get sound on a speaker, not to record sounds. But I don’t get any signal on that one either.

Hi simon,
The pinmux config looks fine for I2S2 pin function and direction of the signal.

I would need additional details as stated below

  1. cat /proc/asound/cards
  2. cat /sys/kernel/debug/clk/clk_summary [dump during the playback active]
  3. Mixer control and commands used for the I2S2 playback

Also recommend to go through some of the debugging tips mentioned @ Audio Setup and Development — Jetson Linux<br/>Developer Guide 34.1 documentation

  1. proc_asound_cards.txt (380 Bytes)
  2. clk_summary.txt (158.1 KB)
  3. Here are the configuration I’ve used with Alsamixer:
    Card: NVIDIA Jetson AGX Orin APE
    DSPK1 Audio Bit Format [16]
    DSPK1 Channel Select [Stereo]
    DSPK1 LR Polarity Select [Left]
    DSPK1 Mono To Stereo [Zero]
    DSPK1 Mux [None]
    DSPK1 OSR Value [OSR_64]

As far as commands go, I just tried aplay test-sin.wav, I tried changing the rate and the sound card but nothing came out of it

Hi simon,

From the log, seems like you are using the I2S1 (onboard codec path) for the usecase. I believe your I2S interest is on 40 pin header.
i2s1 1 1 0 1411199 1411200 0 0 50000
*[ default_freq 0]

40 pin header has I2S2 for it’s usage.

Also, I don’t see a need to use DSPK mixer controls for I2S2 usecase. Can you try below commands to check the clock again on the 40 pin header

amixer -c APE cset name=“I2S2 Mux” “ADMAIF2”
aplay -Dhw:APE,1 ./test-sin.wav

Hi mkumard and thanks for the help,

$ amixer -c APE cset name=“I2S2 Mux” “ADMAIF2”
gives me :
amixer: Cannot find the given element from control hw:1

However I2S2 Mux is present when I use amixer controles:

$ amixer -c APE controls | grep I2S2
numid=322,iface=MIXER,name='I2S2 BCLK Ratio'
numid=310,iface=MIXER,name='I2S2 Capture Audio Bit Format'
numid=313,iface=MIXER,name='I2S2 Capture Audio Channels'
numid=318,iface=MIXER,name='I2S2 Capture Mono To Stereo'
numid=317,iface=MIXER,name='I2S2 Capture Stereo To Mono'
numid=311,iface=MIXER,name='I2S2 Client Bit Format'
numid=314,iface=MIXER,name='I2S2 Client Channels'
numid=316,iface=MIXER,name='I2S2 FSYNC Width'
numid=315,iface=MIXER,name='I2S2 Loopback'
numid=1301,iface=MIXER,name='I2S2 Mux'
numid=309,iface=MIXER,name='I2S2 Playback Audio Bit Format'
numid=312,iface=MIXER,name='I2S2 Playback Audio Channels'
numid=321,iface=MIXER,name='I2S2 Playback FIFO Threshold'
numid=320,iface=MIXER,name='I2S2 Playback Mono To Stereo'
numid=319,iface=MIXER,name='I2S2 Playback Stereo To Mono'
numid=308,iface=MIXER,name='I2S2 Sample Rate'
numid=1651,iface=MIXER,name='I2S2 codec frame mode'
numid=1652,iface=MIXER,name='I2S2 codec master mode'

But I think it might be a problem with the sound card, it doesn’t look to be properly recognised?

$ cat /proc/asound/cards
 0 [HDA            ]: tegra-hda - NVIDIA Jetson AGX Orin HDA
                      NVIDIA Jetson AGX Orin HDA at 0x3518000 irq 116
 1 [APE            ]: tegra-ape - NVIDIA Jetson AGX Orin APE
                      Unknown-JetsonAGXOrin-NotSpecified

I recently updated the firmware from Jetson Linux 35.1 to 35.3, could that be a factor?

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Hi Simon,
This seems to be some formatting issue with the double quote used at your side. Can you cross check