Search notes:

Advanced Linux Sound Architecture

ALSA deprecated OSS with Linux 2.6 since when ALSA is Linux' default sound system.
ALSA is used in frameworks such as JACK or PulseAudio.
Apparently, a user must belong to the audio group to access ALSA devices.

Configuring

/usr/share/alsa/alsa.conf is the main entry point for configuring the ALSA system.
~/.asoundrc

Plugins

ALSA consists plugins.
The hw plugin does not processing, it accesses the hardware driver.
The plug plugin performs channel duplication, sample value conversion and resampling (when necessary because not supported by the hardware).
The file plugin writes sample data to a file.

Cards, devices, subdevices, interfaces

Cards

A card is either a physical or logical kernel device that is albe to record, process or emit sound.
ALSA counts up to eight cards, numbered from 0 to 7 or alternatively identified by an ID.

Devices

Each card has devices whose numbers again start with 0.
These devices have a specific kind such as
  • playback
  • capture
  • control
  • timer
  • sequencer
The device »level« is where most of the hardware access takes place.

Subdevices

A device might have subdevices.
A subdevice, if available, specifies a sound end point.

Interfaces

An interface specifies an asla protocl to a card/device/subdevice triple.
An interface string thus might look like interface:CARD=0,DEV=1,SUBDEV=1.

Utilities

speaker-test is a test tone generator for ALSA.
alsactl allows to save settings for a device.
amixer to make adjustments to devices volume and sound controls.
alsamixer is the ncurses version of amixer.
acconnect and aseqview to make midi connections and view the list of connected ports.
aplay plays back a sound file.
arecord records a sound file.
alsaconf

Modules

/proc/asound/modules shows the loaded sound module (along with their order).
Alternativly, lsmod | grep snd gets a devices and modules list (snd = for sound cards?)
Apparently, the standard module for on-board cards is snd_hda_intel.

Kernel configuration

The kernel must at least be built with CONFIG_SOUND.
I had to enable the driver for the sound card with make menuconfig under Device Drivers -> Sound card support -> Advanced Linux Sound Architecture -> HD-Audio -> Select a codec … -> Build Realtek HD-audio codec support. (This is CONFIG_SND_HDA_CODEC_REALTEK )

See also

Linux sound
/var/lib/alsa/asound.state seems to store ALSA mixer settings.
/usr/share/sounds/alsa

Links

http://www.alsa-project.org/main/index.php/Main_Page
http://www.volkerschatz.com/noise/alsa.html

Index