From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CDE26C55174 for ; Sat, 8 Aug 2026 11:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Subject:Cc:To: From:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/D+dnMbaMDyns5an8+PP7vrcvO7XumH2epAgdnfElUI=; b=3sHLocZenzi6TT qoQJf3CG+5xEqA57UsLStfhckP4KBsGmHOekAr7sC7Y3TSJrEzOzNjQictBbHBquVUOSwtc6YbPFt k1N2boGr0tfcTYF1OEql5nKQUinGGSCtN8JGHIuaU98RPdpzYeChxVbOYlPyKLr+LEuiMt7DgqkaW aE64KmY+LwXswub9+JmyoJyIuOdpgQCamlDeuRljjOXOxtxMSZTnniNIIZz2TkzL4e5L/3idYALvz uaMUg0c2JGyx2asbRyegkfCOVIKevTAdD4X134NbhWj+gtLcQG8ZAE0Oc98HcntEu351XwmEZ76qt AanjbBnwnQLPnNC4iA8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wsfE3-00000009JYv-05Y3; Sat, 08 Aug 2026 11:28:27 +0000 Received: from out-180.mta0.migadu.com ([91.218.175.180]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wsfDz-00000009JYO-0voh for linux-rockchip@lists.infradead.org; Sat, 08 Aug 2026 11:28:25 +0000 Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cknow-tech.com; s=key1; t=1786188496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nTiQEkGVBrasvVz8h8QknY2d4efiqb6H0T4s+eD983M=; b=RtPwgry/cGWIE73k1OOPhyXIijIJRNCMYBRaHVyD1Z+u1QIXAj6XGI6cnrEw3pfnu7vVQH w9IupxB3EOMxN8AELNZNIDUppeEOpS93Ph6S/wwbns1SXO72Q7cfRpNSZZ6P/2mYYzeAN/ vUl5AlUCPtzg9hptJ0G1lNu2keigXxcdFaZ9UtMSqwAi5RWWa8EQj+5WiCDfKOA2C3Tm4x HtVhLZAH+pOcVdUUI+xLHIp3SR8oX1tk0XANscUQMl8+oA/J5dF16+eHms//VqcemYMdNi 4G2srQgigDo9cS2ya9gThKXgFRXLQuCcFhFjraZs+qdylNC3l8JMYmUhP26r+Q== Date: Sat, 08 Aug 2026 13:28:11 +0200 Message-Id: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Diederik de Haas" 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: , , , Subject: Re: [PATCH] drm/bridge: dw-hdmi-qp: Return -EOPNOTSUPP in HDMI audio functions References: <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com> In-Reply-To: <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260808_042824_026924_547F1CB0 X-CRM114-Status: GOOD ( 19.96 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 # 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 > --- > 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 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip