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

Amar Akshat amar.akshat at gmail.com
Fri Jun 29 08:58:28 PDT 2012


On Sat, Jun 30, 2012 at 12:27 AM, Tanu Kaskinen <tanuk at iki.fi> wrote:

> On Fri, 2012-06-29 at 23:54 +0900, Amar Akshat wrote:
> > 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.
>
> You're apparently using an alsa application. If it asks you a sound card
> name, tell it to use "default". That should then forward the sound to
> pulseaudio if alsa is set up correctly.
>

Let me explain, I am in the process of building an application ("my
program"), which allows user to switch sound cards (as in left usb handset,
right usb handset and oboard), and I am going to store sound_cards, in
variables like following,

onboard = "pulse_onboard"
right_handset = "pulse_right"
left_handset = "pulse_left"

Depending upon user's current state, I am going to marshal request to
my back-end program, which takes sound card as plain strings. So I can't
use default, I need to be able to specify the sound_card name which can be
any of the three (namely onboard, right and left).


>
> > 2). Multiple applications within my program shall be able to use the
> > same sound -card.
>
> I don't understand what you're trying to say here. What's the difference
> between "application" and "my program" here? If you tell all
> applications to use "default", then all applications will use the same
> sound card, and your problem is solved?
>
> As explained above I can't tell my program to use default, because user
may change his preference by the press of a button to switch the program,
when it is running.


> > 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.
>
> With pavucontrol you can route each application where ever you want. I
> feel that I'm not understanding what you're asking...
>
> Am I a bit clear this time ?

> --
> 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/20120630/2390fab8/attachment.html>


More information about the pulseaudio-discuss mailing list