HDMI audio fix
My little Mele mini-PC has been sitting on a shelf, not setup due
to lack of monitor, etc. And a lack of bench space. It is good,
though, to have all the computers setup ready to use, for
convenience when testing a new iteration of EasyOS.
So, unfolded the camp table and found all the parts to get the
Mele going. Using my little 24 inch TV, used for camping, as it
runs on 12v. That's when I discovered audio output via HDMI to the
TV doesn't work.
Looking at the Multiple Sound Card Wizard (usr/sbin/mscw), I see
that I did implement a fix for this in December 2021, but it is
broken again. Actually, this is a pulseaudio bug, that has been
around for years, see discussion here, from mid-2019 to mid-2022:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1834771
I have fixed HDMI audio, with this new code in MSCW:
#20220702 testing on mele mini-pc with tv, hdmi audio, no sound. fix...
# "pactl list sinks" doesn't show the hdmi, pa bug for 3 years...
# ref: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1834771
read newCard newDevice <<< "$(get_card_device "$SELECTED")"
pactl load-module module-alsa-sink device=hw:${newCard},${newDevice} #so don't have to restart server.
sed -i '/^load-module module-alsa-sink/d' /etc/pulse/default.pa
echo "load-module module-alsa-sink device=hw:${newCard},${newDevice}" >> /etc/pulse/default.pa
pactl set-default-sink alsa_output.hw_${newCard}_${newDevice} #so don't have to restart server.
sed -i '/^set-default-sink/d' /etc/pulse/default.pa
echo "set-default-sink alsa_output.hw_${newCard}_${newDevice}" >> /etc/pulse/default.pa
Rebooted, and yes, audio works.
I notice the posters in the above link are saying the bug affects
AMD CPU/GPU PCs, but the Mele has an Apollo Lake J3455 CPU with
Intel "HD Graphics 500" and "HDA-Intel" audio.
Tags: easy