Date: Sun, 21 May 1995 01:00:03 -0700 From: pritc003@maroon.tc.umn.edu To: freebsd-bugs Subject: bin/432: mixer should print out the current mixer settings by default Message-ID: <199505210800.BAA28047@freefall.cdrom.com> In-Reply-To: Your message of Sun, 21 May 1995 02:50:43 -0500 <199505210750.CAA01918@mpp.com>
index | next in thread | previous in thread | raw e-mail
>Number: 432
>Category: bin
>Synopsis: mixer should print out the current mixer settings by default
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs (FreeBSD bugs mailing list)
>State: open
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun May 21 01:00:02 1995
>Originator: Mike Pritchard
>Organization:
>Release: FreeBSD 2.1.0-Development i386
>Environment:
FreeBSD-current, w/sound blaster 16
>Description:
It would be nice if the "mixer" command printed out all of the
current mixer settings when run with no arguments instead
of printing the command usage. This would allow a person to check
all of the current mixer settings at once instead of having to
run "mixer vol", "mixer cd", "mixer bass", etc...for each setting
they are interested in.
>How-To-Repeat:
>Fix:
The following patch changes mixer to display all of the valid settings
when run with no arguments.
*** /usr/src/usr.sbin/mixer/mixer.c Wed Feb 15 11:33:03 1995
--- mixer.c Sun May 21 02:43:56 1995
***************
*** 90,97 ****
--- 90,113 ----
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++);
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505210800.BAA28047>
