Module Name: src Committed By: isaki Date: Sat Apr 23 06:17:59 UTC 2022
Modified Files: src/sys/dev/audio: audio.c Log Message: audio(4): Fix an (unintended) minor behavior on AUDIO_FLUSH. On NetBSD7, when AUDIO_FLUSH was issued, .offset of AUDIO_GETOOFFS was reinitialized (to one block ahead from zero) or unchanged depend on whether the user encoding is hardware native or not (probably). I don't believe that it's intended or we need to maintain it. Now, AUDIO_FLUSH always clears the offset to zero. To generate a diff of this commit: cvs rdiff -u -r1.128 -r1.129 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.128 src/sys/dev/audio/audio.c:1.129 --- src/sys/dev/audio/audio.c:1.128 Thu Apr 21 01:15:24 2022 +++ src/sys/dev/audio/audio.c Sat Apr 23 06:17:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.128 2022/04/21 01:15:24 macallan Exp $ */ +/* $NetBSD: audio.c,v 1.129 2022/04/23 06:17:59 isaki Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -181,7 +181,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.128 2022/04/21 01:15:24 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.129 2022/04/23 06:17:59 isaki Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -6280,8 +6280,9 @@ audio_track_clear(struct audio_softc *sc audio_track_lock_enter(track); - track->usrbuf.used = 0; /* Clear all internal parameters. */ + track->usrbuf.used = 0; + track->usrbuf.head = 0; if (track->codec.filter) { track->codec.srcbuf.used = 0; track->codec.srcbuf.head = 0;