Archive

Sound On Linux

Sound On Linux

”A 10 second overview…”

All good things in Linux / Unix are modular in design offering the end user considerable choice.

Hardware

In the kernel there is a module to drive the hardware interface to the sound card, and a generic sound API that other applications can talk to. There are two main interfaces, OSS for kernels 2.4.x and older, and ALSA for 2.4.x and later kernels. In 2.6.X kernels, ALSA is the default, deprecating OSS support.

Middlelayers

If you are using an OSS driver, then you may optionally use a software multiplexer to mix sounds from different sources at the same time, and send them to the sound system. If you are running ALSA then it is capable of doing this directly, and a sound multiplexer is not required. Popular middlelayers offering multiplexing and other features are the KDE analog realtime synthesizer (aRts) and the more Gnomeish Enlightement Sound Daemon (ESD) (Although it should be pointed out that almost all sound daemons are complete rubbish and rarely do what they’re supposed to.)

Media Engine

The engine is the component that actually does the conversion of media files into sounds that are sent to the middlelayer or directly to the ALSA/OSS system. It is not uncommon for the engine itself to be modular, with a wide range of plug-ins for different files formats and audio or video codecs. Often this component may be quite simple with only a command line interface.

Mplayer and xine are quite powerful engines that can handle a wide range of formats both audio and video, though both are often not distributed because of restrictions of codecs – so you sometimes have to install them manually. GStreamer is another modern audio streaming engine with a wide range of file formats and codec support.

User Interface

Finally on top there is usually a front-end user interface. This is the bit you see.

Examples

Xmms the popular X Winamp look-a-like media player consists of its own x front end and audio engine (which takes plug-ins), although has been dead for some time, with some distributions dropping support for it entirely (Gentoo). It hasn’t been supported in years, and its successor, XMMS2 is a complete rewrite with different design goals (c.f. MPD, etc.)

amaroK is a modern (KDE based) front end, much nicer than Xmms. It has no built-in media engine, works well with xine.

=== See Also ===

Leave a Reply