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
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to