summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-03-12 11:32:43 +0100
committerColin Guthrie <colin@mageia.org>2012-03-12 10:49:50 +0000
commitfa80315b2cbde82226baa4325d93bb25d5365a3c (patch)
tree18acff311a24a471888f8f1783d37a8d93a8651f
parentbbc600aae9066ece6ed7802319669e3d00bdc095 (diff)
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@canonical.com>
-rw-r--r--src/modules/alsa/alsa-mixer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 59a9ac9f..102ec824 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;
}