Subject: kern/2592: audio mixer
To: None <gnats-bugs@NetBSD.ORG>
From: None <rvb@cs.cmu.edu>
List: netbsd-bugs
Date: 07/01/1996 15:30:03
>Number: 2592
>Category: kern
>Synopsis: mixer operation is confusing and wrong
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 1 15:50:04 1996
>Last-Modified:
>Originator: Robert V. Baron
>Organization:
>Release: 1.1
>Environment:
System: NetBSD strauss.coda.cs.cmu.edu 1.1 NetBSD 1.1 (CCODA) #14: Wed Jun 19 14:56:34 EDT 1996 bnoble@telemann.coda.cs.cmu.edu:/usr1/bnoble/kernel_tree/src/sys/arch/i386/compile/CCODA i386
>Description:
First I thought the explanation on the manual page was really
confusing. I had to read audio.c, sbdsp.c and finally write some code
to figure out what was going on.
Then when you use it, you see it uses string names vs "#define
numbers" which is harder to manipulate in a program. Further, you see
that label "msgid"'s are almost always 0, (so why bother having the
field), you see that the value label names are always "volume" (so
again why bother.)
But more importantly, this elaborate schema of having values and sets
and masks for ports/items gets by for the SBPro but is broken with
regards to the SB16. Here, input and output mixing is not an
enumeration but a bit mask. Also treble/bass are not "enumerations"
but 4 bit fields.
>How-To-Repeat:
<code/input/activities to reproduce the problem (multiple lines)>
>How-To-Repeat:
>Fix:
I would throw out all the mixer_devinfo and return array of key: value
pairs. This would be much simpler and more general. In any case,
take a look at the sunos audio mixer interface, see how they handle input
and output source (ports) as masks, etc.
>Audit-Trail:
>Unformatted: