diff options
author | João Paulo Rechi Vita <jprvita@gmail.com> | 2013-11-21 11:39:03 -0300 |
---|---|---|
committer | João Paulo Rechi Vita <jprvita@gmail.com> | 2014-02-04 18:09:25 -0300 |
commit | 8cc6b56fd849a914f7970870a4df2c3d9a26c50a (patch) | |
tree | 5272ae4bd24498d2e5c268cf62ecdc60520321fc | |
parent | d1c5520d42ebe22ac5ba887de13f9950f9a19f1e (diff) |
bluetooth: Change BlueZ 5 card profile name from a2dp to a2dp_sinkbt-fixes
This name is more acurate with regards of what role we're currently
playing and we've already been using it in
pa_bluetooth_profile_to_string() since 449d6cb.
-rw-r--r-- | src/modules/bluetooth/module-bluetooth-policy.c | 3 | ||||
-rw-r--r-- | src/modules/bluetooth/module-bluez5-device.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c index 0031ccf6..6837f0d6 100644 --- a/src/modules/bluetooth/module-bluetooth-policy.c +++ b/src/modules/bluetooth/module-bluetooth-policy.c @@ -172,7 +172,8 @@ static pa_hook_result_t profile_available_hook_callback(pa_core *c, pa_card_prof return PA_HOOK_OK; /* Do not automatically switch profiles for headsets, just in case */ - if (pa_streq(profile->name, "hsp") || pa_streq(profile->name, "a2dp")) + /* TODO: remove a2dp when we decide to remove support for BlueZ 4 */ + if (pa_streq(profile->name, "hsp") || pa_streq(profile->name, "a2dp") || pa_streq(profile->name, "a2dp_sink")) return PA_HOOK_OK; is_active_profile = card->active_profile == profile; diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c index 287e7639..7da41c2c 100644 --- a/src/modules/bluetooth/module-bluez5-device.c +++ b/src/modules/bluetooth/module-bluez5-device.c @@ -1520,9 +1520,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid pa_assert_se(output_port = pa_hashmap_get(ports, u->output_port_name)); if (pa_streq(uuid, PA_BLUETOOTH_UUID_A2DP_SINK)) { - /* TODO: Change this profile's name to a2dp_sink, to reflect the remote - * device's role and be consistent with the a2dp source profile */ - cp = pa_card_profile_new("a2dp", _("High Fidelity Playback (A2DP Sink)"), sizeof(pa_bluetooth_profile_t)); + cp = pa_card_profile_new("a2dp_sink", _("High Fidelity Playback (A2DP Sink)"), sizeof(pa_bluetooth_profile_t)); cp->priority = 10; cp->n_sinks = 1; cp->n_sources = 0; |