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.
kmod-sound-corefor Kernel audio support and ALSA drivers
|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.
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.
In combination with wget it can act as an Internet radio. Find some MP3 stream and try something like:
wget -O - http://184.108.40.206:80/stream/1014 | 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:
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