Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/bridge: dw-hdmi: Restore audio when setting a mode

When setting a new display mode, dw_hdmi_setup() calls
dw_hdmi_enable_video_path(), which disables all hdmi clocks, including
the audio clock.

We should only (re-)enable the audio clock if audio was already enabled
when setting the new mode.

Without this patch, on RK3288, there will be HDMI audio on some monitors
if i2s was played to headphone when the monitor was plugged.
ACER H277HU and ASUS PB278 are two of the monitors showing this issue.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191008102145.55134-1-cychiang@chromium.org

authored by

Daniel Kurtz and committed by
Neil Armstrong
fadfee3f b1d06693

+1 -1
+1 -1
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
··· 2090 2090 2091 2091 /* HDMI Initialization Step E - Configure audio */ 2092 2092 hdmi_clk_regenerator_update_pixel_clock(hdmi); 2093 - hdmi_enable_audio_clk(hdmi, true); 2093 + hdmi_enable_audio_clk(hdmi, hdmi->audio_enable); 2094 2094 } 2095 2095 2096 2096 /* not for DVI mode */