summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorisaki <isaki@NetBSD.org>2022-04-23 07:55:07 +0000
committerisaki <isaki@NetBSD.org>2022-04-23 07:55:07 +0000
commit83ab570a501b2df6f5b1f3be6f6747d034dcf871 (patch)
tree417d4642696fa34a0805572e8fdf3d50436c08df /sys/dev
parentf8f435a7e4c77205cd39ab53de86d217e60919a8 (diff)
audio(4): Remove no longer used counters.
These were used at very early phase of development.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/audio/audio.c18
-rw-r--r--sys/dev/audio/audiodef.h8
2 files changed, 5 insertions, 21 deletions
diff --git a/sys/dev/audio/audio.c b/sys/dev/audio/audio.c
index 5a5fdfb7bea..37901a477c0 100644
--- a/sys/dev/audio/audio.c
+++ b/sys/dev/audio/audio.c
@@ -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 @@ audio_read(struct audio_softc *sc, struct uio *uio, int ioflag,
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 @@ audio_write(struct audio_softc *sc, struct uio *uio, int ioflag,
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 @@ audio_track_play(audio_track_t *track)
"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 @@ audio_track_play(audio_track_t *track)
}
}
- 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 @@ audio_track_drain(struct audio_softc *sc, audio_track_t *track)
}
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 --git a/sys/dev/audio/audiodef.h b/sys/dev/audio/audiodef.h
index 184a4f000ce..fc13a3d6707 100644
--- a/sys/dev/audio/audiodef.h
+++ b/sys/dev/audio/audiodef.h
@@ -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 @@ struct audio_track {
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 */
/*