World Library  
Flag as Inappropriate
Email this Article

Advanced Linux Sound Architecture

Article Id: WHEBN0000165539
Reproduction Date:

Title: Advanced Linux Sound Architecture  
Author: World Heritage Encyclopedia
Language: English
Subject: Linux kernel, Open Sound System, Rosegarden, Ubuntu Studio, Kernel same-page merging
Collection: 1998 Software, Advanced Linux Sound Architecture, Application Programming Interfaces, Interfaces of the Linux Kernel, Linux Drivers
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Advanced Linux Sound Architecture

ALSA
Screenshot of Alsamixer 1.0.14
Original author(s) Jaroslav Kysela
Developer(s) ALSA team[1]
Initial release 1998
Stable release 1.0.28 / June 17, 2014 (2014-06-17)[2]
Written in C[3]
Operating system Linux
Type
License
Website .org.alsa-projectwww
The freedesktop.org).
ALSA is part of the Linux kernel, while PulseAudio is middleware, a part of the lower levels of the desktop stack. So is SDL.

Advanced Linux Sound Architecture (ALSA) is a software framework and part of the Linux kernel that provides an application programming interface (API) for sound card device drivers. Some of the goals of the ALSA project at its inception were automatic configuration of sound-card hardware and graceful handling of multiple sound devices in a system. ALSA is released under the GNU General Public License (GPL) and the GNU Lesser General Public License (LGPL).[4] Some frameworks such as JACK use ALSA to allow performing low-latency professional-grade audio editing and mixing.

Contents

  • Features 1
  • Concepts 2
  • Implementations 3
  • History 4
  • Applications 5
  • See also 6
  • References 7
  • External links 8

Features

ALSA was designed with some features which were not, at the time of its conception, supported by the Open Sound System (OSS):

ALSA has a larger and more complex API than OSS, so it can be more difficult to develop an application that uses ALSA as its sound technology. While ALSA may be configured to provide an OSS emulation layer, such functionality is no longer available or is not installed by default in many Linux distributions.

Besides the sound device drivers, ALSA bundles a user-space library for application developers who want to use driver features through an interface that is higher-level than the interface provided for direct interaction with the kernel drivers. Unlike the kernel API, which tries to reflect the capabilities of the hardware directly, ALSA's user-space library presents an abstraction that remains as standardized as possible across disparate underlying hardware elements. This goal is achieved in part by using software plug-ins; for example, many modern sound cards or built-in sound chips do not have a "master volume" control. Instead, for these devices, the user space library provides a software volume control using the "softvol" plug-in, and ordinary application software need not care whether such a control is implemented by underlying hardware or software emulation of such underlying hardware.

Concepts

This section provides an overview of basic concepts pertaining to ALSA.[5][6][7]

Typically, ALSA supports up to eight cards, numbered 0 through 7; each card is a physical or logical kernel device capable of input, output. Furthermore, each card may also be addressed by its id, which is an explanatory string such as "Headset" or "ICH9".

A card has devices, numbered starting at 0; a device may be of playback type, meaning it outputs sound from the computer, or some other type such as capture, control, timer, or sequencer; device number 0 is used by default when no particular device is specified.

A device may have subdevices, numbered starting at 0; a subdevice represents some relevant sound endpoint for the device, such as a speaker pair. If the subdevice is not specified, or if subdevice number −1 is specified, then any available subdevice is used.

A card's interface is a description of an ALSA protocol for accessing the card; possible interfaces include: hw, plughw, default, and plug:dmix. The hw interface provides direct access to the kernel device, but no software mixing or stream adaptation support. The plughw and default enable sound output where the hw interface would produce an error.

An application typically describes sound output by combining all of the aforementioned specifications together in a device string, which has one of the following forms (which are case-sensitive):

  • interface:card,device,subdevice
  • interface:CARD=1,DEV=3,SUBDEV=2.

An ALSA stream is a data flow representing sound; the most common stream format is PCM that must be produced in such a way as to match the characteristics or parameters of the hardware, including:

  • sampling rate: 44.1 kHz on home stereos, and 48 kHz on home theaters
  • sample width: measured in some number of bits per sample (such as 8, 16, 24, or 32 bits/sample)
  • sample encoding: such as endianness
  • number of channels: 1 for mono, 2 for stereo, or 6 for AC-3/IEC958

Implementations

The ALSA System on Chip (ASoC) layer aims to provide better support for ALSA on embedded systems that use a system-on-chip (SoC) design.[8]

History

The project to develop ALSA was led by Jaroslav Kysela, and was based on the Linux device driver for the Gravis Ultrasound sound card. It started in 1998 and was developed separately from the Linux kernel until it was introduced in the 2.5 development series in 2002 (2.5.4–2.5.5).[9]

In the 2.6 version, it replaced the previous system, Open Sound System (OSS), by default (although a backwards-compatibility layer does exist).[10]

Applications

ALSA includes several front-end pieces of application software, including alsactl, amixer, arecord/aplay command-line tools/utilities, as well as the alsamixer, a ncurses-based TUI.

See also

References

  1. ^ Alsa Team, alsa-project.org, 2008-09-29, retrieved 2012-01-08 
  2. ^ Main Page News, alsa-project.org, retrieved 2014-06-18 
  3. ^ "ALSA", Analysis Summary ( 
  4. ^ a b "Introduction". alsa-project.org. Retrieved 2012-01-08. 
  5. ^ Tranter, Jeff (October 2004), "Introduction to Sound Programming with ALSA", Linux Journal, retrieved 2012-01-08 
  6. ^ Phillips, Dave (June 2005), "A User's Guide to ALSA", Linux Journal, retrieved 2012-01-08 
  7. ^ Alsa C library Doxygen documentation, October 2007, retrieved 2012-01-08 
  8. ^ ALSA SoC Layer, Rpsys.net, 2006-09-15, retrieved 2012-01-08 
  9. ^ Linux 2.5.5 release notes, retrieved 2012-01-08 
  10. ^ OSS Emulation, retrieved 2012-07-07 

External links

  • Official website
Various layers within Linux, also showing separation between the userland and kernel space
User mode User applications For example, bash, LibreOffice, Apache OpenOffice, Blender, 0 A.D., Mozilla Firefox, etc.
Low-level system components: System daemons:
systemd, runit, logind, networkd, soundd, ...
Windowing system:
X11, Wayland, Mir, SurfaceFlinger (Android)
Other libraries:
GTK+, Qt, EFL, SDL, SFML, FLTK, GNUstep, etc.
Graphics:
Mesa 3D, AMD Catalyst, ...
C standard library open(), exec(), sbrk(), socket(), fopen(), calloc(), ... (up to 2000 subroutines)
glibc aims to be POSIX/SUS-compatible, uClibc targets embedded systems, bionic written for Android, etc.
Kernel mode Linux kernel stat, splice, dup, read, open, ioctl, write, mmap, close, exit, etc. (about 380 system calls)
The Linux kernel System Call Interface (SCI, aims to be POSIX/SUS-compatible)
Process scheduling
subsystem
IPC
subsystem
Memory management
subsystem
Virtual files
subsystem
Network
subsystem
Other components: ALSA, DRI, evdev, LVM, device mapper, Linux Network Scheduler, Netfilter
Linux Security Modules: SELinux, TOMOYO, AppArmor, Smack
Hardware (CPU, main memory, data storage devices, etc.)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.