OSDN Git Service

Added toggle for cset
authorJaroslav Kysela <perex@perex.cz>
Thu, 27 Sep 2001 17:07:07 +0000 (17:07 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 27 Sep 2001 17:07:07 +0000 (17:07 +0000)
amixer/amixer.c

index 214fce6..08a6087 100644 (file)
@@ -947,6 +947,10 @@ static int cset(int argc, char *argv[], int roflag)
                                } else if (!strncasecmp(ptr, "yes", 3)) {
                                        tmp = 1;
                                        ptr += 3;
+                               } else if (!strncasecmp(ptr, "toggle", 6)) {
+                                       snd_ctl_elem_value_get_boolean(control, idx, &tmp);
+                                       tmp = tmp ? 0 : 1;
+                                       ptr += 6;
                                } else if (atoi(ptr)) {
                                        tmp = 1;
                                        while (isdigit(*ptr))