Bounding Unicorns

How To Disable HDMI Audio Output in Linux

Option 1

This solution works to remove HDMI audio output but it does so together with HDA audio output also. It might work if you have some other, non-HDA sound card (such as an external USB device).

This SO post offers the following:

  1. Add to /etc/modprobe/blacklist.conf:

    blacklist sndhdacodec_hdmi

This does not do anything on my system, the snd_hda_codec_hdmi module is loaded anyway (perhaps as a dependency).

  1. Force the module to really not load - add to /etc/modprobe/blacklist.conf:

    blacklist sndhdacodechdmi install sndhdacodechdmi /bin/false

This did in fact stop snd_hda_codec_hdmi from loading, however the HDMI audio device remained with a generic driver:

% aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC221 Analog [ALC221 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
  1. Disable the generic codec as well:

    blacklist sndhdacodechdmi install sndhdacodechdmi /bin/false blacklist sndhdacodecgeneric install sndhdacodecgeneric /bin/false

This unfortunately caused all audio devices to disappear, including the analog audio output.

Option 2

This option didn't have any effect on my system (HP t620 thin client). From this SO post:

Add radeon.audio=0 to the kernel boot command, e.g. in /boot/grub/menu.lst:

kernel /vmlinuz-linux root=/dev/sda6 ro radeon.audio=0

On Debian, edit /etc/default/grub and add radeon.audio=0 to the line starting with GRUB_CMDLINE_LINUX=, e.g. in my case

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 radeon.audio=0"