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): Remove no longer used counters.



details:   https://anonhg.NetBSD.org/src/rev/dfc013303734
branches:  trunk
changeset: 365751:dfc013303734
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Apr 23 07:55:07 2022 +0000

description:
audio(4): Remove no longer used counters.
These were used at very early phase of development.

diffstat:

 sys/dev/audio/audio.c    |  18 +++---------------
 sys/dev/audio/audiodef.h |   8 ++------
 2 files changed, 5 insertions(+), 21 deletions(-)

diffs (89 lines):

diff -r d856420df14c -r dfc013303734 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sat Apr 23 07:47:42 2022 +0000
+++ b/sys/dev/audio/audio.c     Sat Apr 23 07:55:07 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.130 2022/04/23 07:43:16 isaki Exp $        */
+/*     $NetBSD: audio.c,v 1.131 2022/04/23 07:55:07 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.130 2022/04/23 07:43:16 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.131 2022/04/23 07:55:07 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -2825,7 +2825,6 @@
                        goto abort;
                }
                auring_take(usrbuf, bytes);
-               track->useriobytes += bytes;
                TRACET(3, track, "uiomove(len=%d) usrbuf=%d/%d/C%d",
                    bytes,
                    usrbuf->head, usrbuf->used, usrbuf->capacity);
@@ -2953,7 +2952,6 @@
                                goto abort;
                        }
                        auring_push(usrbuf, len);
-                       track->useriobytes += len;
                        TRACET(3, track, "uiomove(len=%d) usrbuf=%d/%d/C%d",
                            len,
                            usrbuf->head, usrbuf->used, usrbuf->capacity);
@@ -4955,9 +4953,6 @@
            "count=%d fpb=%d",
            count, frame_per_block(track->mixer, &track->outbuf.fmt));
 
-       /* XXX TODO: is this necessary for now? */
-       int track_count_0 = track->outbuf.used;
-
        usrbuf = &track->usrbuf;
        input = track->input;
 
@@ -5068,12 +5063,6 @@
                }
        }
 
-       if (track->input == &track->outbuf) {
-               track->outputcounter = track->inputcounter;
-       } else {
-               track->outputcounter += track->outbuf.used - track_count_0;
-       }
-
        track->stamp++;
 
 #if defined(AUDIO_DEBUG)
@@ -6389,8 +6378,7 @@
        }
 
        track->pstate = AUDIO_STATE_CLEAR;
-       TRACET(3, track, "done trk_inp=%d trk_out=%d",
-               (int)track->inputcounter, (int)track->outputcounter);
+       TRACET(3, track, "done");
        return 0;
 }
 
diff -r d856420df14c -r dfc013303734 sys/dev/audio/audiodef.h
--- a/sys/dev/audio/audiodef.h  Sat Apr 23 07:47:42 2022 +0000
+++ b/sys/dev/audio/audiodef.h  Sat Apr 23 07:55:07 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audiodef.h,v 1.18 2022/04/20 07:11:13 isaki Exp $      */
+/*     $NetBSD: audiodef.h,v 1.19 2022/04/23 07:55:07 isaki Exp $      */
 
 /*
  * Copyright (C) 2017 Tetsuya Isaki. All rights reserved.
@@ -175,11 +175,7 @@
        audio_state_t   pstate;         /* playback state */
        bool            is_pause;
 
-       /* Statistic counters. */
-       uint64_t        inputcounter;   /* # of frames input to track */
-       uint64_t        outputcounter;  /* # of frames output from track */
-       uint64_t        useriobytes;    /* # of bytes xfer to/from userland */
-       uint64_t        dropframes;     /* # of frames dropped */
+       uint64_t        dropframes;     /* number of dropped frames */
        int             eofcounter;     /* count of zero-sized write */
 
        /*



Home | Main Index | Thread Index | Old Index