[pulseaudio-commits] src/modules

Colin Guthrie colin at kemper.freedesktop.org
Mon Mar 12 03:50:01 PDT 2012


 src/modules/alsa/alsa-mixer.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit fa80315b2cbde82226baa4325d93bb25d5365a3c
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Mon Mar 12 11:32:43 2012 +0100

    alsa-mixer: Don't remove paths if jacks state.(un)plugged differ
    
    If the jack state differs, they are not the same path, so don't
    remove them.
    
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 59a9ac9..102ec82 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -3183,7 +3183,9 @@ static void path_set_condense(pa_alsa_path_set *ps, snd_mixer_t *m) {
                     continue;
 
                 PA_LLIST_FOREACH(jb, p2->jacks) {
-                    if (jb->has_control && !strcmp(jb->alsa_name, ja->alsa_name)) {
+                    if (jb->has_control && !strcmp(jb->alsa_name, ja->alsa_name) &&
+                       (ja->state_plugged == jb->state_plugged) &&
+                       (ja->state_unplugged == jb->state_unplugged)) {
                         exists = TRUE;
                         break;
                     }



More information about the pulseaudio-commits mailing list