diff options
author | Ricardo Neri <ricardo.neri@ti.com> | 2012-11-06 01:19:16 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-06 06:33:36 -0500 |
commit | d7b6f4437fb7796af774c5423a4b9b486b19233f (patch) | |
tree | 555e892e1aa4d0c010ed4b77438156a2dd383c5e | |
parent | d18bc45543f5a7571fec2465651c9e88c6d555eb (diff) |
OMAPDSS: HDMI: Add op to get audio DMA port address offset
It could be possible that the DMA port differs accross diferent HDMI IPs. Thus,
add an IP-specific function to obtain the address offset and size of the DMA
data port.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi.h | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 9 |
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 3e8287c8709d..8dcecbca46a5 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -820,6 +820,7 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { | |||
820 | .audio_start = ti_hdmi_4xxx_audio_start, | 820 | .audio_start = ti_hdmi_4xxx_audio_start, |
821 | .audio_stop = ti_hdmi_4xxx_audio_stop, | 821 | .audio_stop = ti_hdmi_4xxx_audio_stop, |
822 | .audio_config = ti_hdmi_4xxx_audio_config, | 822 | .audio_config = ti_hdmi_4xxx_audio_config, |
823 | .audio_get_dma_port = ti_hdmi_4xxx_audio_get_dma_port, | ||
823 | #endif | 824 | #endif |
824 | 825 | ||
825 | }; | 826 | }; |
diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h index b046c208cb97..216aa704f9d7 100644 --- a/drivers/video/omap2/dss/ti_hdmi.h +++ b/drivers/video/omap2/dss/ti_hdmi.h | |||
@@ -102,6 +102,8 @@ struct ti_hdmi_ip_ops { | |||
102 | 102 | ||
103 | int (*audio_config)(struct hdmi_ip_data *ip_data, | 103 | int (*audio_config)(struct hdmi_ip_data *ip_data, |
104 | struct omap_dss_audio *audio); | 104 | struct omap_dss_audio *audio); |
105 | |||
106 | int (*audio_get_dma_port)(u32 *offset, u32 *size); | ||
105 | #endif | 107 | #endif |
106 | 108 | ||
107 | }; | 109 | }; |
@@ -183,5 +185,6 @@ int ti_hdmi_4xxx_audio_start(struct hdmi_ip_data *ip_data); | |||
183 | void ti_hdmi_4xxx_audio_stop(struct hdmi_ip_data *ip_data); | 185 | void ti_hdmi_4xxx_audio_stop(struct hdmi_ip_data *ip_data); |
184 | int ti_hdmi_4xxx_audio_config(struct hdmi_ip_data *ip_data, | 186 | int ti_hdmi_4xxx_audio_config(struct hdmi_ip_data *ip_data, |
185 | struct omap_dss_audio *audio); | 187 | struct omap_dss_audio *audio); |
188 | int ti_hdmi_4xxx_audio_get_dma_port(u32 *offset, u32 *size); | ||
186 | #endif | 189 | #endif |
187 | #endif | 190 | #endif |
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index a6efff257aa2..e18b222ed739 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | |||
@@ -1418,4 +1418,13 @@ void ti_hdmi_4xxx_audio_stop(struct hdmi_ip_data *ip_data) | |||
1418 | REG_FLD_MOD(hdmi_wp_base(ip_data), | 1418 | REG_FLD_MOD(hdmi_wp_base(ip_data), |
1419 | HDMI_WP_AUDIO_CTRL, false, 30, 30); | 1419 | HDMI_WP_AUDIO_CTRL, false, 30, 30); |
1420 | } | 1420 | } |
1421 | |||
1422 | int ti_hdmi_4xxx_audio_get_dma_port(u32 *offset, u32 *size) | ||
1423 | { | ||
1424 | if (!offset || !size) | ||
1425 | return -EINVAL; | ||
1426 | *offset = HDMI_WP_AUDIO_DATA; | ||
1427 | *size = 4; | ||
1428 | return 0; | ||
1429 | } | ||
1421 | #endif | 1430 | #endif |