OSDN Git Service

Fix alsa-lib to regard 3D control - Depth as Playback Controls
authorRaymond Yau <superquad.vortex2@gmail.com>
Sat, 26 Feb 2011 01:24:43 +0000 (09:24 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Feb 2011 10:15:57 +0000 (11:15 +0100)
This allow those mixer or recording application to find those controls which
are really used for capturing.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/mixer/simple_none.c

index 426f2d7..395e4d6 100644 (file)
@@ -937,7 +937,12 @@ static int base_len(const char *name, selem_ctl_type_t *type)
                *type = CTL_CAPTURE_ROUTE;
                return strlen(name);
        }
-
+       if (strstr(name, "3D Control") > 0) {
+               if (strstr(name, "Depth") > 0) {
+                       *type = CTL_PLAYBACK_VOLUME;
+                       return strlen(name);
+               }
+       }
        return 0;
 }