Orin NX no APE sound card

Hi, we are using our custom board with orin nx. And want to test rt5640.

I followed the

and here is my custom device tree


{
   bus@0 {	
        /*pin 232 234*/
		i2c@3160000 {		
			rt5640: rt5640@1c {
				status = "okay";
				compatible = "realtek,rt5640";
				reg = <0x1c>;

				clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
				clock-names = "mclk";
				sound-name-prefix = "CVB-RT";

				port {
					rt5640_ep: endpoint {
						remote-endpoint = <&i2s1_dap>;
						mclk-fs = <256>;
					};
				};

			};
		};

   /*ALC5640*/
	tegra_sound_graph: tegra_sound: sound {
		compatible = "nvidia,tegra186-audio-graph-card",
			     "nvidia,tegra186-ape";
		clocks = <&bpmp TEGRA234_CLK_PLLA>,
			 <&bpmp TEGRA234_CLK_PLLA_OUT0>,
			 <&bpmp TEGRA234_CLK_AUD_MCLK>;
		clock-names = "pll_a", "plla_out0", "extern1";
		assigned-clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
		assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLA_OUT0>;

		nvidia-audio-card,name = "NVIDIA Jetson Orin NX APE";

		nvidia-audio-card,widgets =
			"Headphone",	"CVB-RT Headphone Jack",
			"Microphone",	"CVB-RT Mic Jack",
			"Speaker",	    "CVB-RT Int Spk",
			"Microphone",	"CVB-RT Int Mic";

		nvidia-audio-card,routing =
			"CVB-RT Headphone Jack", "CVB-RT HPOL",
			"CVB-RT Headphone Jack", "CVB-RT HPOR",
			"CVB-RT IN1P",		     "CVB-RT Mic Jack",
			"CVB-RT IN2P",		     "CVB-RT Mic Jack",
			"CVB-RT IN1P",		     "CVB-RT Int Mic",
			"CVB-RT IN2P",		     "CVB-RT Int Mic",
			"CVB-RT Int Spk",	     "CVB-RT SPOLP",
			"CVB-RT Int Spk",	     "CVB-RT SPORP",
			"CVB-RT Line Out",	     "CVB-RT LOUTL",
			"CVB-RT Line Out",	     "CVB-RT LOUTR";
	};
};

&i2s1_to_codec { 
	link-name = "rt5640-playback";
	bitclock-master;
    frame-master;
	codec {
		sound-dai = <&rt5640 0>;
		prefix = "CVB-RT";
	};
};


/* Audio graph related bindings */
&i2s1_dap {
	//bitclock-master;
	//frame-master;
	remote-endpoint = <&rt5640_ep>;
};

And when system boot I can’t find the APE card


uis.c.root@uis:~$ cat /proc/asound/cards
 0 [V1             ]: USB-Audio - HK DXMIC V1
                      CF-IC HK DXMIC V1 at usb-3610000.usb-2.1.1, full speed
 1 [HDA            ]: tegra-hda - NVIDIA Jetson Orin NX HDA
                      NVIDIA Jetson Orin NX HDA at 0x3518000 irq 120

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

Based on the provided context, I’ll provide a comprehensive answer to your question.

The Jetson AGX Orin and Jetson AGX Xavier have an audio panel header (J511) that supports Intel’s HD front panel audio connector. The header is connected internally to the RT5640 codec on Jetson AGX Orin and to the RT5658 codec on Jetson AGX Xavier.

However, you are using a custom board with the Orin NX module, and you want to test the RT5640 codec. You have followed the documentation on NVIDIA’s website, specifically the “Audio Setup and Development” topic, which covers the ASoC driver, audio hub hardware, USB audio, and other matters related to audio on NVIDIA Jetson devices.

Despite this, you are unable to find the APE (Audio Processing Engine) card when the system boots. This suggests that there might be an issue with your custom device tree configuration.

To troubleshoot this issue, I recommend checking the following:

  1. Device Tree Configuration: Verify that your custom device tree configuration is correct and matches the documentation provided by NVIDIA. Make sure that the RT5640 codec is properly configured and enabled in the device tree.
  2. Kernel Version: Ensure that you are using a compatible kernel version that supports the RT5640 codec. You can check the kernel version by running the command uname -r in the terminal.
  3. ASoC Driver: Verify that the ASoC driver is properly loaded and configured. You can check the kernel logs to see if there are any errors related to the ASoC driver.
  4. Audio Hub Hardware: Ensure that the audio hub hardware is properly configured and enabled. You can check the kernel logs to see if there are any errors related to the audio hub hardware.

In comparison to the Jetson AGX Orin and Jetson AGX Xavier, the Orin NX module has a similar audio architecture, but with some differences. The Orin NX module uses the RT5640 codec, which is the same as the Jetson AGX Orin. However, the Orin NX module has a different device tree configuration and kernel version, which might require additional configuration and setup.

To resolve the issue, you can try the following:

  1. Update the Device Tree Configuration: Update your custom device tree configuration to match the documentation provided by NVIDIA.
  2. Update the Kernel Version: Update the kernel version to a compatible version that supports the RT5640 codec.
  3. Load the ASoC Driver: Load the ASoC driver manually using the command modprobe snd-soc-rt5640 (assuming that the driver is not already loaded).
  4. Verify the Audio Hub Hardware: Verify that the audio hub hardware is properly configured and enabled.

If you are still unable to find the APE card, you can try checking the kernel logs for any errors related to the audio setup and development. You can also try contacting NVIDIA support for further assistance.

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

I fix it by modified device tree