Module Name: src Committed By: martin Date: Tue Nov 19 12:58:30 UTC 2019
Modified Files: src/sys/dev/audio [netbsd-9]: audio.c Log Message: Pull up following revision(s) (requested by isaki in ticket #448): sys/dev/audio/audio.c: revision 1.33 Fix a wrong calculation of recording ring buffer. Reported on http://mail-index.netbsd.org/current-users/2019/11/04/msg036976.html To generate a diff of this commit: cvs rdiff -u -r1.28.2.3 -r1.28.2.4 src/sys/dev/audio/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.28.2.3 src/sys/dev/audio/audio.c:1.28.2.4 --- src/sys/dev/audio/audio.c:1.28.2.3 Sun Oct 6 11:02:32 2019 +++ src/sys/dev/audio/audio.c Tue Nov 19 12:58:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.28.2.3 2019/10/06 11:02:32 martin Exp $ */ +/* $NetBSD: audio.c,v 1.28.2.4 2019/11/19 12:58:29 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -142,7 +142,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.3 2019/10/06 11:02:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.4 2019/11/19 12:58:29 martin Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -4510,7 +4510,7 @@ audio_track_record(audio_track_t *track) 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,