Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Revert to previous. It is necessary to use the calc...



details:   https://anonhg.NetBSD.org/src/rev/180ba0a3ab31
branches:  trunk
changeset: 357267:180ba0a3ab31
user:      nat <nat%NetBSD.org@localhost>
date:      Fri Nov 03 21:12:44 2017 +0000

description:
Revert to previous.  It is necessary to use the calculated blocksize if
none supplied.

Tested by martin@.

diffstat:

 sys/dev/audio.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 76430cf212c4 -r 180ba0a3ab31 sys/dev/audio.c
--- a/sys/dev/audio.c   Fri Nov 03 19:49:23 2017 +0000
+++ b/sys/dev/audio.c   Fri Nov 03 21:12:44 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.426 2017/11/03 05:31:38 nat Exp $  */
+/*     $NetBSD: audio.c,v 1.427 2017/11/03 21:12:44 nat Exp $  */
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.426 2017/11/03 05:31:38 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.427 2017/11/03 21:12:44 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2676,22 +2676,26 @@
 {
        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 {
-               if (SPECIFIED(blksize))
+               cb->blksize = audio_calc_blksize(sc, &stream->param);
+               if (SPECIFIED(blksize) && blksize > cb->blksize)
                        cb->blksize = blksize;
        }
 }



Home | Main Index | Thread Index | Old Index