[PlanetCCRMA] [Fedora-music-list] sound card order in fc9

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Wed Sep 17 12:45:10 PDT 2008

On Tue, 2008-09-16 at 10:23 -0700, Fernando Lopez-Lezcano wrote:
> I'm trying to find out how to change the default order of the sound
> cards in Fedora 9 (_not_ account by account or using pulseaudio, just a
> global change so that soundcard modules are always loaded in the order I
> define). Googling was of no use (no threads where someone answers the
> original question in a meaningful way). 

And furthermore, the ordering of the cards appears to be
non-deterministic!! That is, in a machine with two sound cards, repeated
reboots end up with different cards in the first slot! How can that be?
Something is throwing dice to select the card??

End result, the machine is unusable if you have more than one soundcard
on it (unless you don't mind sound coming out of different soundcards
randomly). And there is no way (out of the box) to define which one is
first. Hard to believe.  

> Would someone please enlighten me??

Got one answer of the list pointing to:


options snd slots=snd_ice1712
alias snd-card-0 snd_ice1712
to /etc/modprobe.d/sound ends up with no cards loaded at all after a
reboot. Doing:
alias snd-card-0 snd_ice1712
options snd-ice1712 index=0
instead also ends up with no drivers loaded for sound, nice... I could,
of course, be doing something dumb. Does anyone have a working
configuration for selecting the order of sound cards using this method?
What is it exactly you changed?


The loading of the kernel modules is now handled by udev. The
incantation in the current default modprobe configuration file for
loading soundcard drivers has a reference to an environment variable
that I can't find anywhere in /etc or /usr. Another mystery.

Further searches yielded:


as a possible solution. A modification of the script posted there seems
to work just fine. I'm attaching it and the special rules that need to
be included. The sound card pci id is used to define which card is the
first card. It would make more sense to look up the id by name (and read
a configuration file from somewhere that has the information needed),
instead of hard coding it in the script. But well, at least this makes
our machines usable. 

Now, is anyone out there in Fedora world expecting a Fedora 9 user that
has two soundcards and wants to use one of them as the primary card and
the other as the secondary to figure this out by him/herself?? (this is
a standard setup if you don't use the mobo soundcard because you need
better quality). 

-- Fernando

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alsa_name
Type: application/x-perl
Size: 1415 bytes
Desc: not available
Url : http://ccrma-mail.stanford.edu/pipermail/planetccrma/attachments/20080917/02507e21/attachment.bin 
-------------- next part --------------
# sets slot ordering of alsa sound cards

KERNEL=="controlC[0-9]*", DRIVERS=="sound", PROGRAM="/usr/bin/alsa_name %k", NAME="snd/%c{1}"
KERNEL=="hwC[D0-9]*", DRIVERS=="sound", PROGRAM="/usr/bin/alsa_name %k", NAME="snd/%c{1}"
KERNEL=="midiC[D0-9]*", DRIVERS=="sound", PROGRAM="/usr/bin/alsa_name %k", NAME="snd/%c{1}"
KERNEL=="pcmC[D0-9cp]*", DRIVERS=="sound", PROGRAM="/usr/bin/alsa_name %k", NAME="snd/%c{1}"

More information about the PlanetCCRMA mailing list