Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: hdac_hdmi: Rate limit logging on connection and disconnection

We currently log parse failures for ELD data and some disconnection events
as errors without rate limiting. These log messages can be triggered very
frequently in some situations, especially ELD parsing when there is nothing
connected to a HDMI port which will generate:

hdmi-audio-codec hdmi-audio-codec.1.auto: HDMI: Unknown ELD version 0

While there's doubtless work that could be done on reducing the number of
connection notification callbacks it's possible these may be legitimately
generated by poor quality physical connections so let's use rate limiting
to mitigate the log spam for the parse errors and lower the severity for
disconnect logging to debug level.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20250613-asoc-hdmi-eld-logging-v1-1-76d64154d969@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

+6 -4
+6 -4
sound/soc/codecs/hdac_hdmi.c
··· 1231 1231 >> DRM_ELD_VER_SHIFT; 1232 1232 1233 1233 if (ver != ELD_VER_CEA_861D && ver != ELD_VER_PARTIAL) { 1234 - dev_err(&hdev->dev, "HDMI: Unknown ELD version %d\n", ver); 1234 + dev_err_ratelimited(&hdev->dev, 1235 + "HDMI: Unknown ELD version %d\n", ver); 1235 1236 return -EINVAL; 1236 1237 } 1237 1238 ··· 1240 1239 DRM_ELD_MNL_MASK) >> DRM_ELD_MNL_SHIFT; 1241 1240 1242 1241 if (mnl > ELD_MAX_MNL) { 1243 - dev_err(&hdev->dev, "HDMI: MNL Invalid %d\n", mnl); 1242 + dev_err_ratelimited(&hdev->dev, 1243 + "HDMI: MNL Invalid %d\n", mnl); 1244 1244 return -EINVAL; 1245 1245 } 1246 1246 ··· 1300 1298 1301 1299 if (!port->eld.monitor_present || !port->eld.eld_valid) { 1302 1300 1303 - dev_err(&hdev->dev, "%s: disconnect for pin:port %d:%d\n", 1304 - __func__, pin->nid, port->id); 1301 + dev_dbg(&hdev->dev, "%s: disconnect for pin:port %d:%d\n", 1302 + __func__, pin->nid, port->id); 1305 1303 1306 1304 /* 1307 1305 * PCMs are not registered during device probe, so don't