[pulseaudio-discuss] asoundrc, configure one virtual device for both input and output

Tanu Kaskinen tanuk at iki.fi
Fri Jun 29 06:45:49 PDT 2012


On Fri, 2012-06-29 at 22:16 +0900, Amar Akshat wrote:
> Hi,
> I have a multiple sound cards connected to my pc, and I have input and
> output configured as different virtual devices, like this,
> pcm.pulse_i {
> type pulse
> device alsa_input.pci-0000_00_1b.0.analog-stereo
> }
> pcm.pulse_o {
> type pulse
> device alsa_output.pci-0000_00_1b.0.analog-mono
> }
> Can I combine both of them into one virtual device ? Since my application
> requires specifying only sound card name for both operations. ?
> Thanks in advance.

It might be possible to combine the two devices into one with some alsa
configuration magic. I don't know how to do that.

It seems a bit stupid that the pulse plugin only has one "device"
parameter. It should have separate "sink" and "source" parameters. Feel
free to file a bug about this:
https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio

That said, usually we recommend not to use a sound card selector in
individual applications. Instead, use pavucontrol or similar to
configure the routing. Let's say that you have this in your asoundrc:

pcm.pulse {
    type pulse
}

When you use that, the routing is done by the pulseaudio daemon, instead
of you hardcoding the sound card in the configuration file. If you're
not happy with the automatic routing, you can move your application's
streams with e.g. pavucontrol to the right sink/source.

-- 
Tanu



More information about the pulseaudio-discuss mailing list