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

Amar Akshat amar.akshat at gmail.com
Fri Jun 29 07:54:30 PDT 2012


Well I understand what you mean, however the problem at my end is a
combination of two, in which automatic routing just can't work as far as I
can see.

1). I need to be able to specify sound card "name", so that my program can
operate sound to/from that device.
2). Multiple applications within my program shall be able to use the same
sound -card.

Now, I can shoot item #2, by creating a virtual device in asoundrc, but to
shoot item# 1, I need sound_device name, which has to be same for sink and
source. By using tools (eg. pavucontrol), I can specify a default
behaviour, but can I specify name based sound routing ? I mean is it
possible that I specify a device there say, X - which can use pulse_1 as
sink and pulse_2 as source.

Thanks in advance.

On Fri, Jun 29, 2012 at 10:45 PM, Tanu Kaskinen <tanuk at iki.fi> wrote:

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


-- 


Thank you...

*Amar Akshat (アマール)*

 *"Walking on water and developing software from a specification are easy
if both are frozen."*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20120629/571c9f33/attachment.html>


More information about the pulseaudio-discuss mailing list