Commit 1f204a13 authored by Igor Kovalenko's avatar Igor Kovalenko
Browse files

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: <!534>
parent 7ca50bab
......@@ -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;
}
......
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