Module Name:    src
Committed By:   riz
Date:           Tue Dec 21 22:25:57 UTC 2010

Modified Files:
        src/sys/dev [netbsd-5]: audio.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1498):
        sys/dev/audio.c: revision 1.252
Fix botches in rev 1.185 (kent-audio1 merge) which cause buffer overrun
and "tlb_exception: no copyin/out fault hander" panic in
audio_fill_silence() after audio playback on dreamcast.
The problem is tracked and fix is provieded by Ryo SHIMIZU,
who is the auther of aica(4) audio driver for dreamcast.


To generate a diff of this commit:
cvs rdiff -u -r1.243.6.3 -r1.243.6.4 src/sys/dev/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/audio.c
diff -u src/sys/dev/audio.c:1.243.6.3 src/sys/dev/audio.c:1.243.6.4
--- src/sys/dev/audio.c:1.243.6.3	Fri Oct 16 05:43:37 2009
+++ src/sys/dev/audio.c	Tue Dec 21 22:25:56 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.243.6.3 2009/10/16 05:43:37 snj Exp $	*/
+/*	$NetBSD: audio.c,v 1.243.6.4 2010/12/21 22:25:56 riz Exp $	*/
 
 /*
  * Copyright (c) 1991-1993 Regents of the University of California.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.243.6.3 2009/10/16 05:43:37 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.243.6.4 2010/12/21 22:25:56 riz Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -2780,8 +2780,8 @@
 
 			/* Clear next block so we keep ahead of the DMA. */
 			used = audio_stream_get_used(&cb->s);
-			if (used + cc < cb->s.end - cb->s.start)
-				audio_pint_silence(sc, cb, inp, blksize);
+			if (used + blksize < cb->s.end - cb->s.start)
+				audio_pint_silence(sc, cb, cb->s.inp, blksize);
 		}
 	}
 

Reply via email to