I’ve got a laptop with an HDMI output. When I connect a display I get a nice popup to let me choose to extend / mirror / ignore that display output device.
But I can’t see anything about that HDMI output device in my KDE audio-config GUI.
After googling a bit I found here, that I can list audio output devices like this:
$aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3266 Analog [ALC3266 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [VSX-924]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
And that this produces white noise on each of the 8 channels of the connected surround system:
speaker-test -D hw:0,8 -c 8
Now how can I continue from here to stream “normal” audio output to that device, preferable by making that output select-able & configurable through the “normal” KDE audio config GUI.
That stackoverflow answer says to create a .asoundrc
config file, so I’ll next try to research what to put in there, the target path seems to be ~/.asoundrc
.
UPDATE: okey so this allows me to pass stereo sound through hdmi:
pactl load-module module-alsa-sink device=hw:0,8
next step: find out how I can name that device (it reads “Built-in Audio” in the sound config GUI now) and how to configure the number of channels to use or allow the GUI to change the number.
UPDATE2:
pactl unload-module module-alsa-sink
pactl load-module module-alsa-sink device=hw:0,8 channels=8
makes it work with 8 channels instead of 2.
So the open question I was not able to answer myself as of yet:
How to get this closer to the “just works” status I find on other systems: Just connect HDMI and select the HDMI output in the audio config GUI.
Without using aplay -l
to get a list of devices, speaker-test
to find which of the many displayed is actually producing sound and finally using pactl load-module
to be able to use that and pactl unload-module
to get rid of that device in the GUI after the hdmi output has been disconnected again.