diff options
author | Ricardo Neri <ricardo.neri@ti.com> | 2011-12-12 11:21:31 +0800 |
---|---|---|
committer | Sebastien Jan <s-jan@ti.com> | 2011-12-19 15:15:33 +0100 |
commit | 56dbd99f8b9d07697d352495b233fbadfb44dd03 (patch) | |
tree | 97c3d55de7ab72e3d9e0f771379741eaa6b36469 /drivers | |
parent | fa016fab91eefbd626a5263978dad9959a759e5b (diff) |
ASoC: OMAP: HDMI: Prevent DSS module from going idle when playing audio
When playing audio through HDMI, the module should be put in
no-idle mode. This is to prevent the DSS_L3_ICLK to be shut down.
Once audio playback is stopped, the module is set back to smart-idle
wakeup-capable. This is as described by OMAP4 TRM.
Also, a omap_hwmod structure is added to hdmi data to have access
to idle-mode configuration.
(AG: updated to new Tomi HDMI patches)
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 10 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi.h | 4 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 5 |
3 files changed, 18 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 01b88587e824..2fb69de743c3 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -40,6 +40,8 @@ #include "ti_hdmi_4xxx_ip.h" #endif +#include <plat/omap_hwmod.h> + #include "ti_hdmi.h" #include "dss.h" #include "dss_features.h" @@ -71,7 +73,6 @@ static struct { int code; int mode; struct hdmi_config cfg; - struct clk *sys_clk; } hdmi; @@ -801,6 +802,13 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev) DSSERR("can't register ASoC HDMI audio codec\n"); return r; } + + hdmi.ip_data.oh = omap_hwmod_lookup("dss_hdmi"); + + if (!hdmi.ip_data.oh) { + dev_err(&pdev->dev, "Cannot find omap_hwmod for hdmi\n"); + return -ENODEV; + } #endif return 0; } diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h index 2c3443dabb14..18c2a6dbc31c 100644 --- a/drivers/video/omap2/dss/ti_hdmi.h +++ b/drivers/video/omap2/dss/ti_hdmi.h @@ -121,6 +121,10 @@ struct hdmi_ip_data { const struct ti_hdmi_ip_ops *ops; struct hdmi_config cfg; struct hdmi_pll_info pll_data; +#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ + defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) + struct omap_hwmod *oh; +#endif }; int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data); void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data); diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index 111941ec12ec..d5018e7df31d 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c @@ -29,6 +29,8 @@ #include <linux/string.h> #include <linux/seq_file.h> +#include <plat/omap_hwmod.h> + #include "ti_hdmi_4xxx_ip.h" #include "dss.h" @@ -1215,6 +1217,7 @@ int hdmi_4xxx_audio_trigger(struct hdmi_ip_data *ip_data, case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + omap_hwmod_set_slave_idlemode(ip_data->oh, HWMOD_IDLEMODE_NO); REG_FLD_MOD(hdmi_av_base(ip_data), HDMI_CORE_AV_AUD_MODE, 1, 0, 0); REG_FLD_MOD(hdmi_wp_base(ip_data), @@ -1232,6 +1235,8 @@ int hdmi_4xxx_audio_trigger(struct hdmi_ip_data *ip_data, HDMI_WP_AUDIO_CTRL, 0, 30, 30); REG_FLD_MOD(hdmi_wp_base(ip_data), HDMI_WP_AUDIO_CTRL, 0, 31, 31); + omap_hwmod_set_slave_idlemode(ip_data->oh, + HWMOD_IDLEMODE_SMART_WKUP); break; default: err = -EINVAL; |