From b9f2e6a8c43cb2bffcb35bb901eb5bd3364789f3 Mon Sep 17 00:00:00 2001 From: Huang-Huang Date: Mon, 1 Feb 2021 03:37:23 +0800 Subject: [PATCH] bluez5: disable HSP AG by default in native backend --- spa/plugins/bluez5/backend-native.c | 3 ++- src/daemon/media-session.d/bluez-monitor.conf | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index ea4710d93..b811facb5 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -54,6 +54,7 @@ struct spa_bt_backend { struct spa_dbus *dbus; DBusConnection *conn; +#define DEFAULT_ENABLED_PROFILES (SPA_BT_PROFILE_HEADSET_HEAD_UNIT | SPA_BT_PROFILE_HFP_AG) enum spa_bt_profile enabled_profiles; struct spa_list rfcomm_list; @@ -1058,7 +1059,7 @@ static int parse_headset_roles(struct spa_bt_backend *backend, const struct spa_ backend->enabled_profiles = profiles; return 0; fallback: - backend->enabled_profiles = SPA_BT_PROFILE_HEADSET_AUDIO; + backend->enabled_profiles = DEFAULT_ENABLED_PROFILES; return 0; } diff --git a/src/daemon/media-session.d/bluez-monitor.conf b/src/daemon/media-session.d/bluez-monitor.conf index 8fdfb2823..13816d572 100644 --- a/src/daemon/media-session.d/bluez-monitor.conf +++ b/src/daemon/media-session.d/bluez-monitor.conf @@ -4,10 +4,14 @@ properties = { #bluez5.msbc-support = true #bluez5.sbc-xq-support = true - # Enabled headset roles (default: all), this property only applies - # to native backend. Currently some headsets(Sony WH-1000XM3) are not - # working with both hsp_ag and hfp_ag enabled, disable either hsp_ag - # or hfp_ag to work around it. + # Enabled headset roles (default: [ hsp_hs hfp_ag ]), this + # property only applies to native backend. Currently some headsets + # (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag + # enabled, disable either hsp_ag or hfp_ag to work around it. + # + # Supported headset roles: hsp_hs (HSP Headset), + # hsp_ag (HSP Audio Gateway), + # hfp_ag (HFP Audio Gateway) #bluez5.headset-roles = [ hsp_hs hsp_ag hfp_ag ] # Enabled A2DP codecs (default: all)