* [PATCH] ALSA: pcm_drm_eld: rate-limit ELD parsing errors
@ 2026-05-10 14:17 Francesco Saverio Pavone
2026-05-15 6:50 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Francesco Saverio Pavone @ 2026-05-10 14:17 UTC (permalink / raw)
To: perex, tiwai; +Cc: broonie, linux-sound, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 607 bytes --]
Hi all,
Sending this via attachment because my Postfix relay setup wasn't usable.
Patch is straightforward: rate-limit two dev_info() calls in
snd_parse_eld() that get triggered on every PCM open against an
HDMI codec with no sink attached.
Equivalent fix to the one Mark Brown did for hdac_hdmi in June 2025
(lkml.kernel.org/lkml/2025/6/13/1380), just for the generic helper used
by ASoC hdmi-codec.
Tested on Rock 5B+ (RK3588): two HDMI outputs, only one cable plugged
in. Before: ~30 "HDMI: Unknown ELD version 0" lines per probe burst.
After: 0.
Let me know if anything needs adjusting.
Thanks,
Sav
[-- Attachment #2: 0001-ALSA-pcm_drm_eld-rate-limit-ELD-parsing-errors.patch --]
[-- Type: application/octet-stream, Size: 2081 bytes --]
From 5c740f52f5bc1629125588cc7e5a2731baf91e8b Mon Sep 17 00:00:00 2001
From: Sav <62543096+dongioia@users.noreply.github.com>
Date: Sun, 10 May 2026 10:54:00 +0000
Subject: [PATCH] ALSA: pcm_drm_eld: rate-limit ELD parsing errors
snd_parse_eld() is the generic helper used by ASoC hdmi-codec, equivalent
to the hdac_hdmi parse path Mark Brown rate-limited in
lkml.kernel.org/lkml/2025/6/13/1380. The same spam shows up here for the
same reason.
When a HDMI sink is not connected (for example a board with two HDMI
outputs and a cable in only one of them), userspace audio servers like
PipeWire keep opening the empty card. snd_parse_eld() then logs
HDMI: Unknown ELD version 0
on every retry. On rk3588 that easily produces 30+ messages per burst.
A malformed ELD (MNL out of range) hits the same code path. Neither is
worth a separate dev_info() per occurrence; switch both to
dev_info_ratelimited().
Signed-off-by: Sav <62543096+dongioia@users.noreply.github.com>
---
sound/core/pcm_drm_eld.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/core/pcm_drm_eld.c b/sound/core/pcm_drm_eld.c
index cb2eebaac85f..1941ee520063 100644
--- a/sound/core/pcm_drm_eld.c
+++ b/sound/core/pcm_drm_eld.c
@@ -334,7 +334,7 @@ int snd_parse_eld(struct device *dev, struct snd_parsed_hdmi_eld *e,
e->eld_ver = GRAB_BITS(buf, 0, 3, 5);
if (e->eld_ver != ELD_VER_CEA_861D &&
e->eld_ver != ELD_VER_PARTIAL) {
- dev_info(dev, "HDMI: Unknown ELD version %d\n", e->eld_ver);
+ dev_info_ratelimited(dev, "HDMI: Unknown ELD version %d\n", e->eld_ver);
goto out_fail;
}
@@ -357,7 +357,7 @@ int snd_parse_eld(struct device *dev, struct snd_parsed_hdmi_eld *e,
e->product_id = get_unaligned_le16(buf + 18);
if (mnl > ELD_MAX_MNL) {
- dev_info(dev, "HDMI: MNL is reserved value %d\n", mnl);
+ dev_info_ratelimited(dev, "HDMI: MNL is reserved value %d\n", mnl);
goto out_fail;
} else if (ELD_FIXED_BYTES + mnl > size) {
dev_info(dev, "HDMI: out of range MNL %d\n", mnl);
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: pcm_drm_eld: rate-limit ELD parsing errors
2026-05-10 14:17 [PATCH] ALSA: pcm_drm_eld: rate-limit ELD parsing errors Francesco Saverio Pavone
@ 2026-05-15 6:50 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-05-15 6:50 UTC (permalink / raw)
To: Francesco Saverio Pavone; +Cc: perex, tiwai, broonie, linux-sound, linux-kernel
On Sun, 10 May 2026 16:17:47 +0200,
Francesco Saverio Pavone wrote:
>
> Hi all,
>
> Sending this via attachment because my Postfix relay setup wasn't usable.
> Patch is straightforward: rate-limit two dev_info() calls in
> snd_parse_eld() that get triggered on every PCM open against an
> HDMI codec with no sink attached.
>
> Equivalent fix to the one Mark Brown did for hdac_hdmi in June 2025
> (lkml.kernel.org/lkml/2025/6/13/1380), just for the generic helper used
> by ASoC hdmi-codec.
>
> Tested on Rock 5B+ (RK3588): two HDMI outputs, only one cable plugged
> in. Before: ~30 "HDMI: Unknown ELD version 0" lines per probe burst.
> After: 0.
>
> Let me know if anything needs adjusting.
>
> Thanks,
> Sav
Is the patch itself missing? Please resubmit.
thanks,
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-15 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 14:17 [PATCH] ALSA: pcm_drm_eld: rate-limit ELD parsing errors Francesco Saverio Pavone
2026-05-15 6:50 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox