[Howto] disable HDMI sound without pulseaudio etc (using Alsa)

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
gor9

[Howto] disable HDMI sound without pulseaudio etc (using Alsa)

#1 Post by gor9 »

For those using pulseaudio there is a graphical way of disabling hdmi. Never used pipewire.
eg pavucontrol gives you the option to disable hdmi. I do not need pulseaudio or pipewire so ....

I create a file with root powers so that

Code: Select all

cat /etc/modprobe.d/sound.conf 
options snd-hda-intel enable=0
and I know my sound module because I have previously run as a local user

Code: Select all

lsmod | grep snd
Then to see if there is an option of "enable" as local user I run

Code: Select all

modinfo snd_hda_intel | grep enable
parm:           enable:Enable Intel HD audio interface. (array of bool)
parm:           enable_msi:Enable Message Signaled Interrupt (MSI) (bint)
If that is not your sound module, change the module to yours to check if interested.

on full reboot, aplay changes from showing index=0 for hdmi and index=1 for analog to only

Code: Select all

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

2) If I needed another option maybe because the holes (stacks) or mic is wrong I would go
to the codec page, if it exists and append to my sound.conf "model=string"
eg model=inv-dmic if that was an issue for me. YMMV.

https://www.kernel.org/doc/html/v4.14/s ... odels.html

3) now the config file is saying this...
on boot up....for index=0, disable it as 0 means off
-> once disabled the analog sound device can now grab index=0

If my config was enable=0,0 then I would disabling both internal devices.

Hope that helps alsa users.

I searched before posting and noticed that Huckleberry Finn know of this config
https://forum.mxlinux.org/viewtopic.php ... 51#p683151

Return to “Tips & Tricks by users (not for help)”