aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAxel Castaneda Gonzalez <x0055901@ti.com>2012-05-03 10:00:21 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 08:15:22 -0400
commit3df9fb5c51ca617e410da890f631100ea9f10652 (patch)
tree0f705465db5e66149a14061df988d776f47fe802 /drivers/video
parent7c92af16780c614b493c4e8a9f495f9dc8008de4 (diff)
OMAPDSS: HDMI: Decouple wrapper enable/disable and audio start/stop
Decouple the enable/disable operation of the HDMI audio wrapper from audio start/stop. Otherwise, an audio FIFO underflow may occur. The audio wrapper enablement must be done after configuration and before audio playback is started. Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com> Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dss_features.c2
-rw-r--r--drivers/video/omap2/dss/ti_hdmi.h6
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c19
3 files changed, 22 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index 234ed8ad89ea..13b45af5e89d 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -577,6 +577,8 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = {
577 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) 577 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
578 .audio_enable = ti_hdmi_4xxx_wp_audio_enable, 578 .audio_enable = ti_hdmi_4xxx_wp_audio_enable,
579 .audio_disable = ti_hdmi_4xxx_wp_audio_disable, 579 .audio_disable = ti_hdmi_4xxx_wp_audio_disable,
580 .audio_start = ti_hdmi_4xxx_audio_start,
581 .audio_stop = ti_hdmi_4xxx_audio_stop,
580#endif 582#endif
581 583
582}; 584};
diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h
index 4c84a9cf2931..8afdd0b7678a 100644
--- a/drivers/video/omap2/dss/ti_hdmi.h
+++ b/drivers/video/omap2/dss/ti_hdmi.h
@@ -113,6 +113,10 @@ struct ti_hdmi_ip_ops {
113 int (*audio_enable)(struct hdmi_ip_data *ip_data); 113 int (*audio_enable)(struct hdmi_ip_data *ip_data);
114 114
115 void (*audio_disable)(struct hdmi_ip_data *ip_data); 115 void (*audio_disable)(struct hdmi_ip_data *ip_data);
116
117 int (*audio_start)(struct hdmi_ip_data *ip_data);
118
119 void (*audio_stop)(struct hdmi_ip_data *ip_data);
116#endif 120#endif
117 121
118}; 122};
@@ -190,5 +194,7 @@ void ti_hdmi_4xxx_phy_dump(struct hdmi_ip_data *ip_data, struct seq_file *s);
190 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) 194 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
191int ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data); 195int ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data);
192void ti_hdmi_4xxx_wp_audio_disable(struct hdmi_ip_data *ip_data); 196void ti_hdmi_4xxx_wp_audio_disable(struct hdmi_ip_data *ip_data);
197int ti_hdmi_4xxx_audio_start(struct hdmi_ip_data *ip_data);
198void ti_hdmi_4xxx_audio_stop(struct hdmi_ip_data *ip_data);
193#endif 199#endif
194#endif 200#endif
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
index a1cbd2fe9889..7b524de831a1 100644
--- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
@@ -1254,22 +1254,31 @@ int hdmi_config_audio_acr(struct hdmi_ip_data *ip_data,
1254 1254
1255int ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data) 1255int ti_hdmi_4xxx_wp_audio_enable(struct hdmi_ip_data *ip_data)
1256{ 1256{
1257 REG_FLD_MOD(hdmi_av_base(ip_data),
1258 HDMI_CORE_AV_AUD_MODE, true, 0, 0);
1259 REG_FLD_MOD(hdmi_wp_base(ip_data), 1257 REG_FLD_MOD(hdmi_wp_base(ip_data),
1260 HDMI_WP_AUDIO_CTRL, true, 31, 31); 1258 HDMI_WP_AUDIO_CTRL, true, 31, 31);
1259 return 0;
1260}
1261
1262void ti_hdmi_4xxx_wp_audio_disable(struct hdmi_ip_data *ip_data)
1263{
1264 REG_FLD_MOD(hdmi_wp_base(ip_data),
1265 HDMI_WP_AUDIO_CTRL, false, 31, 31);
1266}
1267
1268int ti_hdmi_4xxx_audio_start(struct hdmi_ip_data *ip_data)
1269{
1270 REG_FLD_MOD(hdmi_av_base(ip_data),
1271 HDMI_CORE_AV_AUD_MODE, true, 0, 0);
1261 REG_FLD_MOD(hdmi_wp_base(ip_data), 1272 REG_FLD_MOD(hdmi_wp_base(ip_data),
1262 HDMI_WP_AUDIO_CTRL, true, 30, 30); 1273 HDMI_WP_AUDIO_CTRL, true, 30, 30);
1263 return 0; 1274 return 0;
1264} 1275}
1265 1276
1266void ti_hdmi_4xxx_wp_audio_disable(struct hdmi_ip_data *ip_data) 1277void ti_hdmi_4xxx_audio_stop(struct hdmi_ip_data *ip_data)
1267{ 1278{
1268 REG_FLD_MOD(hdmi_av_base(ip_data), 1279 REG_FLD_MOD(hdmi_av_base(ip_data),
1269 HDMI_CORE_AV_AUD_MODE, false, 0, 0); 1280 HDMI_CORE_AV_AUD_MODE, false, 0, 0);
1270 REG_FLD_MOD(hdmi_wp_base(ip_data), 1281 REG_FLD_MOD(hdmi_wp_base(ip_data),
1271 HDMI_WP_AUDIO_CTRL, false, 31, 31);
1272 REG_FLD_MOD(hdmi_wp_base(ip_data),
1273 HDMI_WP_AUDIO_CTRL, false, 30, 30); 1282 HDMI_WP_AUDIO_CTRL, false, 30, 30);
1274} 1283}
1275#endif 1284#endif