From: Daniel Golle <daniel@makrotopia.org>
To: 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>,
Luca Ceresoli <luca.ceresoli@bootlin.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>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Allen Chen <allen.chen@ite.com.tw>,
Hermes Wu <hermes.wu@ite.com.tw>,
Pin-yen Lin <treapking@chromium.org>,
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
Date: Thu, 24 Sep 2026 19:42:35 +0100 [thread overview]
Message-ID: <2a125d71fcbae7dd393a3ea21f452caa63c2cfda.1790275151.git.daniel@makrotopia.org> (raw)
In-Reply-To: <cover.1790275151.git.daniel@makrotopia.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 <daniel@makrotopia.org>
---
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
prev parent reply other threads:[~2026-09-24 18:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 18:39 [PATCH v7 00/14] drm/bridge: it6505: DP audio support + shared-DAI hw_params fix Daniel Golle
2026-09-24 18:40 ` [PATCH v7 01/14] drm/bridge: it6505: quiesce event sources and work on remove() Daniel Golle
2026-09-24 18:40 ` [PATCH v7 02/14] drm/bridge: it6505: quiesce work items before powering off Daniel Golle
2026-09-24 18:40 ` [PATCH v7 03/14] drm/bridge: it6505: balance and disable runtime PM on remove Daniel Golle
2026-09-24 18:40 ` [PATCH v7 04/14] drm/bridge: it6505: unregister DP AUX adapter on bridge detach Daniel Golle
2026-09-24 18:40 ` [PATCH v7 05/14] drm/bridge: it6505: complete poweroff even if disabling regulators fails Daniel Golle
2026-09-24 18:40 ` [PATCH v7 06/14] drm/bridge: it6505: bail out of the IRQ handler when status reads fail Daniel Golle
2026-09-24 18:40 ` [PATCH v7 07/14] drm/bridge: it6505: avoid division by zero in pixel clock calculation Daniel Golle
2026-09-24 18:41 ` [PATCH v7 08/14] drm/bridge: it6505: avoid division by zero in audio FS debug print Daniel Golle
2026-09-24 18:41 ` [PATCH v7 09/14] drm/bridge: it6505: guard against zero channel count in audio infoframe Daniel Golle
2026-09-24 18:41 ` [PATCH v7 10/14] drm/bridge: it6505: hold endpoint OF node reference while parsing it Daniel Golle
2026-09-24 18:42 ` [PATCH v7 11/14] drm/bridge: it6505: reject a too short link-frequencies property Daniel Golle
2026-09-24 18:42 ` [PATCH v7 12/14] drm/bridge: it6505: don't write an error code back to the reset register Daniel Golle
2026-09-24 18:42 ` [PATCH v7 13/14] drm/bridge: it6505: Add audio support Daniel Golle
2026-09-24 18:42 ` Daniel Golle [this message]
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=2a125d71fcbae7dd393a3ea21f452caa63c2cfda.1790275151.git.daniel@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=allen.chen@ite.com.tw \
--cc=andrzej.hajda@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hermes.wu@ite.com.tw \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=treapking@chromium.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®