bluetooth: Add support for automatic switch between hsp and a2dp profiles
authorPali Rohár <pali.rohar@gmail.com>
Sat, 2 Jul 2016 20:26:17 +0000 (22:26 +0200)
committerArun Raghavan <arun@arunraghavan.net>
Fri, 22 Jul 2016 11:00:25 +0000 (16:30 +0530)
commitbde2ff8794a9363b1f7f2c683b160268ce371770
tree37c1f10c307faa4c326d002e560b988e97d9834f
parent74251f07864c63439ea847d7287024ac54578d64
bluetooth: Add support for automatic switch between hsp and a2dp profiles

With this patch module-bluetooth-policy automatically switch from a2dp profile
to hsp profile if some VOIP application with media.role=phone wants to start
recording audio.

By default a2dp profile is used for listening music, but for VOIP calls is
needed profile with microphone support (hsp). So this patch will switch to
hsp profile if some application want to use microphone (and specify it in
media.role as "phone). After recording is stopped profile is switched back
to a2dp. So this patch allows to use bluetooth microphone for VOIP applications
with media.role=phone automatically without need of user interaction.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
src/modules/bluetooth/module-bluetooth-policy.c