Tuesday, September 25, 2018

[solved] more hdmi sound hijinx

Whichever card is running the HDMI must be set as the default inside alsa, no matter whether or not there are secondary issues with pulseaudio. Your order of business when finding that, say, YouTube videos no longer have sound, or VLC is without audio, are
  • ye olde verify audio is unmuted in alsamixer (while you're in alsamixer, why not check your card for annoying "automute", and disable it. Select it and use the "+" or "-" keys to toggle it)
  • check sound with a specific command to the hardware card. If this doesn't work, go into a subroutine of verifying HDMI. For example, this MUST work, if this is the named card and HDMI channel
    $ aplay -D plughw:1,7 /usr/share/sounds/alsa/Front_Center.wav
  • assuming the above works, then the wrong default card is likely being assigned, so that YouTube is, say, attempting to play through [default] motherboard audio, instead of an HDMI authorized sound card. This means, particularly after an software update, doing the thing you've done for years now...
    # nano /usr/share/alsa/alsa.conf
    @hooks [
    {
    func load
    files [
    {
    @func concat
    strings [
    { @func datadir }
    "/alsa.conf.d/"
    ]
    }
    ]
    errors false
    }
    ]
    ... and then further down in the file change the defaults...
    # nano /usr/share/alsa/alsa.conf
    defaults.ctl.card 1 #default 0
    defaults.pcm.card 1 #default 0
    defaults.pcm.device 7 #default 0

No comments: