[LAU] Many identical cards - how to keep them straight

carmen _ at whats-your.name
Sun Mar 9 23:09:49 EDT 2008


On Sun Mar 09, 2008 at 07:24:00PM -0700, Mark Knecht wrote:
> On Sun, Mar 9, 2008 at 7:00 PM, David <dplist at free.fr> wrote:
> > On Sun, 9 Mar 2008 15:57:16 -0700
> >  "Mark Knecht" <markknecht at gmail.com> wrote:
> >
> >  > On Sun, Mar 9, 2008 at 3:52 PM, drew Roberts <zotz at 100jamz.com> wrote:
> >  > >
> >  > > On Sunday 09 March 2008 18:44:21 Mark Knecht wrote:
> >  > >  > Hi,
> >  > >  >    I'm aware of and use standard Alsa methods to keep different
> >  > >  > sound cards in the same system straight as far as Alsa is
> >  > >  > concerned. I'm wondering what the proper process would be to
> >  > >  > keep 3 HDSP9652's which are physically in the same system, or
> >  > >  > multiple USB sound devices external to the system, straight as
> >  > >  > far as Alsa is concerned. I'd like to know that a certain card
> >  > >  > always will be always be card 0, card 1 or card 2. I do not want
> >  > >  > Alsa or Linux to make this decision for me and I certainly don't
> >  > >  > want Alsa to change them from boot cycle to boot cycle.
> >  > >  >
> >  > >  >    What's the process to determine which identical card is
> >  > >  > which? Do you need to determine some sort of card specific
> >  > >  > hardware ID and then write udev rules or is there some way to do
> >  > >  > this within Alsa?
> >  > >
> >  > >  I needed to solve this problem a while back. The best help I got
> >  > > was telling me it was not possible.
> >  >
> >  > Humm, that's a pretty glaring disappointment, assuming it's true, and
> >  > I have no reason to believe it isn't.
> >  > >
> >  > >  I would be very interested to learn that there is a way. I got a
> >  > > lot of info that would help with non-identical cards though.
> >
> >  I have not tried this but maybe well crafted udev rules could help ?
> >  The page http://reactivated.net/writing_udev_rules.html#sysfsmatch
> >  gives hints about matching device names to data read from sysfs.
> >
> >  Reading this doc, it looks like you might find info that uniquely
> >  identify each of your cards using the command
> >  "udevinfo -a -p $(udevinfo -q path -n /dev/snd/<yourdevice>)" and craft
> >  you local rules from there.
> >
> >  This might be a question worth asking on alsa-users too.
> >
> >  HTH
> >
> >  --
> >  David
> >
> 
> Yeah, as I said in the original post I suspected that if Alsa couldn't
> do it then udev might be the way to go. Unfortunately that might mean
> that every time I set up a new system I'd have to craft a file
> specifically for that system. I was hoping that maybe there was some
> way for Alsa to look at the card's ID and then automatically assign
> the cards in ID order, etc.

there is, alias snd-slot and snd-card stuff in modprobe conf in /etc (/etc/modules.d/alsa here). im not sure if it works if all the cards are using the same driver

keeps my internal on hw:1 so an Indigo is alwyas default anwyays..



More information about the Linux-audio-user mailing list