[PATCH v2 2/3] ASoC: hdac_hdmi: Use dev_info on invalid ELD version

Detlev Casanova posted 3 patches 1 month, 2 weeks ago
[PATCH v2 2/3] ASoC: hdac_hdmi: Use dev_info on invalid ELD version
Posted by Detlev Casanova 1 month, 2 weeks ago
When disconnected, the ELD data cannot be read by the display driver, so
it just sets the data to 0.

That makes the ELD parsing code read an ELD version of 0, which is
invalid. In hdac_hdmi, that is logged with dev_err(), but should be
logged with dev_info() instead as it is done in sound/core/pcm_drm_eld.c

This avoids printing multiple messages like:

    HDMI: Unknown ELD version 0

in the kernel log when userspace tries to open the sound device.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 sound/soc/codecs/hdac_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 1139a2754ca33..4cc3b7a1062bd 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1232,7 +1232,7 @@ static int hdac_hdmi_parse_eld(struct hdac_device *hdev,
 						>> DRM_ELD_VER_SHIFT;
 
 	if (ver != ELD_VER_CEA_861D && ver != ELD_VER_PARTIAL) {
-		dev_err(&hdev->dev, "HDMI: Unknown ELD version %d\n", ver);
+		dev_info(&hdev->dev, "HDMI: Unknown ELD version %d\n", ver);
 		return -EINVAL;
 	}
 
-- 
2.50.1
Re: [PATCH v2 2/3] ASoC: hdac_hdmi: Use dev_info on invalid ELD version
Posted by Mark Brown 1 month, 2 weeks ago
On Tue, Jul 22, 2025 at 03:54:36PM -0400, Detlev Casanova wrote:
> When disconnected, the ELD data cannot be read by the display driver, so
> it just sets the data to 0.

Please don't put patches for different subsystems into the same series
if there's no dependencies, it just makes dependencies less obvious and
creates hassle merging things.

> That makes the ELD parsing code read an ELD version of 0, which is
> invalid. In hdac_hdmi, that is logged with dev_err(), but should be
> logged with dev_info() instead as it is done in sound/core/pcm_drm_eld.c
> 
> This avoids printing multiple messages like:
> 
>     HDMI: Unknown ELD version 0
> 
> in the kernel log when userspace tries to open the sound device.

It doesn't, it just lowers the severity of the logs that are printed.
If the goal is to lower the number of messages printed you need to use
a ratelimited print.
Re: [PATCH v2 2/3] ASoC: hdac_hdmi: Use dev_info on invalid ELD version
Posted by Detlev Casanova 1 month, 2 weeks ago
Hi Mark,
On Wednesday, 23 July 2025 06:40:13 EDT Mark Brown wrote:
> On Tue, Jul 22, 2025 at 03:54:36PM -0400, Detlev Casanova wrote:
> > When disconnected, the ELD data cannot be read by the display driver, so
> > it just sets the data to 0.
> 
> Please don't put patches for different subsystems into the same series
> if there's no dependencies, it just makes dependencies less obvious and
> creates hassle merging things.

Yes, sorry, I'll send v3 of this patch separately.

> > That makes the ELD parsing code read an ELD version of 0, which is
> > invalid. In hdac_hdmi, that is logged with dev_err(), but should be
> > logged with dev_info() instead as it is done in sound/core/pcm_drm_eld.c
> > 
> > This avoids printing multiple messages like:
> >     HDMI: Unknown ELD version 0
> > 
> > in the kernel log when userspace tries to open the sound device.
> 
> It doesn't, it just lowers the severity of the logs that are printed.
> If the goal is to lower the number of messages printed you need to use
> a ratelimited print.

I see, ratelimited would be good, but it still prints a message about 
something that is normal behaviour. Maybe this should go further to a 
dev_dbg(), or is there a specific reason to show this message ?

This could also be a special case:
 - version == 0 -> dev_dbg()
 - version !=0 && != known_versions -> dev_err()

Detlev.