ALSA is a software framework and part of the Linux kernel (see Fig. 1), as a set of modules, that provides an application programming interface (API), in C, for sound device drivers [1]. For example, to show the modules related with ALSA currently loaded, run:
Let’s see some of the most basic tools shipped with ALSA.
amixer (through the command line) and alsamixer (using also the command line but being ncurses-based) can be used to control the gain of the audio inputs and outputs. For example, to run alsamixer, in your terminal write:
arecord runs on ALSA to capture PCM (Pulse Code Modulation) (by default, using the WAV audio format) audio data, and provides information about the hardware, and also, about the audio servers. Some examples of use are:
List the physical audio ADC(s):
Show information about the ADC(s) capabilities (if PulseAudio is not running, remove pasuspender –):
Idem, but using the default audio server (usually, PulseAudio):
Usually, the software capabilities are higher than the hardware ones.
List the virtual ADC(s) (PCM outputs):
Record raw (without header) audio in CD audio format:
aplay is the companion PCM player of arecord. The playing capabilities used to be exactly the same than the provides by arecord.
List the physical audio DAC(s):
Idem, but listing the virtual DACs (PCM outputs):
(Recording and) Playing directly through ALSA, using the physical DAC and DAC:
(Recording and) Playing throught the default sound server (usually PulseAudio), using the virtual DAC and DAC:
speaker-test allows to generate (by default) pink noise or a pure tone through the audio outputs. Examples: