Solution: how to force sound card order on RPi

Forcing the order of your sound cards can solve some software issues on the Raspberry Pi. For example: if you have to constantly re-select USB PnP Sound Device Audio on Fldigi after a reboot, you may benefit from forcing the sound card order. After hours of scouring the internet and wading through a sea of bad information, I was able to locate the solution posted here by username ernstkl.

The info we need is toward the bottom of the post.

sudo nano /lib/modprobe.d/aliases.conf

Comment out, or delete the existing line about USB sound cards.

Add the following:

options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd_usb_audio,snd_bcm2835

ctl+x, Y, enter to save
sudo reboot

Verify new sound card order with aplay -l
If the Digirig PnP USB sound card doesn’t appear, you probably typed something wrong in the aliases.conf file.

This will force your Digirig to index in the zero spot, and the headset jack to go into the 1 spot. The Digirig will stay in that place so that it doesn’t randomly switch spots following a reboot, and so Fldigi will know where to find it. I have made this work on the Pi 2B, Pi 3B, Pi 3B+, and Pi 4.

1 Like

FYI This no longer works in the new Rasperry Pi OS Trixie. I’m not sure yet how much of an issue this will be on Trixie.

I’m having the same issue with a different audio card on a Trixie system. Were you able to find a solution? Thank you!

1 Like

No. Everything has moved and changed. I spent accumulated weeks worth of hours and thousands of dollars in learning and R&D setting up a robust raspberry pi based VHF comms system for my family, only for everything to get screwed up and changed by new operating systems.

So I have reverted back to the Bullseye OS that I know predictably works and does exactly what I need it to do. All of the old OS are available on the Raspberry Pi website and flashing them with the Rasperry Pi imager is easy. I don’t do any banking or sensitive work on these machines, so if this presents a security risk then I expect the risk to be minimal. I make lots of backups and I don’t even need to have them connected to the internet, so I feel comfortable with this decision.

What type of sound card issue are you encountering with Trixie?

1 Like