HD Audio on Orin Dev Kit (J511 header)

We are trying to enable the audio connector on the Orin and were successful for one device using the instructions provided in this post: NVIDIA Jetson Orin Dev Kit -- > Interfacing to the HD Audio header J511 - #6 by atalambedu

However, when we tried the same instructions on another Orin they didn’t work. We have upgrade the system to R35 and the fdtoverlay command doesn’t report any errors or warnings. However, after a reboot, the i2cdetect command still shows 1c and not UU.

What information can we provide to debug this further?

For fdtoverlay, what is the correct path for input and output? Is it

  • /boot/kernel_tegra234-p3701-0000-p3737-0000.dtb, or
  • /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb

We are working directly on the Orin (attaching display, keyboard, and mouse), so we’re also wondering if the instructions change for this setup? The instructions in the linked post distinguish between Host and Target. We also don’t have the Linux_for_Tegra folder, for example.

Thanks!

Hi eliasm,

Output should be placed in /boot on target. Linux_for_Tegra folder will be available on host where you download the kernel sources

From the information provided, you have a codec with RT5640 but the overlaying did not seem to take effect.

After rebooting with overlay, check if the dtbo got applied using below command on both working targets, Below command converts the dtb into dts so that its user readable and can be compared or share the dts on both targets here on forum

dtc -I dtb -O dts -o my-overlay.dts /boot/<relevant main dtb>

relevant main dtb can be found from below o/p from target on boot after flash

dmesg | grep -i dts

Replace dts with dtb to get to know name of the orginal kernel dtb that was applied

Thanks

Thank you for getting back to us quickly. Please find attached the dts files from the two Orin devices as well as some logs from the command lines. In the user readable files, we noticed 4 slightly different addresses (see dts_diff.txt in the zip file). puck4 is the Orin that has working audio, puck13 is the one that is not working yet. We also observed that there were many warnings when running dtc (see attached logs).

Please let us know if you need further information to debug this issue and how to proceed. Thanks!

dts.zip (130.4 KB)

Hi eliasm,

Thanks for the inputs. The codec related nodes have been assigned a different address, but that should not affect the usecase. Anyways you could use flashing same kernel dtb on both the boards once and see if that helps.

If still seeing issue, share the dmesg log on both targets. Further,I see that codec component is failing to register. Please check if rt5640_i2c_probe function in codec driver runs and completes. This function registers the codec

Thanks

Hi atalambedu,

Thanks for getting back to us. We tried to use the dtb on the other board, but that didn’t work. Please find the dmesg for both boards (puck4 has working audio, puck13 does not). I didn’t find any mention of rt5640_i2c_probe in those logs…

dmesg.zip (49.5 KB)

Thanks!

Hi eliasm,

Thanks for the logs. Unfortunately, that did not have a clue for the issue

rt5640_i2c_probe will not be part of those logs as no prints are enabled by default in that function. I suggested you to put debug prints in the codec driver and check what is blocking the codec registration i.e whether the i2c probe is getting called and if its passing the codec registration part in the failing board

Thanks

I was able to get it to run with the following command on yet another Orin device with the following command (note that it’s changing the files in /boot/dtb and not /boot):

sudo fdtoverlay -v -i /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb -o /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb ~/Downloads/tegra234-p3737-audio-codec-rt5640.dtbo

tegra234-p3737-audio-codec-rt5640.dtbo was downloaded from the other thread. Not sure if it matters for this case, but both were devices that had R34 installed using sdkmanager and then updated to R35 using these instructions.

rt5640_i2c_probe will not be part of those logs as no prints are enabled by default in that function. I suggested you to put debug prints in the codec driver and check what is blocking the codec registration i.e whether the i2c probe is getting called and if its passing the codec registration part in the failing board

Can you provide some instructions on how to do that? Is it required to download Linux_for_Tegra with the kernel sources to a host, or can this be done directly on the Orin (i.e., the “target”)?

Thanks!

Hi eliasm,

You need to modify the codec driver to put the print, recompile kernel (yes kernel sources needs to be downloaded to host) and reflash the kernel image and observe the logs

Refer: Kernel Customization — Jetson Linux<br/>Developer Guide 34.1 documentation for Kernel customization

Thanks

Thanks for your help, atalambedu. We were able to get audio to work reliably when applying the overlay on the host and then flash to the Orin (as described in NVIDIA Jetson Orin Dev Kit -- > Interfacing to the HD Audio header J511 - #6 by atalambedu). Directly applying the overlay on the targets flashed without the overlay only worked on some devices, but not all.

Glad to know.

Thanks