mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-20 06:46:31 -04:00
bluez5: add quirk for LC3-24kHz for HFP
MT7925 fails to setup a SCO connection that results to working LC3-24kHz audio. Other controllers (Intel etc) appear to work OK. Add quirk for disabling this codec, and disable it for this Mediatek controller.
This commit is contained in:
parent
6e8e234e61
commit
84e6845aa6
4 changed files with 17 additions and 1 deletions
|
|
@ -52,6 +52,7 @@ struct spa_bt_quirks {
|
|||
int force_sbc_xq;
|
||||
int force_faststream;
|
||||
int force_a2dp_duplex;
|
||||
int force_lc3_a127;
|
||||
|
||||
char *device_rules;
|
||||
char *adapter_rules;
|
||||
|
|
@ -69,6 +70,7 @@ static enum spa_bt_feature parse_feature(const char *str)
|
|||
{ "sbc-xq", SPA_BT_FEATURE_SBC_XQ },
|
||||
{ "faststream", SPA_BT_FEATURE_FASTSTREAM },
|
||||
{ "a2dp-duplex", SPA_BT_FEATURE_A2DP_DUPLEX },
|
||||
{ "lc3-a127", SPA_BT_FEATURE_LC3_A127 },
|
||||
};
|
||||
SPA_FOR_EACH_ELEMENT_VAR(feature_keys, f) {
|
||||
if (spa_streq(str, f->key))
|
||||
|
|
@ -228,6 +230,7 @@ struct spa_bt_quirks *spa_bt_quirks_create(const struct spa_dict *info, struct s
|
|||
this->force_hw_volume = parse_force_flag(info, "bluez5.enable-hw-volume");
|
||||
this->force_faststream = parse_force_flag(info, "bluez5.enable-faststream");
|
||||
this->force_a2dp_duplex = parse_force_flag(info, "bluez5.enable-a2dp-duplex");
|
||||
this->force_lc3_a127 = parse_force_flag(info, "bluez5.enable-lc3-a127");
|
||||
|
||||
if ((str = spa_dict_lookup(info, "bluez5.hardware-database")) != NULL) {
|
||||
spa_log_debug(this->log, "loading session manager provided data");
|
||||
|
|
@ -385,6 +388,9 @@ static int get_features(const struct spa_bt_quirks *this,
|
|||
if (this->force_a2dp_duplex != -1)
|
||||
SPA_FLAG_UPDATE(*features, SPA_BT_FEATURE_A2DP_DUPLEX, this->force_a2dp_duplex);
|
||||
|
||||
if (this->force_lc3_a127 != -1)
|
||||
SPA_FLAG_UPDATE(*features, SPA_BT_FEATURE_LC3_A127, this->force_lc3_a127);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue