mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
BROKEN: bluetooth: Update card profile when active transport changes
This commit is contained in:
parent
3f0e843bc8
commit
ac36551888
1 changed files with 7 additions and 0 deletions
|
|
@ -1341,6 +1341,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 */
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -2092,6 +2094,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);
|
||||
|
||||
if (p == u->profile) {
|
||||
pa_log_debug("Profile %s already selected", pa_bluetooth_profile_to_string(p));
|
||||
return 0;
|
||||
}
|
||||
|
||||
stop_thread(u);
|
||||
|
||||
if (p != PA_BLUETOOTH_PROFILE_OFF) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue