File 0008-bluetooth-reshuffle-profile-priorities.patch of Package pulseaudio-modules-bt
From f39144225f1c1609e632e9a304dcf33340409acc Mon Sep 17 00:00:00 2001
From: Faidon Liambotis <paravoid@debian.org>
Date: Fri, 9 Aug 2019 17:43:49 +0300
Subject: [PATCH 8/9] bluetooth: reshuffle profile priorities
Reshuffle the profile priorities in order to prefer HFP over HSP. The
new priorities are set in this order:
- A2DP Sink
- HFP HF
- HSP HS
- A2DP Source
- HFP AG
- HSP AG
Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/modules/bluetooth/module-bluez5-device.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
index a7b18929d803..5ab1d643bd29 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
@@ -1926,7 +1926,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
pa_assert_se(a2dp_codec != NULL && a2dp_codec->a2dp_source);
cp = pa_card_profile_new(name, _(a2dp_codec_index_to_description(codec_index)), sizeof(pa_bluetooth_profile_info_t));
- cp->priority = 40;
+ cp->priority = 60;
cp->n_sinks = 1;
cp->n_sources = 0;
cp->max_sink_channels = 2;
@@ -1941,7 +1941,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
pa_assert_se(a2dp_codec != NULL && a2dp_codec->a2dp_sink);
cp = pa_card_profile_new(name, _(a2dp_codec_index_to_description(codec_index)), sizeof(pa_bluetooth_profile_info_t));
- cp->priority = 20;
+ cp->priority = 30;
cp->n_sinks = 0;
cp->n_sources = 1;
cp->max_sink_channels = 0;
@@ -1953,7 +1953,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
case PA_BLUETOOTH_PROFILE_HFP_HF:
cp = pa_card_profile_new(name, _("Handsfree (HFP)"), sizeof(pa_bluetooth_profile_info_t));
- cp->priority = 30;
+ cp->priority = 50;
cp->n_sinks = 1;
cp->n_sources = 1;
cp->max_sink_channels = 1;
@@ -1966,7 +1966,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
case PA_BLUETOOTH_PROFILE_HSP_HS:
cp = pa_card_profile_new(name, _("Headset (HSP)"), sizeof(pa_bluetooth_profile_info_t));
- cp->priority = 30;
+ cp->priority = 40;
cp->n_sinks = 1;
cp->n_sources = 1;
cp->max_sink_channels = 1;
@@ -1979,7 +1979,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_pro
case PA_BLUETOOTH_PROFILE_HFP_AG:
cp = pa_card_profile_new(name, _("Handsfree Audio Gateway (HFP)"), sizeof(pa_bluetooth_profile_info_t));
- cp->priority = 10;
+ cp->priority = 20;
cp->n_sinks = 1;
cp->n_sources = 1;
cp->max_sink_channels = 1;
--
2.26.2