Subject: bin/4279: `mixerctl -a' prints a weird output
To: None <gnats-bugs@gnats.netbsd.org>
From: NAKAJIMA Yoshihiro <nakayosh@kcn.or.jp>
List: netbsd-bugs
Date: 10/17/1997 00:25:48
>Number:         4279
>Category:       bin
>Synopsis:       `mixerctl -a' prints a weird output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 16 08:35:02 1997
>Last-Modified:
>Originator:     NAKAJIMA Yoshihiro
>Organization:
>Release:        NetBSD-current 97/10/12
>Environment:
System: NetBSD asura 1.2G NetBSD 1.2G (ASURA) #36: Thu Oct 16 22:47:56 JST 1997 nakayosh@asura:/usr/src/sys/arch/i386/compile/ASURA i386


>Description:
	Mixerctl prints a weird output, like this:

: % mixerctl -a
: outputs.master=192,192
: outputs.fmsynth=192,192
: outputs.cd=192,192
: outputs.dac=192,192
: outputs.mic=0
: outputs.line=0,0
: record.source=mic
: .treble=off		<= a dot leads
: bass=on

	I use a SB-PRO compatible sound card on i386.

>How-To-Repeat:
	See above.

>Fix:
	If it should be ``treble=off'', this patch may be available.

--- src/usr.bin/mixerctl/mixerctl.c.orig	Fri Oct 10 08:38:32 1997
+++ src/usr.bin/mixerctl/mixerctl.c	Fri Oct 17 00:14:59 1997
@@ -303,7 +303,7 @@
 	}
 
 	for(i = 0; i < j; i++) {
-		if (infos[i].mixer_class >= 0 && infos[i].mixer_class < ndev)
+		if (fields[i].infp->mixer_class >= 0 && fields[i].infp->mixer_class < ndev)
 			fields[i].name = catstr(infos[fields[i].infp->mixer_class].label.name, 
 						fields[i].name);
 	}
>Audit-Trail:
>Unformatted: