User Tools

Site Tools


linux:alsa

This is an old revision of the document!


ALSA

Disable specific sound cards (i.e. ATI HDMI when not in use):

This command shows all physical cards ALSA identified:

cat /proc/asound/cards

This command provides more details:

aplay -l

Identify the relevant kernel module using

lsmod | grep snd

Check for options of the module, e.g. snd_hda_intel

modinfo snd_hda_intel | grep enable:
# parm:           enable:Enable Intel HD audio interface. (array of bool)

Notice the 'array of bool' for this parameter.

To disable parts of this module, create a modprobe conf file and add options. The enable parameter requires values for each of the devices it found. e.g.

vi /etc/modprobe.d/snd_hda_intel.conf
options snd_hda_intel enable=1,0,0

The enable parameter is an array of booleans that can enable/disable each card driven by the snd_hda_intel module. Look for “HDA-Intel” in “cat /proc/asound/cards” e.g.:

 0 [U0x46d0x8c9    ]: USB-Audio - [...]
                      [...]
 1 [PCH            ]: HDA-Intel - [...]
                      [...]
 2 [HDMI           ]: HDA-Intel - [...]
                      [...]
 3 [HDMI_1         ]: HDA-Intel - [...]
                      [...]

The three cards listed that are driven by “HDA-Intel” are PCH, HDMI, and HDMI_1 so to disable both HDMI cards, the enable parameter is “1,0,0”.

linux/alsa.1549199312.txt.gz · Last modified: 2023/05/29 11:53 (external edit)