[pulseaudio-discuss] How to change profile of bluetooth headset for different applications?

Lin, Mengdong mengdong.lin at intel.com
Mon May 23 08:58:22 PDT 2011


Is it possible to handle bluetooth profile change within "module-bluetooth-device", instead of unload this module and reloading it with the new profile argument for the same device?

I need my bluetooth headset working under A2DP profile for a music/video application and switch to HSP profile automatically for a incoming phone application. I wonder if the "module-bluetooth-device" can monitor application change by hooking sink input's put and unlink event, change profile accordingly, and create/delete sink or source by itself. Then "module-switch-on-connect" can handle sink/source switch and "module-cork-music-on-phone" can handle music interrupted by a incoming call :)

My current solution is to monitor application change in "module-bluetooth-discover": when a phone's input stream is put and current profile is not HSP, the discover module will unload "module-bluetooth-device" and reload it to HSP profile. I wonder if the bluetooth device module can handle this by itself so unloading and reloading can be saved.

I have another question, I learned that the internal concept of a single "default" device can be replaced by priority lists of devices in future routing (from Colin's blog: http://colin.guthr.ie/2010/02/this-is-the-route-to-hell/)
Can the logic of "module-switch-on-connect" conflict with the new routing design?
If yes, this means a latest connected Bluetooth headset may not be the default device for a phone call and changing the profile is not needed. How can the Bluetooth device module know whether it's the default device for an application when this application's input stream is PUT?

Thanks
Amanda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110523/148748c0/attachment.htm>


More information about the pulseaudio-discuss mailing list