Module Name:    src
Committed By:   tsutsui
Date:           Sat Nov 20 18:03:49 UTC 2010

Modified Files:
        src/sys/dev: audio.c

Log Message:
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.251 -r1.252 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.251 src/sys/dev/audio.c:1.252
--- src/sys/dev/audio.c:1.251	Wed Feb 24 22:37:56 2010
+++ src/sys/dev/audio.c	Sat Nov 20 18:03:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.251 2010/02/24 22:37:56 dyoung Exp $	*/
+/*	$NetBSD: audio.c,v 1.252 2010/11/20 18:03:49 tsutsui 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.251 2010/02/24 22:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.252 2010/11/20 18:03:49 tsutsui Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -2778,8 +2778,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