Subject: kern/1184: audio driver turns off speaker on full-duplex device when it shouldn't
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: netbsd-bugs
Date: 07/02/1995 15:50:02
>Number: 1184
>Category: kern
>Synopsis: audio driver turns off speaker on full-duplex device when it shouldn't
>Confidential: yes
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 2 15:50:00 1995
>Originator: John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release: -current, June 30
>Environment:
System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #559: Sun Jul 2 14:50:32 EDT 1995 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386
>Description:
On a full-duplex device opened for reading and writing, a read
will turn off the speaker. This is not quite useful.
>How-To-Repeat:
see above
>Fix:
This patch makes it so that the speaker is turned off if you've only
opened it for read, or you're on a half-duplex device.
===================================================================
RCS file: RCS/audio.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 audio.c
--- audio.c 1995/06/06 03:53:56 1.1.1.1
+++ audio.c 1995/07/02 19:18:25
@@ -602,7 +615,8 @@
int s = splaudio();
sc->sc_mode |= 1<<AUMODE_RECORD;
- if (sc->hw_if->speaker_ctl)
+ if (sc->hw_if->speaker_ctl &&
+ (!sc->hw_if->full_duplex || (sc->sc_mode & 1<<AUMODE_PLAY) == 0))
sc->hw_if->speaker_ctl(sc->hw_hdl, SPKR_OFF);
splx(s);
}
>Audit-Trail:
>Unformatted: