[pulseaudio-discuss] [PATCH v5 2/4] bluetooth: separate HSP and HFP
Rodrigo Araujo
araujo.rm at gmail.com
Sat Sep 23 22:33:15 UTC 2017
Hi.
First, just to say that your patches are going great. Finally I can use
the microphone of my HFP only headset (a version of a Bluedio T2+).
So far, I've only encontered one problem: the auto_switch option of
module_bluetooth_policy stops working. Dug through the code and I think
you missed a few spots were you have to hangle the new headset_handsfree
profile in module_bluetooth_policy.c
Applying the following after applying your v5 patches fixed the issue
for me, now when I start making a VOIP call the profile switches to
headset_handsfree and the mic works automatically, and when the call
finishes it reverts back to a2dp.
Thanks and best regards.
--- a/src/modules/bluetooth/module-bluetooth-policy.c 2017-09-23 23:04:49.543369180 +0100
+++ b/src/modules/bluetooth/module-bluetooth-policy.c 2017-09-23 23:04:58.039286751 +0100
@@ -160,7 +160,7 @@
if (!pa_streq(profile->name, "a2dp") && !pa_streq(profile->name, "a2dp_sink"))
continue;
} else {
- if (!pa_streq(profile->name, "hsp") && !pa_streq(profile->name, "headset_head_unit"))
+ if (!pa_streq(profile->name, "hsp") && !pa_streq(profile->name, "headset_head_unit") && !pa_streq(profile->name, "headset_handsfree"))
continue;
}
@@ -195,7 +195,7 @@
return;
/* Skip card if does not have active hsp profile */
- if (!pa_streq(card->active_profile->name, "hsp") && !pa_streq(card->active_profile->name, "headset_head_unit"))
+ if (!pa_streq(card->active_profile->name, "hsp") && !pa_streq(card->active_profile->name, "headset_head_unit") && !pa_streq(card->active_profile->name, "headset_handsfree"))
return;
/* Skip card if already has active a2dp profile */
@@ -207,7 +207,7 @@
return;
/* Skip card if already has active hsp profile */
- if (pa_streq(card->active_profile->name, "hsp") || pa_streq(card->active_profile->name, "headset_head_unit"))
+ if (pa_streq(card->active_profile->name, "hsp") || pa_streq(card->active_profile->name, "headset_head_unit") || pa_streq(card->active_profile->name, "headset_handsfree"))
return;
}
More information about the pulseaudio-discuss
mailing list