summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/mixer/mixer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c
index ac60294..9415a42 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) {
OpenPOWER on IntegriCloud