Skip to content

Commit

Permalink
OMAPDSS: hdmi5: Change hdmi_wp idlemode to to no_idle for audio playback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jyri Sarha authored and Tomi Valkeinen committed Dec 1, 2014
1 parent 84a845d commit 2d7639b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ struct omap_hdmi {

struct platform_device *audio_pdev;
void (*audio_abort_cb)(struct device *dev);
int wp_idlemode;
};

#endif
7 changes: 7 additions & 0 deletions drivers/video/fbdev/omap2/dss/hdmi5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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,
Expand Down

0 comments on commit 2d7639b

Please sign in to comment.