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 F3385C98318 for ; Thu, 24 Sep 2026 18:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KWXHMCqPhd+fgNk0P4hGqU1QYjaf45zN7FEhgaYliZk=; b=FVS556SmwwLbFOnXCWa6E1/b0B dfwK0owU5nwHWVo3QE0sg9oYl1dSrJnCYTfEA88IwsL9CE+g7175HCk67wNz0gT7DVwmpcyOJgAq2 bVTyZ//FKSxMcxXQrkdUcu4FYBWutvG0X0l5t0J15bGyEEYnH6iMjYkjbN+wt2+APRfXIp+r94J7F ZZkU2XxaxhgMt8MeJ9wcoqxVsV8Wkh+0A9RhCPPGaLKGD7j3UhWDZag5c7YnKlrAUhhr7KAMxxnt2 aZwcDiEStsW0/vuDhzwSoKRAd+Vw114plgb7tgZExuh4XkV2pRp3iPUsTgOhpcn1rU6Tancfkh3aU 6+BRQZUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x9oPA-0000000Bwxl-0MNz; Thu, 24 Sep 2026 18:42:48 +0000 Received: from pidgin.makrotopia.org ([2a07:2ec0:3002::65]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x9oP6-0000000Bwur-0ZKC; Thu, 24 Sep 2026 18:42:46 +0000 Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256:X25519MLKEM768) (Exim 4.100) (envelope-from ) id 1x9oP0-000000007SV-3yLQ; Thu, 24 Sep 2026 18:42:39 +0000 Date: Thu, 24 Sep 2026 19:42:35 +0100 From: Daniel Golle To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , Allen Chen , Hermes Wu , Pin-yen Lin , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v7 14/14] drm/bridge: it6505: Don't reject audio hw_params without an encoder Message-ID: <2a125d71fcbae7dd393a3ea21f452caa63c2cfda.1790275151.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260924_114244_177553_01F12854 X-CRM114-Status: GOOD ( 10.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org it6505_audio_setup_hw_params() returns -ENODEV when no encoder is attached. With it6505 registering an hdmi-audio-codec this runs for every stream on the I2S DAI, and on mt8186-corsola, where the rt1019 speaker amplifier shares I2S3, the error tears down the whole DPCM backend and breaks speaker playback whenever no display is attached. The function only caches stream parameters, which needs no encoder. Drop the check, and apply the audio defaults once at probe instead of in it6505_variable_config(), which would clobber the cached parameters again on every hotplug. Actual audio output remains gated by it6505->powered. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Daniel Golle --- v7: no changes v6: no changes v5: no changes v4: apply audio defaults at probe time instead of in it6505_variable_config() v3: no changes v2: drop the encoder check entirely instead of returning 0 early --- drivers/gpu/drm/bridge/ite-it6505.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index 00eaac183130..079129925f8a 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -1371,16 +1371,6 @@ static void it6505_variable_config(struct it6505 *it6505) it6505->link_state = LINK_IDLE; it6505->hdcp_desired = HDCP_DESIRED; it6505->auto_train_retry = AUTO_TRAIN_RETRY; - it6505->audio.select = AUDIO_SELECT; - it6505->audio.sample_rate = AUDIO_SAMPLE_RATE; - it6505->audio.channel_count = AUDIO_CHANNEL_COUNT; - it6505->audio.type = AUDIO_TYPE; - it6505->audio.i2s_input_format = I2S_INPUT_FORMAT; - it6505->audio.i2s_justified = I2S_JUSTIFIED; - it6505->audio.i2s_data_delay = I2S_DATA_DELAY; - it6505->audio.i2s_ws_channel = I2S_WS_CHANNEL; - it6505->audio.i2s_data_sequence = I2S_DATA_SEQUENCE; - it6505->audio.word_length = AUDIO_WORD_LENGTH; memset(it6505->sha1_input, 0, sizeof(it6505->sha1_input)); memset(it6505->bksvs, 0, sizeof(it6505->bksvs)); } @@ -3025,9 +3015,6 @@ static int it6505_audio_setup_hw_params(struct it6505 *it6505, params->sample_rate, params->sample_width, params->cea.channels); - if (!it6505->bridge.encoder) - return -ENODEV; - if (params->cea.channels <= 1 || params->cea.channels > 8) { DRM_DEV_DEBUG_DRIVER(dev, "channel number: %d not support", params->cea.channels); @@ -3159,6 +3146,16 @@ static int it6505_register_audio_driver(struct device *dev) }; struct platform_device *pdev; + it6505->audio.select = AUDIO_SELECT; + it6505->audio.sample_rate = AUDIO_SAMPLE_RATE; + it6505->audio.channel_count = AUDIO_CHANNEL_COUNT; + it6505->audio.type = AUDIO_TYPE; + it6505->audio.i2s_input_format = I2S_INPUT_FORMAT; + it6505->audio.i2s_justified = I2S_JUSTIFIED; + it6505->audio.i2s_data_delay = I2S_DATA_DELAY; + it6505->audio.i2s_ws_channel = I2S_WS_CHANNEL; + it6505->audio.i2s_data_sequence = I2S_DATA_SEQUENCE; + it6505->audio.word_length = AUDIO_WORD_LENGTH; it6505->audio.mute = true; INIT_DELAYED_WORK(&it6505->delayed_audio, it6505_delayed_audio); -- 2.55.0