[PlanetCCRMA] Reordering Sound Cards

Mark Knecht Mark Knecht <markknecht@gmail.com>
Wed Jul 6 13:32:01 2005


On 7/6/05, Janina Sajka <janina@freestandards.org> wrote:
> Mark Knecht writes:
> > Hi,
> >    I think you want something like:
> >
> > alias snd-card-0 snd-CARD_0
> > options snd-CARD_0 index=0
> > alias snd-card-1 snd-CARD_1
> > options snd-CARD_1 index=1
> >
> > I don't have this set up right now but I've used it in the past with 2
> > audio cards and a USB MIDI interface where I wanted to know that each
> > time I booted I'd always get the cards in a known order.
> >
> 
> 
> Yes, that's exactly what I did in /etc/modprobe.conf, but it doesn't
> appear to be enough.
> 
> Running aplay [file.wav] gives me:
> 
> ALSA lib conf.c:1578:(snd_config_load1) _toplevel_:51:23:No such file or
> directory
> ALSA lib conf.c:2823:(snd_config_hook_load) /etc/alsa/cards/aliases.conf
> may be old or corrupted: consider to remove or fix it
> ALSA lib conf.c:2686:(snd_config_hooks_call) function
> snd_config_hook_load returned error: No such file or directory
> ALSA lib pcm.c:1959:(snd_pcm_open_conf) Invalid type for PCM default
> definition (id: default, value: cards.pcm.default)
> aplay: main:533: audio open error: Invalid argument
> 
> Whereas 'apaly -D hw:0,0' works like a charm. So, not sure where the
> "invalid argument' is housed.
> 
> 
> As you suggest, I've already switched things around in my
> /etc/modprobe.conf as follows. The card/index number are as I want them.
> The install had them reversed from this:
> 
> alias snd-card-0 snd-intel8x0
> options snd-card-0 index=0
> options snd-intel8x0 index=0
> remove snd-intel8x0 { /usr/sbin/alsactl store 1 >/dev/null 2>&1 || : ;
> }; /sbin/modprobe -r --ignore-remove snd-intel8x0
> options snd-hdsp index=1
> remove snd-hdsp { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; };
> /sbin/modprobe -r --ignore-remove snd-hdsp
> 

Do you have a cards_limit command somewhere? I think that's required
also. I was assuming it was there before but I don't see it here.

options snd card_limits=2

I seem to remember that if you don't do this then results are not
guaranteed. I hope I'm not leading you astray though.

good luck,
Mark