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

@ -148,8 +148,8 @@ static const struct a2dp_codec * const a2dp_codec_list[] = {
#if ENABLE_MP3
&a2dp_codec_mpeg,
#endif
&a2dp_codec_sbc_xq,
&a2dp_codec_sbc,
&a2dp_codec_sbc_xq,
NULL
};