Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Sav <pavone.lawyer@gmail.com>
To: tiwai@suse.de, perex@perex.cz
Cc: broonie@kernel.org, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Sav <62543096+dongioia@users.noreply.github.com>
Subject: [PATCH] ALSA: pcm_drm_eld: rate-limit ELD parsing errors
Date: Fri, 15 May 2026 17:58:36 +0200	[thread overview]
Message-ID: <20260515155836.58993-1-pavone.lawyer@gmail.com> (raw)
In-Reply-To: <MSG-ID-Takashi>

From: Sav <62543096+dongioia@users.noreply.github.com>

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


       reply	other threads:[~2026-05-15 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <MSG-ID-Takashi>
2026-05-15 15:58 ` Sav [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260515155836.58993-1-pavone.lawyer@gmail.com \
    --to=pavone.lawyer@gmail.com \
    --cc=62543096+dongioia@users.noreply.github.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox