mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
bluez5: add faststream quirks
For some devices FastStream causes problems. Add quirk for disabling it.
This commit is contained in:
parent
84bc0490a5
commit
c620121529
5 changed files with 27 additions and 5 deletions
|
|
@ -69,6 +69,7 @@ struct spa_bt_quirks {
|
|||
int force_msbc;
|
||||
int force_hw_volume;
|
||||
int force_sbc_xq;
|
||||
int force_faststream;
|
||||
|
||||
char *device_rules;
|
||||
char *adapter_rules;
|
||||
|
|
@ -84,6 +85,7 @@ static enum spa_bt_feature parse_feature(const char *str)
|
|||
{ "hw-volume", SPA_BT_FEATURE_HW_VOLUME },
|
||||
{ "hw-volume-mic", SPA_BT_FEATURE_HW_VOLUME_MIC },
|
||||
{ "sbc-xq", SPA_BT_FEATURE_SBC_XQ },
|
||||
{ "faststream", SPA_BT_FEATURE_FASTSTREAM },
|
||||
};
|
||||
size_t i;
|
||||
for (i = 0; i < SPA_N_ELEMENTS(feature_keys); ++i) {
|
||||
|
|
@ -248,6 +250,7 @@ struct spa_bt_quirks *spa_bt_quirks_create(const struct spa_dict *info, struct s
|
|||
this->force_sbc_xq = parse_force_flag(info, "bluez5.enable-sbc-xq");
|
||||
this->force_msbc = parse_force_flag(info, "bluez5.enable-msbc");
|
||||
this->force_hw_volume = parse_force_flag(info, "bluez5.enable-hw-volume");
|
||||
this->force_faststream = parse_force_flag(info, "bluez5.enable-faststream");
|
||||
|
||||
if ((str = spa_dict_lookup(info, "bluez5.hardware-database")) != NULL) {
|
||||
spa_log_debug(this->log, "loading session manager provided data");
|
||||
|
|
@ -389,5 +392,8 @@ int spa_bt_quirks_get_features(const struct spa_bt_quirks *this,
|
|||
if (this->force_sbc_xq != -1)
|
||||
SPA_FLAG_UPDATE(*features, SPA_BT_FEATURE_SBC_XQ, this->force_sbc_xq);
|
||||
|
||||
if (this->force_faststream != -1)
|
||||
SPA_FLAG_UPDATE(*features, SPA_BT_FEATURE_FASTSTREAM, this->force_faststream);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue