diff options
author | Igor V. Kovalenko <igor.v.kovalenko@gmail.com> | 2021-04-03 08:10:46 +0300 |
---|---|---|
committer | Igor V. Kovalenko <igor.v.kovalenko@gmail.com> | 2021-04-03 08:48:06 +0300 |
commit | 1f204a1357f2d26a4cca12ea9e017db90dd2d961 (patch) | |
tree | 3b61d74c9f8c9d5a004671f3fe5ffd6d34c4e998 /src | |
parent | 7ca50bab2f946237bbe6418bf9e7dbd01fada1bd (diff) | |
download | pulseaudio-1f204a1357f2d26a4cca12ea9e017db90dd2d961.tar.gz |
bluetooth: prioritize native backend HFP HF connection
Bluez prepends newly registered profile to a list of supported profiles,
and new peer profile connections are attempted in reverse order of profile
registration.
Currently native backend would register HFP AG profile before HSP AG profile.
When peer supports both HFP HF and HSP HS profiles, this registration order
causes extra HSP HS connection attempt before native backend would reject it
to make sure peer is reconnected with HFP HF profile.
Reorder HSP AG profile registration before HFP AG to make sure peer supporting
both profiles connects with HFP HF profile first.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/534>
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/bluetooth/backend-native.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/bluetooth/backend-native.c b/src/modules/bluetooth/backend-native.c index 90116bbd4..d866f4b28 100644 --- a/src/modules/bluetooth/backend-native.c +++ b/src/modules/bluetooth/backend-native.c @@ -914,11 +914,11 @@ pa_bluetooth_backend *pa_bluetooth_native_backend_new(pa_core *c, pa_bluetooth_d backend->enable_shared_profiles = enable_shared_profiles; backend->enable_hfp_hf = pa_bluetooth_discovery_get_enable_native_hfp_hf(y); + profile_init(backend, PA_BLUETOOTH_PROFILE_HSP_HS); + if (backend->enable_shared_profiles) native_backend_apply_profile_registration_change(backend, true); - profile_init(backend, PA_BLUETOOTH_PROFILE_HSP_HS); - return backend; } |