Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multiple sound cards
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
karlosfwb
n00b
n00b


Joined: 17 Mar 2003
Posts: 14

PostPosted: Fri Jan 16, 2004 4:22 am    Post subject: Multiple sound cards Reply with quote

I am trying to get 2 sound cards working. I have both cards installed, and the alsa drivers installed for both. Everything seems to be working. However, when i look in /dev there is only dsp, no dsp1. Same goes for /dev/sound. No just dsp, no dsp1. In /proc/asound, both cards are listed.

Any ideas?
_________________
Dulche decorum est, pro patria mori...
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Wed Jan 21, 2004 10:56 pm    Post subject: Reply with quote

/dev/dsp is only for oss-compatibility, you have to set up your cards in your /etc/asound.conf, press F2 in alsamixer to get the numbers. What do you want to use them for?
Back to top
View user's profile Send private message
karlosfwb
n00b
n00b


Joined: 17 Mar 2003
Posts: 14

PostPosted: Wed Jan 21, 2004 11:15 pm    Post subject: Reply with quote

I'm using multiple sound cards to go with my multiple tuners for use with MythTV. I actually dropped back to 2.4.20, and I got both dsp and dsp1 back.

At the moment I don't have an asound.conf. What would be the proper method for setting up the cards under alsa, not using oss compatibility?
_________________
Dulche decorum est, pro patria mori...
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Wed Jan 21, 2004 11:27 pm    Post subject: Reply with quote

You have to setup two slaves and tell your programs which to use, one can be default, difficult to describe and the docs are #@!¤!!!
Code:
# ~/.asoundrc:
pcm.!default {
        type plug
        slave.pcm "dmixer"
}

pcm.dmixer  {
        type dmix
        ipc_key 1024
        slave {
                pcm "hw:0,1"
                period_time 0
                period_size 1024
                buffer_size 8192
                #periods 128
                rate 44100
        }
        bindings {
                0 0
                1 1
        }
}

ctl.mixer0 {
        type hw
        card 0
}

tells alsa-aware apps to use the rear exit of my card and apply software mixing, while oss-apps get the front out. Sorry, I don't know MythTV, but if it let's you specify alsa-drivers, you can differenciate by using hw:0,0 or hw:1,0. If one of your cards supports 4-channel, perhaps something like alsa:rear can be enough. Have a look at alsa.opensrc.org for some docs, I'll check on MythTV ;-)
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Wed Jan 21, 2004 11:33 pm    Post subject: Reply with quote

Ok, the web site won't tell me about audio settings, but now I see, you need two inputs! Can you get some screenshots or config syntax how/where you got this with OSS?
Back to top
View user's profile Send private message
karlosfwb
n00b
n00b


Joined: 17 Mar 2003
Posts: 14

PostPosted: Thu Jan 22, 2004 12:02 am    Post subject: Reply with quote

Apparently I did it completely by accident. :D

I'm not sure exactly what you are looking for, but here is the gist.

Once I discovered that I would need a second sound card (or use the btaudio driver, which I'm told is not worth it) to utilize 2 tuners with mythtv, I installed a second sound card, recompiled alsa-driver with
Code:
ALSA_CARDS="emu10k1 cmipci"
now in my make.conf. I then proceeded to update /etc/modules.d/alsa for two cards as per the documentation in the file. I rebooted, and viola, to inputs in /dev. However, for reasons not pertinent to the discussion, I also decided to update my kernel to 2.4.22, and something about that process apparently screwed up alsa (...perhaps I needed to recompile alsa-oss as well?). Anyway, I went back to 2.4.20, and both inputs were back in /dev.

As far as mythtv goes, when you run the mythsetup program to set up mythtv for your hardware, for each tuner, it asks you for an audio input for each tuner card (since the tuner cards just spit the audio out the back, you have to use a 'loopback' cable to get the sound back into the system). Anyway, apparently Mythtv does some autodetection, because it prepopulates the list with /dev/dsp, /dev/sound/dsp, etc.

Perhaps mythtv is not alsa aware...

If you want to see any config files, just let me know which ones.
_________________
Dulche decorum est, pro patria mori...
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Thu Jan 22, 2004 12:19 am    Post subject: Reply with quote

Can you get a screenshot of this window containing /dev/dsp etc? I was thinking about activating my onboard-chip again, I'll have a look on my 2.6.1 about /dev/dsp1. Tomorrow, that is, quite late here :D
Btw, the mythtv website recommends alsa.
Back to top
View user's profile Send private message
karlosfwb
n00b
n00b


Joined: 17 Mar 2003
Posts: 14

PostPosted: Thu Jan 22, 2004 12:47 am    Post subject: Reply with quote

Here ya go

[img:36a7523bce]http://karlos.eccstudents.com/snapshot3.jpg[/img:36a7523bce]

EDIT: Hmm, I don't seem to have the hang of posting a screenshot here... Well thats the URL anyway.
_________________
Dulche decorum est, pro patria mori...
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Thu Jan 22, 2004 1:56 pm    Post subject: Reply with quote

Image posting was disabled some days ago, for reasons that were not to be mentioned !?!? :?

Anyway, I tried to get my onboard via82xx to work along with the cmi8738, but while it appears in /sys/bus/pci/drivers, it isn't listed by lspci and alsa doesn't care about it...sorry, I have no idea what I'm missing and I'm not going back to 2.4 atm.
Perhaps I'll check on the alsa mailing-list if I can't find any recent docs on 2.6. For the moment I can only advise you to stick with 2.4, but I'll share my findings, good luck til then!
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Thu Jan 22, 2004 4:14 pm    Post subject: Reply with quote

Ok, seems to be some kind of hardware problem on my side, I can't get the kernel to find the chip, even booted into windows, no idea...you OTOH may want to look at http://alsa.opensrc.org/index.php?page=MultipleCards and/or post your /etc/modules.d/alsa...;-)
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Thu Jan 22, 2004 4:17 pm    Post subject: Reply with quote

http://alsa.opensrc.org/index.php?action=find&find=Getting+oss+emulation+to+work+with+2+Sound+cards

while you're at it :D
Back to top
View user's profile Send private message
karlosfwb
n00b
n00b


Joined: 17 Mar 2003
Posts: 14

PostPosted: Thu Jan 22, 2004 4:28 pm    Post subject: Reply with quote

Interesting... Particularly because I had it work for me using 2.4.20, but NOT when using 2.4.22...

Ah well, one of these days, I'll make the switch to 2.6. In any case its good to know that it was a bug, and not my stupidity that was causing the problems... :D

So let me see if i understand this properly. When using /dev/dsp and whatnot to access your sound 'devices' you are using oss compatibility. So what is the benefit of using pure alsa drivers (hw:0,0), as that seems a deviation from the normal unix-y way of doing things?

Thanks for all your help. :)
_________________
Dulche decorum est, pro patria mori...
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Thu Jan 22, 2004 5:18 pm    Post subject: Reply with quote

Alsa is more flexible, you can assign programs to plug-ins like the dmixer, eliminating the need for arts or esd, or convert sample-rates on the fly or with jackd get low latency for your composing apps...It's the future(tm) :P
It made 1.0 just recently, but all that means is that alsa-lib functions won't break with new releases, there's still work to be done, but I like it :D

HTH, cu!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum