I would like to use my" wm890" soundcard as default (card 0)
After reboot the soundcard sometimes change to card 1.
How i can change the soundcard in “isound.conf” card 0?
I would like to use my" wm890" soundcard as default (card 0)
After reboot the soundcard sometimes change to card 1.
How i can change the soundcard in “isound.conf” card 0?
AI generated solution not checked :
On a Raspberry Pi (or most Linux distros running ALSA), forcing a particular soundcard to remain “card 0” involves two main steps:
/etc/asound.conf or in a user‐level ~/.asoundrc).Below is a general approach. Adapt it for your exact card name and system.
bash
Copy
aplay -l
This lists all detected ALSA playback devices and shows each device’s card number, device number, and card name.
2. Note the card name (e.g. wm8960-soundcard, USB Audio, bcm2835, etc.) and the index assigned.
In many Raspberry Pi setups, you can specify card indexing in a file under /etc/modprobe.d/. Sometimes it’s called alsa-base.conf or you may need to create a new file like /etc/modprobe.d/alsa-base.conf:
bash
Copy
sudo nano /etc/modprobe.d/alsa-base.conf
conf
Copy
# Force wm8960 (example name) to be card 0
options snd_soc_wm8960 index=0
# Force onboard audio (bcm2835) to be card 1 (or -2 if you want it to ignore indexing)
options snd_bcm2835 index=1
snd_soc_wm8960 with whatever module name is appropriate for your card.lsmod | grep wm8960 or looking at dmesg logs after plugging the device in.bash
Copy
aplay -l
to verify that your “wm890” or “wm8960” card is now permanently card 0.
asound.conf or .asoundrcOnce the hardware is pinned at card 0, you can specify that card as the default for ALSA. You typically do this in /etc/asound.conf (system‐wide) or in your home directory’s ~/.asoundrc (per user). For example:
conf
Copy
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
}
If your system wants the card name instead of the numeric index, you can do:
conf
Copy
pcm.!default {
type hw
card "wm8960-soundcard" # or the name you saw from aplay -l
device 0
}
ctl.!default {
type hw
card "wm8960-soundcard"
}
Key points:
card 0 means “whatever is pinned as index 0.”0 for playback, but check aplay -l in case your device is labeled differently.bash
Copy
aplay -l
to ensure the card is still at index 0.
2. Test playback:
bash
Copy
speaker-test -t wav -c2
You should hear audio through the “wm890” (or whichever you pinned).
Once these steps are in place, ALSA should consistently treat that card as default, even after reboots.