Subject: kern/2590: /dev/sound misfeature 1
To: None <gnats-bugs@NetBSD.ORG>
From: None <rvb@cs.cmu.edu>
List: netbsd-bugs
Date: 07/01/1996 15:13:11
>Number:         2590
>Category:       kern
>Synopsis:       /dev/sound misfeature 1
>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:35:09 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:
	 This
problem may be a just misfeature of /dev/sound.  What I discovered is
that if you switched from a program playing sound to a program
recording sound, nothing got recorded.  What went wrong is that the
sc_mode had been AUMODE_PLAY.  When you switch to AUMODE_RECORD on
/dev/sound this new "mode" gets or'ed into the "mode" to give you both
play|record -- which spells big trouble.  A whole bunch of code
(cb_pause) is now active to handle this "full duplex" feature.  (With
/dev/audio the "mode" is never or'ed it is set.)  I think it is wrong
that going from play to record does nothing. 
>How-To-Repeat:
	 
>Fix:
 This could be fixed by making /dev/sound behave like /dev/audio on
open.  Alternatively, you could make device close, clear out the old
mode bit.
	
>Audit-Trail:
>Unformatted: