bluetooth: disable HSP HS profile by default
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Thu, 15 Apr 2021 17:19:27 +0000 (20:19 +0300)
committerIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Fri, 16 Apr 2021 05:33:42 +0000 (08:33 +0300)
commitfec9eb178d5fee5b39cd49d5d55a7ac202bb9894
tree7a79478888fea1d61ef79ea8834a90e66744d845
parente3fa93750804a5521e43bb4ed57d72efe0a2ad1f
bluetooth: disable HSP HS profile by default

A few headsets have issues if HFP HF profile connection is attempted before
HSP HS profile connection is closed. Looks like this could happen because
bluez bluetoothd alows to make simultaneous HSP HS and HFP HF peer connections.

One of affected headsets is WH-1000XM2

Until we find out how to prevent simultaneous HSP HS and HFP HF connections,
when native backend has HFP HF profile enabled (this is the default) do disable
HSP HS completely unless user explicitly request it via discovery modarg.

Do this by adding module-bluetooth-discover arg enable_native_hsp_hs,
default to inverse of enable_native_hfp_hf.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/538>
src/modules/bluetooth/backend-native.c
src/modules/bluetooth/bluez5-util.c
src/modules/bluetooth/bluez5-util.h
src/modules/bluetooth/module-bluez5-discover.c