[v4,3/4] bluetooth: policy: Remove BlueZ 4 related code

Submitted by Luiz Augusto von Dentz on March 26, 2018, 2:15 p.m.

Details

Message ID 20180326141552.17300-3-luiz.dentz@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in PulseAudio

Not browsing as part of any series.

Commit Message

Luiz Augusto von Dentz March 26, 2018, 2:15 p.m.
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This removes hfpw option and profile which were only used by BlueZ 4.
---
 src/modules/bluetooth/module-bluetooth-policy.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c
index a6a812b57..1592a38be 100644
--- a/src/modules/bluetooth/module-bluetooth-policy.c
+++ b/src/modules/bluetooth/module-bluetooth-policy.c
@@ -38,8 +38,7 @@  PA_MODULE_LOAD_ONCE(true);
 PA_MODULE_USAGE(
         "auto_switch=<Switch between hsp and a2dp profile? (0 - never, 1 - media.role=phone, 2 - heuristic> "
         "a2dp_source=<Handle a2dp_source card profile (sink role)?> "
-        "ag=<Handle headset_audio_gateway card profile (headset role)?> "
-        "hfgw=<Handle hfgw card profile (headset role)?> DEPRECATED");
+        "ag=<Handle headset_audio_gateway card profile (headset role)?> ");
 
 static const char* const valid_modargs[] = {
     "auto_switch",
@@ -88,8 +87,7 @@  static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
 
     if (u->enable_a2dp_source && pa_streq(s, "a2dp_source"))
         role = "music";
-    /* TODO: remove hfgw when we remove BlueZ 4 support */
-    else if (u->enable_ag && (pa_streq(s, "hfgw") || pa_streq(s, "headset_audio_gateway")))
+    else if (u->enable_ag && pa_streq(s, "headset_audio_gateway"))
         role = "phone";
     else {
         pa_log_debug("Profile %s cannot be selected for loopback", s);
@@ -128,8 +126,7 @@  static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void *
     if (!s)
         return PA_HOOK_OK;
 
-    /* TODO: remove hfgw when we remove BlueZ 4 support */
-    if (u->enable_ag && (pa_streq(s, "hfgw") || pa_streq(s, "headset_audio_gateway")))
+    if (u->enable_ag && pa_streq(s, "headset_audio_gateway"))
         role = "phone";
     else {
         pa_log_debug("Profile %s cannot be selected for loopback", s);
@@ -448,10 +445,6 @@  int pa__init(pa_module *m) {
     }
 
     u->enable_ag = true;
-    if (pa_modargs_get_value_boolean(ma, "hfgw", &u->enable_ag) < 0) {
-        pa_log("Failed to parse hfgw argument.");
-        goto fail;
-    }
     if (pa_modargs_get_value_boolean(ma, "ag", &u->enable_ag) < 0) {
         pa_log("Failed to parse ag argument.");
         goto fail;

Comments

On Mon, 2018-03-26 at 17:15 +0300, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This removes hfpw option and profile which were only used by BlueZ 4.
> ---
>  src/modules/bluetooth/module-bluetooth-policy.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)

Thanks! Applied to the "next" branch. There was still one place where
old profile names were used, I fixed that up.