[AGX Orin] audio codec RT5640 not working with JetPack 7.2

Hi NV,

I use custom board AGX Orin with Jetpack 7.2.

As my topic, I have a similar issue with the [link].

$ amixer -c APE cset name="CVB-RT SPK MIXL REC MIXL Switch" off
amixer: Cannot find the given element from control sysdefault:1

Provide the below debug logs:

$ sudo dmesg | grep sound
[    8.146566]   No soundcards found.
[   13.373717] input: NVIDIA Jetson AGX Orin HDA HDMI/DP,pcm=3 as /devices/platform/bus@0/3510000.hda/sound/card0/input11
[   13.421233] input: NVIDIA Jetson AGX Orin HDA HDMI/DP,pcm=7 as /devices/platform/bus@0/3510000.hda/sound/card0/input12
[   13.421302] input: NVIDIA Jetson AGX Orin HDA HDMI/DP,pcm=8 as /devices/platform/bus@0/3510000.hda/sound/card0/input13
[   13.421372] input: NVIDIA Jetson AGX Orin HDA HDMI/DP,pcm=9 as /devices/platform/bus@0/3510000.hda/sound/card0/input14
[   15.243084] tegra-audio-graph-card sound: Registered APE graph sound card with DPCM links for AHUB
[   15.249199] tegra-mixer-controls sound:mixer-controls: Begin probe of override control device
[   15.250455] tegra-mixer-controls sound:mixer-controls: Registered override controls for APE sound card

dmesg.txt (119.4 KB)

$ cat /proc/asound/cards
 0 [HDA            ]: tegra-hda - NVIDIA Jetson AGX Orin HDA
                      NVIDIA Jetson AGX Orin HDA at 0x3518000 irq 232
 1 [APE            ]: tegra-ape - NVIDIA Jetson AGX Orin APE
                      NVIDIA-NVIDIAJetsonAGXOrinDeveloperKit-NotSpecified-Jetson
$ cat /sys/kernel/debug/asoc/components
sound
2901500.i2s
2901300.i2s
2901100.i2s
290f000.admaif
2901000.i2s
2904200.dmic
2903300.amx
2902600.sfc
2903b00.adx
2903200.amx
2902400.sfc
2903a00.adx
2908000.processing-engine
2902200.sfc
290a200.mvc
2903100.amx
2903900.adx
290bb00.amixer
2903800.adx
2910000.asrc
2903000.amx
290a000.mvc
2902000.sfc
2900800.ahub
rt5640.8-001c
snd-soc-dummy
snd-soc-dummy
$ sudo i2cdetect -y -r 31e0000.i2c
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

amixer -c APE controls > controls.txt
controls.txt (47.6 KB)

Found an issue where widgets and routing are missing from /proc/device-tree/sound/ on our custom board. They are defined under the sound node in tegra234-p3737-0000+p3701-0000-dynamic.dts and included in OVERLAY_DTB_FILE inside p3737-0000-p3701-0000.conf.

Testing with the same image on the AGX Orin DevKit shows that widgets and routing are present under /proc/device-tree/sound/, meaning CVB-RT parameters can be configured normally using amixer.

Furthermore, our hardware design matches the reference DevKit. I’ve already verified the hardware by flashing Jetpack 6.1, and the audio codec functioned normally, so hardware issues have been ruled out."

Thanks!!

— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —

Based on the provided context, it seems that you are experiencing issues with the audio codec RT5640 on your custom board with JetPack 7.2. The error message “amixer: Cannot find the given element from control sysdefault:1” suggests that the widgets and routing are missing from /proc/device-tree/sound/.

According to the community solution from Topic #330042, the issue might be due to incorrect routing and widgets properties in the device tree file. The solution suggests updating the nvidia-audio-card,widgets and nvidia-audio-card,routing properties in the tegra234-p3737-0000+p3701-0000-dynamic.dts file.

Additionally, the community solution from Topic #313415 mentions that the issue might be related to the missing CVB mixer controls. The solution suggests trying the steps mentioned in the query, including setting specific controls using amixer commands.

To troubleshoot the issue, you can try the following steps:

  1. Verify that the widgets and routing are defined correctly in the device tree file tegra234-p3737-0000+p3701-0000-dynamic.dts.
  2. Check if the CVB mixer controls are present under /proc/device-tree/sound/.
  3. Try setting the specific controls using amixer commands as mentioned in the community solution from Topic #313415.

If you are still facing issues, please provide more details about your setup and configuration, and I’ll be happy to help further.

Note: The provided context does not mention any specific version of JetPack or L4T, so please ensure that you are using the correct version compatible with your setup.

— We support team will also look into your issue to have further suggestions soon. please stay tuned. —

Hi NV,

Also, I found a difference in tegra234-soc-audio-dai-links.dtsi between JetPack 6.1 and JetPack 7.2 BSP. In JetPack 6.1, we wrote a DTBO to reference nvidia-audio-card,dai-link@76 inside it, but JetPack 7.2 no longer has this. Would this discrepancy impact our audio configuration?

Thanks!!

The reason this is not getting applied is that the RT5640 enablement is currently inside the P3737 dynamic overlay:

hardware/nvidia/t23x/nv-public/overlay/tegra234-p3737-0000+p3701-0000-dynamic.dts

That overlay is not applied unconditionally. The RT5640 fragment is guarded by P3737 carrier board IDs:

board_config {
ids = “>=3737-0000-TS4”, “>=3737-0000-RC1”, “>=3737-0000-300”;
};

So if this is a custom carrier board, its board ID/compatible string will not match the P3737 IDs, and the fragment containing the RT5640 node, I2S endpoint, and sound routing will be skipped.

For a custom board, please add the RT5640 changes either directly in the custom board DTS, or create a custom DTBO whose compatible/board_config matches the custom carrier board.

JP7.2 moved to upstream drivers, hence the DT nodes format changes. Refer to Audio Setup and Development — NVIDIA Jetson Linux Developer Guide for details.

Hi @Sheetal.G ,

Thanks for reply,

Or can I modify the tegra234-p3737-0000+p3701-0000-dynamic.dtbo file included in p3737-0000-p3701-0000.conf by commenting out the board_config section, as shown below, to bypass the board configuration check ?

/*board_config {
			ids = ">=3737-0000-TS4", ">=3737-0000-RC1", ">=3737-0000-300";
		};*/

Can I simply comment out the board_config section to bypass the board ID check, instead of creating a separate DTBO file?

Thanks!!

Hi @SamM11,

Thanks for the detailed diagnostic data and the clear question. To help you determine the best approach for your custom board, we need a bit more engineering guidance:

  1. Is commenting out board_config supported? Can you confirm whether modifying the existing tegra234-p3737-0000+p3701-0000-dynamic.dtbo file by commenting out the board_config section is a supported approach, or could it cause unintended side effects on the P3737 board ID check?

  2. Persistence across kernel updates: Will the commented-out approach persist across kernel updates, or is creating a custom DTBO the more maintainable long-term solution?

Once we have clarity on these points, we can recommend the best path forward for your custom board configuration.

Hi NV,

  1. Is commenting out board_config supported? Can you confirm whether modifying the existing tegra234-p3737-0000+p3701-0000-dynamic.dtbo file by commenting out the board_config section is a supported approach, or could it cause unintended side effects on the P3737 board ID check?

→ Based on my testing, I can now see the widgets and routing nodes under /proc/device-tree/sound/, and the audio codec functions work correctly after applying the same amixer settings that were used with JetPack 6.

I also have another question. Since commenting out board_config appears to work and I haven’t observed any issues so far, would you recommend this approach? Are there any potential risks or hidden side effects that I should be aware of?

Thanks!!

Ideally, the overlay file should be intended for that specific board. If it is a custom board, we recommend that users create a board-specific DT overlay file.