summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2012-07-27 16:41:22 +0200
committerJaska Uimonen <jaska.uimonen@intel.com>2013-01-24 09:29:35 +0200
commitf2a1db04a2079815faa7055a7b3eeeac0c6a2e6f (patch)
treee772f0c489ee4ec78f235a3ab9fb809e7ef57ad2
parentf6e6263d3d43385bfc71a2d6fe2743816ca06ceb (diff)
downloadpulseaudio-panda-f2a1db04a2079815faa7055a7b3eeeac0c6a2e6f.tar.gz
pulseaudio-panda-f2a1db04a2079815faa7055a7b3eeeac0c6a2e6f.tar.bz2
pulseaudio-panda-f2a1db04a2079815faa7055a7b3eeeac0c6a2e6f.zip
bluetooth: Avoid duplicating profile argument twice
The module module-bluetooth-device should never be given parameter 'profile' twice, even if both HFGW and A2DP are playing. This patch proposed to consider HFGW first.
-rw-r--r--src/modules/bluetooth/module-bluetooth-discover.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index e96a4f31..d4e056e3 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -107,11 +107,10 @@ static pa_hook_result_t load_module_for_device(pa_bluetooth_discovery *y, const
args = tmp;
}
- if (d->audio_source_state >= PA_BT_AUDIO_STATE_CONNECTED)
- args = pa_sprintf_malloc("%s profile=\"a2dp_source\" auto_connect=no", args);
-
if (d->hfgw_state >= PA_BT_AUDIO_STATE_CONNECTED)
args = pa_sprintf_malloc("%s profile=\"hfgw\"", args);
+ else if (d->audio_source_state >= PA_BT_AUDIO_STATE_CONNECTED)
+ args = pa_sprintf_malloc("%s profile=\"a2dp_source\" auto_connect=no", args);
pa_log_debug("Loading module-bluetooth-device %s", args);
m = pa_module_load(u->module->core, "module-bluetooth-device", args);