Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ALSA Card Order
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
avieth
Veteran
Veteran


Joined: 17 Sep 2004
Posts: 1945
Location: Canada

PostPosted: Tue Dec 12, 2006 9:35 pm    Post subject: ALSA Card Order Reply with quote

I have two sound devices in my box. One is the sound card, emu10k1, the other is a usb midi keyboard, snd-usb-audio.

I'm using kernel modules, not the alsa-driver package. I have the emu10k1 set to autoload first, and then the usb-audio. For some reason usb-audio is always set to card0, or the default device. I have an alias setting snd-emu10k1 to card-0 in /etc/modules.d/alsa, but it doesn't seem to do anything.

How can I get emu10k1 to be my default device (besides just turning off my keyboard at boot, which works just fine :wink: )
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Tue Dec 12, 2006 9:39 pm    Post subject: Reply with quote

in /etc/modules.d/alsa

Code:

options snd-emu10k1 index=0
...
options snd_ice1712 index=1
...


HTH
Back to top
View user's profile Send private message
VoVaN
l33t
l33t


Joined: 02 Jul 2003
Posts: 701
Location: The Netherlands

PostPosted: Wed Dec 13, 2006 2:47 pm    Post subject: Reply with quote

frostschutz wrote:
in /etc/modules.d/alsa

Code:

options snd-emu10k1 index=0
...
options snd_ice1712 index=1
...


HTH

I don't know it it solved the problem for the author, but it doesn't work for me, so I have to load driver for the first card from /etc/modules.d/kernel-2.6.
Code:
snd-emu10k1 index=0
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Dec 13, 2006 3:13 pm    Post subject: Reply with quote

Edit /etc/modules.d/alsa, then run modules-update to recreate /etc/modules.conf

This running of modules-update is a crummy compromise, due to legacy files, apparently :(
Back to top
View user's profile Send private message
VoVaN
l33t
l33t


Joined: 02 Jul 2003
Posts: 701
Location: The Netherlands

PostPosted: Wed Dec 13, 2006 3:27 pm    Post subject: Reply with quote

PaulBredbury wrote:
Edit /etc/modules.d/alsa, then run modules-update to recreate /etc/modules.conf

This running of modules-update is a crummy compromise, due to legacy files, apparently :(


As I can remember, I've done modules-update after updating files, but probably I just forgot it... Anyway, I'm satisfied with the solution/workaround I'm using at the moment.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Wed Dec 13, 2006 5:31 pm    Post subject: Reply with quote

The modules autoload workaround is what I was using before, but it repeatedly broke; may be due to other init scripts / dependencies that already caused modules to load, maybe after restarting the alsa init script (which unloads and then reloads all modules on its own, so it may cause a reordering of devices). The above solution seems to work fine for me so far; of course you'll have to change snd_emu10k1 and the like to the drivers / sound card modules you are actually using.

The solution I quoted above is also described in the Linux Kernel / Alsa Driver documentation (/usr/src/linux/Documentation/sound/alsa/ALSA-Configuration.txt). Here is the relevant part of the original documentation:

Code:

The available number of auto-loaded sound cards depends on the module
option "cards_limit" of snd module.  As default it's set to 1.
To enable the auto-loading of multiple cards, specify the number of
sound cards in that option.

When multiple cards are available, it'd better to specify the index
number for each card via module option, too, so that the order of
cards is kept consistent.

An example configuration for two sound cards is like below:

----- /etc/modprobe.conf
# ALSA portion
options snd cards_limit=2
alias snd-card-0 snd-interwave
alias snd-card-1 snd-ens1371
options snd-interwave index=0
options snd-ens1371 index=1
# OSS/Free portion
alias sound-slot-0 snd-interwave
alias sound-slot-1 snd-ens1371
----- /etc/modprobe.conf

In this example, the interwave card is always loaded as the first card
(index 0) and ens1371 as the second (index 1).


In other words, it should work. It does for me; or is it just luck?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum