Module Name: src
Committed By: nat
Date: Sun Dec 11 07:36:30 UTC 2016
Modified Files:
src/sys/dev: audio.c
Log Message:
PR 50613: Onno van der Linden: unpausing audio(4) causes already written
data to be dropped.
Applied patch prepared by Onno.
To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 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.275 src/sys/dev/audio.c:1.276
--- src/sys/dev/audio.c:1.275 Sat Dec 10 22:37:12 2016
+++ src/sys/dev/audio.c Sun Dec 11 07:36:30 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.275 2016/12/10 22:37:12 christos Exp $ */
+/* $NetBSD: audio.c,v 1.276 2016/12/11 07:36:30 nat Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <[email protected]>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.275 2016/12/10 22:37:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.276 2016/12/11 07:36:30 nat Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -4506,7 +4506,8 @@ cleanup:
int init_error;
mutex_enter(sc->sc_intr_lock);
- init_error = audio_initbufs(sc, n);
+ init_error = (pausechange == 1 && reset == 0) ? 0 :
+ audio_initbufs(sc, n);
if (init_error) goto err;
if (vc->sc_mpr.blksize != oldpblksize ||
vc->sc_mrr.blksize != oldrblksize ||