Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/hdaudio properly round block and buffer sizes --...



details:   https://anonhg.NetBSD.org/src/rev/e789f537837c
branches:  trunk
changeset: 757117:e789f537837c
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Aug 15 16:21:46 2010 +0000

description:
properly round block and buffer sizes -- nvidia HDA controllers work now

diffstat:

 sys/dev/pci/hdaudio/hdaudio_afg.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 54cb302a0946 -r e789f537837c sys/dev/pci/hdaudio/hdaudio_afg.c
--- a/sys/dev/pci/hdaudio/hdaudio_afg.c Sun Aug 15 16:10:56 2010 +0000
+++ b/sys/dev/pci/hdaudio/hdaudio_afg.c Sun Aug 15 16:21:46 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio_afg.c,v 1.22 2010/08/10 13:47:38 joerg Exp $ */
+/* $NetBSD: hdaudio_afg.c,v 1.23 2010/08/15 16:21:46 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd <support%precedence.co.uk@localhost>
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdaudio_afg.c,v 1.22 2010/08/10 13:47:38 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdaudio_afg.c,v 1.23 2010/08/15 16:21:46 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3350,7 +3350,7 @@
        }
 
        /* Multiple of 128 */
-       blksize &= ~128;
+       blksize &= ~127;
        if (blksize <= 0)
                blksize = 128;
 
@@ -3358,7 +3358,7 @@
        if (bufsize > HDAUDIO_BDL_MAX * blksize) {
                blksize = bufsize / HDAUDIO_BDL_MAX;
                if (blksize & 128)
-                       blksize = (blksize + 128) & ~128;
+                       blksize = (blksize + 128) & ~127;
        }
 
        return blksize;
@@ -3572,7 +3572,7 @@
 hdaudio_afg_round_buffersize(void *opaque, int direction, size_t bufsize)
 {
        /* Multiple of 128 */
-       bufsize &= ~128;
+       bufsize &= ~127;
        if (bufsize <= 0)
                bufsize = 128;
        return bufsize;



Home | Main Index | Thread Index | Old Index