====== 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
note the module filename uses dashes instead of underscores
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".