This is indeed annoying.
In the meantime, you can switch between cards/audio outputs with keyboard shortcuts using a simple script if you want to save some time.
How to
How to:
Type pactl list short sinks
in a terminal window.
This will display the available cards.
In my case:
|7|alsa_output.usb-FiiO_DigiHug_USB_Audio-01.analog-stereo|module-alsa-card.c|s16le 2ch 44100Hz|SUSPENDED|
|8|alsa_output.pci-0000_01_00.1.hdmi-stereo-extra5|module-alsa-card.c|s16le 2ch 44100Hz|SUSPENDED|
If I want to set the hdmi sound as default sound card, I need to enter pactl set-default-sink 8
or pactl set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo-extra5
. I recommend the latter as numbers can change if you add/remove sound cards. Naturally, entering pactl set-default-sink 7
or pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.analog-stereo
will revert to the other card.
If you get the wrong HDMI output when typing pactl list short sinks
, you can use pacmd list sinks
to spot the available profiles (outputs) and card number for your HDMI sound. It defaulted to hdmi-stereo-extra4
while I needed hdmi-stereo-extra5
. So I had to use pactl set-card-profile 1 output:hdmi-stereo-extra5
to use the right output.
The scripts in my case:
To get USB sound:
#!/bin/bash
pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.analog-stereo
pactl set-sink-volume 1 100%
notify-send -i mate -t 1500 'Switching to USB audio'
To get HDMI sound:
#!/bin/bash
pactl set-card-profile 1 output:hdmi-stereo-extra5
pactl set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo-extra5
notify-send -i mate -t 1500 'Switching to HDMI audio'
Just edit them with the right outputs and volume if needed , save them and make them executable (chmod +x scriptname
or in the file properties, permissions tab) and then create keyboard shortcuts using mate-keybinding-properties
(add, give it a name, browse to the right script and then assign a key combination in the list).
While this is not the perfect solution (other than fixing the bug, fiddling with udev rules would allow to automate the thing I assume), it can save quite some time in the long run if you often change outputs..