Jetson Nano I2S Audio: How to Set Up the Raspiaudio Audio+
To set up the Raspiaudio Audio+ on a Jetson Nano, you enable the I2S4 pins in jetson-io, force those pins into audio mode at every boot, and route I2S4 to the sound driver. The Jetson Nano developer kit is built for AI and robotics, but it has no analog audio output. The Raspiaudio Audio+ board is a sound card designed for the Raspberry Pi that also fits the Nano's 40-pin header.
This guide covers every step on the Jetson Nano B02 (2019). At the end, you'll hear audio from the Audio+ headphone jack.
Before You Start: Jetson Nano Model and Audio+ Compatibility
Set up your Jetson Nano first. If you haven't, follow NVIDIA's Jetson Nano setup guide. You should be able to boot the Nano to the desktop with a monitor and keyboard.
What you'll need: a Jetson Nano B02 and a Raspiaudio Audio+ board. The Audio+ 40-pin connector fits directly onto the Nano's header. Push it down firmly so every pin makes contact.
This guide was tested on the Jetson Nano B02 developer kit (2019), also called the P3450 (module P3448 on carrier board P3449). You can recognize the Jetson Nano by its passive heatsink (more recent Jetson models use fans). The B02 also has a row of pins that sticks out like a little "bay", which the older A01 model lacks.
If you have the older A01 model or a more recent Jetson, use this guide as a reference only, since the steps won't apply directly. You can share your tips in the Raspiaudio community.
Other I2S DAC boards: the Audio+ and similar Raspberry Pi DACs have no control interface, only an I2S interface. As explained in this NVIDIA forum thread on Raspberry Pi I2S sound cards for the Jetson Nano, such boards should work once the pins are configured. So the steps below are a good starting point for other I2S DACs of this kind on the Nano B02.
Special thanks to jas-mx for the NVIDIA forum post on enabling I2S audio output on the 40-pin connector that inspired this guide.
Step 1: Enable the I2S4 Audio Pins with jetson-io
By default, the Jetson Nano doesn't use those header pins for audio. Boot the Nano with a monitor and keyboard, open a terminal, and run:
sudo /opt/nvidia/jetson-io/jetson-io.py
This opens a menu-based tool:
- Use the arrow keys (up/down) to highlight "Configure Jetson 40pin Header" and press Enter
- Select "Configure header pins manually" and press Enter
- In the list of checkboxes, find "i2s4" (pins 12, 35, 38, 40) and "audio_mclk" (pin 7). Press Space on each one to mark it with an asterisk [*].
- Select "Back"
- Select "Save pin changes"
- Select "Save and reboot to reconfigure pins"
The Jetson Nano restarts. The tool writes a custom device tree (DTB) that assigns those pins to audio, saved at /boot/kernel_tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb.
Step 2: Check That the Pins Are in I2S Mode
After the reboot, check the pin mode:
sudo cat /sys/kernel/debug/tegra_gpio | grep "J:"
You should see: J: 2:1 00 00 00 00 00 00 000000
If you see "f0" anywhere (like "f0 00 00"), the fix below is required.
"00" means the pins are in special function (SFIO) mode for I2S audio. "f0" means they're stuck in GPIO mode.
Step 3: Fix the Pins with a systemd Service (if Needed)
On many B02 boards, the pins don't switch to audio mode. This command fixes it:
sudo busybox devmem 0x6000d204 32 0
It forces the pins into the right mode, but they go back to GPIO mode when you restart. To apply the fix at every boot, create a systemd service:
sudo tee /etc/systemd/system/fix-i2s4-pins.service <<EOF
[Unit]
Description=Fix I2S4 Pinmux for Jetson Nano
After=local-fs.target
[Service]
Type=oneshot
ExecStart=/bin/busybox devmem 0x6000d204 32 0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
This startup service writes to the GPIO configuration register 0x6000d204, which forces the Port J pins into SFIO mode for I2S4.
Enable and start the service:
sudo systemctl enable fix-i2s4-pins
sudo systemctl start fix-i2s4-pins
Both commands should return no errors. If you see "Failed to start fix-i2s4-pins.service: Unit not found," the service file wasn't created correctly. Check the logs:
sudo journalctl -u fix-i2s4-pins
Step 4: Route I2S4 to the Sound Driver
Connect the I2S4 interface to the audio system:
amixer -c tegrasndt210ref cset name='I2S4 Mux' ADMAIF1
The output should end with values=1. If you get an "Invalid card" error, the audio driver isn't loaded yet. Reboot and try again.
This routes the ADMAIF1 interface (where the sound driver sends audio) to I2S4, which connects the driver to the hardware pins.
Step 5: Play a Test Tone
This command sends a 48 kHz, 16-bit stereo sine wave through the I2S4 interface:
speaker-test -D hw:tegrasndt210ref,0 -r 48000 -c 2 -F S16_LE -t sine
You should hear a continuous tone from your headphones or speakers. Press Ctrl+C to stop it.
How to Confirm the Audio+ Board Is Working
If you heard the tone, the Raspiaudio Audio+ works on your Jetson Nano B02. The pin fix survives reboots thanks to the service from Step 3.
Extra: How to Flash Your Jetson Nano with the Custom DTB
The method above works for one device. If you need to flash several Jetson Nano boards for production, going through the jetson-io menus on each one gets tedious. Instead, flash each board with the DTB (Device Tree Blob) file created in Step 1, so the pin configuration is already in place:
/boot/kernel_tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb
Copy this file to your computer. When you reflash, copy it back to the /boot/ folder before the first boot.
This DTB file only matches the carrier board revision it was created on. The revision is at the end of the filename (here, b00). Flashing a DTB from a different revision can break the boot partition, and you may then need to reflash everything from a host computer.
The easiest way to flash a Jetson Nano is from a Linux host computer with either NVIDIA SDK Manager or the NVIDIA Jetson Linux Driver Package (L4T). I recommend L4T because it works on more Linux distributions. The full procedure is in this NVIDIA forum thread on manually downloading and flashing L4T. Here's the short version.
Download L4T from the NVIDIA Jetson Linux archive. For the Jetson Nano, use the Jetson Linux 32.7.x series, not a newer JetPack branch. On the release page, download the Driver Package (BSP) and the Sample Root Filesystem. Extract the driver package without sudo, then extract the sample root filesystem with sudo into Linux_for_Tegra/rootfs/.
Then, from the Linux_for_Tegra folder, apply the NVIDIA binaries:
sudo ./apply_binaries.sh
Next, connect the Jetson Nano to your host computer via micro USB. The Nano must be powered by a separate 5V power supply.
Here's an example command that flashes the Jetson Nano with your custom DTB file. Run it on the host computer, after copying the custom DTB file from the Nano to the host. Replace the path with yours.
sudo ./flash.sh -k DTB
-d /path/to/your/file/kernel_tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb
jetson-nano-devkit mmcblk1p1
To flash, you may need to put the Jetson Nano into Recovery Mode:
- Power the Jetson Nano from a 5V power supply (not via micro USB).
- Connect the "FC RCV" (force recovery) pin to a "GND" pin with a jumper wire, a paperclip, or a small screwdriver.
- Connect the "SYS_RST" (system reset) pin to a "GND" pin to reboot the Jetson Nano.
- Connect the Nano to your host computer via micro USB.
Check the connection on your host computer with:
lsusb | grep -i nvidia
After flashing, you still need to add the systemd service from Step 3 so the pins are set correctly at every boot.
Related Guides
Once the board plays sound, these guides cover neural audio projects for small single-board computers:
- RAVE model by IRCAM: its lightweight "raspberry" configuration and the nn~ external target embedded boards for portable installations.
- Free neural network guitar plugins: ToobAmp and Stompbox run neural amp models on Raspberry Pi pedal builds.
- DDSP by Google Magenta: includes Open NSynth Super, a neural synth built on a Raspberry Pi.