[pulseaudio-discuss] Does pulseaudio provide any callback mechanism for application on device change?

Lin, Mengdong mengdong.lin at intel.com
Tue Sep 20 02:13:34 PDT 2011


Hi Col,

The policy application is a routing manager.  And we hope the routing policy would be general rather than for any single customer. So it would be very helpful to support it in upstream and PA provides a framework for us to write our own routing module. 

Here are the requirements:
- No limitation on the types of devices. Support as many audio devices as possible, including loud speaker/mic, wired headset, Bluetooth headset, HDMI output etc.

- Latest connected device/port has highest priority for audio output/input. PA can automatically route audio to this device/port at once. And the device will become the default sink/source. We don't consider multiple outputs/inputs for handheld devices now. (This work is done in module-switch-on-connect.c after David adds his jack detection patch)

- When the default device is removed or it active port become unavailable, PA can route audio back the previous device/port if still available. (So we need to maintain a device/port usage history list, i.e. a priority list in connection and user choice order)

- The application get all device/port status and get notified on the change. The user can manually route audio to any available device/port.

- The default device (its card) can automatically change the profile for the "main" stream. E.g. the Bluetooth headset can change profile from A2DP to HSP when a "phone" stream is created and switch back to A2DP profile after the call ends to play music.

We'll be grateful if you could share you ideas on these requirements.

Thanks
Mengdong 


> -----Original Message-----
> From:
> pulseaudio-discuss-bounces+mengdong.lin=intel.com at lists.freedesktop.org
> [mailto:pulseaudio-discuss-bounces+mengdong.lin=intel.com at lists.freedesk
> top.org] On Behalf Of Colin Guthrie
> Sent: Tuesday, September 20, 2011 4:09 PM
> To: pulseaudio-discuss at lists.freedesktop.org
> Subject: Re: [pulseaudio-discuss] Does pulseaudio provide any callback
> mechanism for application on device change?
> 
> 'Twas brillig, and Lin, Mengdong at 20/09/11 07:56 did gyre and gimble:
> > I’m working on a policy application that need to know all available
> > audio devices (speaker/mike, headphone, Bluetooth headset, HDMI) and
> > allow user to manually set the default sink/source/port.
> 
> If it's not confidential, it would be very appreciated if you could
> share the policy app requirements here.
> 
> Several people have written separate, in-house policy bits and it would
> be much more beneficial if we could get something upstream (even if just
> a solid framework) that would reduce the effort and duplication.
> 
> Cheers for any info you can share.
> 
> Col
> 
> --
> 
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
> 
> Day Job:
>   Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>   Mageia Contributor [http://www.mageia.org/]
>   PulseAudio Hacker [http://www.pulseaudio.org/]
>   Trac Hacker [http://trac.edgewall.org/]
> 
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


More information about the pulseaudio-discuss mailing list