Subject: kern/2060: would be nice to be able to query for # of audio playback drops
To: None <gnats-bugs@NetBSD.ORG>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: netbsd-bugs
Date: 02/10/1996 18:23:58
>Number:         2060
>Category:       kern
>Synopsis:       would be nice to be able to query for # of audio playback drops
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 10 19:05:05 1996
>Last-Modified:
>Originator:     John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release:        1.1
>Environment:
	
System: NetBSD pattern 1.1A NetBSD 1.1A (PATTERN) #15: Sat Feb 10 17:47:26 EST 1996 jtk@pattern:/u3/NetBSD-current/src/sys/arch/i386/compile/PATTERN i386


>Description:
	When using an audio playback tool, it would be nice to be able
to query the audio driver for the number of playback drops.

>How-To-Repeat:
>Fix:
===================================================================
RCS file: dev/RCS/audio.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 audio.c
*** dev/audio.c	1996/02/09 00:11:58	1.1.1.4
--- dev/audio.c	1996/02/10 23:20:47
***************
*** 1086,1091 ****
--- 1088,1097 ----
  		*(int *)addr = sc->rr.cb_drops != 0;
  		break;
  
+ 	case AUDIO_PERROR:
+ 		*(int *)addr = sc->pr.cb_drops;
+ 		break;
+ 
  	/*
  	 * How many samples will elapse until mike hears the first
  	 * sample of what we last wrote?
===================================================================
RCS file: sys/RCS/audioio.h,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 ../sys/audioio.h
*** sys/audioio.h	1995/07/09 15:28:12	1.1.1.2
--- sys/audioio.h	1996/02/08 04:32:16
***************
*** 121,126 ****
--- 121,127 ----
  #define AUDIO_GETENC	_IOWR('A', 28, struct audio_encoding)
  #define AUDIO_GETFD	_IOR('A', 29, int)
  #define AUDIO_SETFD	_IOWR('A', 30, int)
+ #define AUDIO_PERROR	_IOR('A', 31, int)
  
  /* 
   * Mixer device
>Audit-Trail:
>Unformatted: