ALSA (abbreviated for Advanced Linux Sound architecture) is a driver-driven Linux kernel component for sound cards to replace the original OSS (open sound system). In addition to providing a set of kernel driver modules like OSS, ALSA provides a library function specifically for simplifying application writing, which is more convenient to use than the IOCTL raw programming interface provided by OSS. Alsa function Library.
The main features of ALSA are as follows:
Multiple sound card devices are supported.
A modular kernel driver.
Supports SMP and multithreading.
Provides application development function libraries to simplify application development.
Supports OSS APIs, compatible with OSS applications.
Alsa has a more user-friendly programming interface and is fully compatible with OSS, and is a better choice for applications. The ALSA system includes the driver package Alsa-driver, the development package alsa-libs, the development package plug-in Alsa-libplugins, the Setup Management Toolkit Alsa-utils, the other sound related processing small package alsa-tools, Special Audio firmware support Package Alsa-firmware,oss interface compatible analog Layer tool Alsa-oss a total of 7 subprojects, of which only the driver package is required.
Alsa-driver refers to kernel drivers, including hardware-related code and some common code, very large.
Alsa-libs refers to the function library of user space, which is provided to the application, and the application should include header file Asoundlib.h. and use shared library libasound.so.
Alsa-utils contains some ALSA applications for controlling sound cards, such as alsaconf (detecting the sound card in the system and writing a suitable ALSA profile), Aplay (playback based on the command line sound file), Arecord (audio file recording based on the command line), and so on.
The interfaces currently provided to user space by the ALSA kernel are:
Information Interface (Proc/asound)
Control Interface (DEV/SND/CONTROLCX)
Mixer Connector (DEV/SND/MIXERCXDX)
PCM Interface (DEV/SND/PCMCXDX)
Raw MIDI Interface (DEV/SND/MIDICXDX)
Sequencer Interface (DEV/SND/SEQ)
Timer interface (Dev/snd/timer)
Similar to OSS, the above interfaces are also provided as files, unlike those that are provided to alsa-lib for use instead of directly to the application. Applications are best to use alsa-lib, or more advanced interfaces.
The following illustration shows a schematic of the ALSA sound card driver and user space architecture, which shows the relationship between the ALSA kernel driver and the User space Library and OSS