[libgnome-volume-control] mixer-control: Fix selecting Bluetooth input when on A2DP profile



commit ce8e4880ce31e275c40825c4ed756c791107f810
Author: David Henningsson <david henningsson canonical com>
Date:   Fri Sep 19 07:21:08 2014 +0200

    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

 gvc-mixer-control.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c
index 7b49456..7a5d560 100644
--- a/gvc-mixer-control.c
+++ b/gvc-mixer-control.c
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]