I’m new to Torizon OS and Toradex products in general.
I’m trying to configure my verdin-am62 SoM running Torizon 7.2.0, that uses a NAU8822 codec.
The SoM shows an installed sound card driver “snd_soc_nau8822” after running "lsmod | grep ‘^snd’.
I believe I need a Device Tree Overlay to “tie” the driver to the actual hardware. I’ve downloaded the overlays provided here: GitHub - toradex/device-trees: Device tree, device tree overlays and related header files. Used by TorizonCore Builder., but none match the NAU8822 codec I have on my board. Most of the support is for the I.MX8M.
Specifically, I’m looking for “verdin-am62_nau8822-btl_overlay.dts” which I can’t find anywhere. Any help would be greatly appreciated.
Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Hello! Welcome to the Toradex community—happy to help you get started with Torizon OS and your Verdin AM62 SoM.
For Torizon OS 7.2.0 on the Verdin AM62, the device tree overlays are maintained on the toradex_6.6-2.2.x-imx
branch, which is newer than the one you referenced (toradex_5.4-2.3.x-imx
). Specifically, the NAU8822 BTL audio overlay you’re looking for is named verdin-am62_nau8822-btl_overlay.dts
. This overlay is available as part of the overlays for Verdin AM62 starting from OS version 6.4.0.
You can find the overlay file and the recommended overlays by:
- Cloning the correct repository and branch with the following commands:
git clone -b toradex_6.6-2.2.x-imx git://git.toradex.com/device-tree-overlays.git device-trees
- After cloning, look inside the
overlays
directory forverdin-am62_nau8822-btl_overlay.dts
.
Further information and how to apply such overlays in Torizon using TorizonCore Builder are available in these guides:
- List of Device Tree Overlays for Peripherals and Add-on Products
- Pre-built Device Tree Overlays for Peripherals and Add-on Products
If you need a step-by-step guide to adding an overlay using TorizonCore Builder, please let me know!
Best regards, Toradex AI Assistant.
I didn’t find any verdin-am62… files in here: git clone -b toradex_6.6-2.2.x-imx git://git.toradex.com/device-tree-overlays.git device-trees
Hey Richard,
You’ll find the AM62 overlay branch here: https://git.toradex.com/cgit/device-tree-overlays.git/tree/overlays?h=toradex_ti-linux-6.6.y
It’s the toradex_ti_linux-6.6.y branch_,_ the one you have linked will be for NXP based modules.
Eric Singer
Toradex
Hi Eric,
I was able to find this overlay file: “verdin-am62-btl_overlay.dtbo” on the SoM here:
boot/ostree/torizon-ec9ba211477b683a4…./dtb/overlays/
I added this file to the “overlays.txt” in /boot/ostree/torizon-ec9ba211477b683a4…./dtb/overlays/
Like this: fdt_overlays=verdin-am62-btl_overlay.dtbo
Is this correct?
Additionally, I found a loaded sound card: snd_soc_nau8822
after executing: lsmod | grep nau8822
however, running /proc/asound/cards produces “— no soundcards --” I assume this is because ALSA is not installed on my verdin-am62 SoM?
Ultimately, I’d like to play sound (I2S) using the Mallow X19 connector, which exposes the I2S clock and data pins.
Hey @ramaral1090,
It sounds correct, you may need to sync/reboot in order to see the overlays take place. As described here: Device Tree Overlays on Torizon | Toradex Developer Center
The Mallow does have the I2S digital audio interface on X19, but the sound card is most likely because you have the default carrier board device tree (for verdin development board). Can you link the output from sudo tdx-info
(from on the module). There isn’t a NAU8822 codec on the mallow board. So this is why I believe this.
If you have an external audio codec, you can see our guide with ASLA, which is installed in the base Torizon OS image.
-Eric
This is the output of “sudo tdx-info”:
Software summary
Bootloader: U-Boot
Kernel version: 6.6.84-7.2.0-g8bf00740f043 #1-Torizon SMP PREEMPT Thu Mar 27 16:42:10 UTC 2025
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/ec9ba211477b683a44806a237c2aef7ced86fcf9aaf09a12fbbb778532976ed6/0
Distro name: NAME=“Torizon OS”
Distro version: VERSION_ID=7.2.0-build.13
Distro variant: VARIANT=“Docker”
Hostname: verdin-am62-15600883
Hardware info
HW model: Toradex Verdin AM62 on Verdin Development Board
Toradex version: 0074 V1.2A
Serial number: 15600883
Processor arch: aarch64
Don’t know why everything is in bold, sorry. If my carrier board does not have a NAU8822 codec what does it have?
Hey @ramaral1090,
This line here tells me my thinking is correct. The software believes you are working from the Verdin Development board, rather than the mallow.
The way to correct this is to make a customized Torizon OS Image that references the mallow device tree file. This is done via torizon-core builder tool, which is a stand alone tool (CLI) or you do preform as a project template in VSCode.
We have quite a few documents on this torizoncore-builder tool, here is the ‘starting point’ doc.
I was hoping not to have to re-image the OS and instead use Device Tree overlays like we did for the display.
I was looking at the schematic diagram for the Mallow carrier board “Mallow V1.1 PDF Schematics”, could explain the part labelled “X1P” on sheet 16. What is it and what does it do.
Hey @ramaral1090,
Device tree overlays are a bit different than the underlying device tree file. The largest difference is overlays get applied after the kernel boots. So creating the customized OS with the correct device tree file is needed.
Page 16 on the mallow datasheet shows me a table for the connector X17, can you send a screenshot of what you are looking at? “X1” is usually a reference to the Modules edge connector with all of the pins.
-Eric
This is the schematic I’m using:
Mallow V1.1 PDF Schematics.PDF (2.8 MB)
Hey @ramaral1090,
Ah yeah, the full edge connector on the module is the “X1” connector, the 3rd character is just a reference to a subset of the X1.
-Eric
Hello Eric,
Just to be clear, my verdin-am62 SoM is plugged into a “simple” or non-Development type carrier Mallow board. This board does not have a codec or audio jacks.
It does expose the I2S_xxx pins from one the three internal McASP (Multichannel Audio Serial Port) SoC within the TI am62 processor. At least this is my understanding, more question on this towards the end.
I created a simple C++ application in VSCode using Torizon IDE Extension and am able to run it locally and on the verdin-am62 SoM, including remote debugging.
I then added the contents of the sample audio app (How to play audio on Torizon OS using Alsa and C/C++ | Toradex Developer Center) to this simple app and modified the torizonPackages.json file to add support for ALSA audio:
{
“buildDeps”: ,
“prodRuntimeDeps”: [“libasound2”, “libasound-dev”, “libpulse0”, “libpulse-dev”, “libasound2-dev”,“alsa-utils”],
“devRuntimeDeps”: [“libasound2”, “libasound-dev”, “libpulse0”, “libpulse-dev”, “libasound2-dev”, “alsa-utils”]
}
as well as the Makefile:
tool macros
CC := g++
CCFLAGS := -Iincludes/
DBGFLAGS := -g
LDFLAGS := -llibasound2-dev
CCOBJFLAGS := $(CCFLAGS) -c
ARCH :=
path macros
BIN_PATH := build-$(ARCH)/bin
OBJ_PATH := build-$(ARCH)/obj
SRC_PATH := src
DBG_PATH := build-$(ARCH)/debug
compile macros
TARGET_NAME := alsaexample1
TARGET := $(BIN_PATH)/$(TARGET_NAME)
TARGET_DEBUG := $(DBG_PATH)/$(TARGET_NAME)
src files & obj files
SRC := $(foreach x, $(SRC_PATH), $(wildcard $(addprefix $(x)/,.c)))
OBJ := $(addprefix $(OBJ_PATH)/, $(addsuffix .o, $(notdir $(basename $(SRC)))))
OBJ_DEBUG := $(addprefix $(DBG_PATH)/, $(addsuffix .o, $(notdir $(basename $(SRC)))))
clean files list
DISTCLEAN_LIST := $(OBJ) \
$(OBJ_DEBUG)
CLEAN_LIST := $(TARGET) \
$(TARGET_DEBUG) \
$(DISTCLEAN_LIST)
default rule
default: makedir all
non-phony targets
$(TARGET): $(OBJ)
$(CC) $(CCFLAGS) -o $@ $(OBJ) $(LDFLAGS)
$(OBJ_PATH)/%.o: $(SRC_PATH)/%.c*
$(CC) $(CCOBJFLAGS) -o $@ $<
$(DBG_PATH)/%.o: $(SRC_PATH)/%.c*
$(CC) $(CCOBJFLAGS) $(DBGFLAGS) -o $@ $<
$(TARGET_DEBUG): $(OBJ_DEBUG)
$(CC) $(CCFLAGS) $(DBGFLAGS) $(OBJ_DEBUG) -o $@ $(LDFLAGS)
phony rules
.PHONY: makedir
makedir:
@mkdir -p $(BIN_PATH) $(OBJ_PATH) $(DBG_PATH)
.PHONY: all
all: $(TARGET)
.PHONY: debug
debug: $(TARGET_DEBUG)
.PHONY: clean
clean:
@echo CLEAN $(CLEAN_LIST)
@rm -f $(CLEAN_LIST)
.PHONY: distclean
distclean:
@echo CLEAN $(CLEAN_LIST)
@rm -f $(DISTCLEAN_LIST)
The build fails with:
aarch64-linux-gnu-g++ -Iincludes/ -g build-arm64/debug/main.o -o build-arm64/debug/alsaexample1 -llibasound2-dev
/usr/lib/gcc-cross/aarch64-linux-gnu/12/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -llibasound2-dev: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:47: build-arm64/debug/alsaexample1] Error 1
Because it can’t find the arm64 ALSA files. Where are these files arm64 ALSA files? I can find the x86 ALSA files on the Mint Linux host PC I’m using but not the arm64 ones.
It’s my understanding that these ALSA files are “baked into” the docker container created during the build process so the application can run on the verdin-am62 SoM.
Also, given the fact that three McASPs exist within the TI am62, which one is used or is the ALSA configured somehow to use a specific one or does it default to the “first” one?
Keep in mind, I’m only interested in generating “digital” audio from the I2S pins from the X19 connector on the Mallow carrier board. We have our own codec to convert the digital audio to analog later.
Thanks!
Software summary
Bootloader: U-Boot
Kernel version: 6.6.84-7.2.0-g8bf00740f043 #1-Torizon SMP PREEMPT Thu Mar 27 16:42:10 UTC 2025
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/ec9ba211477b683a44806a237c2aef7ced86fcf9aaf09a12fbbb778532976ed6/0
Distro name: NAME=“Torizon OS”
Distro version: VERSION_ID=7.2.0-build.13
Distro variant: VARIANT=“Docker”
Hostname: verdin-am62-15600883
Hardware info
HW model: Toradex Verdin AM62 on Verdin Development Board
Toradex version: 0074 V1.2A
Serial number: 15600883
Processor arch: aarch64
Hey @ramaral1090,
ALSA being “in the OS” refers to the server side ALSA kernel drivers. From our docs, " It works based on a client/server pattern, where the server side is the ALSA driver inside the Linux kernel space. For more information, see the [ALSA documentation](https://alsa.opensrc.org/)."
You are correct, you will need to run the docker container with the client side ALSA programs, as described in the guide.
I think the step you may be missing is the arm emulation. The guide has some mention of this, and a guide link here:
-Eric
I’m following the steps here: Loading Toradex Easy Installer | Toradex Developer Center
To install a new Torizon Image.
C:\torizon-image\Verdin-AM62_ToradexEasyInstaller_7.3.0+build.7\Verdin-AM62_ToradexEasyInstaller_7.3.0+build.7
My verdin is in Recovery Mode. I’m running the recovery-windows.bat file and get this:
C:\torizon-image\Verdin-AM62_ToradexEasyInstaller_7.3.0+build.7\Verdin-AM62_ToradexEasyInstaller_7.3.0+build.7>recovery-windows.bat
Downloading Toradex Easy Installer…
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Waiting for device, exit with ctrl-C
Opening DFU capable USB device…
Device ID 30c9:00c1
Run-Time device DFU version 0110
Claiming USB DFU (Run-Time) Interface…
Setting Alternate Interface zero…
Determining device status…
DFU state(0) = appIDLE, status(14) = Something went wrong, but the device does not know what it was
Device really in Run-Time Mode, send DFU detach request…
error detaching
Device will detach and reattach…
Lost device after RESET?
recovery\dd: opening `SocId.bin’: No such file or directory
FC: cannot open SOCTYPE.BIN - No such file or folder
Could Not Find C:\torizon-image\Verdin-AM62_ToradexEasyInstaller_7.3.0+build.7\Verdin-AM62_ToradexEasyInstaller_7.3.0+build.7\SocId.bin
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Waiting for device, exit with ctrl-C
^CTerminate batch job (Y/N)? y
Hey @ramaral1090,
At the end of the page you have linked there is a troubling shooting guide for AM62 on windows. Can you try this solution?
“(AM62-only) Cannot Open DFU Device”
-Eric
Step three of “(AM62-only) Cannot Open DFU Device” states the Device Manager should display “AM62x DFU”. The only thing I see is a new Serial Port when I plug the serial cable from the board to my Windows 11 USB port.
If I pretend the Serial Port is “AM62x DFU” and try to update the driver I get a list of twelve (12) manufactures, the default for the serial port is FTDI. The troubleshooting instructions say to look for “winUSBDevice”, so I tried looking for this in each of the twelve manufactures and did not find it.
Hey @ramaral1090,
You may need to use the tool Zadig to install the WinUSB Driver.
Here is a link to the Zadig tool [You can also find this link on the document page]
-Eric