Add function to obtain the DVI/HDMI mode. This is needed by the ASoC HDMI audio codec. HDMI audio can only be transmitted when the IP is configured as HDMI. As the DVI/HDMI mode is a private parameter of the HDMI driver, this functions allows to expose such mode to the ASoC driver. Also, the function is exported for dynamic linking as the ASoC codec and DSS may be built as separate modules. Signed-off-by: Ricardo Neri <ricardo.neri@xxxxxx> --- drivers/video/omap2/dss/dss.h | 1 + drivers/video/omap2/dss/hdmi.c | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 32ff69f..881fab8 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -520,6 +520,7 @@ int omapdss_hdmi_read_edid(u8 *buf, int len); bool omapdss_hdmi_detect(void); int hdmi_panel_init(void); void hdmi_panel_exit(void); +int omapdss_hdmi_get_hdmi_mode(void); /* RFBI */ #ifdef CONFIG_OMAP2_DSS_RFBI diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 04c83c8..2ba108f 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -558,6 +558,12 @@ void omapdss_hdmi_display_disable(struct omap_dss_device *dssdev) mutex_unlock(&hdmi.lock); } +int omapdss_hdmi_get_hdmi_mode(void) +{ + return hdmi.ip_data.cfg.cm.mode; +} +EXPORT_SYMBOL(omapdss_hdmi_get_hdmi_mode); + #if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html