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>
This commit is contained in:
David Henningsson 2012-03-12 11:32:43 +01:00 committed by Colin Guthrie
parent bbc600aae9
commit fa80315b2c

View file

@ -3183,7 +3183,9 @@ static void path_set_condense(pa_alsa_path_set *ps, snd_mixer_t *m) {
continue; continue;
PA_LLIST_FOREACH(jb, p2->jacks) { 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; exists = TRUE;
break; break;
} }