I have read a number of threads but they all point me to the same conclusion - one that doesn't work for me. This conclusion is to ensure that S/PDIF is unmuted and that HDMI / Digital Audio is available. Well I confirm this but still no audio.
So I can't get HDMI audio out via with Ubuntu.
I've tried switching the audio using the command line via pactl as well as the PulseAudio Volume Control GUI and the Ubuntu Sound Control applet but no go. When I switch to digital the audio from the laptop speaker turns off and then there is a complete silence.
I can confirm that Digital Stereo (IEC958) Output is listed in PulseAudio Volume Control and when I query pacmd I get:
input:analog-stereo: Analogue Stereo Input (priority 60, available: unknown)
output:analog-stereo: Analogue Stereo Output (priority 6000, available: unknown)
output:analog-stereo+input:analog-stereo: Analogue Stereo Duplex (priority 6060, available: unknown)
output:analog-surround-21: Analogue Surround 2.1 Output (priority 800, available: unknown)
output:analog-surround-21+input:analog-stereo: Analogue Surround 2.1 Output + Analogue Stereo Input (priority 860, available: unknown)
output:analog-surround-40: Analogue Surround 4.0 Output (priority 700, available: unknown)
output:analog-surround-40+input:analog-stereo: Analogue Surround 4.0 Output + Analogue Stereo Input (priority 760, available: unknown)
output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analogue Stereo Input (priority 5560, available: unknown)
off: Off (priority 0, available: unknown)
So you can see that digital is right there where it should be - output:iec958-stereo
This is what I do to switch the audio to digital and analog but HDMI never works:
pactl set-card-profile 0 output:iec958-stereo
pactl set-card-profile 0 output:analog-stereo
So after I run:
pactl set-card-profile 0 output:iec958-stereo
all I get is a complete silence. I am not getting any error messages.
So I run alsamixer and I confirm that S/PDIF is originally muted but pressing the M key unmutes it and the issue still remains - no audio via HDMI.
When I run PulseAudio Volume Control and look at the Playback tab, I can see levels fluctuating indicating that audio is playing except that there is no actual audio output.
What else should I try? My laptop has a dual card configuration, Intel + a discrete nVidia.
Update - 17/12/2016 I found out why it doesn't work. I am missing the nVidia HDMI Audio option. It appears that something has been mis-configured. Take a look below, no nVidia HDMI Audio option:
$ > aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC663 Analog [ALC663 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC663 Digital [ALC663 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
Update 2 - 17/12/2016 There are some relevant details about this right here: does not detect my sound card HDMI which I haven't tried yet but in my case, running "sudo lspci -H1" does not list NVIDIA also which makes me conclude that the kernel has not detected the nVidia audio chip.
Update 3 - 17/12/2016 It appears that this is a bug. Full details: here