aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-18 17:11:38 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-21 09:12:10 -0500
commitdee89c4d94433520e4e3977ae203d4cfbfe385fb (patch)
treebdbe4c54cd9789b02a6d0bf5f75a47b8721e073e /sound/soc/omap
parenta47cbe7263236691ee0bbc392f7fd4ec0da1159f (diff)
ASoC: Merge snd_soc_ops into snd_soc_dai_ops
Liam Girdwood's ASoC v2 work avoids having two different ops structures for DAIs by merging the members of struct snd_soc_ops into struct snd_soc_dai_ops, allowing per DAI configuration for everything. Backport this change. This paves the way for future work allowing any combination of DAIs to be connected rather than having fixed purpose CODEC and CPU DAIs and only allowing CODEC<->CPU interconnections. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/omap-mcbsp.c14
-rw-r--r--sound/soc/omap/omap2evm.c3
2 files changed, 10 insertions, 7 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 3d4060b00eb3..6013898f49b4 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -138,7 +138,8 @@ static const unsigned long omap34xx_mcbsp_port[][2] = {
138static const unsigned long omap34xx_mcbsp_port[][2] = {}; 138static const unsigned long omap34xx_mcbsp_port[][2] = {};
139#endif 139#endif
140 140
141static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream) 141static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream,
142 struct snd_soc_dai *dai)
142{ 143{
143 struct snd_soc_pcm_runtime *rtd = substream->private_data; 144 struct snd_soc_pcm_runtime *rtd = substream->private_data;
144 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 145 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -151,7 +152,8 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream)
151 return err; 152 return err;
152} 153}
153 154
154static void omap_mcbsp_dai_shutdown(struct snd_pcm_substream *substream) 155static void omap_mcbsp_dai_shutdown(struct snd_pcm_substream *substream,
156 struct snd_soc_dai *dai)
155{ 157{
156 struct snd_soc_pcm_runtime *rtd = substream->private_data; 158 struct snd_soc_pcm_runtime *rtd = substream->private_data;
157 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 159 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -163,7 +165,8 @@ static void omap_mcbsp_dai_shutdown(struct snd_pcm_substream *substream)
163 } 165 }
164} 166}
165 167
166static int omap_mcbsp_dai_trigger(struct snd_pcm_substream *substream, int cmd) 168static int omap_mcbsp_dai_trigger(struct snd_pcm_substream *substream, int cmd,
169 struct snd_soc_dai *dai)
167{ 170{
168 struct snd_soc_pcm_runtime *rtd = substream->private_data; 171 struct snd_soc_pcm_runtime *rtd = substream->private_data;
169 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 172 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -192,7 +195,8 @@ static int omap_mcbsp_dai_trigger(struct snd_pcm_substream *substream, int cmd)
192} 195}
193 196
194static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, 197static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
195 struct snd_pcm_hw_params *params) 198 struct snd_pcm_hw_params *params,
199 struct snd_soc_dai *dai)
196{ 200{
197 struct snd_soc_pcm_runtime *rtd = substream->private_data; 201 struct snd_soc_pcm_runtime *rtd = substream->private_data;
198 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 202 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -470,8 +474,6 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
470 .shutdown = omap_mcbsp_dai_shutdown, \ 474 .shutdown = omap_mcbsp_dai_shutdown, \
471 .trigger = omap_mcbsp_dai_trigger, \ 475 .trigger = omap_mcbsp_dai_trigger, \
472 .hw_params = omap_mcbsp_dai_hw_params, \ 476 .hw_params = omap_mcbsp_dai_hw_params, \
473 }, \
474 .dai_ops = { \
475 .set_fmt = omap_mcbsp_dai_set_dai_fmt, \ 477 .set_fmt = omap_mcbsp_dai_set_dai_fmt, \
476 .set_clkdiv = omap_mcbsp_dai_set_clkdiv, \ 478 .set_clkdiv = omap_mcbsp_dai_set_clkdiv, \
477 .set_sysclk = omap_mcbsp_dai_set_dai_sysclk, \ 479 .set_sysclk = omap_mcbsp_dai_set_dai_sysclk, \
diff --git a/sound/soc/omap/omap2evm.c b/sound/soc/omap/omap2evm.c
index 5bea31157a94..7b160f9d83f9 100644
--- a/sound/soc/omap/omap2evm.c
+++ b/sound/soc/omap/omap2evm.c
@@ -38,7 +38,8 @@
38#include "../codecs/twl4030.h" 38#include "../codecs/twl4030.h"
39 39
40static int omap2evm_hw_params(struct snd_pcm_substream *substream, 40static int omap2evm_hw_params(struct snd_pcm_substream *substream,
41 struct snd_pcm_hw_params *params) 41 struct snd_pcm_hw_params *params,
42 struct snd_soc_dai *dai)
42{ 43{
43 struct snd_soc_pcm_runtime *rtd = substream->private_data; 44 struct snd_soc_pcm_runtime *rtd = substream->private_data;
44 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 45 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;