mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
bluetooth: Fix premature acquire attempts
A transport should be considered connected only after the connection procedure is complete, as expressed in audio_state_to_transport_state(). module-bluetooth-device should be loaded only after at least one transport is not only created (during configuration), but also connected. This fixes the issue of premature acquire attempts sometimes experienced when a headset is connected (issue not present in v3.0 though).
This commit is contained in:
parent
2c666e3e16
commit
5d4b7c4a89
2 changed files with 5 additions and 4 deletions
|
|
@ -1101,7 +1101,7 @@ bool pa_bluetooth_device_any_audio_connected(const pa_bluetooth_device *d) {
|
|||
return false;
|
||||
|
||||
for (i = 0; i < PA_BLUETOOTH_PROFILE_COUNT; i++)
|
||||
if (d->transports[i])
|
||||
if (d->transports[i] && d->transports[i]->state != PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue