On Wed, Apr 21, 2010 at 8:26 AM, Arnold Krille <arnold@xxxxxxxxxxxxx> wrote:
Take a look at loading modules with options. And then tell the kernel via/etc/modprobe.d/ to load the modules for the soundcards with option
"index=<IDX>" where IDX is the index number/ordering you want to give these
cards. Then it doesn't depend on the order the soundcards are detected
anymore.
Except if you plug in a new USB audio device, such as a web-cam with microphone, it'll automatically assert itself as "device 0" unless you explicitly setup /etc/modprobe.d with ALSA card #'s for all devices before ever plugging them in.
The issue is that the USB audio devices "bind" first, so if you have a PCI or PCIe soundcard as device 0, such as your builtin mobo sound, or an add-on Delta-66 or Audiophile 24/96, the "card" will fail because the random new USB device has already grabbed the device.
One solution to this is to leave "device 0" unbound. That way, whenever you accidentally plugin a USB device with sound, it automatically gets assigned as device 0, instead of disabling whatever PCI card should have been bound to that device.
FYI, here's the /etc/modprobe.d/snd.conf I setup on my son's computer to ensure consistent numbering of ALSA audio devices:
##
## 0 [NVidia ]: HDA-Intel - HDA NVidia
## HDA NVidia at 0xdfff8000 irq 21
alias snd-card-0 snd-hda-intel
options snd-hda-intel index=0
##
## 1 [M66 ]: ICE1712 - M Audio Delta 66
## M Audio Delta 66 at 0xe880, irq 21
alias snd-card-1 snd-ice1712
options snd-ice1712 index=1 omni=1
##
## 2 [MT4 ]: USB-Audio - MT4
## Emagic MT4 at usb-0000:00:04.0-2, full speed
alias snd-card-2 snd-usb-audio
##
## 3 [LPK25 ]: USB-Audio - LPK25
## AKAI professional LLC LPK25 at usb-0000:00:02.0-1, full speed
alias snd-card-3 snd-usb-audio
##
## 4 [WE ]: USB-Audio - DJ Console (WE)
## Hercules DJ Console (WE) at usb-0000:00:02.0-2, full speed
alias snd-card-4 snd-usb-audio
##
## 5 [KQ245AA ]: USB-Audio - HP Prem AF Webcam KQ245AA
## HP Prem AF Webcam KQ245AA HP Prem AF Webcam KQ245AA at usb-0000:00:02.1-2, high
alias snd-card-5 snd-usb-audio
##
## ROOT-coggie-16-/etc/modprobe.d> lsusb
## ...
## Bus 004 Device 006: ID 0582:0005 Roland Corp. Edirol UM-2 MIDI Adapter
## Bus 004 Device 003: ID 086a:0003 Emagic Soft- und Hardware GmbH MT4
## Bus 004 Device 002: ID 06f8:b000 Guillemot Corp. Hercules DJ Console
## Bus 003 Device 002: ID 09e8:0076 AKAI Professional M.I. Corp.
## Bus 001 Device 003: ID 04f2:a13d Chicony Electronics Co., Ltd
## ...
options snd-usb-audio index=2,3,4,5 vid=0x086a,0x09e8,0x06f8,0x04f2 pid=0x0003,0x0076,0xb000,0xa13d
-- Niels
_______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/listinfo/linux-audio-user