Jetson AGX Orin NX - TLV320AIC32x4 Codec I2S DOUT No Data Output, But Clock Signals Are Normal

Hardware/Software Environment:

  • Platform: Jetson AGX Orin NX

  • System: L4T 35.3.x (JetPack 5.1.2)

  • Audio Codec: TLV320AIC32x4 (I2C address 0x18)

  • Interface: I2S2

  • Audio Device: hw:1,1

The I2S DOUT pin of TLV320AIC32x4 codec has no data output, but all clock signals are normal.

settings.txt (791.2 KB)

reg_dump.txt (585 Bytes)

kernel_log.txt (69.6 KB)

dtb.txt (9.0 KB)

pinmux:

titan@titan:~$ sudo busybox devmem 0x02434088
0x00001405
titan@titan:~$ ^C
titan@titan:~$ sudo busybox devmem 0x02434090
0x00000405
titan@titan:~$ sudo busybox devmem 0x02434098
0x00001455
titan@titan:~$ sudo busybox devmem 0x024340a0
0x00001405

*** Please note that this reply is generated by LLM automatically ***

The issue at hand appears to be related to the Jetson Orin NX series, specifically with the TLV320AIC32x4 codec, where the I2S DOUT pin is not outputting any data despite normal clock signals.

To address this issue, let’s break down the information provided:

  1. Hardware and Software Configuration: The system is running on the Jetson Orin NX series with L4T 353x and JetPack 512. The TLV320AIC32x4 codec is connected via I2C with an address of 0x18 and is using the I2S2 interface (hw11).

  2. Symptoms: The I2S DOUT pin of the TLV320AIC32x4 codec has no data output, but all clock signals are normal.

  3. Troubleshooting Steps: The user has provided a series of commands using busybox devmem to read and write to specific memory addresses. These commands are likely intended to configure or debug the I2S interface.

To provide a comprehensive solution, let’s analyze the provided commands:

  • sudo busybox devmem 0x02434088 0x00001405: This command writes the value 0x00001405 to the memory address 0x02434088. Without knowing the exact memory layout, it’s difficult to determine the purpose of this command. However, it may be related to configuring the I2S interface or the TLV320AIC32x4 codec.

  • sudo busybox devmem 0x02434090 0x00000405: This command writes the value 0x00000405 to the memory address 0x02434090. Similar to the previous command, the purpose is unclear without more context.

  • sudo busybox devmem 0x02434098 0x00001455: This command writes the value 0x00001455 to the memory address 0x02434098. Again, the purpose is unclear without more context.

  • sudo busybox devmem 0x024340a0 0x00001405: This command writes the value 0x00001405 to the memory address 0x024340a0. This command is similar to the first one, but with a different memory address.

To resolve the issue, I would recommend the following steps:

  1. Check the I2S configuration: Verify that the I2S interface is properly configured in the device tree (dtb) and that the TLV320AIC32x4 codec is correctly connected and configured.

  2. Verify the clock signals: Ensure that the clock signals are correctly configured and that the TLV320AIC32x4 codec is receiving the expected clock signals.

  3. Check the I2C communication: Verify that the I2C communication between the Jetson Orin NX and the TLV320AIC32x4 codec is working correctly.

  4. Consult the documentation: Refer to the Jetson Orin NX documentation and the TLV320AIC32x4 codec datasheet to ensure that the configuration and troubleshooting steps are correct.

  5. Seek additional help: If the issue persists, consider seeking help from the Jetson Orin NX community or a professional with experience in embedded systems and audio codecs.

In comparison to other Jetson modules, the Jetson Orin NX series has a similar architecture and configuration. However, the specific issue at hand may be unique to the TLV320AIC32x4 codec and the Jetson Orin NX series. Therefore, it’s essential to consult the documentation and seek help from experts familiar with this specific hardware configuration.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Could this question offer some help

Hi,

Could you provide the details on the 40 pin header number used for the I2S signals measurement. The pinmux does enables I2S DOUT function, so expecting DOUT signal presence to codec.

Also list the amixer controls used for the playback

These are all the files of amixer controls. settings.txt
settings.txt (791.2 KB)

reg_dump.txt (585 Bytes)

kernel_log.txt (69.6 KB)

dtb.txt (9.0 KB)

pinmux:

titan@titan:~$ sudo busybox devmem 0x02434088 I2S2_SCLK
0x00001405
titan@titan:~$ ^C
titan@titan:~$ sudo busybox devmem 0x02434090 I2S2_SDATA_OUT
0x00000405
titan@titan:~$ sudo busybox devmem 0x02434098 I2S2_SDATA_IN
0x00001455
titan@titan:~$ sudo busybox devmem 0x024340a0 I2S2_LRCK
0x00001405

May be, let me ask differently, could you provide the Pin mapping between Codec and Orin NX 40 pin header I2S2 signals?. I would like to ensure DOUT pin connected to codec was correct.



Do you mean this connection diagram?

Yes, also to confirm the 40th pin of 40-pin GPIO Expansion header is taken out as DOUT signal?. If so I don’t see any concern or issue for DOUT assuming Tegra is the I2S master.

Also, when you execute aplay command, does the audio file runs for the whole duration or it closes immediately

Hi,

The driver used before was incorrect. After modification, it can control the codec normally, but it keeps emitting noise all the time.

Run the command “aplay -D hw:APE,0 output.wav”, and the program will keep running until the end of the audio file.

tegra234-p3767-common-audio.txt (8.0 KB)

trace.log (53.4 KB)

When I run the following command:

aplay -D hw:APE,0 output.wav
Playing WAVE ‘output.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

The waveform of dout is like this:

Is this a valid waveform?

This has to be compared with input wave file played using aplay. you can also do I2S internal loopback to dump into a file and compare with input to make sure both these are matching

The dout on the orin end seems to have no output. I’m playing Front_Left.wav in a loop. The yellow signal is the dout of orin, and the blue signal is the dout of codec.

The codec DOUT seems valid, Did you tried capturing this data with arecord?. Could you confirm if the captured wavefile is proper to validate capture path.

An error was reported when attempting to capture:

arecord -D hw:APE,0 -r 44100 -c 2 -f S16_LE ~/output.wav
Recording WAVE ‘/home/titan/output.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: pcm_read:2178: read error: Input/output error

	nvidia-audio-card,widgets =
    	"Line",         "tlv Line In L",
		"Line",         "tlv Line In R",
    	"Headphone",    "tlv Headphone",
    	"Microphone",   "tlv Mic",
		"Line",     	"tlv Line Out L",
		"Line",     	"tlv Line Out R",
    	"Speaker",      "tlv Int Spk";

	nvidia-audio-card,routing =
    	"tlv Line Out L", "tlv LLOUT",
    	"tlv Line Out R", "tlv RLOUT",
		"tlv MIC2L"    , "tlv Mic",
		"tlv MIC2R"    , "tlv Mic";

This info is incomplete, did you set amixer control for codec side to set the capture path? I don’t see complete info on what all amixer controls set for playback and capture. Could you paste the amixer controls commands used.

This is the setting of the control related to I2S2. Is there anything that needs to be modified?

amixer -c APE cset name=‘I2S2 Mux’
numid=1313,iface=MIXER,name=‘I2S2 Mux’
; type=ENUMERATED,access=rw------,values=1,items=81
; Item #0 ‘None’
; Item #1 ‘ADMAIF1’
; Item #2 ‘ADMAIF2’
; Item #3 ‘ADMAIF3’
; Item #4 ‘ADMAIF4’
; Item #5 ‘ADMAIF5’
; Item #6 ‘ADMAIF6’
; Item #7 ‘ADMAIF7’
; Item #8 ‘ADMAIF8’
; Item #9 ‘ADMAIF9’
; Item #10 ‘ADMAIF10’
; Item #11 ‘ADMAIF11’
; Item #12 ‘ADMAIF12’
; Item #13 ‘ADMAIF13’
; Item #14 ‘ADMAIF14’
; Item #15 ‘ADMAIF15’
; Item #16 ‘ADMAIF16’
; Item #17 ‘I2S1’
; Item #18 ‘I2S2’
; Item #19 ‘I2S3’
; Item #20 ‘I2S4’
; Item #21 ‘I2S5’
; Item #22 ‘I2S6’
; Item #23 ‘SFC1’
; Item #24 ‘SFC2’
; Item #25 ‘SFC3’
; Item #26 ‘SFC4’
; Item #27 ‘MIXER1 TX1’
; Item #28 ‘MIXER1 TX2’
; Item #29 ‘MIXER1 TX3’
; Item #30 ‘MIXER1 TX4’
; Item #31 ‘MIXER1 TX5’
; Item #32 ‘AMX1’
; Item #33 ‘AMX2’
; Item #34 ‘AMX3’
; Item #35 ‘AMX4’
; Item #36 ‘ARAD1’
; Item #37 ‘AFC1’
; Item #38 ‘AFC2’
; Item #39 ‘AFC3’
; Item #40 ‘AFC4’
; Item #41 ‘AFC5’
; Item #42 ‘AFC6’
; Item #43 ‘OPE1’
; Item #44 ‘SPKPROT1’
; Item #45 ‘MVC1’
; Item #46 ‘MVC2’
; Item #47 ‘IQC1-1’
; Item #48 ‘IQC1-2’
; Item #49 ‘IQC2-1’
; Item #50 ‘IQC2-2’
; Item #51 ‘DMIC1’
; Item #52 ‘DMIC2’
; Item #53 ‘DMIC3’
; Item #54 ‘DMIC4’
; Item #55 ‘ADX1 TX1’
; Item #56 ‘ADX1 TX2’
; Item #57 ‘ADX1 TX3’
; Item #58 ‘ADX1 TX4’
; Item #59 ‘ADX2 TX1’
; Item #60 ‘ADX2 TX2’
; Item #61 ‘ADX2 TX3’
; Item #62 ‘ADX2 TX4’
; Item #63 ‘ADX3 TX1’
; Item #64 ‘ADX3 TX2’
; Item #65 ‘ADX3 TX3’
; Item #66 ‘ADX3 TX4’
; Item #67 ‘ADX4 TX1’
; Item #68 ‘ADX4 TX2’
; Item #69 ‘ADX4 TX3’
; Item #70 ‘ADX4 TX4’
; Item #71 ‘ADMAIF17’
; Item #72 ‘ADMAIF18’
; Item #73 ‘ADMAIF19’
; Item #74 ‘ADMAIF20’
; Item #75 ‘ASRC1 TX1’
; Item #76 ‘ASRC1 TX2’
; Item #77 ‘ASRC1 TX3’
; Item #78 ‘ASRC1 TX4’
; Item #79 ‘ASRC1 TX5’
; Item #80 ‘ASRC1 TX6’
: values=1

amixer -c APE cget name=‘I2S2 BCLK Ratio’
numid=322,iface=MIXER,name=‘I2S2 BCLK Ratio’
; type=INTEGER,access=rw------,values=1,min=0,max=2147483647,step=0
: values=0

amixer -c APE cget name=‘I2S2 Capture Audio Bit Format’
numid=310,iface=MIXER,name=‘I2S2 Capture Audio Bit Format’
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 ‘None’
; Item #1 ‘16’
; Item #2 ‘32’
: values=1

amixer -c APE cget name=‘I2S2 Capture Audio Channels’
numid=313,iface=MIXER,name=‘I2S2 Capture Audio Channels’
; type=INTEGER,access=rw------,values=1,min=0,max=16,step=0
: values=16

amixer -c APE cget name=‘I2S2 Capture Mono To Stereo’
numid=318,iface=MIXER,name=‘I2S2 Capture Mono To Stereo’
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 ‘Zero’
; Item #1 ‘Copy’
: values=0

amixer -c APE cget name=‘I2S2 Capture Stereo To Mono’
numid=317,iface=MIXER,name=‘I2S2 Capture Stereo To Mono’
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 ‘CH0’
; Item #1 ‘CH1’
; Item #2 ‘AVG’
: values=0

amixer -c APE cget name=‘I2S2 Client Bit Format’
numid=311,iface=MIXER,name=‘I2S2 Client Bit Format’
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 ‘None’
; Item #1 ‘16’
; Item #2 ‘32’
: values=0

amixer -c APE cget name=‘I2S2 Client Channels’
numid=314,iface=MIXER,name=‘I2S2 Client Channels’
; type=INTEGER,access=rw------,values=1,min=0,max=16,step=0
: values=0

amixer -c APE cget name=‘I2S2 FSYNC Width’
numid=316,iface=MIXER,name=‘I2S2 FSYNC Width’
; type=INTEGER,access=rw------,values=1,min=0,max=255,step=0
: values=0

amixer -c APE cget name=‘I2S2 Loopback’
numid=315,iface=MIXER,name=‘I2S2 Loopback’
; type=BOOLEAN,access=rw------,values=1
: values=on

amixer -c APE cget name=‘I2S2 Loopback’
numid=315,iface=MIXER,name=‘I2S2 Loopback’
; type=BOOLEAN,access=rw------,values=1
: values=off

amixer -c APE cget name=‘I2S2 Playback Audio Bit Format’
numid=309,iface=MIXER,name=‘I2S2 Playback Audio Bit Format’
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 ‘None’
; Item #1 ‘16’
; Item #2 ‘32’
: values=0

amixer -c APE cget name=‘I2S2 Playback Audio Channels’
numid=312,iface=MIXER,name=‘I2S2 Playback Audio Channels’
; type=INTEGER,access=rw------,values=1,min=0,max=16,step=0
: values=0

amixer -c APE cget name=‘I2S2 Playback FIFO Threshold’
numid=321,iface=MIXER,name=‘I2S2 Playback FIFO Threshold’
; type=INTEGER,access=rw------,values=1,min=0,max=63,step=0
: values=3

amixer -c APE cget name=‘I2S2 Playback Mono To Stereo’
numid=320,iface=MIXER,name=‘I2S2 Playback Mono To Stereo’
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 ‘Zero’
; Item #1 ‘Copy’
: values=0

amixer -c APE cget name=‘I2S2 Playback Stereo To Mono’
numid=319,iface=MIXER,name=‘I2S2 Playback Stereo To Mono’
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 ‘CH0’
; Item #1 ‘CH1’
; Item #2 ‘AVG’
: values=0

amixer -c APE cget name=‘I2S2 Sample Rate’
numid=308,iface=MIXER,name=‘I2S2 Sample Rate’
; type=INTEGER,access=rw------,values=1,min=0,max=192000,step=0
: values=0

amixer -c APE cget name=‘I2S2 codec frame mode’ 1
numid=1604,iface=MIXER,name=‘I2S2 codec frame mode’
; type=ENUMERATED,access=rw------,values=1,items=6
; Item #0 ‘None’
; Item #1 ‘i2s’
; Item #2 ‘right-j’
; Item #3 ‘left-j’
; Item #4 ‘dsp-a’
; Item #5 ‘dsp-b’
: values=1

amixer -c APE cget name=‘I2S2 codec master mode’
numid=1605,iface=MIXER,name=‘I2S2 codec master mode’
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 ‘None’
; Item #1 ‘cbm-cfm’
; Item #2 ‘cbs-cfs’
: values=0

These are I2S2 controls, apart from this as you integrated the Codec, I believe there would be specific codec related control needs to be set for DAPM path closure. Did you set any control for Codec?.

on side note, I see ‘I2S2 Loopback’ is set to “on“ which is not required with codec in path.

As you not seeing I2S2 DOUT, I would recommend lets first make sure I2S2 working fine. Let’s revert all the codec related changes. Set only I2S2 pinmux with Configuring the Jetson Expansion Headers — Jetson LinuxDeveloper Guide 34.1 documentation . We could try to probe the I2S2 signal to make sure no issues seen from Jetson platform side

The pin configuration seems to be correct,dout still has no output:

Ok, may be try below and check once probing DOUT signal. If no activity on DOUT, we might need to check on the board side.

amixer -c APE cset name=“I2S2 Mux” “ADMAIF1”
amixer -c APE cset name=“ADMAIF1 Mux” “I2S2”

amixer -c APE cset name=“I2S2 Loopback” “off”

speaker-test -D hw:“APE”,0 -r 48000 -c 2 -F S16_LE -t sine -f 1000

I made an attempt, but still no waveform.

Besides, I found that I couldn’t control the levels of dout and din by writing to registers.

sudo busybox devmem 0x02434090 0x32 0x08

sudo busybox devmem 0x02434098 0x32 0x08

It has always been at a low level.

I can control the sclk and fs levels to be high or low.

sudo busybox devmem 0x02434088 0x32 0x08

sudo busybox devmem 0x024340a0 0x32 0x08

Does this mean that the pins might have been connected incorrectly?

Are you probing 40th pin for DOUT from 40 pin GPIO header?. If so, this is correct pin for DOUT