User Tools

Site Tools

USB Audio Support

As long as you have the necessary hardware connected, OpenWrt can play audio, as can any other GNU/Linux distribution. Any USB Audio device supported by GNU/Linux should work with OpenWrt as well. But, because of it's lightbuild structure OpenWrt does not come with audio support. You have to install that afterwards.

Any USB sound card supported by Linux can work with OpenWrt. Many USB sound cards comply with the USB Audio Class standard and use the generic snd-usb-audio driver. Sometimes sound card manufacturers will explicitly say their devices are class compliant, but more commonly they do not. You can figure out whether a device is class compliant if it is marketed for use with iOS, as iOS only supports class compliant sound cards, or if it is marketed as working with Mac OS X but there is no driver to download for Mac OS X. (Windows partially supports the USB Audio Class standard, but often manufacturers provide a Windows driver for ASIO support.) If a device is not class compliant, you may be able to find whether it works with Linux by checking the ALSA compatibility matrix, but this is often very out of date.

You could get any cheap USB sound card for use with OpenWrt, but the quality of sound cards varies as widely as their price. You generally get what you pay for; expensive sound cards do sound much better than cheap ones.

For an overview of the different software systems for sound on Linux, see How it works: Linux audio explained.



  1. utilize a USB sound card with GNU/Linux support, see the Notes on that
  2. »You must have enabled the ALSA support in the kernel«
  3. install the packages kmod-usb-audio and kmod-sound-core for Kernel audio support and ALSA drivers
  4. plug the USB sound card of your choice into the USB port of your OpenWrt router

Required Packages

Server (OpenWrt)

Name Size Description
kmod-usb-audio 51909 Kernel support for USB audio devices
kmod-sound-core 135315 Kernel modules for sound support
kmod-sound-cs5535audio 56695 support for the integrated AC97 sound device on olpc
kmod-sound-i8x0 66521 Support for the integrated AC97 sound device on motherboards with Intel/SiS/nVidia/AMD chipsets, or ALi chipsets using the M5455 Audio Controller.
kmod-sound-soc-core 25290 SoC sound support
usbutils 186470 package includes 'lsusb', if you want to check your usb-device is properly detected


There is nothing much to configure, but if you need to, you could use the package alsa-utils to do that.



Once your sound card is up and running, you need some programs to play the sound:

Name Version Dependencies Size Description
madplay 0.15.2b-3 libid3tag libmad 34047 MAD is an MPEG audio decoder. It currently only supports the MPEG 1 standard, but fully implements all three audio layers (Layer I, Layer II, and Layer III, the latter often colloquially known as MP3.). There is also full support for ID3 tags.
mpd 0.15.8-6 alsa-lib, libaudiofile, libfaad2, libmad, glib2, libcurl, libflac, libmms, libpthread, libshout, libvorbis, libvorbisidec, libid3tag 114565 MPD is a music player supporting flac, mp3 and ogg files. It is typically controlled over a network using one of it's many clients including mpc(console), gmpc(gnome), phpmp(php), etc…
sox 14.0.1-3 lame-lib, libmad, libid3tag, libvorbis, libvorbisidec, libgsm 202816 SoX is a command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files during the conversion. As an added bonus, SoX can play and record audio files on several unix-style platforms.


MPD (Music Player Daemon) is a small music player with support for FLAC, MP3 and OGG files. It is a daemon process which is typically controlled by a client such as gmpc running on another desktop machine. For more information:

MPD is configured in the file /etc/mpd.conf. The default config file probably won't work as-is, but it should have enough comments to be edited easily. FIXME The MPD package does not currently contain a script to start MPD at boot. Check other HowTos to easily write one.


In combination with wget it can act as an Internet radio. Find some MP3 stream and try something like:

wget -O - | madplay -


sox -q $1 -t ossdsp /dev/sound/dsp



If your USB sound card has a microphone input, you can use it to connect an infrared receiver module, and use any remote to send commands to the router.


Generic Alsa init:

alsactl init

Required for AC97 Sound in Virtual Box.

Unmute sound with:

amixer sset Master unmute

Test sounds with:

speaker-test -Dplug:front -c2 -tsine -f440
speaker-test -Dplug:front -c2 -twav -f440
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/guide-user/hardware/audio/ · Last modified: 2018/05/01 10:12 by tmomas