Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Allow the hwvc block size to be set to any amount wi...



details:   https://anonhg.NetBSD.org/src/rev/19a42eeb9851
branches:  trunk
changeset: 828494:19a42eeb9851
user:      nat <nat%NetBSD.org@localhost>
date:      Sat Dec 16 15:58:56 2017 +0000

description:
Allow the hwvc block size to be set to any amount with audio mixing
disabled.

diffstat:

 sys/dev/audio.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 0aaf11b50d65 -r 19a42eeb9851 sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Dec 16 15:56:00 2017 +0000
+++ b/sys/dev/audio.c   Sat Dec 16 15:58:56 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.443 2017/12/16 15:56:00 nat Exp $  */
+/*     $NetBSD: audio.c,v 1.444 2017/12/16 15:58:56 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.443 2017/12/16 15:56:00 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.444 2017/12/16 15:58:56 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2725,12 +2725,13 @@
                stream = vc->sc_pustream;
        }
 
-       if (vc == sc->sc_hwvc) {
+       if (sc->sc_usemixer && 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 ((!sc->sc_usemixer && SPECIFIED(blksize)) ||
+                   (SPECIFIED(blksize) && blksize > cb->blksize))
                        cb->blksize = blksize;
        }
 }



Home | Main Index | Thread Index | Old Index