Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom Reduce latency a bit. From nat@
details: https://anonhg.NetBSD.org/src/rev/ddfdf9358f4c
branches: trunk
changeset: 339570:ddfdf9358f4c
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Jul 28 21:24:43 2015 +0000
description:
Reduce latency a bit. From nat@
diffstat:
sys/arch/arm/broadcom/bcm2835_vcaudio.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diffs (47 lines):
diff -r f06916e83721 -r ddfdf9358f4c sys/arch/arm/broadcom/bcm2835_vcaudio.c
--- a/sys/arch/arm/broadcom/bcm2835_vcaudio.c Tue Jul 28 19:46:42 2015 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_vcaudio.c Tue Jul 28 21:24:43 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_vcaudio.c,v 1.9 2015/03/15 18:31:29 jmcneill Exp $ */
+/* $NetBSD: bcm2835_vcaudio.c,v 1.10 2015/07/28 21:24:43 skrll Exp $ */
/*-
* Copyright (c) 2013 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_vcaudio.c,v 1.9 2015/03/15 18:31:29 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_vcaudio.c,v 1.10 2015/07/28 21:24:43 skrll Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -81,20 +81,22 @@
VCAUDIO_DEST_HDMI = 2,
};
-
/*
- * Standard message size is 4000 bytes and VCHIQ can accept 16 messages.
+ * Maximum message size is 4000 bytes and VCHIQ can accept 16 messages.
*
* 4000 bytes of 16bit 48kHz stereo is approximately 21ms.
*
* We get complete messages at ~10ms intervals.
*
- * Setting blocksize to 2 x 4000 means that we send approx 42ms of audio. We
- * prefill by two blocks before starting audio meaning we have 83ms of latency.
+ * Setting blocksize to 4 x 1600 means that we send approx 33ms of audio. We
+ * prefill by two blocks before starting audio meaning we have 50ms of latency.
+ *
+ * Six messages of 1600 bytes was chosen working back from a desired latency of
+ * 50ms.
*/
-#define VCAUDIO_MSGSIZE 4000
-#define VCAUDIO_NUMMSGS 2
+#define VCAUDIO_MSGSIZE 1600
+#define VCAUDIO_NUMMSGS 4
#define VCAUDIO_BLOCKSIZE (VCAUDIO_MSGSIZE * VCAUDIO_NUMMSGS)
#define VCAUDIO_BUFFERSIZE 128000
#define VCAUDIO_PREFILLCOUNT 2
Home |
Main Index |
Thread Index |
Old Index