aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-i2s.c
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/davinci/davinci-i2s.c
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/davinci/davinci-i2s.c')
-rw-r--r--sound/soc/davinci/davinci-i2s.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index 95df51e803b4..7a17cd0ecf64 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -188,7 +188,8 @@ static void davinci_mcbsp_stop(struct snd_pcm_substream *substream)
188 davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_SPCR_REG, w); 188 davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_SPCR_REG, w);
189} 189}
190 190
191static int davinci_i2s_startup(struct snd_pcm_substream *substream) 191static int davinci_i2s_startup(struct snd_pcm_substream *substream,
192 struct snd_soc_dai *dai)
192{ 193{
193 struct snd_soc_pcm_runtime *rtd = substream->private_data; 194 struct snd_soc_pcm_runtime *rtd = substream->private_data;
194 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 195 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -285,7 +286,8 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
285} 286}
286 287
287static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, 288static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,
288 struct snd_pcm_hw_params *params) 289 struct snd_pcm_hw_params *params,
290 struct snd_soc_dai *dai)
289{ 291{
290 struct snd_soc_pcm_runtime *rtd = substream->private_data; 292 struct snd_soc_pcm_runtime *rtd = substream->private_data;
291 struct davinci_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; 293 struct davinci_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data;
@@ -349,7 +351,8 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,
349 return 0; 351 return 0;
350} 352}
351 353
352static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd) 354static int davinci_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
355 struct snd_soc_dai *dai)
353{ 356{
354 int ret = 0; 357 int ret = 0;
355 358
@@ -473,8 +476,7 @@ struct snd_soc_dai davinci_i2s_dai = {
473 .ops = { 476 .ops = {
474 .startup = davinci_i2s_startup, 477 .startup = davinci_i2s_startup,
475 .trigger = davinci_i2s_trigger, 478 .trigger = davinci_i2s_trigger,
476 .hw_params = davinci_i2s_hw_params,}, 479 .hw_params = davinci_i2s_hw_params,
477 .dai_ops = {
478 .set_fmt = davinci_i2s_set_dai_fmt, 480 .set_fmt = davinci_i2s_set_dai_fmt,
479 }, 481 },
480}; 482};