You are not logged in.
Hi everyone,
I wonder if it is possible to use two soundcards at the same time with ALSA.
What I want to do is using the inboard sound card, wich is connected to my pc speakers, for every sounds, like listening a video on youtube or someting. The other one (PCI soundcard) is connected to the living room speakers, and I want it to be used only by mpd.
Someone know if it is possible? And if not with ALSA, maybe with pulseaudio?
Thanks you all !
Last edited by k2000 (2010-08-12 22:09:44)
Offline
Yes, ALSA can do that.
Flash, and all apps by default, use the obviously-named stereo "default" PCM.
So, set up a PCM for MPD to use, which outputs to the 2nd soundcard.
Offline
To set up a dedicated PCM for MPD, use something like this:
pcm.mpd {
type hw
card 1 # Obviously, this number can be anything. Check with aplay -l to see what number your card has.
}
Offline
Thanks!
but...
To set up a dedicated PCM for MPD, use something like this:
pcm.mpd { type hw card 1 # Obviously, this number can be anything. Check with aplay -l to see what number your card has. }
wich file must I edit? Something like alsa.conf... but I don't know where Alsa configuration is located.
Offline
~/.asoundrc
Offline
ok, thanks for your help.
doesnt work yet...
first I want it system-wide, so I put the lines in /usr/share/alsa/alsa.con
aplay -l says this:
**** List of PLAYBACK Hardware Devices ****
card 0: SI7012 [SiS SI7012], device 0: Intel ICH [SiS SI7012]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: CA0106 [CA0106], device 0: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: CA0106 [CA0106], device 1: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: CA0106 [CA0106], device 2: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: CA0106 [CA0106], device 3: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0 is the onboard default soundcard, nice. All sounds currently play through this one.
So I want mpd to use card 2. I put this in alsa.conf:
pcm.mpd {
type hw
card 2
}
just after the "pcm.hw" part. Alsa still works correctly, so I guess there is no errors...
Now to configure mpd. I tried this, and a few other combinaison, but it doesnt work. In fact I absolutely don't know where to put the "pcm.mpd" to specify which card to use.
audio_output {
type "alsa"
name "My ALSA Device"
device "mpd:0,0" # optional
# format "44100:16:2" # optional
# mixer_device "default" # optional
# mixer_control "pcm.mpd" # optional
# mixer_index "0" # optional
#}
Any help?
Offline
Oh I got it!
what it takes was that:
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:2,0" # optional
mixer_control "mpd" # optional
}
And everyting seems to be all right! Thanks!!!
Offline
Hey, I'm back...
It still works correctly most of the time, but I have a related problem that I posted here:
https://bbs.archlinux.org/viewtopic.php … 59#p820259
Offline