diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of.h | 3 | ||||
-rw-r--r-- | include/sound/omap-hdmi-audio.h | 43 | ||||
-rw-r--r-- | include/video/omapdss.h | 45 |
3 files changed, 48 insertions, 43 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 1a66b8881c01..b47096730dc5 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -108,8 +108,6 @@ static inline struct device_node *of_node_get(struct device_node *node) static inline void of_node_put(struct device_node *node) { } #endif /* !CONFIG_OF_DYNAMIC */ -#ifdef CONFIG_OF - /* Pointer for first entry in chain of all nodes. */ extern struct device_node *of_allnodes; extern struct device_node *of_chosen; @@ -117,6 +115,7 @@ extern struct device_node *of_aliases; extern struct device_node *of_stdout; extern raw_spinlock_t devtree_lock; +#ifdef CONFIG_OF static inline bool is_of_node(struct fwnode_handle *fwnode) { return fwnode && fwnode->type == FWNODE_OF; diff --git a/include/sound/omap-hdmi-audio.h b/include/sound/omap-hdmi-audio.h new file mode 100644 index 000000000000..afdb416898e0 --- /dev/null +++ b/include/sound/omap-hdmi-audio.h @@ -0,0 +1,43 @@ +/* + * hdmi-audio.c -- OMAP4+ DSS HDMI audio support library + * + * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com + * + * Author: Jyri Sarha <jsarha@ti.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#include <video/omapdss.h> + +#ifndef __OMAP_HDMI_AUDIO_H__ +#define __OMAP_HDMI_AUDIO_H__ + +struct omap_hdmi_audio_ops { + int (*audio_startup)(struct device *dev, + void (*abort_cb)(struct device *dev)); + int (*audio_shutdown)(struct device *dev); + int (*audio_start)(struct device *dev); + void (*audio_stop)(struct device *dev); + int (*audio_config)(struct device *dev, + struct omap_dss_audio *dss_audio); +}; + +/* HDMI audio initalization data */ +struct omap_hdmi_audio_pdata { + struct device *dev; + enum omapdss_version dss_version; + phys_addr_t audio_dma_addr; + + const struct omap_hdmi_audio_ops *ops; +}; + +#endif /* __OMAP_HDMI_AUDIO_H__ */ diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 069dfca9549a..6a84498ea513 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -166,13 +166,6 @@ enum omap_dss_display_state { OMAP_DSS_DISPLAY_ACTIVE, }; -enum omap_dss_audio_state { - OMAP_DSS_AUDIO_DISABLED = 0, - OMAP_DSS_AUDIO_ENABLED, - OMAP_DSS_AUDIO_CONFIGURED, - OMAP_DSS_AUDIO_PLAYING, -}; - struct omap_dss_audio { struct snd_aes_iec958 *iec; struct snd_cea_861_aud_if *cea; @@ -635,19 +628,6 @@ struct omapdss_hdmi_ops { int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); int (*set_infoframe)(struct omap_dss_device *dssdev, const struct hdmi_avi_infoframe *avi); - - /* - * Note: These functions might sleep. Do not call while - * holding a spinlock/readlock. - */ - int (*audio_enable)(struct omap_dss_device *dssdev); - void (*audio_disable)(struct omap_dss_device *dssdev); - bool (*audio_supported)(struct omap_dss_device *dssdev); - int (*audio_config)(struct omap_dss_device *dssdev, - struct omap_dss_audio *audio); - /* Note: These functions may not sleep */ - int (*audio_start)(struct omap_dss_device *dssdev); - void (*audio_stop)(struct omap_dss_device *dssdev); }; struct omapdss_dsi_ops { @@ -783,8 +763,6 @@ struct omap_dss_device { enum omap_dss_display_state state; - enum omap_dss_audio_state audio_state; - /* OMAP DSS output specific fields */ struct list_head list; @@ -795,6 +773,9 @@ struct omap_dss_device { /* output instance */ enum omap_dss_output_id id; + /* the port number in the DT node */ + int port_num; + /* dynamic fields */ struct omap_overlay_manager *manager; @@ -858,24 +839,6 @@ struct omap_dss_driver { int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev, const struct hdmi_avi_infoframe *avi); - - /* - * For display drivers that support audio. This encompasses - * HDMI and DisplayPort at the moment. - */ - /* - * Note: These functions might sleep. Do not call while - * holding a spinlock/readlock. - */ - int (*audio_enable)(struct omap_dss_device *dssdev); - void (*audio_disable)(struct omap_dss_device *dssdev); - bool (*audio_supported)(struct omap_dss_device *dssdev); - int (*audio_config)(struct omap_dss_device *dssdev, - struct omap_dss_audio *audio); - /* Note: These functions may not sleep */ - int (*audio_start)(struct omap_dss_device *dssdev); - void (*audio_stop)(struct omap_dss_device *dssdev); - }; enum omapdss_version omapdss_get_version(void); @@ -918,7 +881,7 @@ int omapdss_register_output(struct omap_dss_device *output); void omapdss_unregister_output(struct omap_dss_device *output); struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id); struct omap_dss_device *omap_dss_find_output(const char *name); -struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node); +struct omap_dss_device *omap_dss_find_output_by_port_node(struct device_node *port); int omapdss_output_set_device(struct omap_dss_device *out, struct omap_dss_device *dssdev); int omapdss_output_unset_device(struct omap_dss_device *out); |