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. If you are new with Linux, you should read the Notes.
- utilize a USB sound card with GNU/Linux support, see the Notes on that
- »You must have enabled the ALSA support in the kernel«
- install usb.essentials
- install the packages
kmod-sound-corefor Kernel audio support and ALSA drivers
- plug the USB sound card of your choice into the USB port of your OpenWrt router
|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 probably detected|
There is nothing much to configure, but if you need to, you could use the package
alsa-utils to do that.
A diploma thesis (in German) describes in detail: http://neophob.com/serendipity/index.php?/archives/149-Diplomarbeit-Embedded-Linux-German.html
Once your sound card is up and running, you need some programs to play the sound:
|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: http://mpd.wikia.com
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. The MPD package does not currently contain a script to start MPD at boot. Check other HowTos to easily write one.
- Here is some documentation about an old and very complicated installation of mpd. Most stuff isn't necessary any longer, and much is optional. But you could milk that article for help not provided here.
In combination with wget it can act as an Internet radio. Find some MP3 stream and try something like:
wget -O - http://18.104.22.168:80/stream/1014 | madplay -
sox -q $1 -t ossdsp /dev/sound/dsp
- what Open Sound System is in addition.
- then GStreamer is again something different.
- You may find additional inspiration or some help at this FOSS project: http://www.rockbox.org/.
- always check the Advanced Linux Sound Architecture Homepage
- KLANG - Kernel Level Audio Next Generation is not even mainlined yet, so no OpenWrt support
Buy an USB sound card with excellent Linux support. It does not have to be expensive, but it's Linux drivers need to be mature and stable. You do not want some basic drivers, you want the best FOSS drivers available. You find help here:
- ALSA ← this Wiki needs some major overhaul
- The safest bet is to have some really competent friends, tell you which drivers are fully developed and exhaust the hardware.
doc/howto/usb.audio.txt · Last modified: 2012/08/08 10:20 by orca