mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
bluetooth: Release MediaEnpoint if card profile is set to Off
If card profile is set to "off", the audio stream should be released. Current implementation releases the stream when the card profile is changed to "hsp" or "hfgw" again and immediatly reconnects after that.
This commit is contained in:
parent
54f3b9a6fa
commit
2c213607e2
1 changed files with 7 additions and 0 deletions
|
|
@ -2564,6 +2564,13 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_thread(u);
|
stop_thread(u);
|
||||||
|
|
||||||
|
if (u->profile != PROFILE_OFF && u->transport) {
|
||||||
|
bt_transport_release(u);
|
||||||
|
pa_xfree(u->transport);
|
||||||
|
u->transport = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
shutdown_bt(u);
|
shutdown_bt(u);
|
||||||
|
|
||||||
if (USE_SCO_OVER_PCM(u))
|
if (USE_SCO_OVER_PCM(u))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue