bluez5: enable SBC-XQ codec by default, if allowed by quirks

Enable SBC-XQ by default, and move it at the end of the codecs list, so
that bluez does not connect to it automatically except when it is the
codec used previously.

When the codec is disabled by quirks, it won't appear in the codecs
list, and so can't be selected by user (and so won't be connected
automatically).

However, since SelectConfiguration does not carry information which
device is in question, we cannot prevent BlueZ connecting to the codec
even if it's disabled for a specific device. If the "impossible" occurs
regardless, we won't reject the connection and the profile will be shown
as the generic "A2DP" one.  If the sound is garbled, the user can select
some other profile that works.
This commit is contained in:
Pauli Virtanen 2021-08-13 19:31:00 +03:00 committed by Wim Taymans
parent f5850af4d8
commit 5071589aea
6 changed files with 11 additions and 16 deletions

View file

@ -13,7 +13,6 @@
# hw-volume AVRCP and HSP/HFP hardware volume support
# hw-volume-mic Functional HSP/HFP microphone volume support
# sbc-xq "nonstandard" SBC codec setting with better sound quality
# (XXX: the SBC-XQ per-device setting doesn't have effect yet)
#
# Features are disabled with the key "no-features" whose value is an
# array of strings in the match rule.

View file

@ -27,7 +27,7 @@ properties = {
#bluez5.headset-roles = [ hsp_hs hsp_ag hfp_hf hfp_ag ]
# Enabled A2DP codecs (default: all).
#bluez5.codecs = [ sbc aac ldac aptx aptx_hd ]
#bluez5.codecs = [ sbc aac ldac aptx aptx_hd sbc_xq ]
# Properties for the A2DP codec configuration
#bluez5.default.rate = 48000