aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri@ti.com>2011-11-22 21:50:50 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-01-05 03:34:47 -0500
commit284cb318c8f84744f073d4f4d3820946afaf5442 (patch)
treebd413c6c320b94691d033561e8a679b6bbcfe57b
parentb17ce117322a446f13716132e47b672d7bf25a30 (diff)
ASoC: OMAP: HDMI: Correct signature of ASoC functions
These functions require access to IP-secific data. However, it is not possible to pass such data as a function argument as such functions have a specific signature specified by ASoC. Instead, they will have access to the IP-specific data by calling snd_soc_codec_get_drvdata. The codec driver data is set at probe time. 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/hdmi.c6
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c7
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h3
3 files changed, 10 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 3c96d771e2c..b727992efd6 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -561,11 +561,13 @@ void omapdss_hdmi_display_disable(struct omap_dss_device *dssdev)
561#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ 561#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
562 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) 562 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
563 563
564static int hdmi_audio_hw_params(struct hdmi_ip_data *ip_data, 564static int hdmi_audio_hw_params(struct snd_pcm_substream *substream,
565 struct snd_pcm_substream *substream,
566 struct snd_pcm_hw_params *params, 565 struct snd_pcm_hw_params *params,
567 struct snd_soc_dai *dai) 566 struct snd_soc_dai *dai)
568{ 567{
568 struct snd_soc_pcm_runtime *rtd = substream->private_data;
569 struct snd_soc_codec *codec = rtd->codec;
570 struct hdmi_ip_data *ip_data = snd_soc_codec_get_drvdata(codec);
569 struct hdmi_audio_format audio_format; 571 struct hdmi_audio_format audio_format;
570 struct hdmi_audio_dma audio_dma; 572 struct hdmi_audio_dma audio_dma;
571 struct hdmi_core_audio_config core_cfg; 573 struct hdmi_core_audio_config core_cfg;
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
index e1a6ce518af..3f74f55269b 100644
--- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
@@ -1204,11 +1204,14 @@ int hdmi_config_audio_acr(struct hdmi_ip_data *ip_data,
1204 return 0; 1204 return 0;
1205} 1205}
1206 1206
1207int hdmi_audio_trigger(struct hdmi_ip_data *ip_data, 1207int hdmi_audio_trigger(struct snd_pcm_substream *substream, int cmd,
1208 struct snd_pcm_substream *substream, int cmd,
1209 struct snd_soc_dai *dai) 1208 struct snd_soc_dai *dai)
1210{ 1209{
1210 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1211 struct snd_soc_codec *codec = rtd->codec;
1212 struct hdmi_ip_data *ip_data = snd_soc_codec_get_drvdata(codec);
1211 int err = 0; 1213 int err = 0;
1214
1212 switch (cmd) { 1215 switch (cmd) {
1213 case SNDRV_PCM_TRIGGER_START: 1216 case SNDRV_PCM_TRIGGER_START:
1214 case SNDRV_PCM_TRIGGER_RESUME: 1217 case SNDRV_PCM_TRIGGER_RESUME:
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h
index 204095632d2..eb5e8f7120f 100644
--- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h
+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h
@@ -576,8 +576,7 @@ struct hdmi_core_audio_config {
576 576
577#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ 577#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
578 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) 578 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
579int hdmi_audio_trigger(struct hdmi_ip_data *ip_data, 579int hdmi_audio_trigger(struct snd_pcm_substream *substream, int cmd,
580 struct snd_pcm_substream *substream, int cmd,
581 struct snd_soc_dai *dai); 580 struct snd_soc_dai *dai);
582int hdmi_config_audio_acr(struct hdmi_ip_data *ip_data, 581int hdmi_config_audio_acr(struct hdmi_ip_data *ip_data,
583 u32 sample_freq, u32 *n, u32 *cts); 582 u32 sample_freq, u32 *n, u32 *cts);