mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
bluez-monitor: Propagate the msbc-support global property to device
msbc-support global property can be used for all backends, or for native backend overloaded on a per device rule.
This commit is contained in:
parent
fa3bd6b0e1
commit
07c9dbbffa
2 changed files with 12 additions and 5 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
# Bluez monitor config file for PipeWire version @VERSION@ #
|
# Bluez monitor config file for PipeWire version @VERSION@ #
|
||||||
|
|
||||||
properties = {
|
properties = {
|
||||||
# Enable mSBC support for ofono backend and hsphfpd backend,
|
# Enable mSBC support, disabled by default. Be aware that
|
||||||
# disabled by default. Be aware that mSBC is not expected to
|
# mSBC is not expected to work on all headset + adapter combinations.
|
||||||
# work on all headset + adapter combinations.
|
# This can be overloaded for a specific device and native backend
|
||||||
|
# in rules section.
|
||||||
#bluez5.msbc-support = false
|
#bluez5.msbc-support = false
|
||||||
|
|
||||||
#bluez5.sbc-xq-support = false
|
#bluez5.sbc-xq-support = false
|
||||||
|
|
@ -51,7 +52,7 @@ rules = [
|
||||||
#]
|
#]
|
||||||
bluez5.reconnect-profiles = [ hfp_hf hsp_hs a2dp_sink ]
|
bluez5.reconnect-profiles = [ hfp_hf hsp_hs a2dp_sink ]
|
||||||
|
|
||||||
# Enable mSBC support for native backend, disabled by default.
|
# Overload mSBC support for native backend and a specific device.
|
||||||
#bluez5.msbc-support = false
|
#bluez5.msbc-support = false
|
||||||
|
|
||||||
# LDAC encoding quality
|
# LDAC encoding quality
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,7 @@ static struct device *bluez5_create_device(struct impl *impl, uint32_t id,
|
||||||
struct spa_handle *handle;
|
struct spa_handle *handle;
|
||||||
int res;
|
int res;
|
||||||
void *iface;
|
void *iface;
|
||||||
const char *rules;
|
const char *rules, *str;
|
||||||
|
|
||||||
pw_log_debug("new device %u", id);
|
pw_log_debug("new device %u", id);
|
||||||
|
|
||||||
|
|
@ -421,6 +421,12 @@ static struct device *bluez5_create_device(struct impl *impl, uint32_t id,
|
||||||
if ((rules = pw_properties_get(impl->conf, "rules")) != NULL)
|
if ((rules = pw_properties_get(impl->conf, "rules")) != NULL)
|
||||||
sm_media_session_match_rules(rules, strlen(rules), device->props);
|
sm_media_session_match_rules(rules, strlen(rules), device->props);
|
||||||
|
|
||||||
|
/* Propagate the msbc-support global property if it exists and is not
|
||||||
|
* overloaded by a device specific one */
|
||||||
|
if ((str = pw_properties_get(impl->props, "bluez5.msbc-support")) != NULL &&
|
||||||
|
pw_properties_get(device->props, "bluez5.msbc-support") == NULL)
|
||||||
|
pw_properties_set(device->props, "bluez5.msbc-support", str);
|
||||||
|
|
||||||
handle = pw_context_load_spa_handle(context,
|
handle = pw_context_load_spa_handle(context,
|
||||||
info->factory_name,
|
info->factory_name,
|
||||||
&device->props->dict);
|
&device->props->dict);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue