[PATCH 2/2] drm/mediatek: hdmi: report jack plugged state from bridge enable/disable
From: Daniel Golle
Date: Wed Apr 15 2026 - 11:10:31 EST
Notify hdmi-codec of the current sink plugged state from
mtk_hdmi_bridge_atomic_enable() and mtk_hdmi_bridge_atomic_disable()
via mtk_hdmi_update_plugged_status(). This matches the pattern used
by dw-hdmi, which invokes handle_plugged_change() from the bridge
enable and disable paths so that ASoC jack state stays in sync with
the actual sink presence across atomic commit cycles, and not only
on CEC HPD transitions.
Userspace audio daemons (e.g. pipewire) rely on the jack state to
route streams, restore per-sink volume levels, and recover the last
used device after a reconnect. Without this, those transitions are
missed whenever the sink change is driven by a mode set rather than
by a bare HPD event.
Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
index 9050d7785f109..565bb72c9b63a 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
@@ -1013,6 +1013,8 @@ static void mtk_hdmi_bridge_atomic_disable(struct drm_bridge *bridge,
hdmi->curr_conn = NULL;
hdmi->enabled = false;
+
+ mtk_hdmi_update_plugged_status(hdmi);
}
static void mtk_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge,
@@ -1082,6 +1084,8 @@ static void mtk_hdmi_bridge_atomic_enable(struct drm_bridge *bridge,
mtk_hdmi_clk_enable_audio(hdmi);
hdmi->enabled = true;
+
+ mtk_hdmi_update_plugged_status(hdmi);
}
static const struct drm_bridge_funcs mtk_hdmi_bridge_funcs = {
--
2.53.0