Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/audio audio(4): Fix an (unintended) minor behavior o...



details:   https://anonhg.NetBSD.org/src/rev/6caa11ebab32
branches:  trunk
changeset: 365746:6caa11ebab32
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Apr 23 06:17:59 2022 +0000

description:
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.

diffstat:

 sys/dev/audio/audio.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 073409335158 -r 6caa11ebab32 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Fri Apr 22 21:22:14 2022 +0000
+++ b/sys/dev/audio/audio.c     Sat Apr 23 06:17:59 2022 +0000
@@ -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_lock_enter(track);
 
+       /* Clear all internal parameters. */
        track->usrbuf.used = 0;
-       /* Clear all internal parameters. */
+       track->usrbuf.head = 0;
        if (track->codec.filter) {
                track->codec.srcbuf.used = 0;
                track->codec.srcbuf.head = 0;



Home | Main Index | Thread Index | Old Index