cce04971fa11b5ac19cc51d8d9eeeb8d2b58f780
[scm/bb/meta-tizen.git] / recipes-multimedia / pulseaudio / pulseaudio_5.0 / 0027-bluetooth-Set-off-profile-as-default-for-newly-creat.patch
1 From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2 Date: Mon, 16 Sep 2013 15:10:51 +0300
3 Subject: bluetooth: Set 'off' profile as default for newly create cards
4
5 This makes sure that pa_card_new doesn't select one profile based on
6 priority which may conflict with audio policy.
7
8 Change-Id: Ifa5ad111d0c9f58701f93bcfd85b70d1f096efac
9 ---
10  src/modules/bluetooth/module-bluez4-device.c | 1 +
11  src/modules/bluetooth/module-bluez5-device.c | 1 +
12  2 files changed, 2 insertions(+)
13
14 diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
15 index 83e603f..b0b12f8 100644
16 --- a/src/modules/bluetooth/module-bluez4-device.c
17 +++ b/src/modules/bluetooth/module-bluez4-device.c
18 @@ -2295,6 +2295,7 @@ static int add_card(struct userdata *u) {
19      d = PA_CARD_PROFILE_DATA(p);
20      *d = PA_BLUEZ4_PROFILE_OFF;
21      pa_hashmap_put(data.profiles, p->name, p);
22 +    pa_card_new_data_set_profile(&data, "off");
23  
24      if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
25          if (pa_hashmap_get(data.profiles, default_profile))
26 diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
27 index 39fa5d0..a0776c8 100644
28 --- a/src/modules/bluetooth/module-bluez5-device.c
29 +++ b/src/modules/bluetooth/module-bluez5-device.c
30 @@ -1888,6 +1888,7 @@ static int add_card(struct userdata *u) {
31      p = PA_CARD_PROFILE_DATA(cp);
32      *p = PA_BLUETOOTH_PROFILE_OFF;
33      pa_hashmap_put(data.profiles, cp->name, cp);
34 +    pa_card_new_data_set_profile(&data, "off");
35  
36      u->card = pa_card_new(u->core, &data);
37      pa_card_new_data_done(&data);