git: 1edf301bbb97 - stable/15 - sound: Remove SND_DIAGNOSTIC section in buffer.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 09:55:07 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=1edf301bbb97dca6b22c13d566ee4fa3d15988c8
commit 1edf301bbb97dca6b22c13d566ee4fa3d15988c8
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:31:48 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-31 09:53:16 +0000
sound: Remove SND_DIAGNOSTIC section in buffer.c
The purpose of this has not been documented, but it seems like it makes
it possible to view the maximum number of bytes that passed to
sndbuf_feed(), as well as the maximum number of cycles taken inside its
main loop. These do not seem particularly useful anymore.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55989
(cherry picked from commit 4324e0fa71f85f274013100d912584a042c9909e)
---
sys/dev/sound/pcm/buffer.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
index 1db9e5661dc8..0c574ae2908c 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -506,29 +506,11 @@ sndbuf_dispose(struct snd_dbuf *b, u_int8_t *to, unsigned int count)
return 0;
}
-#ifdef SND_DIAGNOSTIC
-static uint32_t snd_feeder_maxfeed = 0;
-SYSCTL_UINT(_hw_snd, OID_AUTO, feeder_maxfeed, CTLFLAG_RD,
- &snd_feeder_maxfeed, 0, "maximum feeder count request");
-
-static uint32_t snd_feeder_maxcycle = 0;
-SYSCTL_UINT(_hw_snd, OID_AUTO, feeder_maxcycle, CTLFLAG_RD,
- &snd_feeder_maxcycle, 0, "maximum feeder cycle");
-#endif
-
/* count is number of bytes we want added to destination buffer */
int
sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *channel, struct pcm_feeder *feeder, unsigned int count)
{
unsigned int cnt, maxfeed;
-#ifdef SND_DIAGNOSTIC
- unsigned int cycle;
-
- if (count > snd_feeder_maxfeed)
- snd_feeder_maxfeed = count;
-
- cycle = 0;
-#endif
KASSERT(count > 0, ("can't feed 0 bytes"));
@@ -544,16 +526,8 @@ sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *chan
break;
sndbuf_acquire(to, to->tmpbuf, cnt);
count -= cnt;
-#ifdef SND_DIAGNOSTIC
- cycle++;
-#endif
} while (count != 0);
-#ifdef SND_DIAGNOSTIC
- if (cycle > snd_feeder_maxcycle)
- snd_feeder_maxcycle = cycle;
-#endif
-
return (0);
}