Subject: kern/1027: audio device doesn't call to set hardware recording gain correctly
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: netbsd-bugs
Date: 05/06/1995 22:35:02
>Number: 1027
>Category: kern
>Synopsis: audio device doesn't call to set hardware recording gain correctly
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 6 22:35:01 1995
>Originator: John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release: 1.0A (-current)
>Environment:
System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #311: Thu May 4 21:37:13 EDT 1995 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386
>Description:
The audio driver doesn't tag the mixer command to set recording gain
properly--it needs to set AUDIO_MIXER_VALUE.
>How-To-Repeat:
try setting the recording gain with ioctl(xx, AUDIO_SETINFO, &info).
>Fix:
*** audio.c.~1~ Sat May 6 06:10:13 1995
--- sys/dev/audio.c Sun May 7 01:26:19 1995
***************
*** 1476,1487 ****
--- 1476,1489 ----
}
if (p->gain != ~0) {
ct.dev = hw->get_out_port(sc->hw_hdl);
+ ct.type = AUDIO_MIXER_VALUE;
ct.un.value.num_channels = 1;
ct.un.value.level[AUDIO_MIXER_LEVEL_MONO] = p->gain;
hw->set_port(sc->hw_hdl, &ct);
}
if (r->gain != ~0) {
ct.dev = hw->get_in_port(sc->hw_hdl);
+ ct.type = AUDIO_MIXER_VALUE;
ct.un.value.num_channels = 1;
ct.un.value.level[AUDIO_MIXER_LEVEL_MONO] = r->gain;
hw->set_port(sc->hw_hdl, &ct);
>Audit-Trail:
>Unformatted: