Hi,
I am working with the Jetson AGX Orin EV Kit (Jetson Linux R35.5.0) and integrating the TLV320AIC3204 audio codec via I2S and I2C. Below are the connection details:
I2S2 is configured through the 40-pin header
PinMux verification output:
evk@tegra-ubuntu:~$ sudo /opt/nvidia/jetson-io/config-by-function.py -l enabled | grep i2s2
2. i2s2 (12,35,38,40)
- Register dump of I2S2 pins:
evk@tegra-ubuntu:~$ sudo busybox devmem 0x02434088 #SOC_GPIO41 - I2S2_SCLK 0x00001445 evk@tegra-ubuntu:~$ sudo busybox devmem 0x02434090 #SOC_GPIO42 - I2S2_SDATA_OUT 0x00000405 evk@tegra-ubuntu:~$ sudo busybox devmem 0x02434098 #SOC_GPIO43 - I2S2_SDATA_IN 0x00000455 evk@tegra-ubuntu:~$ sudo busybox devmem 0x024340a0 #SOC_GPIO44 - I2S2_LRCK 0x00000445
Here is DT changes
/*I2S2 in Short frame sync for BT SCO */
i2s@2901100 {
status = "okay";
};
/*Added Audio codec DT Changes*/
i2c@c250000 {
aic32x4: tlv320aic32x4.1-0018@18 {
compatible = "ti,tlv320aic32x4";
reg = <0x18>;
clocks = <&bpmp_clks TEGRA234_CLK_AUD_MCLK>;
clock-names = "mclk";
status = "okay";
dv-supply = <&battery_reg>;
av-supply = <&battery_reg>;
iov-supply = <&battery_reg>;
#sound-dai-cells = <1>;
sound-name-prefix = "tlv";
};
};
//hdr40_i2c1: i2c@c250000 { };
tegra_sound: sound {
compatible = "nvidia,tegra186-ape";
nvidia-audio-card,name = "NVIDIA Jetson AGX Orin APE";
clocks = <&bpmp_clks TEGRA234_CLK_PLLA>,
<&bpmp_clks TEGRA234_CLK_PLLA_OUT0>,
<&bpmp_clks TEGRA234_CLK_AUD_MCLK>;
clock-names = "pll_a", "pll_a_out0", "extern1";
assigned-clocks = <&bpmp_clks TEGRA234_CLK_AUD_MCLK>;
assigned-clock-parents = <&bpmp_clks TEGRA234_CLK_PLLA_OUT0>;
nvidia-audio-card,widgets =
"Line", "tlv Line In",
"Headphone", "tlv Headphone",
"Microphone", "tlv Mic",
"Speaker", "tlv Int Spk";
nvidia-audio-card,routing =
"tlv Headphone", "tlv LOR",
"tlv Headphone", "tlv LOL",
"tlv Headphone", "tlv HPR",
"tlv Headphone", "tlv HPL",
"tlv Left DAC", "tlv Playback",
"tlv Right DAC", "tlv Playback",
"tlv IN1_L", "tlv Mic",
"tlv IN1_R", "tlv Mic",
"tlv IN2_L", "tlv Mic",
"tlv IN2_R", "tlv Mic",
"tlv IN3_L", "tlv Mic",
"tlv IN3_R", "tlv Mic",
"tlv Capture", "tlv Left ADC",
"tlv Capture", "tlv Right ADC",
"tlv Line In", "tlv Left ADC",
"tlv Line In", "tlv Right ADC";
nvidia-audio-card,mclk-fs = <256>;
status = "okay";
};
hdr40_snd_link_i2s: &i2s2_to_codec {
link-name = "ti-capture";
codec {
sound-dai = <&aic32x4 0>;
prefix = "tlv";
};
};
&i2s2_to_codec {
status = "okay";
link-name = "ti-capture";
format = "dsp_a";
name-prefix = "tlv";
codec {
sound-dai = <&aic32x4 0>;
prefix = "tlv";
};
};
- Detected sound cards:
evk@tegra-ubuntu:~$ cat /proc/asound/cards 0 [HDA ]: tegra-hda - NVIDIA Jetson AGX Orin HDA NVIDIA Jetson AGX Orin HDA at 0x3518000 irq 118 1 [APE ]: tegra-ape - NVIDIA Jetson AGX Orin APE NVIDIA Jetson AGX Orin APE
amixer -c APE cset name="I2S1 Mux" "ADMAIF2"
amixer -c APE cset name="ADMAIF2 Mux" "I2S1"
amixer -c APE cset name="I2S1 Loopback" "on"
evk@tegra-ubuntu:~$ aplay -D hw:APE,1 ~/Downloads/file_example_WAV_10MG.wav & arecord -D hw:APE,1 -f S16_LE -c 2 -r 44100 my.wav -v
[1] 6107
Playing WAVE '/home/evk/Downloads/file_example_WAV_10MG.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Recording WAVE 'my.wav' : StereoSigned 16 bit Little Endian,
Rate 44100 Hz, Stereo
Hardware PCM card 1 'NVIDIA Jetson AGX Orin APE' device 1 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 8192
period_size : 2048
period_time : 46439
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 2048
period_event : 0
start_threshold : 1
stop_threshold : 8192
silence_threshold: 0
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
^CAborted by signal Interrupt...
[1]+ Done aplay -D hw:APE,1 ~/Downloads/file_example_WAV_10MG.wav
evk@tegra-ubuntu:~$
The codec card is detected, but I’m not able to hear any audio output. (only noise) I have followed the forums and implemented the device tree changes. TLV320AIC3204 Driver will support for AGX Orin 64GB SOM?
Could you help identify what might be missing in the setup?
Here is the Dmesg log
dmesg.log (117.8 KB)