summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri@ti.com>2012-04-23 08:55:28 +0800
committerAndy Green <andy.green@linaro.org>2012-06-13 21:32:23 +0800
commit8dbd6f321538467e2f563e4eec1cb0567df7b40f (patch)
treed1123b86f3c09e7e297c6041d21d84a8342e8e62 /include
parent9a9cd23f94716cc05faa62960c23a67182a7bd85 (diff)
OMAPDSS: Provide interface for audio support in DSS
There exist several display technologies and standards that support audio as well. Hence, it is relevant to update the DSS device driver to provide an audio interface that may be used by an audio or any other driver interested in the functionality. The DSS audio functions are intended to be used as follows: The audio_enable function is intended to prepare the relevant IP for playback (e.g., enabling an audio FIFO, taking out of reset some IP, etc). While the display may support audio, it is possible that for certain configurations audio is not supported (e.g., an HDMI display using a VESA video timing). The audio_detect function is intended to query whether the current configuration of the display supports audio. The audio_config function is intended to configure all the relevant audio parameters of the display. In order to make the function independent of any DSS device driver or IP, it takes an IEC-60958 channel status word struct as well as a CEA-861 audio infoframe struct. At the moment, this should be enough to support HDMI and DisplayPort, as both are based on CEA-861 and IEC-60958. The audio_start function is intended to effectively start/stop audio playback after the configuration has taken place. Please note that asound.h is #included only to pass the relevant data structures to the DSS device driver. The DSS device driver should not link to any ALSA function as DSS and ALSA are built in separate modules. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/video/omapdss.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 483f67caa7ad..e35ae9666d5d 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -21,6 +21,7 @@
#include <linux/list.h>
#include <linux/kobject.h>
#include <linux/device.h>
+#include <sound/asound.h>
#define DISPC_IRQ_FRAMEDONE (1 << 0)
#define DISPC_IRQ_VSYNC (1 << 1)
@@ -642,6 +643,17 @@ struct omap_dss_driver {
int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
bool (*detect)(struct omap_dss_device *dssdev);
+
+ /*
+ * For display drivers that support audio. This encompasses
+ * HDMI and DisplayPort at the moment.
+ */
+ int (*audio_enable)(struct omap_dss_device *dssdev, bool enable);
+ int (*audio_start)(struct omap_dss_device *dssdev, bool start);
+ bool (*audio_detect)(struct omap_dss_device *dssdev);
+ int (*audio_config)(struct omap_dss_device *dssdev,
+ struct snd_aes_iec958 *iec, struct snd_cea_861_aud_if *aud_if);
+
};
int omap_dss_register_driver(struct omap_dss_driver *);