mirror of
https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
synced 2024-11-24 09:50:43 -05:00
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:
parent
d52194fce1
commit
ce8e4880ce
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user