]> code.delx.au - pulseaudio/commitdiff
alsa-mixer: Fix a small issue when detecting required-any
authorDavid Henningsson <david.henningsson@canonical.com>
Mon, 26 Mar 2012 08:45:52 +0000 (10:45 +0200)
committerDavid Henningsson <david.henningsson@canonical.com>
Mon, 26 Mar 2012 08:45:52 +0000 (10:45 +0200)
If somebody writes the line "required-any=ignore", that shouldn't
mean a required-any element needs to be present for the path to
succeed probing.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/modules/alsa/alsa-mixer.c

index 2e768e99d3fd1752d47f1493f93370e80d653fd2..ba31c79db044a2d1d134ccdd0f77941fd23bc33b 100644 (file)
@@ -1999,15 +1999,15 @@ static int element_parse_required(
     else if (pa_streq(lvalue, "required-any")) {
         if (e) {
             e->required_any = req;
-            e->path->has_req_any = TRUE;
+            e->path->has_req_any |= (req != PA_ALSA_REQUIRED_IGNORE);
         }
         if (o) {
             o->required_any = req;
-            o->element->path->has_req_any = TRUE;
+            o->element->path->has_req_any |= (req != PA_ALSA_REQUIRED_IGNORE);
         }
         if (j) {
             j->required_any = req;
-            j->path->has_req_any = TRUE;
+            j->path->has_req_any |= (req != PA_ALSA_REQUIRED_IGNORE);
         }
 
     }