Module Name:    src
Committed By:   nat
Date:           Fri Nov  3 05:31:38 UTC 2017

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

Log Message:
No need to ratify block size twice as this is done in audio_initbufs.

This is a rework of rev 1.421.


To generate a diff of this commit:
cvs rdiff -u -r1.425 -r1.426 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.425 src/sys/dev/audio.c:1.426
--- src/sys/dev/audio.c:1.425	Fri Nov  3 05:09:49 2017
+++ src/sys/dev/audio.c	Fri Nov  3 05:31:38 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.425 2017/11/03 05:09:49 nat Exp $	*/
+/*	$NetBSD: audio.c,v 1.426 2017/11/03 05:31:38 nat Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.425 2017/11/03 05:09:49 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.426 2017/11/03 05:31:38 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2676,26 +2676,22 @@ audio_setblksize(struct audio_softc *sc,
 {
 	struct audio_ringbuffer *mixcb, *cb;
 	audio_params_t *parm;
-	audio_stream_t *stream;
 
 	if (mode == AUMODE_RECORD) {
 		mixcb = &sc->sc_mixring.sc_mrr;
 		cb = &vc->sc_mrr;
 		parm = &vc->sc_rparams;
-		stream = vc->sc_rustream;
 	} else {
 		mixcb = &sc->sc_mixring.sc_mpr;
 		cb = &vc->sc_mpr;
 		parm = &vc->sc_pparams;
-		stream = vc->sc_pustream;
 	}
 
 	if (vc == sc->sc_hwvc) {
 		mixcb->blksize = audio_calc_blksize(sc, parm);
 		cb->blksize = audio_calc_blksize(sc, &cb->s.param);
 	} else {
-		cb->blksize = audio_calc_blksize(sc, &stream->param);
-		if (SPECIFIED(blksize) && blksize > cb->blksize)
+		if (SPECIFIED(blksize))
 			cb->blksize = blksize;
 	}
 }

Reply via email to