diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index ac602940699d..9415a42a12ec 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -90,10 +90,26 @@ main(int argc, char *argv[]) case 2: bar = 0; break; + case 1: + bar = -1; + break; default: usage(); } + if (bar < 0) { + for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++) { + if (!((1 << foo) & devmask)) + continue; + if (ioctl(baz, MIXER_READ(foo),&bar)== -1) { + perror("MIXER_READ"); + continue; + } + printf("Mixer %-8s is currently set to %3d:%d\n", names[foo], bar & 0x7f, (bar >> 8) & 0x7f); + } + return(0); + } + for (foo = 0; foo < SOUND_MIXER_NRDEVICES && strcmp(names[foo], argv[1]); foo++); if (foo >= SOUND_MIXER_NRDEVICES) {