Skip to content
Search

Advanced Linux Sound Architecture

lastmod 2023-02-20created 2020-04-0126 edits

Advanced Linux Sound Architecture (ALSA) is a component of the Linux kernel, a software framework that provides an API for sound card device drivers.

The goals put forward when ALSA started as a project were automatic configuration of sound card hardware and smooth control of multiple sound devices in a Linux system. The ALSA project, led by Jaroslav Kysela(en), first started in 1998 as a Linux device driver for the Gravis Ultrasound sound card, and has continued development after branching off from the Linux kernel after the 2.5 development series (2.5.4-2.5.5) in 2002. Since version 2.6, it has replaced the previous system, the Open Sound System (OSS), by default. Sound servers such as PulseAudio and JACK, and high-level abstraction APIs such as OpenAL and SDL Audio, run on top of ALSA to implement sound card device drivers.

ALSA is distributed under the GPL and LGPL licenses.

Categories

Command-line music players

Utilities

How to install

ALSA is a set of built-in Linux kernel modules. Therefore, no manual installation is needed.

udev automatically detects hardware and selects the needed drivers at boot, so sound should already be working. However, sound may be muted at first. If so, see unmuting the channels.

Recommend installation

However, installing the following is recommended.

$ sudo pacman -S alsa-lib alsa-firmware alsa-utils

alsa command

Located at /sbin/alsa.

$ alsa --help
Usage: /sbin/alsa {unload|reload|force-unload|force-reload|suspend|resume}

Configuration files

ALSA Firmware (ArchLinux)

The alsa-firmware package contains firmware that may be required for certain sound cards (e.g. Creative SB0400 Audigy2).

$ sudo pacman -S alsa-firmware

List of sound cards

Use the aplay command to list sound cards.

$ aplay -l

Force-disable HDMI sound

Change it using alsamixer

How to change the ALSA configuration file

Check the card and device you want to enable with the aplay -l command, and add the following to the ~/.asoundrc file.

defaults.pcm.card 1
defaults.pcm.device 0

How to add a blacklist in modprobe

You can check the hdmi sound card with the lsmod command.

$ lsmod | grep snd | grep hdmi

Add the following to the /etc/modprobe.d/hdmi_audio_blacklist.conf file:

blacklist snd_hda_codec_hdmi

Then reboot.

See also

Troubleshooting

Audio crackling

See Linux:Audio#Restart alsa. In short:

pulseaudio -k && sudo alsa force-reload

Favorite site

Tip

author Zer0 sitemap