Advanced Linux Sound Architecture

The Advanced Linux Sound Architecture ( ALSA ) is a free sound architecture for Linux systems that has ( PCM ) audio and MIDI functionality. ALSA is available under GPL ( Drivers & Utilities ) and LGPL ( application libraries ).

ALSA consists of Linux kernel modules that provide different kernel drivers for sound cards. Different tasks (general sound, Midi, Wave, synthesizers, hardware ) are issued by individual device drivers abstracted in the Sound Stack. Dolby Digital is possible. The goals of the ALSA project were particularly support an automatic configuration of sound cards and an elegant handling of multiple sound devices in a system. These objectives were largely achieved. Various frameworks such as JACK and PulseAudio use ALSA for audio editing and mixing on a professional level with low latency.

The neat little driver for the OSS3 architecture are highlighted in current kernel versions in favor of ALSA as deprecated (obsolete).


The project was born August 1998 of a driver for the sound card manufacturer's Gravis Ultrasound headed by Jaroslav Kysela. Kysela annoyed about the poor driver of the Open Sound System for his card and wrote a replacement for it, the other owner of the card was extremely enthusiastic.

With version 1.0.17 the version control system Mercurial was switched to Git and added many new drivers for system on a chip. In addition, support for high-end audio cards and I ² C was added.

ALSA was developed separately from the Linux kernel until it was incorporated into the development branch of kernel version 2.5.5 2002. It is the standard sound system since kernel version 2.6.


Use programs the ALSA user space library, software -side mixing by ALSA's PCM plugin interface is possible, for example, by Dmix plugin. This means that different sound streams, such as from different programs at the same time can be played without a sound server like PulseAudio, ESD or aRts, must be used.

ALSA and especially the drivers for sound hardware are fully modularized. ALSA requires its own drivers for the devices to be addressed, which is why OSS drivers can not be used. Of user devices to professional multichannel cards a plurality of devices is supported.

Is relevant for developers that ALSA is fully multi-threaded and SMP -capable. When programming interfaces the ALSA API that provides an interface to the ALSA kernel module and the ALSA user space library, libasound that has the full functionality of the ALSA API, but the usability are significantly improved. The use of the user space library is advantageous for reasons of software- mixdown.

ALSA emulation, the libaoss library for OSS programs to be usable still can.

It supports an unlimited number of channels, the unlimited full- duplex mode and includes a loopback device.


The drivers for ALSA are since version 2.6 of the Linux kernel directly in it. They themselves are divided into several levels. The top one is the ALSA sound kernel, which provides access to the middle tier. In the middle there are the hardware interfaces such as mixer, sequencer, MIDI and hardware-dependent components. The lower level contains the cards and chip -specific code. If available, located between the middle and lower level modules for OSS compatibility.

The interface between the drivers and the applications then form the libraries in the alsa- lib package. Thus, several programs can use the sound card at the same time, a so-called sound server is used.


This paragraph provides an overview of the basic concepts of ALSA

Usually, ALSA supports up to eight cards that are numbered 0 to 7; each card is either a physical or a logical kernel device that absorb sound, spend or can control. Each card can be addressed via its string ID, eg "Headset " or " ICH9 ".

A card has devices whose numbering also starts with 0; There are several device-Typen/-Arten, for example, playback, capture, control, timer or sequencer. The default is 0 is assumed.

A device can have sub-devices, the numbering starts with 0; a subdevice represents any relevant sound endpoint for this device, such a pair of speakers. If no specific subdevice is specified, or the number -1, all available subddevices driven.

The interface card is a description of an ALSA Protokols to access it; Available interfaces are: hw, plughw, default, and plug: dmix. The hw interface allows direct access to the kernel device without software mixing or stream adaptation. The interfaces and default plughw allow the issue of sound in cases where the hw interface produces an error message.

An application specifies the output of sound by the above-described parameters are passed together in a one device string. It has the following syntax (they are case sensitive):

  • Interface: CARD = 1, DEV = 3, SUBDEV = 2

An ALSA stream is a data flow that represents sound; The most common format is PCM. The generated stream must exactly match the hardware, in terms of:

  • Sampling rate: for example, 44.1 kHz or 48 kHz
  • Sample width: for example, 8, 16, 24, or 32 bits / sample
  • Sample encoding
  • Number of channels: 1 for mono, 2 for stereo or 6 for AC-3/IEC958

ALSA also needs a buffer parameter; This determined how often the CPU must be addressed in order to provide new audio data.


The ALSA project provides many tools for configuring the sound system. This includes many cessation programs for setting ALSA and the sound card, as alsaconf as well as for the sound as alsamixer and amixer.

In addition, even simple programs for playing WAVE and MIDI files are present.