ALSA drivers with 2 soundcards

ALSA drivers with 2 soundcards

Post by Fabrice DELENT » Mon, 06 Jan 2003 19:55:23



Hello all.

First forgive me if I posted in the wrong NG but I didn't know where that
would fit...

I have two soundcards in my computer : one is a SoundBlaster 16PCI and the
other is a AC97 VT686A on-board chip.

I installed ALSA-drivers 0.90rc6 so that I could use both. But only one of
those cards (the SoundBlaster) is available. I can't reach the other one,
and I have found no docs on how to do that.

The SoundBlaster is in OSS emulation mode, and works perfectly - except that
every time I reload the modules, all the mixer parameters (pcm volume, etc.)
are set to 0.

Can anybody give a hint or pointers to decent docs?

Thanks in advance.

--
Fabrice DELENTE

 
 
 

ALSA drivers with 2 soundcards

Post by Burton Samogra » Sun, 12 Jan 2003 03:16:07


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


Quote:> First forgive me if I posted in the wrong NG but I didn't know where that
> would fit...

You can always check the alsa-user mailling list archives for info
like this.

Quote:> I have two soundcards in my computer : one is a SoundBlaster 16PCI and the
> other is a AC97 VT686A on-board chip.

> I installed ALSA-drivers 0.90rc6 so that I could use both. But only one of
> those cards (the SoundBlaster) is available. I can't reach the other one,
> and I have found no docs on how to do that.

You want to have two entries in your ~/.asoundrc (you created that
didn't you? :)  

You'll want two entries per card, that look like this:

pcm.sb16
{
type hw
card 0

Quote:}

ctl.sb16
{
type hw
card 0

Quote:}

pcm.vt686a
{
type hw
card 1
Quote:}

ctl.vt686a
{
type hw
card 1

Quote:}

I don't know if sb16 and vt686a are correct in the above example.
Put the actual name of device driver that's loaded for each card
there.

You can then use either card by using -D hw:0 or -D hw:1 in aplay.
Other apps all seem to have different semantics for alsa right now,
but the general hw:0 and hw:1 are relatively consistent.

Quote:> The SoundBlaster is in OSS emulation mode, and works perfectly - except that
> every time I reload the modules, all the mixer parameters (pcm volume, etc.)
> are set to 0.

Try alsactl store 0 and 1 to store your card parameters after setting
them up.  alsactl restore <card> will put them back.  These are
generally run by the alsasound init script.

Quote:> Can anybody give a hint or pointers to decent docs?

Check out alsa-project.org.  The documentation is minimal but there
are some decent examples in there, and they seem to be getting
better.

- --
burton samograd

http://kruhftwerk.dydns.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+Hwf2Lq/0KC7fYbURAhNuAJ0a0SdJXGaTTjUK2z0/h/6z0yee/QCgwCNH
EKxcEfGp9BuqKrv2OkN45Tk=
=ydCq
-----END PGP SIGNATURE-----

 
 
 

ALSA drivers with 2 soundcards

Post by Fabrice DELENT » Sun, 12 Jan 2003 19:53:15


Quote:> You can always check the alsa-user mailling list archives for info
> like this.

I remember trying that but I don't remember finding anything relevant.

Quote:> You want to have two entries in your ~/.asoundrc (you created that
> didn't you? :)  

No I didn't :^) but it's fixed now.

Quote:> pcm.sb16
> {
> type hw
> card 0
> }
> ctl.sb16
> {
> type hw
> card 0
> }
> pcm.vt686a
> {
> type hw
> card 1
> }
> ctl.vt686a
> {
> type hw
> card 1
> }
> I don't know if sb16 and vt686a are correct in the above example.
> Put the actual name of device driver that's loaded for each card
> there.

lsmod gives:

Module                  Size  Used by
snd-pcm-oss            45840   0  (autoclean)
snd-mixer-oss          12784   1  (autoclean) [snd-pcm-oss]
snd-ens1371            12560   0  (autoclean)
snd-via82xx             9040   1  (autoclean)
snd-pcm                64992   0  (autoclean) [snd-pcm-oss snd-ens1371
snd-via82xx]
snd-timer              12720   0  (autoclean) [snd-pcm]
snd-ac97-codec         27008   0  (autoclean) [snd-ens1371 snd-via82xx]
snd-mpu401-uart         3392   0  (autoclean) [snd-via82xx]
snd-rawmidi            14560   0  (autoclean) [snd-ens1371 snd-mpu401-uart]
snd-seq-device          4304   0  (autoclean) [snd-rawmidi]
snd                    31984   1  (autoclean) [snd-pcm-oss snd-mixer-oss
snd-ens1371 snd-via82xx snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart
snd-rawmidi snd-seq-device]

so I put pcm.ens1371, ctl.1371, pcm.via82xx and ctl.via82xx in ~/.asoundrc

After that, alsa loads the vt686a card (driver via82xx) as the main card and
the SB as the secondary card, though I would like the reverse. What's
strange is that I get this behavior (SB main and via686 secondary) if I
remove ~/.asoundrc ?? I'm baffled.

Thanks.

--
Fabrice DELENTE

 
 
 

ALSA drivers with 2 soundcards

Post by Burton Samogra » Sat, 18 Jan 2003 09:00:07


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


Quote:>> pcm.sb16
>> {
>> type hw
>> card 0
>> }
>> ctl.sb16
>> {
>> type hw
>> card 0
>> }

>> pcm.vt686a
>> {
>> type hw
>> card 1
>> }
>> ctl.vt686a
>> {
>> type hw
>> card 1
>> }

> After that, alsa loads the vt686a card (driver via82xx) as the main card and
> the SB as the secondary card, though I would like the reverse. What's
> strange is that I get this behavior (SB main and via686 secondary) if I
> remove ~/.asoundrc ?? I'm baffled.

did you try changing the card lines around (card 0 and card 1 in the
example above) and see if that puts them in the right order?  You
might also want to look at your /etc/modules.conf which defines the
sound card aliases and put the index=<number> option to get them in
the right order.

- --
burton samograd

http://kruhftwerk.dydns.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+Jz/fLq/0KC7fYbURAkZSAJ9DSM8ui3tGQUZQxNBevc0JqYQV5QCdFH7o
UJ8NotELIGHiuEKvjfR3vdM=
=rLxm
-----END PGP SIGNATURE-----