Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7995

Raspberry Pi OS • Re: Reverting to HDMI Audio on Pi4b Fails

$
0
0
It would be nice if the speaker icon setting would also set the default alsa device, but is there any way to currently use asound.conf and alsa-base.conf to keep the same default alsa device?
Installing pipewire-alsa works around this issue. No need to struggle getting alsa-base.conf to be recognized. I'm not sure why it isn't installed by default on the Desktop RPiOS image.
I googled "linux force vc4 audio to come up before analog audio" and google's AI thing suggested I try creating /etc/modprobe.d/alsa-base.conf with the following content:

Code:

options snd slots=vc4-hdmi,snd_bcm2835
It seems that's slightly wrong, and what you actually need is:

Code:

options snd slots=vc4,snd_bcm2835
Note: vc4 (correct) instead of vc4-hdmi (wrong).

Doing that and rebooting gets me card 0 as vc4-hdmi-0, card 1 as the analog output, card 2 as vc4-hdmi-1, so almost there. A further google led to https://bbs.archlinux.org/viewtopic.php?id=224241 which led me to try:

Code:

options snd slots=vc4,vc4,snd_bcm2835
which finally got me the two HDMI sound outputs as card 0 and card 1, followed by the analogue output as card 2.

Having said that, on a clean install the analogue output always comes up as card 0 for me. Strange. Similar to the above, to force the analogue output to always be card 0, set /etc/modprobe.d/alsa-base.conf to have:

Code:

options snd slots=snd_bcm2835,vc4,vc4
Unfortunately, if you comment out dtparam=audio=on from config.txt you end up with the HDMI outputs being cards 1 and 2, so this could not be used in RPiOS by default, as there is then no card 0, which ALSA will try to use by default and fail. (Unless you add a .asoundrc file, or some other tweak)

The raspi-config utility does include code to switch the default ALSA audio device, but it assumes that the card numbers are stable and don't change between boots, so you would still need a suitable alsa-base.conf or pipewire-alsa installed if you system is having cards change their order upon reboot.

Statistics: Posted by andrum99 — Fri Feb 20, 2026 2:16 am



Viewing all articles
Browse latest Browse all 7995

Trending Articles