* Re: [PATCH] drm/bridge: dw-hdmi-qp: Return -EOPNOTSUPP in HDMI audio functions
[not found] <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com>
@ 2026-08-08 11:28 ` Diederik de Haas
0 siblings, 0 replies; only message in thread
From: Diederik de Haas @ 2026-08-08 11:28 UTC (permalink / raw)
To: Detlev Casanova, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter
Cc: dri-devel, linux-kernel, kernel, linux-rockchip
Hi Detlev,
On Tue May 19, 2026 at 8:00 PM CEST, Detlev Casanova wrote:
> -EOPNOTSUPP is not logged as an error by the ASoC subsystem, but -ENODEV
> is.
> It also better represents the situation: The operation is currently not
> supported (because clocks are not enabled and tmds_char_rate is
> unavailable), but the hardware is present.
>
> Using -EOPNOTSUPP in the audio_prepare callback removes possible repeated
> warning log lines when HDMI is not connected.
IME/IMO that's a bit of an understatement as I got 10/100/1000s of these:
hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC error (-19): at snd_soc_dai_prepare() on i2s-hifi
In my test without this patch, I booted up my SBCs, logged in quickly and
still got 60/120/270 of these errors in dmesg ... and I wasn't actually
using HDMI at that time. Previously, more then once did it completely
fill the dmesg buffer, removing/hiding the things I actually wanted to see.
> Returning -EOPNOTSUPP in the audio_enable callback is also needed as it
> avoids logging 0-valued ELD errors.
I've seen those too, multiple times, although it didn't annoy me as much
as the above one ... due to the (much) lower frequency. So
1) Thanks a LOT for this patch :-D
2) Feel free to include my
Tested-by: Diederik de Haas <diederik@cknow-tech.com> # Rock 5B, NanoPC-T6 LTS & Plus
Cheers,
Diederik
> When tmds_char_rate is available, the clocks are enabled and the
> functions will keep returning 0 as before.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> index d649a1cf07f5..270c8c47d853 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> @@ -469,8 +469,10 @@ static int dw_hdmi_qp_audio_enable(struct drm_bridge *bridge,
> {
> struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
>
> - if (hdmi->tmds_char_rate)
> - dw_hdmi_qp_mod(hdmi, 0, AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE);
> + if (!hdmi->tmds_char_rate)
> + return -EOPNOTSUPP;
> +
> + dw_hdmi_qp_mod(hdmi, 0, AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE);
>
> return 0;
> }
> @@ -484,7 +486,7 @@ static int dw_hdmi_qp_audio_prepare(struct drm_bridge *bridge,
> bool ref2stream = false;
>
> if (!hdmi->tmds_char_rate)
> - return -ENODEV;
> + return -EOPNOTSUPP;
>
> if (fmt->bit_clk_provider | fmt->frame_clk_provider) {
> dev_err(hdmi->dev, "unsupported clock settings\n");
>
> ---
> base-commit: 1a2ab0feaa23147e347b4d4cb79cb3fc392118eb
> change-id: 20260519-fix-hdmi-audio-warnings-139062ec00b9
>
> Best regards,
> --
> Detlev Casanova <detlev.casanova@collabora.com>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] only message in thread