Added toggle for cset

This commit is contained in:
Jaroslav Kysela 2001-09-27 17:07:07 +00:00
parent a23db635c9
commit d205c38ea6

View 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))