Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sbus change dbri's DMA segment size to a power of tw...
details: https://anonhg.NetBSD.org/src/rev/5152a7419395
branches: trunk
changeset: 763045:5152a7419395
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Mar 09 05:40:11 2011 +0000
description:
change dbri's DMA segment size to a power of two value - the ship allows
segments up to 0x1fff bytes but even rounded to 32bit this seems to
confuse the rest of the audio code these days
TODO: we don't need to interrupt at every single segment
either way, with this mpg123 doesn't produce semi-random funny noises
anymore
diffstat:
sys/dev/sbus/dbri.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 2adf49196a40 -r 5152a7419395 sys/dev/sbus/dbri.c
--- a/sys/dev/sbus/dbri.c Wed Mar 09 00:44:23 2011 +0000
+++ b/sys/dev/sbus/dbri.c Wed Mar 09 05:40:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dbri.c,v 1.32 2011/01/11 00:49:50 macallan Exp $ */
+/* $NetBSD: dbri.c,v 1.33 2011/03/09 05:40:11 macallan Exp $ */
/*
* Copyright (C) 1997 Rudolf Koenig (rfkoenig%immd4.informatik.uni-erlangen.de@localhost)
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.32 2011/01/11 00:49:50 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.33 2011/03/09 05:40:11 macallan Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -1729,8 +1729,12 @@
const audio_params_t *param)
{
- /* DBRI DMA segment size, rounded down to 32bit alignment */
- return 0x1ffc;
+ /*
+ * DBRI DMA segment size can be up to 0x1fff, sixes that are not powers
+ * of two seem to confuse the upper audio layer so we're going with
+ * 0x1000 here
+ */
+ return 0x1000;
}
static int
@@ -1946,7 +1950,7 @@
dbri_round_buffersize(void *hdl, int dir, size_t bufsize)
{
#ifdef DBRI_BIG_BUFFER
- return 16*0x1ffc; /* use ~128KB buffer */
+ return 0x20000; /* use 128KB buffer */
#else
return bufsize;
#endif
Home |
Main Index |
Thread Index |
Old Index