]> code.delx.au - pulseaudio/commitdiff
bluetooth: Fix wrongly set "phone" role for HFGW
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Fri, 31 Aug 2012 10:50:57 +0000 (12:50 +0200)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 26 Sep 2012 11:27:14 +0000 (19:27 +0800)
The HFGW source should be consistent with the sink by not setting the
"phone" intended role.

Even though setting this role seems to make sense strictly speaking, the
rest of the codebase doesn't handle this well. Therefore, the audio
coming from a Bluetooth phone can be routed back to the same device.

src/modules/bluetooth/module-bluetooth-device.c

index 70f48a74ce46720901b89aaa81f377331656923e..51ee92f231c2274ac5d673f425e64c61e3cd91ee 100644 (file)
@@ -1593,7 +1593,7 @@ static int add_source(struct userdata *u) {
         data.module = u->module;
         pa_source_new_data_set_sample_spec(&data, &u->sample_spec);
         pa_proplist_sets(data.proplist, "bluetooth.protocol", profile_to_string(u->profile));
-        if ((u->profile == PROFILE_HSP) || (u->profile == PROFILE_HFGW))
+        if (u->profile == PROFILE_HSP)
             pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
 
         data.card = u->card;