From: Heiko Stuebner <heiko@sntech.de>
To: linux-kernel@vger.kernel.org,
Detlev Casanova <detlev.casanova@collabora.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Detlev Casanova <detlev.casanova@collabora.com>,
Douglas Anderson <dianders@chromium.org>,
Sugar Zhang <sugar.zhang@rock-chips.com>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Raag Jadav <raag.jadav@intel.com>,
dri-devel@lists.freedesktop.org, linux-sound@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH 1/3] drm/bridge: dw-hdmi-qp: Return 0 in audio prepare when disconnected
Date: Fri, 18 Jul 2025 09:43:26 +0200 [thread overview]
Message-ID: <8861545.DvuYhMxLoT@phil> (raw)
In-Reply-To: <20250717215620.288651-2-detlev.casanova@collabora.com>
Am Donnerstag, 17. Juli 2025, 23:56:18 Mitteleuropäische Sommerzeit schrieb Detlev Casanova:
> To configure audio registers, the clock of the video port in use must be
> enabled.
> As those clocks are managed by the VOP driver, they can't be enabled here
> to write the registers even when the HDMI cable is disconnected.
>
> Furthermore, the registers values are computed from the TMDS char rate,
> which is not available when disconnected.
>
> Returning -ENODEV seemed reasonable at first, but ASoC will log an error
> multiple times if dw_hdmi_qp_audio_prepare() return an error.
> Userspace might also retry multiple times, filling the kernel log with:
>
> hdmi-audio-codec hdmi-audio-codec.0.auto: ASoC error (-19): at snd_soc_dai_prepare() on i2s-hifi
>
> This has become even worse with the support of the second HDMI TX port.
>
> Activating the clocks to write fake data (fake because the TMDS char
> rate is unavailable) would require API changes to communicate between
> VOP and HDMI, which doesn't really make sense.
>
> Using a cached regmap to be dumped when a cable is connected won't work
> because writing order is important and some data needs to be retrieved
> from registers to write others.
>
> Returning 0 to silently fail sounds like the best and simplest solution.
>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> index 5e5f8c2f95be1..7d3d7b5084c8d 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> @@ -459,7 +459,7 @@ static int dw_hdmi_qp_audio_prepare(struct drm_connector *connector,
> bool ref2stream = false;
>
> if (!hdmi->tmds_char_rate)
> - return -ENODEV;
> + return 0;
nit: part of me would like a short comment stating the requirment of the
running video-clock.
Heiko
>
> if (fmt->bit_clk_provider | fmt->frame_clk_provider) {
> dev_err(hdmi->dev, "unsupported clock settings\n");
>
next prev parent reply other threads:[~2025-07-18 7:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 21:56 [PATCH 0/3] Clean some logs on rockchip hdmi audio Detlev Casanova
2025-07-17 21:56 ` [PATCH 1/3] drm/bridge: dw-hdmi-qp: Return 0 in audio prepare when disconnected Detlev Casanova
2025-07-18 7:43 ` Heiko Stuebner [this message]
2025-07-17 21:56 ` [PATCH 2/3] ASoC: hdac_hdmi: Use dev_info on invalid ELD version Detlev Casanova
2025-07-17 21:56 ` [PATCH 3/3] drm/bridge: synopsys: Do not warn about audio params computation Detlev Casanova
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=8861545.DvuYhMxLoT@phil \
--to=heiko@sntech.de \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=detlev.casanova@collabora.com \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=raag.jadav@intel.com \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=sugar.zhang@rock-chips.com \
--cc=tiwai@suse.com \
--cc=tzimmermann@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.