[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Naming multiple alsa sound cards (was Re: synthetic sound generator with api)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 9 Aug 2006 12:24:24 -0400
"Chuckk Hubbard" <badmuthahubbard@gmail.com> wrote:

> On 8/5/06, Hugo Vanwoerkom <hvw59601@care2.com> wrote:
> > CJ van den Berg wrote:
> > > On Thu, Aug 03, 2006 at 05:20:38PM -0500, Hugo Vanwoerkom wrote:
> > >> For the alsa behaved apps (like libao) you set alsa_card=1 or 0
> > >> and ao_example.c plays on either one soundcard or the other.
> > >
> > > Just a small tip. On machines with multiple sound devices the
> > > alsa card numbers may not be predictable because the device
> > > number depends on which card was detected first. On my machine it
> > > seems to be pretty random. Alsa allows you to refer to sound
> > > devices by *name* though too, which works much more predictably.
> > > So for example in libao you would use the driver option
> > > "dev=hw:NAME" instead of "dev=hw:NUMBER". The names of the
> > > devices on your machine are listed (in square brackets)
> > > in /proc/asound/cards.
> > >
> >
> > I have this in /etc/modprobe.d/sound:
> >
> > alias snd-card-0 snd-via82xx
> > options snd-via82xx index=0
> > alias snd-card-1 snd_ca0106
> > options snd_ca0106 index=1
> >
> >
> > and now the cards always seem to come up in that order.
> > But thanks for the tip!
> 
> Is there any sort of standard for this?  I don't have
> /etc/modprobe.d/sound, and I can't find anywhere what files I need to
> edit to get this done.  

Not to state the obvious here, but have you tried alsaconf?
My /etc/modprobe.d/sound was created by running that utility.

HTH,
Jacob
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFE2hOkkpJ43hY3cTURAkGYAJ998BKo+AudHoJmw96Eyv4QGnZxFQCfXFTX
wazo2QAQ1g3LQTqiS+FYz1c=
=4mEM
-----END PGP SIGNATURE-----

Reply to: