mixer-control: Fix selecting Bluetooth input when on A2DP profile

When on A2DP profile and a Bluetooth input is selected, we first need to
switch the profile to HFP/HSP, then select the default source to be that
profile. In some cases the latter step was forgotten, because
the variable "profile_swapping_device_id" was reset before it was
supposed to be used.

https://bugzilla.gnome.org/show_bug.cgi?id=736943
This commit is contained in:
David Henningsson 2014-09-19 07:21:08 +02:00 committed by Bastien Nocera
parent d52194fce1
commit ce8e4880ce

View File

@ -1561,9 +1561,9 @@ update_sink (GvcMixerControl *control,
if (gvc_mixer_ui_device_get_stream_id (dev) == gvc_mixer_stream_get_id (stream)) {
g_debug ("Looks like we profile swapped on a non server default sink");
gvc_mixer_control_set_default_sink (control, stream);
control->priv->profile_swapping_device_id = GVC_MIXER_UI_DEVICE_INVALID;
}
}
control->priv->profile_swapping_device_id = GVC_MIXER_UI_DEVICE_INVALID;
}
if (control->priv->default_sink_name != NULL
@ -1679,11 +1679,11 @@ update_source (GvcMixerControl *control,
if (dev != NULL) {
/* now check to make sure this new stream is the same stream just matched and set on the device object */
if (gvc_mixer_ui_device_get_stream_id (dev) == gvc_mixer_stream_get_id (stream)) {
g_debug ("Looks like we profile swapped on a non server default sink");
g_debug ("Looks like we profile swapped on a non server default source");
gvc_mixer_control_set_default_source (control, stream);
control->priv->profile_swapping_device_id = GVC_MIXER_UI_DEVICE_INVALID;
}
}
control->priv->profile_swapping_device_id = GVC_MIXER_UI_DEVICE_INVALID;
}
if (control->priv->default_source_name != NULL
&& info->name != NULL