From 8ed5ef7d65f58da156b523998ca241adb77c3a87 Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Sat, 7 Sep 2024 03:42:08 +0700 Subject: [PATCH] bluetooth: restore default of 'enable_native_hfp_hf' Default value of 'enable_native_hfp_hf' seems to be inadvertently changed from "when using only native backend" to "always" in commit fec9eb178d5f ("bluetooth: disable HSP HS profile by default"). This is due to a second default overwriting the first default set above (presumably because it's in a different place from other arguments' defaults). Remove the second default and move the first default to its place, in line with other arguments' defaults. --- src/modules/bluetooth/module-bluez5-discover.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/bluetooth/module-bluez5-discover.c b/src/modules/bluetooth/module-bluez5-discover.c index b13517eff..dec3bfdc0 100644 --- a/src/modules/bluetooth/module-bluez5-discover.c +++ b/src/modules/bluetooth/module-bluez5-discover.c @@ -147,9 +147,6 @@ int pa__init(pa_module *m) { goto fail; } - /* default value if no module parameter */ - enable_native_hfp_hf = (headset_backend == HEADSET_BACKEND_NATIVE); - autodetect_mtu = false; if (pa_modargs_get_value_boolean(ma, "autodetect_mtu", &autodetect_mtu) < 0) { pa_log("Invalid boolean value for autodetect_mtu parameter"); @@ -158,7 +155,7 @@ int pa__init(pa_module *m) { if (pa_modargs_get_value_boolean(ma, "enable_msbc", &enable_msbc) < 0) { pa_log("Invalid boolean value for enable_msbc parameter"); } - enable_native_hfp_hf = true; + enable_native_hfp_hf = (headset_backend == HEADSET_BACKEND_NATIVE); if (pa_modargs_get_value_boolean(ma, "enable_native_hfp_hf", &enable_native_hfp_hf) < 0) { pa_log("enable_native_hfp_hf must be true or false"); goto fail;