From: Mikel Astiz Date: Fri, 27 Jul 2012 14:41:22 +0000 (+0200) Subject: bluetooth: Avoid duplicating profile argument twice X-Git-Tag: v2.99.1~182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00cc8af99551177d0e44545c5364924110748632;p=platform%2Fupstream%2Fpulseaudio.git 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. --- diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c index e96a4f3..d4e056e 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);