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.
- 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);
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);
pa_log_debug("Loading module-bluetooth-device %s", args);
m = pa_module_load(u->module->core, "module-bluetooth-device", args);