snd_usb_audio needed

I need to use this alsa module but is not present in the kernel. I tried installing alsa by apt but isn’t actually working. Any trobleshoot?

Which release are you using (e.g., “head -n 1 /etc/nv_tegra_release”)?

On your running Jetson what do you see from:

zcat /proc/config.gz | grep -i snd_usb_audio

My release is:

R28 (release), REVISION: 1.0, GCID: 9379712, BOARD: t210ref, EABI: aarch64, DATE: Thu Jul 20 07:45:59 UTC 2017

and that’s the output
nvidia@tegra-ubuntu:~$ zcat /proc/config.gz | grep -i snd_usb_audio


That means your kernel has a driver available, but it isn’t enabled. You’d have to build the kernel module and install that. Many parts of this are exactly the same even for a desktop PC.

One option is to just flash the newer release R28.2…this has the module in it. If you don’t want to deal with kernel compiles, then this is a very good option.

Once you’ve set up for building a kernel and have a list of the basic commands to go through it isn’t nearly as difficult as this will sound. Much of this is a recipe where the very few custom steps actually occupy most of the explanation, e.g., getting source, once done, doesn’t need to occur again. A saved list of setting up steps can be used via copy and paste. You can always ask questions at any step which needs more information.

If you do want to build your own kernel (or in this case kernel module), then the first thing you’ll need is the source. If you look in the driver package (which JetPack can download, though it might be less straight-forward) and find “” (this will be in the “Linux_for_Tegra/” subdirectory). This file can be copied anywhere…even to the Jetson itself if you want to build natively on the Jetson. Running this will download the source and create a subdirectory (named “sources/”) with what you need. Assuming R28.1, then this would be an example:

./ -k tegra-l4t-r28.1

If you upgrade to R28.2, then this would apply:

./ -k tegra-l4t-r28.<b>2</b>

The official documentation for this release has cross compile information for the case of using the PC to build for the Jetson. Mostly this is the same as directly on the Jetson, except the Jetson native compile has fewer setup steps and does not require a cross compiler.

You would probably need to log in for some of this, but the R28.1 downloads are at:

R28.2 is probably a better option unless you have a need to stick to R28.1:

Here’s an example of my build steps for R28.1 natively on the TX2. This assumes you copied to “/usr/local/src/” and have used a combination of chmod/chown to make this directory writeable to user “ubuntu” or user “nvidia” (you could just do this as root…it isn’t recommended):

cd /usr/local/src

./ -k tegra-l4t-r28.2

export SRC=/usr/local/src/sources/kernel/kernel-4.4
export STAGE=/usr/local/src/build
export TEGRA_KERNEL_OUT=${STAGE}/kernel
export TEGRA_MODULES_OUT=${STAGE}/modules
export TEGRA_FIRMWARE_OUT=${STAGE}/firmware

rm -Rf ${STAGE:-/usr/local/src/build}/*
mkdir ${STAGE:-/usr/local/src/build}/kernel
mkdir ${STAGE:-/usr/local/src/build}/modules
mkdir ${STAGE:-/usr/local/src/build}/firmware
cp /proc/config.gz ${STAGE:-/usr/local/src/build}/
gunzip ${STAGE:-/usr/local/src/build}/config.gz
mv ${STAGE:-/usr/local/src/build}/config ${STAGE:-/usr/local/src/build}/config-$(uname -r)

…note that you will need to set CONFIG_LOCALVERSION in the “.config” file…probably to “-tegra” to match the current suffix you see from the output of the command “uname -r”.

You’ll want to install package libncurses5-devel (some of the graphical config utilities use this):

sudo apt-get install libncurses5-devel

You’ll need to edit this configuration via something like “make nconfig” to add the desired CONFIG_SND_USB_AUDIO as a module. Much of the above regarding “/proc/config.gz” is simply to get a starting configuration which is an exact match of the running system (other than the CONFIG_LOCALVERSION…you always have to edit that).

You can test build like this as much as you like…it doesn’t hurt anything because it doesn’t actually install a kernel or modules.

Actual build commands would be done from the subdirectory which is the root of the kernel source. In this particular example where was run from “/usr/local/src/” there will now exist directory “/usr/local/src/sources/kernel/kernel-4.4/”. My example above set $SRC to this so for this case you could “cd $SRC” to get there.

If you want to max out the Jetson’s performance before a build run (with this build time is far faster than what you’d ever expect from an embedded system):

sudo nvpmodel -m0
sudo ~ubuntu/

Once there you could do something like this:

make O=$TEGRA_KERNEL_OUT nconfig
make -j6 O=$TEGRA_KERNEL_OUT Image
make -j6 O=$TEGRA_KERNEL_OUT modules

The module would be found somewhere in $TEGRA_MODULES_OUT (e.g., “cd $TEGRA_MODULES_OUT”, then look around for the relevant module).

Thank you very much.
I solved the problems.