From 5ac432e5bec7549b626120aba41c5afa4d1536ca Mon Sep 17 00:00:00 2001 From: Andrew Sayers Date: Mon, 20 Jan 2025 12:14:14 +0000 Subject: [PATCH] Downgrade snd_pcm_mmap_commit error to warning --- spa/plugins/alsa/alsa-pcm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index b8728bfe1..eaa0939b6 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -3027,10 +3027,14 @@ again: if (state->use_mmap && written > 0) { if (SPA_UNLIKELY((commitres = snd_pcm_mmap_commit(hndl, offset, written)) < 0)) { - spa_log_error(state->log, "%s: snd_pcm_mmap_commit error: %s", - state->name, snd_strerror(commitres)); - if (commitres != -EPIPE && commitres != -ESTRPIPE) + if (commitres == -EPIPE || commitres == -ESTRPIPE) { + spa_log_warn(state->log, "%s: snd_pcm_mmap_commit error: %s", + state->name, snd_strerror(commitres)); + } else { + spa_log_error(state->log, "%s: snd_pcm_mmap_commit error: %s", + state->name, snd_strerror(commitres)); return res; + } } if (commitres > 0 && written != (snd_pcm_uframes_t) commitres) { spa_log_warn(state->log, "%s: mmap_commit wrote %ld instead of %ld",