Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix the size of the playback buffer. Patch from ...



details:   https://anonhg.NetBSD.org/src/rev/f4382fd7cb83
branches:  trunk
changeset: 480697:f4382fd7cb83
user:      cjs <cjs%NetBSD.org@localhost>
date:      Tue Jan 18 04:48:47 2000 +0000

description:
Fix the size of the playback buffer. Patch from Dave Sainty <dave%dtsp.co.nz@localhost>.

diffstat:

 sys/dev/pci/eso.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (33 lines):

diff -r cd7784f5527a -r f4382fd7cb83 sys/dev/pci/eso.c
--- a/sys/dev/pci/eso.c Tue Jan 18 03:35:40 2000 +0000
+++ b/sys/dev/pci/eso.c Tue Jan 18 04:48:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eso.c,v 1.16 1999/12/28 19:26:26 kleink Exp $  */
+/*     $NetBSD: eso.c,v 1.17 2000/01/18 04:48:47 cjs Exp $     */
 
 /*
  * Copyright (c) 1999 Klaus J. Klein
@@ -1580,15 +1580,16 @@
        size_t maxsize;
 
        /*
-        * The playback DMA buffer size on the Solo-1 is limited to 2^16 -
-        * 1 bytes.  This is because A2DMAC is a two byte value indicating
-        * the literal byte count, and zero does not appear to be used as
-        * a special case for 2^16.
+        * The playback DMA buffer size on the Solo-1 is limited to 0xfff0
+        * bytes.  This is because IO_A2DMAC is a two byte value
+        * indicating the literal byte count, and the 4 least significant
+        * bits are read-only.  Zero is not used as a special case for
+        * 0x10000.
         *
-        * For recording, DMAC_DMAC is the byte count - 1, so 2^16 can be
-        * represented.
+        * For recording, DMAC_DMAC is the byte count - 1, so 0x10000 can
+        * be represented.
         */
-       maxsize = (direction == AUMODE_PLAY) ? 65535 : 65536;
+       maxsize = (direction == AUMODE_PLAY) ? 0xfff0 : 0x10000;
 
        if (bufsize > maxsize)
                bufsize = maxsize;



Home | Main Index | Thread Index | Old Index