Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

2 soundcard in linux

Posted on 2000-04-19
9
Medium Priority
?
429 Views
Last Modified: 2010-04-20
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  
0
Comment
Question by:hehehaaaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 

Expert Comment

by:smile040800
ID: 2733958
hi,
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.
0
 
LVL 1

Accepted Solution

by:
X2 earned 450 total points
ID: 2757661
=)  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
wavetable.

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

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
one.


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

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
etc...

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,
/usr/src/linux[-whatever].

look in:

/usr/src/linux[-whatever]/Documentation/sound/AWE32


That document has plenty of good
information. Much of which I've already
covered.
0
 

Author Comment

by:hehehaaaa
ID: 2796051
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
0
Certified OpenStack Administrator Course

We just refreshed our COA course based on the Newton exam.  With 14 labs, this course goes over the different OpenStack services that are part of the certification: Dashboard, Identity Service, Image Service, Networking, Compute, Object Storage, Block Storage, and Orchestration.

 
LVL 1

Expert Comment

by:X2
ID: 2797781
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.
0
 

Author Comment

by:hehehaaaa
ID: 2799149
I have assign DMA 1 and 5 for sound card 1, and DMA 3 and 7 for card 2.
0
 
LVL 1

Expert Comment

by:X2
ID: 2801977
I think you need to pass resource
information to the module when you
load it.

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

add:

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]
0
 

Author Comment

by:hehehaaaa
ID: 2803380
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!!!!!
0
 
LVL 1

Expert Comment

by:X2
ID: 2806160
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.


Vinh
0
 

Author Comment

by:hehehaaaa
ID: 2816143
It works!!!!
I run "modprobe -a sb2" and 2 card can both work now.
Thanks
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to moveā€¦
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question