diff options
author | Jyri Sarha <jsarha@ti.com> | 2014-10-23 13:07:05 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-12-01 11:10:02 +0200 |
commit | 2d7639bc02457da149837962656c2bd2b94c5873 (patch) | |
tree | 6f23867a7387f78efe5d843b56b3cd5a0e8dde68 /drivers/video | |
parent | 84a845de578a6d46e13307edc2fb27b423213eff (diff) |
OMAPDSS: hdmi5: Change hdmi_wp idlemode to to no_idle for audio playback
Enabling idle mode during audio playback causes the glitches on OMAP5
HDMI. The TRM also suggests to use no-idle for HDMI audio playback.
This patch sets HDMI idle mode to no-idle for the duration of the
playback, and restores it back to original value afterwards.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi.h | 1 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi5.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi.h b/drivers/video/fbdev/omap2/dss/hdmi.h index dde1989901a..e4a32fe77b0 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi.h +++ b/drivers/video/fbdev/omap2/dss/hdmi.h @@ -357,6 +357,7 @@ struct omap_hdmi { struct platform_device *audio_pdev; void (*audio_abort_cb)(struct device *dev); + int wp_idlemode; }; #endif diff --git a/drivers/video/fbdev/omap2/dss/hdmi5.c b/drivers/video/fbdev/omap2/dss/hdmi5.c index 84736667e52..cbfb282f35c 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi5.c +++ b/drivers/video/fbdev/omap2/dss/hdmi5.c @@ -607,6 +607,10 @@ static int hdmi_audio_start(struct device *dev) WARN_ON(!hdmi_mode_has_audio(&hd->cfg)); WARN_ON(!hd->display_enabled); + /* No-idle while playing audio, store the old value */ + hd->wp_idlemode = REG_GET(hdmi.wp.base, HDMI_WP_SYSCONFIG, 3, 2); + REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, 1, 3, 2); + hdmi_wp_audio_enable(&hd->wp, true); hdmi_wp_audio_core_req_enable(&hd->wp, true); @@ -622,6 +626,9 @@ static void hdmi_audio_stop(struct device *dev) hdmi_wp_audio_core_req_enable(&hd->wp, false); hdmi_wp_audio_enable(&hd->wp, false); + + /* Playback stopped, restore original idlemode */ + REG_FLD_MOD(hdmi.wp.base, HDMI_WP_SYSCONFIG, hd->wp_idlemode, 3, 2); } static int hdmi_audio_config(struct device *dev, |