2 soundcard in linux

I want to install 2 identical soundcards (AWE64) in one machine, and it can be driven independently. That is they play different sound source. Thanks  
Who is Participating?
=)  No problem!

Linux does support multiple sound cards.
First off, you need may need to
recompile the kernel.  The reason for
this is that AWE requires special
support in the kernel if you want

Ok, first, let's assume your
distribution comes with the AWE drivers.
I RedHat comes with AWE modules

As root (you need the permissions):

cp /etc/isapnp.conf /etc/isapnp.bak
pnpdump > /etc/isapnp.conf

This will detect PnP devices on your
system.  The AWE64 is a PnP device.

After executing the command above,
you'll find that all the PnP devices
on your system are listed in the
isapnp.conf.  Edit that file using your
favorite text editor.  The isapnp.conf
gives you a set of resources for each
PnP device with which to choose from.
It will most likely give you the same
resource options for both AWE's.  Be
sure to choose different sets of
resources!!!  You select resources
by uncommenting them.  isapnp.conf is
filled with comments on what the device
is and so forth, so it shouldn't be too
difficult for you.

Note!  pnpdump doesn't detect all the
resources needed for AWE Wavetable!
It will only assign one IO Port to the
Wavetable!  Add these additional ones.

(IO 1 (BASE 0x0A20))
(IO 2 (BASE 0x0E20))

I'm not so sure how the IO Ports will
work with two soundcards... you can
email me if you run into trouble on this

Ok, now reboot.  RedHat should run
isapnp on startup and assign the
resources you just specified in

If it didn't:

isapnp /etc/isapnp.conf

will do the trick.

The appropriate drivers should also
have been loaded at startup.  If not:

modprobe sb
modprobe awe_wave
and whatever else, I can't remember...

Now, resources have been assigned and
drivers are loaded, you're all set to
go.  How does Linux support multiple
sound cards?

In /dev/ there are files representing
the various devices on your system.

/dev/dsp0 - first wave output
/dev/dsp1 - second wave output
/dev/mixer0 - first mixer
/dev/mixer1 - second mixer
/dev/sequencer0 - first midi out
/dev/sequencer1 - second midi out

Now most audio apps you have will allow
you to specify a sound device, all you
have to do is tell it which on in /dev.
It varies from application to
application so I can't help you there.

Ok, now let's think practical.  Why
would you want two soundcards?  If
you want different sounds coming from
different speakers, I can understand
this setup.  If you're a music
professional I can also understand your
setup.  But if you want multiple sound
cards to play multiple sound files, this
isn't necessary!  Yes!  You can play
multiple audio streams on a single
soundcard.  It depends on the
application generally.  Or, if you're
running the esound daemon, it supports
merging of streams and playing them
as if they were one.  esound is beyond
the scope of this answer, but if you
want to go that route, I can do what
I can.

Ok, more info.  If what I have said
isn't enough, look in the kernel docs!
If you have the kernel installed,

look in:


That document has plenty of good
information. Much of which I've already
probably you will better of installing only one sound card on one machine- however to install two sound cards I guess you will have to use modules to get them running.( better of running them thru modules than compiling into the kernel). Although I am not sure if this can be done you can try to set the sound cards on different irqs and probe them.
hehehaaaaAuthor Commented:
Thanks for your advice, i can assign two set of resource. But there's an error when i run " modprobe sound"---"Sb16 Bad or missing 16 bit DMA channel". Also, I use XMMS to play audio file, the speed is very low. I don't know how's it happen. Thanks for help
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

The problem might be related, but I'm
not sure.

Let's try to fix the 16bit DMA problem
first and it might fix the XMMS problem.

The 16bit DMA problem sounds easy
enough.  Look in your isapnp.conf and
make sure that you assigned two DMA
channels for each soundcard.  Generally
for a system with one soundcard, the
soundcard would get DMA 0 and 1.  The
other soundcard would have a different
set of DMA channels, maybe something
like 3 and 5.  Try checking that and
let me know how it goes.
hehehaaaaAuthor Commented:
I have assign DMA 1 and 5 for sound card 1, and DMA 3 and 7 for card 2.
I think you need to pass resource
information to the module when you
load it.

in /etc/conf.modules or /etc/modules.conf


options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330

That will work for the first sound card.
I'm not certain about the 2nd sound card, but perhaps you can add another line for the other sound card.

For example:
options sb io=[address] irq=5 dma=3 dma16=7 mpu_io=[address]
hehehaaaaAuthor Commented:
Thanks for your help.
I can make the card working with editing the /etc/conf.modules.
However it only work with 1 card. If I add another line for card 2, it will only detect the second card only!!!!!
Hmm... I have an idea, but I'm not sure
if it will work, so you can give it
a try.

The problem is that you're loading 1
module and trying to give it 2 sets of
parameters.  Try this:

Go into /lib/modules/[version]/misc

in there, you should find a file called
sb.o which is the sound blaster driver
module.  Do this:

cp sb.o sb2.o

Now edit your /etc/conf.modules
and add a line for your 2nd soundcard,
but rather than sb, use sb2.

I'm not sure if this method could fool
the system into treating sb2.o as a
2nd driver or if it will now that sb2
is just a copy of sb.o, but it's worth
a try.  If it doesn't work, we'll see
if we can come up with other ideas.

hehehaaaaAuthor Commented:
It works!!!!
I run "modprobe -a sb2" and 2 card can both work now.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.