From mpp@mpp.com  Sun May 21 00:50:58 1995
Received: from mpp.com (dialup-5-102.gw.umn.edu [128.101.96.102])
          by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id AAA26986
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 May 1995 00:50:51 -0700
Received: (from mpp@localhost) by mpp.com (8.6.11/8.6.9) id CAA01918; Sun, 21 May 1995 02:50:43 -0500
Message-Id: <199505210750.CAA01918@mpp.com>
Date: Sun, 21 May 1995 02:50:43 -0500
From: pritc003@maroon.tc.umn.edu
Reply-To: pritc003@maroon.tc.umn.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: mixer should print out the current mixer settings by default
X-Send-Pr-Version: 3.2

>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
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 21 01:00:02 1995
>Closed-Date:    Wed Jan 31 10:01:37 PST 1996
>Last-Modified:  Wed Jan 31 10:02:53 PST 1996
>Originator:     Mike Pritchard
>Release:        FreeBSD 2.1.0-Development i386
>Organization:
>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++);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Wed Jan 31 10:01:37 PST 1996 
State-Changed-Why:  
Changed in rev 1.4 of mixer.c. 
>Unformatted:


