Share to: share facebook share twitter share wa share telegram print page

Advanced Linux Sound Architecture

ALSA
Original author(s)Jaroslav Kysela[1]
Developer(s)ALSA team[2]
Initial release1998; 27 years ago (1998)
Stable release
1.2.13[3] / 12 November 2024; 50 days ago (12 November 2024)
Written inC[4]
Operating systemLinux
Type
License
Websitealsa-project.org
The Linux API is composed out of the System Call Interface of the Linux kernel, the GNU C Library (by GNU), libdrm, libalsa and libevdev (by 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 GPL-2.0-or-later and LGPL-2.1-or-later.[5]

On Linux, sound servers, like sndio, PulseAudio, JACK (low-latency professional-grade audio editing and mixing) and PipeWire, and higher-level APIs (e.g OpenAL, SDL audio, etc.) work on top of ALSA and its sound card device drivers. ALSA succeeded the older Linux port of the Open Sound System (OSS).

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).[6]

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

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.

Features

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

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.

Applications

Additional to the software framework internal to the Linux kernel, the ALSA project also provides the command-line tools[8][9][10] and utilities[11] alsactl,[12] amixer,[13] arecord/aplay and alsamixer,[13] an ncurses-based TUI.

There also are GUIs programmed by third-party developers, such as GNOME-ALSAmixer[14] (using GTK), Kmix,[14] XFCE4-mixer, LXpanel, QasHctl, QasMixer, Pavucontrol, AconnectGUI,[15] tapiir,[15] polarbear,[15] ALSAmixerGUI[16] (using FLTK), ZynAddSubFX, Yoshimi, and even more.

Concepts

This section provides an overview of basic concepts pertaining to ALSA.[17][18][19]

Typically, ALSA supports up to eight cards, numbered 0 through 7; each card is a physical or logical kernel device capable of input and 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;[20] 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[citation needed], 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: often 44.1 kHz on home stereos, or 48 kHz on home theaters, yet up to 88.2 kHz, 96 kHz, or even 192 kHz for hi-fi audio production or reproduction.
  • 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.[21]

Open Sound System version 4 is able to emulate ALSA.[22]

QNX uses a sound system derived from, but not directly compatible with ALSA. The header file and library names are still "asound", same as the ALSA names.[23] ALSA API uses ioctl() calls in a way not allowed in the QNX kernel.[24]

See also

References

  1. ^ "Jaroslav Kysela - Perex soft".
  2. ^ Alsa Team, alsa-project.org, 2008-09-29, retrieved 2012-01-08
  3. ^ "Main Page News". 12 November 2024. Retrieved 13 November 2024.
  4. ^ "ALSA", Analysis Summary, Ohloh, archived from the original on 2013-12-20, retrieved 2012-01-08
  5. ^ a b "Introduction". alsa-project.org. Retrieved 2012-01-08.
  6. ^ Linux 2.5.5 release notes, retrieved 2012-01-08
  7. ^ OSS Emulation, archived from the original on 2012-06-05, retrieved 2012-07-07
  8. ^ "Alsa-project/Alsa-tools". GitHub. 3 April 2022.
  9. ^ "Alsa-tools - ALSA wiki". alsa.opensrc.org. Archived from the original on 18 March 2008. Retrieved 12 January 2022.
  10. ^ "ALSA User Info - AlsaProject".
  11. ^ "Alsa-utils". GitHub. 4 May 2022.
  12. ^ "Category:Alsa-utils - ALSA wiki". alsa.opensrc.org. Archived from the original on 18 March 2008. Retrieved 12 January 2022.
  13. ^ a b "How to Use ALSA Utilities to Manage Linux Audio from the Terminal". 14 May 2018.
  14. ^ a b "AlsaMixers - ALSA wiki". alsa.opensrc.org. Archived from the original on 4 April 2008. Retrieved 12 January 2022.
  15. ^ a b c boer, maarten de. "maarten's homepage". iua.upf.es. Archived from the original on 2006-09-04. Retrieved 18 July 2021. this page will contain a list of my projects, but i need to clean up some things first. for now, use the following links, or browse the ftp: tapiir, alsamixergui, aconnectgui, polarbear
  16. ^ Boer, Maarten de. "AlsaMixerGui". Music Technology Group. Barcelona: Universitat Pompeu Fabra. Archived from the original on 2009-02-05. Retrieved 18 July 2021. alsamixergui is a FLTK based frontend for alsamixer. It is written directly on top of the alsamixer source, leaving the original source intact, only adding a couple of ifdefs, and some calls to the gui part, so it provides exactly the same functionality, but with a graphical user interface. (Researcher, 1999-2010)
  17. ^ Tranter, Jeff (October 2004), "Introduction to Sound Programming with ALSA", Linux Journal, retrieved 2012-01-08
  18. ^ Phillips, Dave (June 2005), "A User's Guide to ALSA", Linux Journal, archived from the original on 2012-01-09, retrieved 2012-01-08
  19. ^ Alsa C library Doxygen documentation, October 2007, retrieved 2012-01-08
  20. ^ "ALSA project - the C library reference: Sequencer interface". www.alsa-project.org. Retrieved 2019-04-30.
  21. ^ ALSA SoC Layer, kernel.org, 2017-07-13
  22. ^ "Tips And Tricks - Open Sound System". ossnext.trueinstruments.com.
  23. ^ "Audio Architecture (QNX 6.4.1)". www.qnx.com.
  24. ^ "ALSA and libasound.so". www.qnx.com.
  • Official website
  • Constable, Mark. "Alsa WIKI". AlsaOpensrcOrg. Archived from the original on 29 March 2002. Retrieved 18 July 2021. Some of the reasons this site remains in existence are, no one from the official ALSA site has ever contributed anything to this site (before the official one existed, this one predates the official wiki by quite a few years), no one has officially or formally suggested a merge, no one else has shown any serious interest in helping to merge them, and most importantly there are a significant number of offsite referers and Google hits that come directly to this site because it's been here for so long.
Various layers within Linux, also showing separation between the userland and kernel space
User mode User applications bash, LibreOffice, GIMP, Blender, 0 A.D., Mozilla Firefox, ...
System components init daemon:
OpenRC, runit, systemd...
System daemons:
polkitd, smbd, sshd, udevd...
Window manager:
X11, Wayland, SurfaceFlinger (Android)
Graphics:
Mesa, AMD Catalyst, ...
Other libraries:
GTK, Qt, EFL, SDL, SFML, FLTK, GNUstep, ...
C standard library fopen, execv, malloc, memcpy, localtime, pthread_create... (up to 2000 subroutines)
glibc aims to be fast, musl aims to be lightweight, uClibc targets embedded systems, bionic was written for Android, etc. All aim to be POSIX/SUS-compatible.
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[1]
Process scheduling subsystem IPC subsystem Memory management subsystem Virtual files subsystem Networking subsystem
Other components: ALSA, DRI, evdev, klibc, LVM, device mapper, Linux Network Scheduler, Netfilter
Linux Security Modules: SELinux, TOMOYO, AppArmor, Smack
Hardware (CPU, main memory, data storage devices, etc.)
  1. ^ "Admin Guide README". Kernel.org git repositories.

Read other articles:

High-profile murder case in the United Kingdom Leanne TiernanTiernan, circa 1998BornLeanne Tiernan(1984-09-27)27 September 1984Metropolitan Borough of Leeds, West Yorkshire, EnglandDied26 November 2000(2000-11-26) (aged 16)Bramley, West YorkshireCause of deathStrangulationBody discovered20 August 2001, Otley, West YorkshireResting placeHill Top Cemetery, Armley, West Yorkshire53°48′05″N 1°36′51″W / 53.8015°N 1.6143°W / 53.8015; -1.6143 (approximate)N…

Ini adalah nama Mandailing, marganya adalah Rangkuti. Junaid TholaSyekh Junaid Thola Rangkuti no 1, Syekh Musthafa Husein no 2, dan Syekh Fauzi Hasibuan no 3NamaJunaid TholaKebangsaanIndonesiaWilayah aktif Mandailing Perak, MalaysiaJabatanUlamaAlma materAl-AzharIstriSariyah binti Haji SaidSiti Hajar binti Haji SaidRokiyah binti Haji IbrahimKeturunanSakinah JunidHabibah JunidKeluargaTan Sri Datu Asri Muda Syekh Haji Junaid Thola Rangkuti (lahir di Mandailing tahun 1897 – meninggal tahun 1948) &…

Heirich Füger Heinrich Friedrich Füger (Heilbronn, 8 dicembre 1751 – Vienna, 5 novembre 1818) è stato un pittore miniaturista tedesco. Indice 1 Biografia 2 Opere principali 3 Note 4 Bibliografia 5 Altri progetti 6 Collegamenti esterni Biografia Figlio di un pastore protestante, la sua formazione artistica si sviluppò grazie a studi da autodidatta, effettuati soprattutto tramite incisioni di Gérard Audran, ispirate dai dipinti di Le Brun.[1] Non ancora quattordicenne ebbe modo di p…

SpiritualSumber alirankaryya musik, himne KristenSumber kebudayaanBudak Afrika di A.S.Alat musik yang biasa digunakanVocalBentuk turunanBlues, musik injil Spirituals (atau Spiritual negro[1][2][3][4][5][6]) adalah musik-musik keagamaan (utamanya Kristen) yang dibuat oleh budak orang Afrika di Amerika Serikat. Terminologi dan asal mula Istilah spiritual berasal dari musik spiritual. Efesus 5:19 berkata: dan berkata-katalah seorang kepada yang lain d…

جاسم المضف معلومات شخصية اسم الولادة جاسم عبد الله جاسم محمد المضف الميلاد 1953 (العمر 71 سنة) الكويت الجنسية  الكويت الديانة مسلم الأولاد عبد الله المضف الحياة العملية المدرسة الأم ليسانس حقوق وشريعة - جامعة الكويت المهنة سياسي الحزب مستقل تعديل مصدري - تعديل   جاسم عبد …

Edward John Eyre Governor of JamaicaMasa jabatan1862–1865 PendahuluCharles Henry DarlingPenggantiHenry Knight StorksLieutenant-Governor of New Munster, New ZealandMasa jabatan1848–1853GubernurGeorge Grey PendahuluNone, position establishedPenggantiNone, position abolished Informasi pribadiLahir(1815-08-05)5 Agustus 1815Whipsnade, England, UKMeninggal30 November 1901(1901-11-30) (umur 86)Yorkshire, England, UKPekerjaanPenjelajah Australia, AdministratorSunting kotak info • L …

1962 United States Senate election in Washington ← 1956 November 6, 1962 1968 →   Nominee Warren Magnuson Richard G. Christensen Party Democratic Republican Popular vote 491,365 446,204 Percentage 52.09% 47.31% County resultsMagnuson:      50–60%      60–70% Christensen:      50–60%      60–70% U.S. senator before election Warren Magnuson Democratic Elected …

Aneksasi oblast-oblast Donetsk, Kherson, Luhansk dan Zaporizhzhia oleh Rusia adalah pencaplokan empat wilayah Ukraina yakni Donetsk, Luhansk, Kherson dan Zaporizhzhia pada 30 September 2022 oleh Rusia setelah referendum yang menurut Moskwa menghasilkan dukungan mayoritas. Negara-negara Barat menganggap hasil tersebut sebagai aneksasi yang tidak sah dan ilegal, yang didukung oleh pemaksaan massal terhadap pemilih. Pasukan Rusia tidak menguasai wilayah mana pun secara penuh. Pasukan Ukraina, diban…

Head of the Catholic Church from 1059 to 1061 This article's lead section may be too short to adequately summarize the key points. Please consider expanding the lead to provide an accessible overview of all important aspects of the article. (June 2016) PopeNicholas IIBishop of RomePortrait of Nicholas II in the Nuova Cronica des Giovanni VillaniChurchCatholic ChurchPapacy began24 January 1059Papacy ended27 July 1061PredecessorStephen IXSuccessorAlexander IIPersonal detailsBornGerardbetween 990 a…

State park in Dane County, Wisconsin Lake Kegonsa State ParkLake Kegonsa from Lake Kegonsa State ParkLocationDane, Wisconsin, United StatesCoordinates42°58′35″N 89°13′55″W / 42.97639°N 89.23194°W / 42.97639; -89.23194Area343 acres (139 ha)Established1962Governing bodyWisconsin Department of Natural Resources Lake KegonsaLake KegonsaCoordinates42°58′N 89°15′W / 42.967°N 89.250°W / 42.967; -89.250Basin countriesUnit…

For a chronological guide, see Timeline of LGBT history. The Stonewall Inn in the gay village of Greenwich Village, Manhattan, site of the June 28, 1969 Stonewall riots, the cradle of the modern worldwide LGBT rights movement, is adorned with rainbow pride flags.[1][2][3] Part of a series onLGBT topics       LesbianGayBisexualTransgender Sexual orientation and gender Aromanticism Asexuality Gray asexuality Biology Bisexuality Pansexuality Dem…

1943 military campaign of World War II on the island of Sicily, Italy Invasion of Sicily redirects here. For the Athenian offensive in the Second Peloponnesian War, see Sicilian Expedition. For the 1860 conquest of Sicily as part of the Unification of Italy, see Expedition of the Thousand. Sicilian campaignPart of the Italian campaign of World War IIA map of the Allied army progress during Operation Husky from 11 July to 17 August 1943.Date9 July – 17 August 1943(1 month, 1 week and …

Low-level aircraft training area, UK A C-130 passing through the Mach Loop, as photographed from a promontory. class=notpageimage| Location in Wales The Mach Loop (also known as the Machynlleth Loop, Welsh: Dolen Mach) is a series of valleys in the United Kingdom in west-central Wales, notable for their use as low-level training areas for fast aircraft. The system of valleys lies 13 km (8 mi) east of Barmouth between the towns of Dolgellau to the north and Machynlleth to the south, fro…

У этого топонима есть и другие значения, см. Ленский. Байкало-Ленский заповедник Истоки реки Лена Категория МСОП — Ia (Строгий природный резерват) Основная информация Площадь659,919 га  Дата основания5 декабря 1986 года  Расположение 54°13′35″ с. ш. 107°53′35″ в. д.HGЯO С…

У этого термина существуют и другие значения, см. Чайки (значения). Чайки Доминиканская чайкаЗападная чайкаКалифорнийская чайкаМорская чайка Научная классификация Домен:ЭукариотыЦарство:ЖивотныеПодцарство:ЭуметазоиБез ранга:Двусторонне-симметричныеБез ранга:Вторичн…

KurukshetraSutradaraMahesh ManjrekarProduserPravin ShahDitulis olehMahesh ManjrekarPemeranSanjay DuttMahima ChaudhryOm PuriMukesh RishiPenata musikAmar HaldipurHimesh ReshammiyaTanggal rilis 10 November 2000 (2000-11-10) NegaraIndiaBahasaHindiKurukshetra adalah sebuah film drama aksi India 2000 yang ditulis dan disutradarai oleh Mahesh Manjrekar. Film ini dirilis pada 10 November 2000 dan dibintangi oleh Sanjay Dutt, Mahima Chaudhry dan Om Puri dalam peran utama bersama Mukesh Rishi d…

إن حيادية وصحة هذه المقالة محلُّ خلافٍ. ناقش هذه المسألة في صفحة نقاش المقالة، ولا تُزِل هذا القالب من غير توافقٍ على ذلك. (نقاش) (مايو 2016) جزء من سلسلة مقالات حولالخَلقية تاريخ الخلقية تاريخ الخلقية الخلقية الإسلامية الخلقية المسيحية مذاهب الخلق علوم الخلق خلقية الأرض الفتي…

土库曼斯坦总统土库曼斯坦国徽土库曼斯坦总统旗現任谢尔达尔·别尔德穆哈梅多夫自2022年3月19日官邸阿什哈巴德总统府(Oguzkhan Presidential Palace)機關所在地阿什哈巴德任命者直接选举任期7年,可连选连任首任萨帕尔穆拉特·尼亚佐夫设立1991年10月27日 土库曼斯坦土库曼斯坦政府与政治 国家政府 土库曼斯坦宪法 国旗 国徽 国歌 立法機關(英语:National Council of Turkmenistan) 土…

Mammalian protein found in Homo sapiens This article is about the glycoprotein. For the stimulant drug, see G-130. Cd130 redirects here. For the isotope of cadmium (Cd-130 or 130Cd), see Cadmium-130. IL6STAvailable structuresPDBOrtholog search: PDBe RCSB List of PDB id codes1BJ8, 1BQU, 1I1R, 1P9M, 1PVH, 3L5H, 3L5I, 3L5J,%%s1BJ8, 1BQU, 1I1R, 1P9M, 1PVH, 3L5H, 3L5I, 3L5J, 1N2QIdentifiersAliasesIL6ST, CD130, CDW130, GP130, IL-6RB, interleukin 6 signal transducerExternal IDsOMIM: 600694 MGI: 96560 H…

Metro station in Suwon, South Korea 수원Suwon Korean nameHangul수원역Hanja水原驛Revised RomanizationSuwonnyeokMcCune–ReischauerSuwŏnnyŏk General informationLocation18 Maesanro 1-ga, 924 Deogyeongdaero, Paldal-gu, Suwon-siGyeonggi-doSouth KoreaCoordinates37°15′58″N 126°59′59″E / 37.26611°N 126.99972°E / 37.26611; 126.99972Operated by KorailLine(s)Gyeongbu Line:     Line 1     Suin–Bundang LinePlatf…

Kembali kehalaman sebelumnya