Posts: 432
Joined: Sat Aug 18, 2012 5:58 pm

VC4 and secondary sound card: Set ALSA card ordering

Fri Feb 08, 2019 1:18 pm

Hi there!

I'be been trying for a year to fix this issue.
Thing is, I have an Hifiberry card on my Pi setup, where I use the open source VC4 driver stack. That gives me two ALSA cards: snd_rpi_hifiberry_dacplus and vc4-hdmi. It works almost fine, but sometimes alsa-restore.service fails on boot because card ordering changes between boots, so it tries to apply control states to the wrong card, thus failing.

So, I need a way to stabilize alsa card ordering among boots.
I have found this info: ... chitecture

So I tried creating /etc/modprobe.d/alsa-base.conf with these contents:

Code: Select all

options snd_soc_hifiberry_dacplus index=0
options vc4 index=1
Alternatively I also tried:

Code: Select all

options vc4 index=-2
(It's supposed to tell modprobe to NEVER allow a card to be the first ALSA one).

However, none of those seem to work. From boot to boot, I get different cards as the first ALSA card...
Can you guys tell me of a working way to get the Hifiberry to ALWAYS be the first ALSA card?
Disabling the vc4-hdmi card entirely would be an option, but there seems to be no way.

Return to “Raspbian”