From 29ad5de8f156d7a954ab2f0c3c9c58dac9dfb595 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 4 Jun 2025 09:35:00 +0200 Subject: [PATCH] alsaloop: only log xrun debug messages when verbose Xruns can happen quite often (E.G. continuously when using alsaloop to/from the UAC gadget driver without a connected host), so only log the debug messages when verbose logging has been requested to not flood the logs. Signed-off-by: Peter Korsgaard --- alsaloop/pcmjob.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c index ffb439b45..2720f55f0 100644 --- a/alsaloop/pcmjob.c +++ b/alsaloop/pcmjob.c @@ -647,13 +647,15 @@ static int xrun(struct loopback_handle *lhandle) int err; if (lhandle == lhandle->loopback->play) { - logit(LOG_DEBUG, "underrun for %s\n", lhandle->id); + if (verbose) + logit(LOG_DEBUG, "underrun for %s\n", lhandle->id); xrun_stats(lhandle->loopback); if ((err = snd_pcm_prepare(lhandle->handle)) < 0) return err; lhandle->xrun_pending = 1; } else { - logit(LOG_DEBUG, "overrun for %s\n", lhandle->id); + if (verbose) + logit(LOG_DEBUG, "overrun for %s\n", lhandle->id); xrun_stats(lhandle->loopback); if ((err = snd_pcm_prepare(lhandle->handle)) < 0) return err;