Re: [pulseaudio-discuss] Does pulseaudo provide API to set the active port of a sink/source?

2011-09-20 Thread Lin, Mengdong
 
> PA_COMMAND_SET_SINK_PORT
> PA_COMMAND_SET_SOURCE_PORT
> ~
> 
> And the corresponding pa_context_set_sink_port_by_index is possibly what
> you want.


Yes. It's what I want. Many thanks ;-)

Mengdong
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Does pulseaudo provide API to set the active port of a sink/source?

2011-09-20 Thread Tanu Kaskinen
On Tue, 2011-09-20 at 10:07 +0300, Lin, Mengdong wrote:

> Does PA provide an API that can to set the active port on a
> sink/source?

http://freedesktop.org/software/pulseaudio/doxygen/introspect_8h.html

pa_context_set_{sink,source}_port_by_{index,name}()

-- 
Tanu

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Does pulseaudo provide API to set the active port of a sink/source?

2011-09-20 Thread Lu Guanqun
On Tue, Sep 20, 2011 at 03:07:49PM +0800, Lin, Mengdong wrote:
> I want to switch to the loud speaker/mike (hand-free) during a phone call 
> without unplugging my wired headset. And the wired-headset and speaker/mike 
> are two ports of the ALSA sink/source on my platform.
> 
> Does PA provide an API that can to set the active port on a sink/source?
> I only found the API to set sink/source "pa_context_set_default_sink" but no 
> API to set the port.

Check PROTOCOL file gives me back:

~
### v16, implemented by >= 0.9.15

new messages:

PA_COMMAND_SET_SINK_PORT
PA_COMMAND_SET_SOURCE_PORT
~

And the corresponding pa_context_set_sink_port_by_index is possibly what
you want.

-- 
guanqun
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Does pulseaudo provide API to set the active port of a sink/source?

2011-09-20 Thread Lin, Mengdong
I want to switch to the loud speaker/mike (hand-free) during a phone call 
without unplugging my wired headset. And the wired-headset and speaker/mike are 
two ports of the ALSA sink/source on my platform.

Does PA provide an API that can to set the active port on a sink/source?
I only found the API to set sink/source "pa_context_set_default_sink" but no 
API to set the port.

Many thanks
Mengdong

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss