Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/audio Fix a wrong calculation of recording ring buff...
details: https://anonhg.NetBSD.org/src/rev/36c7aff4b4e7
branches: trunk
changeset: 465114:36c7aff4b4e7
user: isaki <isaki%NetBSD.org@localhost>
date: Wed Nov 06 13:37:27 2019 +0000
description:
Fix a wrong calculation of recording ring buffer. Reported on
http://mail-index.netbsd.org/current-users/2019/11/04/msg036976.html
diffstat:
sys/dev/audio/audio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r dee0035029c1 -r 36c7aff4b4e7 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c Wed Nov 06 13:07:32 2019 +0000
+++ b/sys/dev/audio/audio.c Wed Nov 06 13:37:27 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.32 2019/10/18 04:09:02 msaitoh Exp $ */
+/* $NetBSD: audio.c,v 1.33 2019/11/06 13:37:27 isaki Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.32 2019/10/18 04:09:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.33 2019/11/06 13:37:27 isaki Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -4510,7 +4510,7 @@
int bytes1;
int bytes2;
- bytes1 = auring_get_contig_used(usrbuf);
+ bytes1 = auring_get_contig_free(usrbuf);
KASSERT(bytes1 % framesize == 0);
memcpy((uint8_t *)usrbuf->mem + auring_tail(usrbuf),
(uint8_t *)outbuf->mem + outbuf->head * framesize,
Home |
Main Index |
Thread Index |
Old Index