Commit a642a939 authored by Marijn Suijten's avatar Marijn Suijten 🦀
Browse files

BROKEN: bluetooth: Update card profile when active transport changes

parent c0bfd9ff
Pipeline #275312 passed with stages
in 5 minutes and 21 seconds
...@@ -1324,6 +1324,8 @@ static int setup_transport(struct userdata *u) { ...@@ -1324,6 +1324,8 @@ static int setup_transport(struct userdata *u) {
return -1; /* We need to fail here until the interactions with module-suspend-on-idle and alike get improved */ return -1; /* We need to fail here until the interactions with module-suspend-on-idle and alike get improved */
} }
pa_assert_se(pa_card_set_profile(u->card, pa_hashmap_get(u->card->profiles, pa_bluetooth_profile_to_string(t->profile)), false) >= 0);
return transport_config(u); return transport_config(u);
} }
...@@ -2029,6 +2031,11 @@ static int set_profile_cb(pa_card *c, pa_card_profile *new_profile) { ...@@ -2029,6 +2031,11 @@ static int set_profile_cb(pa_card *c, pa_card_profile *new_profile) {
p = *(pa_bluetooth_profile_t *)PA_CARD_PROFILE_DATA(new_profile); p = *(pa_bluetooth_profile_t *)PA_CARD_PROFILE_DATA(new_profile);
if (p == u->profile) {
pa_log_debug("Profile %s already selected", pa_bluetooth_profile_to_string(p));
return 0;
}
stop_thread(u); stop_thread(u);
if (p != PA_BLUETOOTH_PROFILE_OFF) { if (p != PA_BLUETOOTH_PROFILE_OFF) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment