aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
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
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')
-rw-r--r--sound/soc/atmel/atmel_ssc_dai.c21
-rw-r--r--sound/soc/au1x/psc-ac97.c5
-rw-r--r--sound/soc/au1x/psc-i2s.c8
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c12
-rw-r--r--sound/soc/codecs/ac97.c3
-rw-r--r--sound/soc/codecs/ak4535.c5
-rw-r--r--sound/soc/codecs/cs4270.c11
-rw-r--r--sound/soc/codecs/ssm2602.c14
-rw-r--r--sound/soc/codecs/tlv320aic23.c19
-rw-r--r--sound/soc/codecs/tlv320aic26.c5
-rw-r--r--sound/soc/codecs/tlv320aic3x.c5
-rw-r--r--sound/soc/codecs/twl4030.c5
-rw-r--r--sound/soc/codecs/uda134x.c12
-rw-r--r--sound/soc/codecs/uda1380.c15
-rw-r--r--sound/soc/codecs/wm8510.c5
-rw-r--r--sound/soc/codecs/wm8580.c12
-rw-r--r--sound/soc/codecs/wm8728.c5
-rw-r--r--sound/soc/codecs/wm8731.c11
-rw-r--r--sound/soc/codecs/wm8750.c5
-rw-r--r--sound/soc/codecs/wm8753.c25
-rw-r--r--sound/soc/codecs/wm8900.c5
-rw-r--r--sound/soc/codecs/wm8903.c11
-rw-r--r--sound/soc/codecs/wm8971.c5
-rw-r--r--sound/soc/codecs/wm8990.c6
-rw-r--r--sound/soc/codecs/wm9712.c6
-rw-r--r--sound/soc/codecs/wm9713.c21
-rw-r--r--sound/soc/davinci/davinci-i2s.c12
-rw-r--r--sound/soc/davinci/davinci-sffsdr.c3
-rw-r--r--sound/soc/fsl/fsl_ssi.c14
-rw-r--r--sound/soc/fsl/mpc5200_psc_i2s.c17
-rw-r--r--sound/soc/omap/omap-mcbsp.c14
-rw-r--r--sound/soc/omap/omap2evm.c3
-rw-r--r--sound/soc/pxa/pxa-ssp.c20
-rw-r--r--sound/soc/pxa/pxa2xx-ac97.c9
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c15
-rw-r--r--sound/soc/s3c24xx/s3c2412-i2s.c8
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c8
-rw-r--r--sound/soc/s3c24xx/s3c24xx-i2s.c9
-rw-r--r--sound/soc/sh/hac.c3
-rw-r--r--sound/soc/sh/ssi.c16
-rw-r--r--sound/soc/soc-core.c74
41 files changed, 247 insertions, 235 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index d290b7894917..916f73b9a18f 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -202,7 +202,8 @@ static irqreturn_t atmel_ssc_interrupt(int irq, void *dev_id)
202/* 202/*
203 * Startup. Only that one substream allowed in each direction. 203 * Startup. Only that one substream allowed in each direction.
204 */ 204 */
205static int atmel_ssc_startup(struct snd_pcm_substream *substream) 205static int atmel_ssc_startup(struct snd_pcm_substream *substream,
206 struct snd_soc_dai *dai)
206{ 207{
207 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream); 208 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream);
208 struct atmel_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id]; 209 struct atmel_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id];
@@ -231,7 +232,8 @@ static int atmel_ssc_startup(struct snd_pcm_substream *substream)
231 * Shutdown. Clear DMA parameters and shutdown the SSC if there 232 * Shutdown. Clear DMA parameters and shutdown the SSC if there
232 * are no other substreams open. 233 * are no other substreams open.
233 */ 234 */
234static void atmel_ssc_shutdown(struct snd_pcm_substream *substream) 235static void atmel_ssc_shutdown(struct snd_pcm_substream *substream,
236 struct snd_soc_dai *dai)
235{ 237{
236 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream); 238 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream);
237 struct atmel_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id]; 239 struct atmel_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id];
@@ -332,7 +334,8 @@ static int atmel_ssc_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,
332 * Configure the SSC. 334 * Configure the SSC.
333 */ 335 */
334static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, 336static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
335 struct snd_pcm_hw_params *params) 337 struct snd_pcm_hw_params *params,
338 struct snd_soc_dai *dai)
336{ 339{
337 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream); 340 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream);
338 int id = rtd->dai->cpu_dai->id; 341 int id = rtd->dai->cpu_dai->id;
@@ -600,7 +603,8 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
600} 603}
601 604
602 605
603static int atmel_ssc_prepare(struct snd_pcm_substream *substream) 606static int atmel_ssc_prepare(struct snd_pcm_substream *substream,
607 struct snd_soc_dai *dai)
604{ 608{
605 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream); 609 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream);
606 struct atmel_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id]; 610 struct atmel_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id];
@@ -715,8 +719,7 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
715 .startup = atmel_ssc_startup, 719 .startup = atmel_ssc_startup,
716 .shutdown = atmel_ssc_shutdown, 720 .shutdown = atmel_ssc_shutdown,
717 .prepare = atmel_ssc_prepare, 721 .prepare = atmel_ssc_prepare,
718 .hw_params = atmel_ssc_hw_params,}, 722 .hw_params = atmel_ssc_hw_params,
719 .dai_ops = {
720 .set_fmt = atmel_ssc_set_dai_fmt, 723 .set_fmt = atmel_ssc_set_dai_fmt,
721 .set_clkdiv = atmel_ssc_set_dai_clkdiv,}, 724 .set_clkdiv = atmel_ssc_set_dai_clkdiv,},
722 .private_data = &ssc_info[0], 725 .private_data = &ssc_info[0],
@@ -741,8 +744,7 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
741 .startup = atmel_ssc_startup, 744 .startup = atmel_ssc_startup,
742 .shutdown = atmel_ssc_shutdown, 745 .shutdown = atmel_ssc_shutdown,
743 .prepare = atmel_ssc_prepare, 746 .prepare = atmel_ssc_prepare,
744 .hw_params = atmel_ssc_hw_params,}, 747 .hw_params = atmel_ssc_hw_params,
745 .dai_ops = {
746 .set_fmt = atmel_ssc_set_dai_fmt, 748 .set_fmt = atmel_ssc_set_dai_fmt,
747 .set_clkdiv = atmel_ssc_set_dai_clkdiv,}, 749 .set_clkdiv = atmel_ssc_set_dai_clkdiv,},
748 .private_data = &ssc_info[1], 750 .private_data = &ssc_info[1],
@@ -766,8 +768,7 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
766 .startup = atmel_ssc_startup, 768 .startup = atmel_ssc_startup,
767 .shutdown = atmel_ssc_shutdown, 769 .shutdown = atmel_ssc_shutdown,
768 .prepare = atmel_ssc_prepare, 770 .prepare = atmel_ssc_prepare,
769 .hw_params = atmel_ssc_hw_params,}, 771 .hw_params = atmel_ssc_hw_params,
770 .dai_ops = {
771 .set_fmt = atmel_ssc_set_dai_fmt, 772 .set_fmt = atmel_ssc_set_dai_fmt,
772 .set_clkdiv = atmel_ssc_set_dai_clkdiv,}, 773 .set_clkdiv = atmel_ssc_set_dai_clkdiv,},
773 .private_data = &ssc_info[2], 774 .private_data = &ssc_info[2],
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index 57facbad6825..ad60a6042cad 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -160,7 +160,8 @@ struct snd_ac97_bus_ops soc_ac97_ops = {
160EXPORT_SYMBOL_GPL(soc_ac97_ops); 160EXPORT_SYMBOL_GPL(soc_ac97_ops);
161 161
162static int au1xpsc_ac97_hw_params(struct snd_pcm_substream *substream, 162static int au1xpsc_ac97_hw_params(struct snd_pcm_substream *substream,
163 struct snd_pcm_hw_params *params) 163 struct snd_pcm_hw_params *params,
164 struct snd_soc_dai *dai)
164{ 165{
165 /* FIXME */ 166 /* FIXME */
166 struct au1xpsc_audio_data *pscdata = au1xpsc_ac97_workdata; 167 struct au1xpsc_audio_data *pscdata = au1xpsc_ac97_workdata;
@@ -210,7 +211,7 @@ static int au1xpsc_ac97_hw_params(struct snd_pcm_substream *substream,
210} 211}
211 212
212static int au1xpsc_ac97_trigger(struct snd_pcm_substream *substream, 213static int au1xpsc_ac97_trigger(struct snd_pcm_substream *substream,
213 int cmd) 214 int cmd, struct snd_soc_dai *dai)
214{ 215{
215 /* FIXME */ 216 /* FIXME */
216 struct au1xpsc_audio_data *pscdata = au1xpsc_ac97_workdata; 217 struct au1xpsc_audio_data *pscdata = au1xpsc_ac97_workdata;
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index 9384702c7ebd..05a5acbb16ae 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -116,7 +116,8 @@ out:
116} 116}
117 117
118static int au1xpsc_i2s_hw_params(struct snd_pcm_substream *substream, 118static int au1xpsc_i2s_hw_params(struct snd_pcm_substream *substream,
119 struct snd_pcm_hw_params *params) 119 struct snd_pcm_hw_params *params,
120 struct snd_soc_dai *dai)
120{ 121{
121 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata; 122 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata;
122 123
@@ -240,7 +241,8 @@ static int au1xpsc_i2s_stop(struct au1xpsc_audio_data *pscdata, int stype)
240 return 0; 241 return 0;
241} 242}
242 243
243static int au1xpsc_i2s_trigger(struct snd_pcm_substream *substream, int cmd) 244static int au1xpsc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
245 struct snd_soc_dai *dai)
244{ 246{
245 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata; 247 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata;
246 int ret, stype = SUBSTREAM_TYPE(substream); 248 int ret, stype = SUBSTREAM_TYPE(substream);
@@ -389,8 +391,6 @@ struct snd_soc_dai au1xpsc_i2s_dai = {
389 .ops = { 391 .ops = {
390 .trigger = au1xpsc_i2s_trigger, 392 .trigger = au1xpsc_i2s_trigger,
391 .hw_params = au1xpsc_i2s_hw_params, 393 .hw_params = au1xpsc_i2s_hw_params,
392 },
393 .dai_ops = {
394 .set_fmt = au1xpsc_i2s_set_fmt, 394 .set_fmt = au1xpsc_i2s_set_fmt,
395 }, 395 },
396}; 396};
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index e020c160ee44..4e675b55b182 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -132,7 +132,8 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
132 return ret; 132 return ret;
133} 133}
134 134
135static int bf5xx_i2s_startup(struct snd_pcm_substream *substream) 135static int bf5xx_i2s_startup(struct snd_pcm_substream *substream,
136 struct snd_soc_dai *dai)
136{ 137{
137 pr_debug("%s enter\n", __func__); 138 pr_debug("%s enter\n", __func__);
138 139
@@ -142,7 +143,8 @@ static int bf5xx_i2s_startup(struct snd_pcm_substream *substream)
142} 143}
143 144
144static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream, 145static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
145 struct snd_pcm_hw_params *params) 146 struct snd_pcm_hw_params *params,
147 struct snd_soc_dai *dai)
146{ 148{
147 int ret = 0; 149 int ret = 0;
148 150
@@ -193,7 +195,8 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
193 return 0; 195 return 0;
194} 196}
195 197
196static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream) 198static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream,
199 struct snd_soc_dai *dai)
197{ 200{
198 pr_debug("%s enter\n", __func__); 201 pr_debug("%s enter\n", __func__);
199 bf5xx_i2s.counter--; 202 bf5xx_i2s.counter--;
@@ -307,8 +310,7 @@ struct snd_soc_dai bf5xx_i2s_dai = {
307 .ops = { 310 .ops = {
308 .startup = bf5xx_i2s_startup, 311 .startup = bf5xx_i2s_startup,
309 .shutdown = bf5xx_i2s_shutdown, 312 .shutdown = bf5xx_i2s_shutdown,
310 .hw_params = bf5xx_i2s_hw_params,}, 313 .hw_params = bf5xx_i2s_hw_params,
311 .dai_ops = {
312 .set_fmt = bf5xx_i2s_set_dai_fmt, 314 .set_fmt = bf5xx_i2s_set_dai_fmt,
313 }, 315 },
314}; 316};
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index bd1ebdc6c86c..8a93aff359d0 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -24,7 +24,8 @@
24 24
25#define AC97_VERSION "0.6" 25#define AC97_VERSION "0.6"
26 26
27static int ac97_prepare(struct snd_pcm_substream *substream) 27static int ac97_prepare(struct snd_pcm_substream *substream,
28 struct snd_soc_dai *dai)
28{ 29{
29 struct snd_pcm_runtime *runtime = substream->runtime; 30 struct snd_pcm_runtime *runtime = substream->runtime;
30 struct snd_soc_pcm_runtime *rtd = substream->private_data; 31 struct snd_soc_pcm_runtime *rtd = substream->private_data;
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 2a89b5888e11..c742290e5533 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -339,7 +339,8 @@ static int ak4535_set_dai_sysclk(struct snd_soc_dai *codec_dai,
339} 339}
340 340
341static int ak4535_hw_params(struct snd_pcm_substream *substream, 341static int ak4535_hw_params(struct snd_pcm_substream *substream,
342 struct snd_pcm_hw_params *params) 342 struct snd_pcm_hw_params *params,
343 struct snd_soc_dai *dai)
343{ 344{
344 struct snd_soc_pcm_runtime *rtd = substream->private_data; 345 struct snd_soc_pcm_runtime *rtd = substream->private_data;
345 struct snd_soc_device *socdev = rtd->socdev; 346 struct snd_soc_device *socdev = rtd->socdev;
@@ -451,8 +452,6 @@ struct snd_soc_dai ak4535_dai = {
451 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 452 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
452 .ops = { 453 .ops = {
453 .hw_params = ak4535_hw_params, 454 .hw_params = ak4535_hw_params,
454 },
455 .dai_ops = {
456 .set_fmt = ak4535_set_dai_fmt, 455 .set_fmt = ak4535_set_dai_fmt,
457 .digital_mute = ak4535_mute, 456 .digital_mute = ak4535_mute,
458 .set_sysclk = ak4535_set_dai_sysclk, 457 .set_sysclk = ak4535_set_dai_sysclk,
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 0ff476d7057c..7507d468b200 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -360,13 +360,14 @@ static int cs4270_i2c_write(struct snd_soc_codec *codec, unsigned int reg,
360/* 360/*
361 * Program the CS4270 with the given hardware parameters. 361 * Program the CS4270 with the given hardware parameters.
362 * 362 *
363 * The .dai_ops functions are used to provide board-specific data, like 363 * The .ops functions are used to provide board-specific data, like
364 * input frequencies, to this driver. This function takes that information, 364 * input frequencies, to this driver. This function takes that information,
365 * combines it with the hardware parameters provided, and programs the 365 * combines it with the hardware parameters provided, and programs the
366 * hardware accordingly. 366 * hardware accordingly.
367 */ 367 */
368static int cs4270_hw_params(struct snd_pcm_substream *substream, 368static int cs4270_hw_params(struct snd_pcm_substream *substream,
369 struct snd_pcm_hw_params *params) 369 struct snd_pcm_hw_params *params,
370 struct snd_soc_dai *dai)
370{ 371{
371 struct snd_soc_pcm_runtime *rtd = substream->private_data; 372 struct snd_soc_pcm_runtime *rtd = substream->private_data;
372 struct snd_soc_device *socdev = rtd->socdev; 373 struct snd_soc_device *socdev = rtd->socdev;
@@ -710,10 +711,10 @@ static int cs4270_probe(struct platform_device *pdev)
710 if (codec->control_data) { 711 if (codec->control_data) {
711 /* Initialize codec ops */ 712 /* Initialize codec ops */
712 cs4270_dai.ops.hw_params = cs4270_hw_params; 713 cs4270_dai.ops.hw_params = cs4270_hw_params;
713 cs4270_dai.dai_ops.set_sysclk = cs4270_set_dai_sysclk; 714 cs4270_dai.ops.set_sysclk = cs4270_set_dai_sysclk;
714 cs4270_dai.dai_ops.set_fmt = cs4270_set_dai_fmt; 715 cs4270_dai.ops.set_fmt = cs4270_set_dai_fmt;
715#ifdef CONFIG_SND_SOC_CS4270_HWMUTE 716#ifdef CONFIG_SND_SOC_CS4270_HWMUTE
716 cs4270_dai.dai_ops.digital_mute = cs4270_mute; 717 cs4270_dai.ops.digital_mute = cs4270_mute;
717#endif 718#endif
718 } else 719 } else
719 printk(KERN_INFO "cs4270: no I2C device found, " 720 printk(KERN_INFO "cs4270: no I2C device found, "
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 56dc1c9c7c52..0c5884ea1b00 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -285,7 +285,8 @@ static inline int get_coeff(int mclk, int rate)
285} 285}
286 286
287static int ssm2602_hw_params(struct snd_pcm_substream *substream, 287static int ssm2602_hw_params(struct snd_pcm_substream *substream,
288 struct snd_pcm_hw_params *params) 288 struct snd_pcm_hw_params *params,
289 struct snd_soc_dai *dai)
289{ 290{
290 u16 srate; 291 u16 srate;
291 struct snd_soc_pcm_runtime *rtd = substream->private_data; 292 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -330,7 +331,8 @@ static int ssm2602_hw_params(struct snd_pcm_substream *substream,
330 return 0; 331 return 0;
331} 332}
332 333
333static int ssm2602_startup(struct snd_pcm_substream *substream) 334static int ssm2602_startup(struct snd_pcm_substream *substream,
335 struct snd_soc_dai *dai)
334{ 336{
335 struct snd_soc_pcm_runtime *rtd = substream->private_data; 337 struct snd_soc_pcm_runtime *rtd = substream->private_data;
336 struct snd_soc_device *socdev = rtd->socdev; 338 struct snd_soc_device *socdev = rtd->socdev;
@@ -366,7 +368,8 @@ static int ssm2602_startup(struct snd_pcm_substream *substream)
366 return 0; 368 return 0;
367} 369}
368 370
369static int ssm2602_pcm_prepare(struct snd_pcm_substream *substream) 371static int ssm2602_pcm_prepare(struct snd_pcm_substream *substream,
372 struct snd_soc_dai *dai)
370{ 373{
371 struct snd_soc_pcm_runtime *rtd = substream->private_data; 374 struct snd_soc_pcm_runtime *rtd = substream->private_data;
372 struct snd_soc_device *socdev = rtd->socdev; 375 struct snd_soc_device *socdev = rtd->socdev;
@@ -377,7 +380,8 @@ static int ssm2602_pcm_prepare(struct snd_pcm_substream *substream)
377 return 0; 380 return 0;
378} 381}
379 382
380static void ssm2602_shutdown(struct snd_pcm_substream *substream) 383static void ssm2602_shutdown(struct snd_pcm_substream *substream,
384 struct snd_soc_dai *dai)
381{ 385{
382 struct snd_soc_pcm_runtime *rtd = substream->private_data; 386 struct snd_soc_pcm_runtime *rtd = substream->private_data;
383 struct snd_soc_device *socdev = rtd->socdev; 387 struct snd_soc_device *socdev = rtd->socdev;
@@ -536,8 +540,6 @@ struct snd_soc_dai ssm2602_dai = {
536 .prepare = ssm2602_pcm_prepare, 540 .prepare = ssm2602_pcm_prepare,
537 .hw_params = ssm2602_hw_params, 541 .hw_params = ssm2602_hw_params,
538 .shutdown = ssm2602_shutdown, 542 .shutdown = ssm2602_shutdown,
539 },
540 .dai_ops = {
541 .digital_mute = ssm2602_mute, 543 .digital_mute = ssm2602_mute,
542 .set_sysclk = ssm2602_set_dai_sysclk, 544 .set_sysclk = ssm2602_set_dai_sysclk,
543 .set_fmt = ssm2602_set_dai_fmt, 545 .set_fmt = ssm2602_set_dai_fmt,
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index c903e4f48dc4..a4e13d0688c9 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -418,7 +418,8 @@ static int tlv320aic23_add_widgets(struct snd_soc_codec *codec)
418} 418}
419 419
420static int tlv320aic23_hw_params(struct snd_pcm_substream *substream, 420static int tlv320aic23_hw_params(struct snd_pcm_substream *substream,
421 struct snd_pcm_hw_params *params) 421 struct snd_pcm_hw_params *params,
422 struct snd_soc_dai *dai)
422{ 423{
423 struct snd_soc_pcm_runtime *rtd = substream->private_data; 424 struct snd_soc_pcm_runtime *rtd = substream->private_data;
424 struct snd_soc_device *socdev = rtd->socdev; 425 struct snd_soc_device *socdev = rtd->socdev;
@@ -465,7 +466,8 @@ static int tlv320aic23_hw_params(struct snd_pcm_substream *substream,
465 return 0; 466 return 0;
466} 467}
467 468
468static int tlv320aic23_pcm_prepare(struct snd_pcm_substream *substream) 469static int tlv320aic23_pcm_prepare(struct snd_pcm_substream *substream,
470 struct snd_soc_dai *dai)
469{ 471{
470 struct snd_soc_pcm_runtime *rtd = substream->private_data; 472 struct snd_soc_pcm_runtime *rtd = substream->private_data;
471 struct snd_soc_device *socdev = rtd->socdev; 473 struct snd_soc_device *socdev = rtd->socdev;
@@ -477,7 +479,8 @@ static int tlv320aic23_pcm_prepare(struct snd_pcm_substream *substream)
477 return 0; 479 return 0;
478} 480}
479 481
480static void tlv320aic23_shutdown(struct snd_pcm_substream *substream) 482static void tlv320aic23_shutdown(struct snd_pcm_substream *substream,
483 struct snd_soc_dai *dai)
481{ 484{
482 struct snd_soc_pcm_runtime *rtd = substream->private_data; 485 struct snd_soc_pcm_runtime *rtd = substream->private_data;
483 struct snd_soc_device *socdev = rtd->socdev; 486 struct snd_soc_device *socdev = rtd->socdev;
@@ -613,12 +616,10 @@ struct snd_soc_dai tlv320aic23_dai = {
613 .prepare = tlv320aic23_pcm_prepare, 616 .prepare = tlv320aic23_pcm_prepare,
614 .hw_params = tlv320aic23_hw_params, 617 .hw_params = tlv320aic23_hw_params,
615 .shutdown = tlv320aic23_shutdown, 618 .shutdown = tlv320aic23_shutdown,
616 }, 619 .digital_mute = tlv320aic23_mute,
617 .dai_ops = { 620 .set_fmt = tlv320aic23_set_dai_fmt,
618 .digital_mute = tlv320aic23_mute, 621 .set_sysclk = tlv320aic23_set_dai_sysclk,
619 .set_fmt = tlv320aic23_set_dai_fmt, 622 }
620 .set_sysclk = tlv320aic23_set_dai_sysclk,
621 }
622}; 623};
623EXPORT_SYMBOL_GPL(tlv320aic23_dai); 624EXPORT_SYMBOL_GPL(tlv320aic23_dai);
624 625
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index bed8a9e63ddc..6b7ddfc92573 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -125,7 +125,8 @@ static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg,
125 * Digital Audio Interface Operations 125 * Digital Audio Interface Operations
126 */ 126 */
127static int aic26_hw_params(struct snd_pcm_substream *substream, 127static int aic26_hw_params(struct snd_pcm_substream *substream,
128 struct snd_pcm_hw_params *params) 128 struct snd_pcm_hw_params *params,
129 struct snd_soc_dai *dai)
129{ 130{
130 struct snd_soc_pcm_runtime *rtd = substream->private_data; 131 struct snd_soc_pcm_runtime *rtd = substream->private_data;
131 struct snd_soc_device *socdev = rtd->socdev; 132 struct snd_soc_device *socdev = rtd->socdev;
@@ -287,8 +288,6 @@ struct snd_soc_dai aic26_dai = {
287 }, 288 },
288 .ops = { 289 .ops = {
289 .hw_params = aic26_hw_params, 290 .hw_params = aic26_hw_params,
290 },
291 .dai_ops = {
292 .digital_mute = aic26_mute, 291 .digital_mute = aic26_mute,
293 .set_sysclk = aic26_set_sysclk, 292 .set_sysclk = aic26_set_sysclk,
294 .set_fmt = aic26_set_fmt, 293 .set_fmt = aic26_set_fmt,
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index cff276ee261e..b76bcc3c4110 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -694,7 +694,8 @@ static int aic3x_add_widgets(struct snd_soc_codec *codec)
694} 694}
695 695
696static int aic3x_hw_params(struct snd_pcm_substream *substream, 696static int aic3x_hw_params(struct snd_pcm_substream *substream,
697 struct snd_pcm_hw_params *params) 697 struct snd_pcm_hw_params *params,
698 struct snd_soc_dai *dai)
698{ 699{
699 struct snd_soc_pcm_runtime *rtd = substream->private_data; 700 struct snd_soc_pcm_runtime *rtd = substream->private_data;
700 struct snd_soc_device *socdev = rtd->socdev; 701 struct snd_soc_device *socdev = rtd->socdev;
@@ -1009,8 +1010,6 @@ struct snd_soc_dai aic3x_dai = {
1009 .formats = AIC3X_FORMATS,}, 1010 .formats = AIC3X_FORMATS,},
1010 .ops = { 1011 .ops = {
1011 .hw_params = aic3x_hw_params, 1012 .hw_params = aic3x_hw_params,
1012 },
1013 .dai_ops = {
1014 .digital_mute = aic3x_mute, 1013 .digital_mute = aic3x_mute,
1015 .set_sysclk = aic3x_set_dai_sysclk, 1014 .set_sysclk = aic3x_set_dai_sysclk,
1016 .set_fmt = aic3x_set_dai_fmt, 1015 .set_fmt = aic3x_set_dai_fmt,
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index c778eb446a5b..33489515b928 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -343,7 +343,8 @@ static int twl4030_set_bias_level(struct snd_soc_codec *codec,
343} 343}
344 344
345static int twl4030_hw_params(struct snd_pcm_substream *substream, 345static int twl4030_hw_params(struct snd_pcm_substream *substream,
346 struct snd_pcm_hw_params *params) 346 struct snd_pcm_hw_params *params,
347 struct snd_soc_dai *dai)
347{ 348{
348 struct snd_soc_pcm_runtime *rtd = substream->private_data; 349 struct snd_soc_pcm_runtime *rtd = substream->private_data;
349 struct snd_soc_device *socdev = rtd->socdev; 350 struct snd_soc_device *socdev = rtd->socdev;
@@ -523,8 +524,6 @@ struct snd_soc_dai twl4030_dai = {
523 .formats = TWL4030_FORMATS,}, 524 .formats = TWL4030_FORMATS,},
524 .ops = { 525 .ops = {
525 .hw_params = twl4030_hw_params, 526 .hw_params = twl4030_hw_params,
526 },
527 .dai_ops = {
528 .set_sysclk = twl4030_set_dai_sysclk, 527 .set_sysclk = twl4030_set_dai_sysclk,
529 .set_fmt = twl4030_set_dai_fmt, 528 .set_fmt = twl4030_set_dai_fmt,
530 } 529 }
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
index 69ef521a2ed1..91f333cdc7cf 100644
--- a/sound/soc/codecs/uda134x.c
+++ b/sound/soc/codecs/uda134x.c
@@ -168,7 +168,8 @@ static int uda134x_mute(struct snd_soc_dai *dai, int mute)
168 return 0; 168 return 0;
169} 169}
170 170
171static int uda134x_startup(struct snd_pcm_substream *substream) 171static int uda134x_startup(struct snd_pcm_substream *substream,
172 struct snd_soc_dai *dai)
172{ 173{
173 struct snd_soc_pcm_runtime *rtd = substream->private_data; 174 struct snd_soc_pcm_runtime *rtd = substream->private_data;
174 struct snd_soc_device *socdev = rtd->socdev; 175 struct snd_soc_device *socdev = rtd->socdev;
@@ -200,7 +201,8 @@ static int uda134x_startup(struct snd_pcm_substream *substream)
200 return 0; 201 return 0;
201} 202}
202 203
203static void uda134x_shutdown(struct snd_pcm_substream *substream) 204static void uda134x_shutdown(struct snd_pcm_substream *substream,
205 struct snd_soc_dai *dai)
204{ 206{
205 struct snd_soc_pcm_runtime *rtd = substream->private_data; 207 struct snd_soc_pcm_runtime *rtd = substream->private_data;
206 struct snd_soc_device *socdev = rtd->socdev; 208 struct snd_soc_device *socdev = rtd->socdev;
@@ -214,7 +216,8 @@ static void uda134x_shutdown(struct snd_pcm_substream *substream)
214} 216}
215 217
216static int uda134x_hw_params(struct snd_pcm_substream *substream, 218static int uda134x_hw_params(struct snd_pcm_substream *substream,
217 struct snd_pcm_hw_params *params) 219 struct snd_pcm_hw_params *params,
220 struct snd_soc_dai *dai)
218{ 221{
219 struct snd_soc_pcm_runtime *rtd = substream->private_data; 222 struct snd_soc_pcm_runtime *rtd = substream->private_data;
220 struct snd_soc_device *socdev = rtd->socdev; 223 struct snd_soc_device *socdev = rtd->socdev;
@@ -484,9 +487,6 @@ struct snd_soc_dai uda134x_dai = {
484 .startup = uda134x_startup, 487 .startup = uda134x_startup,
485 .shutdown = uda134x_shutdown, 488 .shutdown = uda134x_shutdown,
486 .hw_params = uda134x_hw_params, 489 .hw_params = uda134x_hw_params,
487 },
488 /* DAI operations */
489 .dai_ops = {
490 .digital_mute = uda134x_mute, 490 .digital_mute = uda134x_mute,
491 .set_sysclk = uda134x_set_dai_sysclk, 491 .set_sysclk = uda134x_set_dai_sysclk,
492 .set_fmt = uda134x_set_dai_fmt, 492 .set_fmt = uda134x_set_dai_fmt,
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index a69ee72a7af5..330877c70699 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -407,7 +407,8 @@ static int uda1380_set_dai_fmt(struct snd_soc_dai *codec_dai,
407 * when the DAI is being clocked by the CPU DAI. It's up to the 407 * when the DAI is being clocked by the CPU DAI. It's up to the
408 * machine and cpu DAI driver to do this before we are called. 408 * machine and cpu DAI driver to do this before we are called.
409 */ 409 */
410static int uda1380_pcm_prepare(struct snd_pcm_substream *substream) 410static int uda1380_pcm_prepare(struct snd_pcm_substream *substream,
411 struct snd_soc_dai *dai)
411{ 412{
412 struct snd_soc_pcm_runtime *rtd = substream->private_data; 413 struct snd_soc_pcm_runtime *rtd = substream->private_data;
413 struct snd_soc_device *socdev = rtd->socdev; 414 struct snd_soc_device *socdev = rtd->socdev;
@@ -439,7 +440,8 @@ static int uda1380_pcm_prepare(struct snd_pcm_substream *substream)
439} 440}
440 441
441static int uda1380_pcm_hw_params(struct snd_pcm_substream *substream, 442static int uda1380_pcm_hw_params(struct snd_pcm_substream *substream,
442 struct snd_pcm_hw_params *params) 443 struct snd_pcm_hw_params *params,
444 struct snd_soc_dai *dai)
443{ 445{
444 struct snd_soc_pcm_runtime *rtd = substream->private_data; 446 struct snd_soc_pcm_runtime *rtd = substream->private_data;
445 struct snd_soc_device *socdev = rtd->socdev; 447 struct snd_soc_device *socdev = rtd->socdev;
@@ -477,7 +479,8 @@ static int uda1380_pcm_hw_params(struct snd_pcm_substream *substream,
477 return 0; 479 return 0;
478} 480}
479 481
480static void uda1380_pcm_shutdown(struct snd_pcm_substream *substream) 482static void uda1380_pcm_shutdown(struct snd_pcm_substream *substream,
483 struct snd_soc_dai *dai)
481{ 484{
482 struct snd_soc_pcm_runtime *rtd = substream->private_data; 485 struct snd_soc_pcm_runtime *rtd = substream->private_data;
483 struct snd_soc_device *socdev = rtd->socdev; 486 struct snd_soc_device *socdev = rtd->socdev;
@@ -560,8 +563,6 @@ struct snd_soc_dai uda1380_dai[] = {
560 .hw_params = uda1380_pcm_hw_params, 563 .hw_params = uda1380_pcm_hw_params,
561 .shutdown = uda1380_pcm_shutdown, 564 .shutdown = uda1380_pcm_shutdown,
562 .prepare = uda1380_pcm_prepare, 565 .prepare = uda1380_pcm_prepare,
563 },
564 .dai_ops = {
565 .digital_mute = uda1380_mute, 566 .digital_mute = uda1380_mute,
566 .set_fmt = uda1380_set_dai_fmt, 567 .set_fmt = uda1380_set_dai_fmt,
567 }, 568 },
@@ -579,8 +580,6 @@ struct snd_soc_dai uda1380_dai[] = {
579 .hw_params = uda1380_pcm_hw_params, 580 .hw_params = uda1380_pcm_hw_params,
580 .shutdown = uda1380_pcm_shutdown, 581 .shutdown = uda1380_pcm_shutdown,
581 .prepare = uda1380_pcm_prepare, 582 .prepare = uda1380_pcm_prepare,
582 },
583 .dai_ops = {
584 .digital_mute = uda1380_mute, 583 .digital_mute = uda1380_mute,
585 .set_fmt = uda1380_set_dai_fmt, 584 .set_fmt = uda1380_set_dai_fmt,
586 }, 585 },
@@ -598,8 +597,6 @@ struct snd_soc_dai uda1380_dai[] = {
598 .hw_params = uda1380_pcm_hw_params, 597 .hw_params = uda1380_pcm_hw_params,
599 .shutdown = uda1380_pcm_shutdown, 598 .shutdown = uda1380_pcm_shutdown,
600 .prepare = uda1380_pcm_prepare, 599 .prepare = uda1380_pcm_prepare,
601 },
602 .dai_ops = {
603 .set_fmt = uda1380_set_dai_fmt, 600 .set_fmt = uda1380_set_dai_fmt,
604 }, 601 },
605}, 602},
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index d8ca2da8d634..173b66c0c766 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -463,7 +463,8 @@ static int wm8510_set_dai_fmt(struct snd_soc_dai *codec_dai,
463} 463}
464 464
465static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream, 465static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream,
466 struct snd_pcm_hw_params *params) 466 struct snd_pcm_hw_params *params,
467 struct snd_soc_dai *dai)
467{ 468{
468 struct snd_soc_pcm_runtime *rtd = substream->private_data; 469 struct snd_soc_pcm_runtime *rtd = substream->private_data;
469 struct snd_soc_device *socdev = rtd->socdev; 470 struct snd_soc_device *socdev = rtd->socdev;
@@ -585,8 +586,6 @@ struct snd_soc_dai wm8510_dai = {
585 .formats = WM8510_FORMATS,}, 586 .formats = WM8510_FORMATS,},
586 .ops = { 587 .ops = {
587 .hw_params = wm8510_pcm_hw_params, 588 .hw_params = wm8510_pcm_hw_params,
588 },
589 .dai_ops = {
590 .digital_mute = wm8510_mute, 589 .digital_mute = wm8510_mute,
591 .set_fmt = wm8510_set_dai_fmt, 590 .set_fmt = wm8510_set_dai_fmt,
592 .set_clkdiv = wm8510_set_dai_clkdiv, 591 .set_clkdiv = wm8510_set_dai_clkdiv,
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index cbcd7c324ab9..220d4b68904a 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -548,13 +548,13 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai,
548 * Set PCM DAI bit size and sample rate. 548 * Set PCM DAI bit size and sample rate.
549 */ 549 */
550static int wm8580_paif_hw_params(struct snd_pcm_substream *substream, 550static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
551 struct snd_pcm_hw_params *params) 551 struct snd_pcm_hw_params *params,
552 struct snd_soc_dai *dai)
552{ 553{
553 struct snd_soc_pcm_runtime *rtd = substream->private_data; 554 struct snd_soc_pcm_runtime *rtd = substream->private_data;
554 struct snd_soc_dai_link *dai = rtd->dai;
555 struct snd_soc_device *socdev = rtd->socdev; 555 struct snd_soc_device *socdev = rtd->socdev;
556 struct snd_soc_codec *codec = socdev->codec; 556 struct snd_soc_codec *codec = socdev->codec;
557 u16 paifb = wm8580_read(codec, WM8580_PAIF3 + dai->codec_dai->id); 557 u16 paifb = wm8580_read(codec, WM8580_PAIF3 + dai->id);
558 558
559 paifb &= ~WM8580_AIF_LENGTH_MASK; 559 paifb &= ~WM8580_AIF_LENGTH_MASK;
560 /* bit size */ 560 /* bit size */
@@ -574,7 +574,7 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
574 return -EINVAL; 574 return -EINVAL;
575 } 575 }
576 576
577 wm8580_write(codec, WM8580_PAIF3 + dai->codec_dai->id, paifb); 577 wm8580_write(codec, WM8580_PAIF3 + dai->id, paifb);
578 return 0; 578 return 0;
579} 579}
580 580
@@ -798,8 +798,6 @@ struct snd_soc_dai wm8580_dai[] = {
798 }, 798 },
799 .ops = { 799 .ops = {
800 .hw_params = wm8580_paif_hw_params, 800 .hw_params = wm8580_paif_hw_params,
801 },
802 .dai_ops = {
803 .set_fmt = wm8580_set_paif_dai_fmt, 801 .set_fmt = wm8580_set_paif_dai_fmt,
804 .set_clkdiv = wm8580_set_dai_clkdiv, 802 .set_clkdiv = wm8580_set_dai_clkdiv,
805 .set_pll = wm8580_set_dai_pll, 803 .set_pll = wm8580_set_dai_pll,
@@ -818,8 +816,6 @@ struct snd_soc_dai wm8580_dai[] = {
818 }, 816 },
819 .ops = { 817 .ops = {
820 .hw_params = wm8580_paif_hw_params, 818 .hw_params = wm8580_paif_hw_params,
821 },
822 .dai_ops = {
823 .set_fmt = wm8580_set_paif_dai_fmt, 819 .set_fmt = wm8580_set_paif_dai_fmt,
824 .set_clkdiv = wm8580_set_dai_clkdiv, 820 .set_clkdiv = wm8580_set_dai_clkdiv,
825 .set_pll = wm8580_set_dai_pll, 821 .set_pll = wm8580_set_dai_pll,
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index 3e39dea61241..71949bd320d3 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -147,7 +147,8 @@ static int wm8728_mute(struct snd_soc_dai *dai, int mute)
147} 147}
148 148
149static int wm8728_hw_params(struct snd_pcm_substream *substream, 149static int wm8728_hw_params(struct snd_pcm_substream *substream,
150 struct snd_pcm_hw_params *params) 150 struct snd_pcm_hw_params *params,
151 struct snd_soc_dai *dai)
151{ 152{
152 struct snd_soc_pcm_runtime *rtd = substream->private_data; 153 struct snd_soc_pcm_runtime *rtd = substream->private_data;
153 struct snd_soc_device *socdev = rtd->socdev; 154 struct snd_soc_device *socdev = rtd->socdev;
@@ -269,8 +270,6 @@ struct snd_soc_dai wm8728_dai = {
269 }, 270 },
270 .ops = { 271 .ops = {
271 .hw_params = wm8728_hw_params, 272 .hw_params = wm8728_hw_params,
272 },
273 .dai_ops = {
274 .digital_mute = wm8728_mute, 273 .digital_mute = wm8728_mute,
275 .set_fmt = wm8728_set_dai_fmt, 274 .set_fmt = wm8728_set_dai_fmt,
276 } 275 }
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 7f8a7e36b33e..c0f277053bb2 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -264,7 +264,8 @@ static inline int get_coeff(int mclk, int rate)
264} 264}
265 265
266static int wm8731_hw_params(struct snd_pcm_substream *substream, 266static int wm8731_hw_params(struct snd_pcm_substream *substream,
267 struct snd_pcm_hw_params *params) 267 struct snd_pcm_hw_params *params,
268 struct snd_soc_dai *dai)
268{ 269{
269 struct snd_soc_pcm_runtime *rtd = substream->private_data; 270 struct snd_soc_pcm_runtime *rtd = substream->private_data;
270 struct snd_soc_device *socdev = rtd->socdev; 271 struct snd_soc_device *socdev = rtd->socdev;
@@ -293,7 +294,8 @@ static int wm8731_hw_params(struct snd_pcm_substream *substream,
293 return 0; 294 return 0;
294} 295}
295 296
296static int wm8731_pcm_prepare(struct snd_pcm_substream *substream) 297static int wm8731_pcm_prepare(struct snd_pcm_substream *substream,
298 struct snd_soc_dai *dai)
297{ 299{
298 struct snd_soc_pcm_runtime *rtd = substream->private_data; 300 struct snd_soc_pcm_runtime *rtd = substream->private_data;
299 struct snd_soc_device *socdev = rtd->socdev; 301 struct snd_soc_device *socdev = rtd->socdev;
@@ -305,7 +307,8 @@ static int wm8731_pcm_prepare(struct snd_pcm_substream *substream)
305 return 0; 307 return 0;
306} 308}
307 309
308static void wm8731_shutdown(struct snd_pcm_substream *substream) 310static void wm8731_shutdown(struct snd_pcm_substream *substream,
311 struct snd_soc_dai *dai)
309{ 312{
310 struct snd_soc_pcm_runtime *rtd = substream->private_data; 313 struct snd_soc_pcm_runtime *rtd = substream->private_data;
311 struct snd_soc_device *socdev = rtd->socdev; 314 struct snd_soc_device *socdev = rtd->socdev;
@@ -461,8 +464,6 @@ struct snd_soc_dai wm8731_dai = {
461 .prepare = wm8731_pcm_prepare, 464 .prepare = wm8731_pcm_prepare,
462 .hw_params = wm8731_hw_params, 465 .hw_params = wm8731_hw_params,
463 .shutdown = wm8731_shutdown, 466 .shutdown = wm8731_shutdown,
464 },
465 .dai_ops = {
466 .digital_mute = wm8731_mute, 467 .digital_mute = wm8731_mute,
467 .set_sysclk = wm8731_set_dai_sysclk, 468 .set_sysclk = wm8731_set_dai_sysclk,
468 .set_fmt = wm8731_set_dai_fmt, 469 .set_fmt = wm8731_set_dai_fmt,
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 9b7296ee5b08..860a1d56830a 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -614,7 +614,8 @@ static int wm8750_set_dai_fmt(struct snd_soc_dai *codec_dai,
614} 614}
615 615
616static int wm8750_pcm_hw_params(struct snd_pcm_substream *substream, 616static int wm8750_pcm_hw_params(struct snd_pcm_substream *substream,
617 struct snd_pcm_hw_params *params) 617 struct snd_pcm_hw_params *params,
618 struct snd_soc_dai *dai)
618{ 619{
619 struct snd_soc_pcm_runtime *rtd = substream->private_data; 620 struct snd_soc_pcm_runtime *rtd = substream->private_data;
620 struct snd_soc_device *socdev = rtd->socdev; 621 struct snd_soc_device *socdev = rtd->socdev;
@@ -709,8 +710,6 @@ struct snd_soc_dai wm8750_dai = {
709 .formats = WM8750_FORMATS,}, 710 .formats = WM8750_FORMATS,},
710 .ops = { 711 .ops = {
711 .hw_params = wm8750_pcm_hw_params, 712 .hw_params = wm8750_pcm_hw_params,
712 },
713 .dai_ops = {
714 .digital_mute = wm8750_mute, 713 .digital_mute = wm8750_mute,
715 .set_fmt = wm8750_set_dai_fmt, 714 .set_fmt = wm8750_set_dai_fmt,
716 .set_sysclk = wm8750_set_dai_sysclk, 715 .set_sysclk = wm8750_set_dai_sysclk,
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index d426eaa22185..5e4cd3bb824a 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -922,7 +922,8 @@ static int wm8753_vdac_adc_set_dai_fmt(struct snd_soc_dai *codec_dai,
922 * Set PCM DAI bit size and sample rate. 922 * Set PCM DAI bit size and sample rate.
923 */ 923 */
924static int wm8753_pcm_hw_params(struct snd_pcm_substream *substream, 924static int wm8753_pcm_hw_params(struct snd_pcm_substream *substream,
925 struct snd_pcm_hw_params *params) 925 struct snd_pcm_hw_params *params,
926 struct snd_soc_dai *dai)
926{ 927{
927 struct snd_soc_pcm_runtime *rtd = substream->private_data; 928 struct snd_soc_pcm_runtime *rtd = substream->private_data;
928 struct snd_soc_device *socdev = rtd->socdev; 929 struct snd_soc_device *socdev = rtd->socdev;
@@ -1155,7 +1156,8 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
1155 * Set PCM DAI bit size and sample rate. 1156 * Set PCM DAI bit size and sample rate.
1156 */ 1157 */
1157static int wm8753_i2s_hw_params(struct snd_pcm_substream *substream, 1158static int wm8753_i2s_hw_params(struct snd_pcm_substream *substream,
1158 struct snd_pcm_hw_params *params) 1159 struct snd_pcm_hw_params *params,
1160 struct snd_soc_dai *dai)
1159{ 1161{
1160 struct snd_soc_pcm_runtime *rtd = substream->private_data; 1162 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1161 struct snd_soc_device *socdev = rtd->socdev; 1163 struct snd_soc_device *socdev = rtd->socdev;
@@ -1323,16 +1325,15 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1323 .channels_min = 1, 1325 .channels_min = 1,
1324 .channels_max = 2, 1326 .channels_max = 2,
1325 .rates = WM8753_RATES, 1327 .rates = WM8753_RATES,
1326 .formats = WM8753_FORMATS,}, 1328 .formats = WM8753_FORMATS},
1327 .capture = { /* dummy for fast DAI switching */ 1329 .capture = { /* dummy for fast DAI switching */
1328 .stream_name = "Capture", 1330 .stream_name = "Capture",
1329 .channels_min = 1, 1331 .channels_min = 1,
1330 .channels_max = 2, 1332 .channels_max = 2,
1331 .rates = WM8753_RATES, 1333 .rates = WM8753_RATES,
1332 .formats = WM8753_FORMATS,}, 1334 .formats = WM8753_FORMATS},
1333 .ops = { 1335 .ops = {
1334 .hw_params = wm8753_i2s_hw_params,}, 1336 .hw_params = wm8753_i2s_hw_params,
1335 .dai_ops = {
1336 .digital_mute = wm8753_mute, 1337 .digital_mute = wm8753_mute,
1337 .set_fmt = wm8753_mode1h_set_dai_fmt, 1338 .set_fmt = wm8753_mode1h_set_dai_fmt,
1338 .set_clkdiv = wm8753_set_dai_clkdiv, 1339 .set_clkdiv = wm8753_set_dai_clkdiv,
@@ -1356,8 +1357,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1356 .rates = WM8753_RATES, 1357 .rates = WM8753_RATES,
1357 .formats = WM8753_FORMATS,}, 1358 .formats = WM8753_FORMATS,},
1358 .ops = { 1359 .ops = {
1359 .hw_params = wm8753_pcm_hw_params,}, 1360 .hw_params = wm8753_pcm_hw_params,
1360 .dai_ops = {
1361 .digital_mute = wm8753_mute, 1361 .digital_mute = wm8753_mute,
1362 .set_fmt = wm8753_mode1v_set_dai_fmt, 1362 .set_fmt = wm8753_mode1v_set_dai_fmt,
1363 .set_clkdiv = wm8753_set_dai_clkdiv, 1363 .set_clkdiv = wm8753_set_dai_clkdiv,
@@ -1385,8 +1385,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1385 .rates = WM8753_RATES, 1385 .rates = WM8753_RATES,
1386 .formats = WM8753_FORMATS,}, 1386 .formats = WM8753_FORMATS,},
1387 .ops = { 1387 .ops = {
1388 .hw_params = wm8753_pcm_hw_params,}, 1388 .hw_params = wm8753_pcm_hw_params,
1389 .dai_ops = {
1390 .digital_mute = wm8753_mute, 1389 .digital_mute = wm8753_mute,
1391 .set_fmt = wm8753_mode2_set_dai_fmt, 1390 .set_fmt = wm8753_mode2_set_dai_fmt,
1392 .set_clkdiv = wm8753_set_dai_clkdiv, 1391 .set_clkdiv = wm8753_set_dai_clkdiv,
@@ -1410,8 +1409,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1410 .rates = WM8753_RATES, 1409 .rates = WM8753_RATES,
1411 .formats = WM8753_FORMATS,}, 1410 .formats = WM8753_FORMATS,},
1412 .ops = { 1411 .ops = {
1413 .hw_params = wm8753_i2s_hw_params,}, 1412 .hw_params = wm8753_i2s_hw_params,
1414 .dai_ops = {
1415 .digital_mute = wm8753_mute, 1413 .digital_mute = wm8753_mute,
1416 .set_fmt = wm8753_mode3_4_set_dai_fmt, 1414 .set_fmt = wm8753_mode3_4_set_dai_fmt,
1417 .set_clkdiv = wm8753_set_dai_clkdiv, 1415 .set_clkdiv = wm8753_set_dai_clkdiv,
@@ -1439,8 +1437,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1439 .rates = WM8753_RATES, 1437 .rates = WM8753_RATES,
1440 .formats = WM8753_FORMATS,}, 1438 .formats = WM8753_FORMATS,},
1441 .ops = { 1439 .ops = {
1442 .hw_params = wm8753_i2s_hw_params,}, 1440 .hw_params = wm8753_i2s_hw_params,
1443 .dai_ops = {
1444 .digital_mute = wm8753_mute, 1441 .digital_mute = wm8753_mute,
1445 .set_fmt = wm8753_mode3_4_set_dai_fmt, 1442 .set_fmt = wm8753_mode3_4_set_dai_fmt,
1446 .set_clkdiv = wm8753_set_dai_clkdiv, 1443 .set_clkdiv = wm8753_set_dai_clkdiv,
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index de016f41e04c..d1326be91c8b 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -727,7 +727,8 @@ static int wm8900_add_widgets(struct snd_soc_codec *codec)
727} 727}
728 728
729static int wm8900_hw_params(struct snd_pcm_substream *substream, 729static int wm8900_hw_params(struct snd_pcm_substream *substream,
730 struct snd_pcm_hw_params *params) 730 struct snd_pcm_hw_params *params,
731 struct snd_soc_dai *dai)
731{ 732{
732 struct snd_soc_pcm_runtime *rtd = substream->private_data; 733 struct snd_soc_pcm_runtime *rtd = substream->private_data;
733 struct snd_soc_device *socdev = rtd->socdev; 734 struct snd_soc_device *socdev = rtd->socdev;
@@ -1117,8 +1118,6 @@ struct snd_soc_dai wm8900_dai = {
1117 }, 1118 },
1118 .ops = { 1119 .ops = {
1119 .hw_params = wm8900_hw_params, 1120 .hw_params = wm8900_hw_params,
1120 },
1121 .dai_ops = {
1122 .set_clkdiv = wm8900_set_dai_clkdiv, 1121 .set_clkdiv = wm8900_set_dai_clkdiv,
1123 .set_pll = wm8900_set_dai_pll, 1122 .set_pll = wm8900_set_dai_pll,
1124 .set_fmt = wm8900_set_dai_fmt, 1123 .set_fmt = wm8900_set_dai_fmt,
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index ce40d7877605..efbe8927b7d2 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1257,7 +1257,8 @@ static struct {
1257 { 0, 0 }, 1257 { 0, 0 },
1258}; 1258};
1259 1259
1260static int wm8903_startup(struct snd_pcm_substream *substream) 1260static int wm8903_startup(struct snd_pcm_substream *substream,
1261 struct snd_soc_dai *dai)
1261{ 1262{
1262 struct snd_soc_pcm_runtime *rtd = substream->private_data; 1263 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1263 struct snd_soc_device *socdev = rtd->socdev; 1264 struct snd_soc_device *socdev = rtd->socdev;
@@ -1298,7 +1299,8 @@ static int wm8903_startup(struct snd_pcm_substream *substream)
1298 return 0; 1299 return 0;
1299} 1300}
1300 1301
1301static void wm8903_shutdown(struct snd_pcm_substream *substream) 1302static void wm8903_shutdown(struct snd_pcm_substream *substream,
1303 struct snd_soc_dai *dai)
1302{ 1304{
1303 struct snd_soc_pcm_runtime *rtd = substream->private_data; 1305 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1304 struct snd_soc_device *socdev = rtd->socdev; 1306 struct snd_soc_device *socdev = rtd->socdev;
@@ -1317,7 +1319,8 @@ static void wm8903_shutdown(struct snd_pcm_substream *substream)
1317} 1319}
1318 1320
1319static int wm8903_hw_params(struct snd_pcm_substream *substream, 1321static int wm8903_hw_params(struct snd_pcm_substream *substream,
1320 struct snd_pcm_hw_params *params) 1322 struct snd_pcm_hw_params *params,
1323 struct snd_soc_dai *dai)
1321{ 1324{
1322 struct snd_soc_pcm_runtime *rtd = substream->private_data; 1325 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1323 struct snd_soc_device *socdev = rtd->socdev; 1326 struct snd_soc_device *socdev = rtd->socdev;
@@ -1515,8 +1518,6 @@ struct snd_soc_dai wm8903_dai = {
1515 .startup = wm8903_startup, 1518 .startup = wm8903_startup,
1516 .shutdown = wm8903_shutdown, 1519 .shutdown = wm8903_shutdown,
1517 .hw_params = wm8903_hw_params, 1520 .hw_params = wm8903_hw_params,
1518 },
1519 .dai_ops = {
1520 .digital_mute = wm8903_digital_mute, 1521 .digital_mute = wm8903_digital_mute,
1521 .set_fmt = wm8903_set_dai_fmt, 1522 .set_fmt = wm8903_set_dai_fmt,
1522 .set_sysclk = wm8903_set_dai_sysclk 1523 .set_sysclk = wm8903_set_dai_sysclk
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index f41a578ddd4f..26edcc9d6e87 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -541,7 +541,8 @@ static int wm8971_set_dai_fmt(struct snd_soc_dai *codec_dai,
541} 541}
542 542
543static int wm8971_pcm_hw_params(struct snd_pcm_substream *substream, 543static int wm8971_pcm_hw_params(struct snd_pcm_substream *substream,
544 struct snd_pcm_hw_params *params) 544 struct snd_pcm_hw_params *params,
545 struct snd_soc_dai *dai)
545{ 546{
546 struct snd_soc_pcm_runtime *rtd = substream->private_data; 547 struct snd_soc_pcm_runtime *rtd = substream->private_data;
547 struct snd_soc_device *socdev = rtd->socdev; 548 struct snd_soc_device *socdev = rtd->socdev;
@@ -634,8 +635,6 @@ struct snd_soc_dai wm8971_dai = {
634 .formats = WM8971_FORMATS,}, 635 .formats = WM8971_FORMATS,},
635 .ops = { 636 .ops = {
636 .hw_params = wm8971_pcm_hw_params, 637 .hw_params = wm8971_pcm_hw_params,
637 },
638 .dai_ops = {
639 .digital_mute = wm8971_mute, 638 .digital_mute = wm8971_mute,
640 .set_fmt = wm8971_set_dai_fmt, 639 .set_fmt = wm8971_set_dai_fmt,
641 .set_sysclk = wm8971_set_dai_sysclk, 640 .set_sysclk = wm8971_set_dai_sysclk,
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 2d7b0096d929..13926516d16e 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1172,7 +1172,8 @@ static int wm8990_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
1172 * Set PCM DAI bit size and sample rate. 1172 * Set PCM DAI bit size and sample rate.
1173 */ 1173 */
1174static int wm8990_hw_params(struct snd_pcm_substream *substream, 1174static int wm8990_hw_params(struct snd_pcm_substream *substream,
1175 struct snd_pcm_hw_params *params) 1175 struct snd_pcm_hw_params *params,
1176 struct snd_soc_dai *dai)
1176{ 1177{
1177 struct snd_soc_pcm_runtime *rtd = substream->private_data; 1178 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1178 struct snd_soc_device *socdev = rtd->socdev; 1179 struct snd_soc_device *socdev = rtd->socdev;
@@ -1362,8 +1363,7 @@ struct snd_soc_dai wm8990_dai = {
1362 .rates = WM8990_RATES, 1363 .rates = WM8990_RATES,
1363 .formats = WM8990_FORMATS,}, 1364 .formats = WM8990_FORMATS,},
1364 .ops = { 1365 .ops = {
1365 .hw_params = wm8990_hw_params,}, 1366 .hw_params = wm8990_hw_params,
1366 .dai_ops = {
1367 .digital_mute = wm8990_mute, 1367 .digital_mute = wm8990_mute,
1368 .set_fmt = wm8990_set_dai_fmt, 1368 .set_fmt = wm8990_set_dai_fmt,
1369 .set_clkdiv = wm8990_set_dai_clkdiv, 1369 .set_clkdiv = wm8990_set_dai_clkdiv,
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index ffb471e420e2..81c38e7ad344 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -487,7 +487,8 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg,
487 return 0; 487 return 0;
488} 488}
489 489
490static int ac97_prepare(struct snd_pcm_substream *substream) 490static int ac97_prepare(struct snd_pcm_substream *substream,
491 struct snd_soc_dai *dai)
491{ 492{
492 struct snd_pcm_runtime *runtime = substream->runtime; 493 struct snd_pcm_runtime *runtime = substream->runtime;
493 struct snd_soc_pcm_runtime *rtd = substream->private_data; 494 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -507,7 +508,8 @@ static int ac97_prepare(struct snd_pcm_substream *substream)
507 return ac97_write(codec, reg, runtime->rate); 508 return ac97_write(codec, reg, runtime->rate);
508} 509}
509 510
510static int ac97_aux_prepare(struct snd_pcm_substream *substream) 511static int ac97_aux_prepare(struct snd_pcm_substream *substream,
512 struct snd_soc_dai *dai)
511{ 513{
512 struct snd_pcm_runtime *runtime = substream->runtime; 514 struct snd_pcm_runtime *runtime = substream->runtime;
513 struct snd_soc_pcm_runtime *rtd = substream->private_data; 515 struct snd_soc_pcm_runtime *rtd = substream->private_data;
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index 740bf3cde18d..a0cc5ac969a1 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -928,7 +928,8 @@ static int wm9713_set_dai_fmt(struct snd_soc_dai *codec_dai,
928} 928}
929 929
930static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream, 930static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream,
931 struct snd_pcm_hw_params *params) 931 struct snd_pcm_hw_params *params,
932 struct snd_soc_dai *dai)
932{ 933{
933 struct snd_soc_pcm_runtime *rtd = substream->private_data; 934 struct snd_soc_pcm_runtime *rtd = substream->private_data;
934 struct snd_soc_device *socdev = rtd->socdev; 935 struct snd_soc_device *socdev = rtd->socdev;
@@ -954,7 +955,8 @@ static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream,
954 return 0; 955 return 0;
955} 956}
956 957
957static void wm9713_voiceshutdown(struct snd_pcm_substream *substream) 958static void wm9713_voiceshutdown(struct snd_pcm_substream *substream,
959 struct snd_soc_dai *dai)
958{ 960{
959 struct snd_soc_pcm_runtime *rtd = substream->private_data; 961 struct snd_soc_pcm_runtime *rtd = substream->private_data;
960 struct snd_soc_device *socdev = rtd->socdev; 962 struct snd_soc_device *socdev = rtd->socdev;
@@ -969,7 +971,8 @@ static void wm9713_voiceshutdown(struct snd_pcm_substream *substream)
969 ac97_write(codec, AC97_EXTENDED_MID, status); 971 ac97_write(codec, AC97_EXTENDED_MID, status);
970} 972}
971 973
972static int ac97_hifi_prepare(struct snd_pcm_substream *substream) 974static int ac97_hifi_prepare(struct snd_pcm_substream *substream,
975 struct snd_soc_dai *dai)
973{ 976{
974 struct snd_pcm_runtime *runtime = substream->runtime; 977 struct snd_pcm_runtime *runtime = substream->runtime;
975 struct snd_soc_pcm_runtime *rtd = substream->private_data; 978 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -989,7 +992,8 @@ static int ac97_hifi_prepare(struct snd_pcm_substream *substream)
989 return ac97_write(codec, reg, runtime->rate); 992 return ac97_write(codec, reg, runtime->rate);
990} 993}
991 994
992static int ac97_aux_prepare(struct snd_pcm_substream *substream) 995static int ac97_aux_prepare(struct snd_pcm_substream *substream,
996 struct snd_soc_dai *dai)
993{ 997{
994 struct snd_pcm_runtime *runtime = substream->runtime; 998 struct snd_pcm_runtime *runtime = substream->runtime;
995 struct snd_soc_pcm_runtime *rtd = substream->private_data; 999 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -1042,8 +1046,7 @@ struct snd_soc_dai wm9713_dai[] = {
1042 .rates = WM9713_RATES, 1046 .rates = WM9713_RATES,
1043 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 1047 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
1044 .ops = { 1048 .ops = {
1045 .prepare = ac97_hifi_prepare,}, 1049 .prepare = ac97_hifi_prepare,
1046 .dai_ops = {
1047 .set_clkdiv = wm9713_set_dai_clkdiv, 1050 .set_clkdiv = wm9713_set_dai_clkdiv,
1048 .set_pll = wm9713_set_dai_pll,}, 1051 .set_pll = wm9713_set_dai_pll,},
1049 }, 1052 },
@@ -1056,8 +1059,7 @@ struct snd_soc_dai wm9713_dai[] = {
1056 .rates = WM9713_RATES, 1059 .rates = WM9713_RATES,
1057 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 1060 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
1058 .ops = { 1061 .ops = {
1059 .prepare = ac97_aux_prepare,}, 1062 .prepare = ac97_aux_prepare,
1060 .dai_ops = {
1061 .set_clkdiv = wm9713_set_dai_clkdiv, 1063 .set_clkdiv = wm9713_set_dai_clkdiv,
1062 .set_pll = wm9713_set_dai_pll,}, 1064 .set_pll = wm9713_set_dai_pll,},
1063 }, 1065 },
@@ -1077,8 +1079,7 @@ struct snd_soc_dai wm9713_dai[] = {
1077 .formats = WM9713_PCM_FORMATS,}, 1079 .formats = WM9713_PCM_FORMATS,},
1078 .ops = { 1080 .ops = {
1079 .hw_params = wm9713_pcm_hw_params, 1081 .hw_params = wm9713_pcm_hw_params,
1080 .shutdown = wm9713_voiceshutdown,}, 1082 .shutdown = wm9713_voiceshutdown,
1081 .dai_ops = {
1082 .set_clkdiv = wm9713_set_dai_clkdiv, 1083 .set_clkdiv = wm9713_set_dai_clkdiv,
1083 .set_pll = wm9713_set_dai_pll, 1084 .set_pll = wm9713_set_dai_pll,
1084 .set_fmt = wm9713_set_dai_fmt, 1085 .set_fmt = wm9713_set_dai_fmt,
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};
diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c
index fa38f9cd3506..e95fde1766b5 100644
--- a/sound/soc/davinci/davinci-sffsdr.c
+++ b/sound/soc/davinci/davinci-sffsdr.c
@@ -34,7 +34,8 @@
34#include "davinci-i2s.h" 34#include "davinci-i2s.h"
35 35
36static int sffsdr_hw_params(struct snd_pcm_substream *substream, 36static int sffsdr_hw_params(struct snd_pcm_substream *substream,
37 struct snd_pcm_hw_params *params) 37 struct snd_pcm_hw_params *params,
38 struct snd_soc_dai *dai)
38{ 39{
39 struct snd_soc_pcm_runtime *rtd = substream->private_data; 40 struct snd_soc_pcm_runtime *rtd = substream->private_data;
40 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 41 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 157a7895ffa1..52c290bb47bf 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -266,7 +266,8 @@ static irqreturn_t fsl_ssi_isr(int irq, void *dev_id)
266 * If this is the first stream open, then grab the IRQ and program most of 266 * If this is the first stream open, then grab the IRQ and program most of
267 * the SSI registers. 267 * the SSI registers.
268 */ 268 */
269static int fsl_ssi_startup(struct snd_pcm_substream *substream) 269static int fsl_ssi_startup(struct snd_pcm_substream *substream,
270 struct snd_soc_dai *dai)
270{ 271{
271 struct snd_soc_pcm_runtime *rtd = substream->private_data; 272 struct snd_soc_pcm_runtime *rtd = substream->private_data;
272 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data; 273 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data;
@@ -411,7 +412,8 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream)
411 * Note: The SxCCR.DC and SxCCR.PM bits are only used if the SSI is the 412 * Note: The SxCCR.DC and SxCCR.PM bits are only used if the SSI is the
412 * clock master. 413 * clock master.
413 */ 414 */
414static int fsl_ssi_prepare(struct snd_pcm_substream *substream) 415static int fsl_ssi_prepare(struct snd_pcm_substream *substream,
416 struct snd_soc_dai *dai)
415{ 417{
416 struct snd_pcm_runtime *runtime = substream->runtime; 418 struct snd_pcm_runtime *runtime = substream->runtime;
417 struct snd_soc_pcm_runtime *rtd = substream->private_data; 419 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -441,7 +443,8 @@ static int fsl_ssi_prepare(struct snd_pcm_substream *substream)
441 * The DMA channel is in external master start and pause mode, which 443 * The DMA channel is in external master start and pause mode, which
442 * means the SSI completely controls the flow of data. 444 * means the SSI completely controls the flow of data.
443 */ 445 */
444static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd) 446static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd,
447 struct snd_soc_dai *dai)
445{ 448{
446 struct snd_soc_pcm_runtime *rtd = substream->private_data; 449 struct snd_soc_pcm_runtime *rtd = substream->private_data;
447 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data; 450 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data;
@@ -490,7 +493,8 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd)
490 * 493 *
491 * Shutdown the SSI if there are no other substreams open. 494 * Shutdown the SSI if there are no other substreams open.
492 */ 495 */
493static void fsl_ssi_shutdown(struct snd_pcm_substream *substream) 496static void fsl_ssi_shutdown(struct snd_pcm_substream *substream,
497 struct snd_soc_dai *dai)
494{ 498{
495 struct snd_soc_pcm_runtime *rtd = substream->private_data; 499 struct snd_soc_pcm_runtime *rtd = substream->private_data;
496 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data; 500 struct fsl_ssi_private *ssi_private = rtd->dai->cpu_dai->private_data;
@@ -578,8 +582,6 @@ static struct snd_soc_dai fsl_ssi_dai_template = {
578 .prepare = fsl_ssi_prepare, 582 .prepare = fsl_ssi_prepare,
579 .shutdown = fsl_ssi_shutdown, 583 .shutdown = fsl_ssi_shutdown,
580 .trigger = fsl_ssi_trigger, 584 .trigger = fsl_ssi_trigger,
581 },
582 .dai_ops = {
583 .set_sysclk = fsl_ssi_set_sysclk, 585 .set_sysclk = fsl_ssi_set_sysclk,
584 .set_fmt = fsl_ssi_set_fmt, 586 .set_fmt = fsl_ssi_set_fmt,
585 }, 587 },
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index 94a02eaa4825..e2c172f38979 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -187,7 +187,8 @@ static irqreturn_t psc_i2s_bcom_irq(int irq, void *_psc_i2s_stream)
187 * If this is the first stream open, then grab the IRQ and program most of 187 * If this is the first stream open, then grab the IRQ and program most of
188 * the PSC registers. 188 * the PSC registers.
189 */ 189 */
190static int psc_i2s_startup(struct snd_pcm_substream *substream) 190static int psc_i2s_startup(struct snd_pcm_substream *substream,
191 struct snd_soc_dai *dai)
191{ 192{
192 struct snd_soc_pcm_runtime *rtd = substream->private_data; 193 struct snd_soc_pcm_runtime *rtd = substream->private_data;
193 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data; 194 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
@@ -220,7 +221,8 @@ static int psc_i2s_startup(struct snd_pcm_substream *substream)
220} 221}
221 222
222static int psc_i2s_hw_params(struct snd_pcm_substream *substream, 223static int psc_i2s_hw_params(struct snd_pcm_substream *substream,
223 struct snd_pcm_hw_params *params) 224 struct snd_pcm_hw_params *params,
225 struct snd_soc_dai *dai)
224{ 226{
225 struct snd_soc_pcm_runtime *rtd = substream->private_data; 227 struct snd_soc_pcm_runtime *rtd = substream->private_data;
226 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data; 228 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
@@ -256,7 +258,8 @@ static int psc_i2s_hw_params(struct snd_pcm_substream *substream,
256 return 0; 258 return 0;
257} 259}
258 260
259static int psc_i2s_hw_free(struct snd_pcm_substream *substream) 261static int psc_i2s_hw_free(struct snd_pcm_substream *substream,
262 struct snd_soc_dai *dai)
260{ 263{
261 snd_pcm_set_runtime_buffer(substream, NULL); 264 snd_pcm_set_runtime_buffer(substream, NULL);
262 return 0; 265 return 0;
@@ -268,7 +271,8 @@ static int psc_i2s_hw_free(struct snd_pcm_substream *substream)
268 * This function is called by ALSA to start, stop, pause, and resume the DMA 271 * This function is called by ALSA to start, stop, pause, and resume the DMA
269 * transfer of data. 272 * transfer of data.
270 */ 273 */
271static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd) 274static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
275 struct snd_soc_dai *dai)
272{ 276{
273 struct snd_soc_pcm_runtime *rtd = substream->private_data; 277 struct snd_soc_pcm_runtime *rtd = substream->private_data;
274 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data; 278 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
@@ -383,7 +387,8 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
383 * 387 *
384 * Shutdown the PSC if there are no other substreams open. 388 * Shutdown the PSC if there are no other substreams open.
385 */ 389 */
386static void psc_i2s_shutdown(struct snd_pcm_substream *substream) 390static void psc_i2s_shutdown(struct snd_pcm_substream *substream,
391 struct snd_soc_dai *dai)
387{ 392{
388 struct snd_soc_pcm_runtime *rtd = substream->private_data; 393 struct snd_soc_pcm_runtime *rtd = substream->private_data;
389 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data; 394 struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
@@ -483,8 +488,6 @@ static struct snd_soc_dai psc_i2s_dai_template = {
483 .hw_free = psc_i2s_hw_free, 488 .hw_free = psc_i2s_hw_free,
484 .shutdown = psc_i2s_shutdown, 489 .shutdown = psc_i2s_shutdown,
485 .trigger = psc_i2s_trigger, 490 .trigger = psc_i2s_trigger,
486 },
487 .dai_ops = {
488 .set_sysclk = psc_i2s_set_sysclk, 491 .set_sysclk = psc_i2s_set_sysclk,
489 .set_fmt = psc_i2s_set_fmt, 492 .set_fmt = psc_i2s_set_fmt,
490 }, 493 },
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;
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index e2b54b88c380..d0dd6245a20a 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -212,7 +212,8 @@ static struct pxa2xx_pcm_dma_params *ssp_dma_params[4][4] = {
212 }, 212 },
213}; 213};
214 214
215static int pxa_ssp_startup(struct snd_pcm_substream *substream) 215static int pxa_ssp_startup(struct snd_pcm_substream *substream,
216 struct snd_soc_dai *dai)
216{ 217{
217 struct snd_soc_pcm_runtime *rtd = substream->private_data; 218 struct snd_soc_pcm_runtime *rtd = substream->private_data;
218 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 219 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -228,7 +229,8 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream)
228 return ret; 229 return ret;
229} 230}
230 231
231static void pxa_ssp_shutdown(struct snd_pcm_substream *substream) 232static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
233 struct snd_soc_dai *dai)
232{ 234{
233 struct snd_soc_pcm_runtime *rtd = substream->private_data; 235 struct snd_soc_pcm_runtime *rtd = substream->private_data;
234 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 236 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -604,7 +606,8 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
604 * Can be called multiple times by oss emulation. 606 * Can be called multiple times by oss emulation.
605 */ 607 */
606static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, 608static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
607 struct snd_pcm_hw_params *params) 609 struct snd_pcm_hw_params *params,
610 struct snd_soc_dai *dai)
608{ 611{
609 struct snd_soc_pcm_runtime *rtd = substream->private_data; 612 struct snd_soc_pcm_runtime *rtd = substream->private_data;
610 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 613 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -678,7 +681,8 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
678 return 0; 681 return 0;
679} 682}
680 683
681static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd) 684static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd,
685 struct snd_soc_dai *dai)
682{ 686{
683 struct snd_soc_pcm_runtime *rtd = substream->private_data; 687 struct snd_soc_pcm_runtime *rtd = substream->private_data;
684 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 688 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -806,8 +810,6 @@ struct snd_soc_dai pxa_ssp_dai[] = {
806 .shutdown = pxa_ssp_shutdown, 810 .shutdown = pxa_ssp_shutdown,
807 .trigger = pxa_ssp_trigger, 811 .trigger = pxa_ssp_trigger,
808 .hw_params = pxa_ssp_hw_params, 812 .hw_params = pxa_ssp_hw_params,
809 },
810 .dai_ops = {
811 .set_sysclk = pxa_ssp_set_dai_sysclk, 813 .set_sysclk = pxa_ssp_set_dai_sysclk,
812 .set_clkdiv = pxa_ssp_set_dai_clkdiv, 814 .set_clkdiv = pxa_ssp_set_dai_clkdiv,
813 .set_pll = pxa_ssp_set_dai_pll, 815 .set_pll = pxa_ssp_set_dai_pll,
@@ -840,8 +842,6 @@ struct snd_soc_dai pxa_ssp_dai[] = {
840 .shutdown = pxa_ssp_shutdown, 842 .shutdown = pxa_ssp_shutdown,
841 .trigger = pxa_ssp_trigger, 843 .trigger = pxa_ssp_trigger,
842 .hw_params = pxa_ssp_hw_params, 844 .hw_params = pxa_ssp_hw_params,
843 },
844 .dai_ops = {
845 .set_sysclk = pxa_ssp_set_dai_sysclk, 845 .set_sysclk = pxa_ssp_set_dai_sysclk,
846 .set_clkdiv = pxa_ssp_set_dai_clkdiv, 846 .set_clkdiv = pxa_ssp_set_dai_clkdiv,
847 .set_pll = pxa_ssp_set_dai_pll, 847 .set_pll = pxa_ssp_set_dai_pll,
@@ -875,8 +875,6 @@ struct snd_soc_dai pxa_ssp_dai[] = {
875 .shutdown = pxa_ssp_shutdown, 875 .shutdown = pxa_ssp_shutdown,
876 .trigger = pxa_ssp_trigger, 876 .trigger = pxa_ssp_trigger,
877 .hw_params = pxa_ssp_hw_params, 877 .hw_params = pxa_ssp_hw_params,
878 },
879 .dai_ops = {
880 .set_sysclk = pxa_ssp_set_dai_sysclk, 878 .set_sysclk = pxa_ssp_set_dai_sysclk,
881 .set_clkdiv = pxa_ssp_set_dai_clkdiv, 879 .set_clkdiv = pxa_ssp_set_dai_clkdiv,
882 .set_pll = pxa_ssp_set_dai_pll, 880 .set_pll = pxa_ssp_set_dai_pll,
@@ -910,8 +908,6 @@ struct snd_soc_dai pxa_ssp_dai[] = {
910 .shutdown = pxa_ssp_shutdown, 908 .shutdown = pxa_ssp_shutdown,
911 .trigger = pxa_ssp_trigger, 909 .trigger = pxa_ssp_trigger,
912 .hw_params = pxa_ssp_hw_params, 910 .hw_params = pxa_ssp_hw_params,
913 },
914 .dai_ops = {
915 .set_sysclk = pxa_ssp_set_dai_sysclk, 911 .set_sysclk = pxa_ssp_set_dai_sysclk,
916 .set_clkdiv = pxa_ssp_set_dai_clkdiv, 912 .set_clkdiv = pxa_ssp_set_dai_clkdiv,
917 .set_pll = pxa_ssp_set_dai_pll, 913 .set_pll = pxa_ssp_set_dai_pll,
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index a7a3a9c5c6ff..86667d2f1b75 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -117,7 +117,8 @@ static void pxa2xx_ac97_remove(struct platform_device *pdev,
117} 117}
118 118
119static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream, 119static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream,
120 struct snd_pcm_hw_params *params) 120 struct snd_pcm_hw_params *params,
121 struct snd_soc_dai *dai)
121{ 122{
122 struct snd_soc_pcm_runtime *rtd = substream->private_data; 123 struct snd_soc_pcm_runtime *rtd = substream->private_data;
123 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 124 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -131,7 +132,8 @@ static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream,
131} 132}
132 133
133static int pxa2xx_ac97_hw_aux_params(struct snd_pcm_substream *substream, 134static int pxa2xx_ac97_hw_aux_params(struct snd_pcm_substream *substream,
134 struct snd_pcm_hw_params *params) 135 struct snd_pcm_hw_params *params,
136 struct snd_soc_dai *dai)
135{ 137{
136 struct snd_soc_pcm_runtime *rtd = substream->private_data; 138 struct snd_soc_pcm_runtime *rtd = substream->private_data;
137 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 139 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -145,7 +147,8 @@ static int pxa2xx_ac97_hw_aux_params(struct snd_pcm_substream *substream,
145} 147}
146 148
147static int pxa2xx_ac97_hw_mic_params(struct snd_pcm_substream *substream, 149static int pxa2xx_ac97_hw_mic_params(struct snd_pcm_substream *substream,
148 struct snd_pcm_hw_params *params) 150 struct snd_pcm_hw_params *params,
151 struct snd_soc_dai *dai)
149{ 152{
150 struct snd_soc_pcm_runtime *rtd = substream->private_data; 153 struct snd_soc_pcm_runtime *rtd = substream->private_data;
151 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 154 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index e758034db5c3..9a3e55b48129 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -121,7 +121,8 @@ static struct pxa2xx_gpio gpio_bus[] = {
121 }, 121 },
122}; 122};
123 123
124static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream) 124static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
125 struct snd_soc_dai *dai)
125{ 126{
126 struct snd_soc_pcm_runtime *rtd = substream->private_data; 127 struct snd_soc_pcm_runtime *rtd = substream->private_data;
127 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 128 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -187,7 +188,8 @@ static int pxa2xx_i2s_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
187} 188}
188 189
189static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream, 190static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
190 struct snd_pcm_hw_params *params) 191 struct snd_pcm_hw_params *params,
192 struct snd_soc_dai *dai)
191{ 193{
192 struct snd_soc_pcm_runtime *rtd = substream->private_data; 194 struct snd_soc_pcm_runtime *rtd = substream->private_data;
193 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 195 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -248,7 +250,8 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
248 return 0; 250 return 0;
249} 251}
250 252
251static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd) 253static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
254 struct snd_soc_dai *dai)
252{ 255{
253 int ret = 0; 256 int ret = 0;
254 257
@@ -269,7 +272,8 @@ static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
269 return ret; 272 return ret;
270} 273}
271 274
272static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream) 275static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
276 struct snd_soc_dai *dai)
273{ 277{
274 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 278 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
275 SACR1 |= SACR1_DRPL; 279 SACR1 |= SACR1_DRPL;
@@ -353,8 +357,7 @@ struct snd_soc_dai pxa_i2s_dai = {
353 .startup = pxa2xx_i2s_startup, 357 .startup = pxa2xx_i2s_startup,
354 .shutdown = pxa2xx_i2s_shutdown, 358 .shutdown = pxa2xx_i2s_shutdown,
355 .trigger = pxa2xx_i2s_trigger, 359 .trigger = pxa2xx_i2s_trigger,
356 .hw_params = pxa2xx_i2s_hw_params,}, 360 .hw_params = pxa2xx_i2s_hw_params,
357 .dai_ops = {
358 .set_fmt = pxa2xx_i2s_set_dai_fmt, 361 .set_fmt = pxa2xx_i2s_set_dai_fmt,
359 .set_sysclk = pxa2xx_i2s_set_dai_sysclk, 362 .set_sysclk = pxa2xx_i2s_set_dai_sysclk,
360 }, 363 },
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index ded7d995a922..360cc2a49d9d 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -343,7 +343,8 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
343} 343}
344 344
345static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream, 345static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
346 struct snd_pcm_hw_params *params) 346 struct snd_pcm_hw_params *params,
347 struct snd_soc_dai *dai)
347{ 348{
348 struct snd_soc_pcm_runtime *rtd = substream->private_data; 349 struct snd_soc_pcm_runtime *rtd = substream->private_data;
349 u32 iismod; 350 u32 iismod;
@@ -373,7 +374,8 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
373 return 0; 374 return 0;
374} 375}
375 376
376static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd) 377static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
378 struct snd_soc_dai *dai)
377{ 379{
378 int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); 380 int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
379 unsigned long irqs; 381 unsigned long irqs;
@@ -730,8 +732,6 @@ struct snd_soc_dai s3c2412_i2s_dai = {
730 .ops = { 732 .ops = {
731 .trigger = s3c2412_i2s_trigger, 733 .trigger = s3c2412_i2s_trigger,
732 .hw_params = s3c2412_i2s_hw_params, 734 .hw_params = s3c2412_i2s_hw_params,
733 },
734 .dai_ops = {
735 .set_fmt = s3c2412_i2s_set_fmt, 735 .set_fmt = s3c2412_i2s_set_fmt,
736 .set_clkdiv = s3c2412_i2s_set_clkdiv, 736 .set_clkdiv = s3c2412_i2s_set_clkdiv,
737 .set_sysclk = s3c2412_i2s_set_sysclk, 737 .set_sysclk = s3c2412_i2s_set_sysclk,
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 19c5c3cf5d8c..31377821b2c5 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -271,7 +271,8 @@ static void s3c2443_ac97_remove(struct platform_device *pdev,
271} 271}
272 272
273static int s3c2443_ac97_hw_params(struct snd_pcm_substream *substream, 273static int s3c2443_ac97_hw_params(struct snd_pcm_substream *substream,
274 struct snd_pcm_hw_params *params) 274 struct snd_pcm_hw_params *params,
275 struct snd_soc_dai *dai)
275{ 276{
276 struct snd_soc_pcm_runtime *rtd = substream->private_data; 277 struct snd_soc_pcm_runtime *rtd = substream->private_data;
277 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 278 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -313,7 +314,8 @@ static int s3c2443_ac97_trigger(struct snd_pcm_substream *substream, int cmd)
313} 314}
314 315
315static int s3c2443_ac97_hw_mic_params(struct snd_pcm_substream *substream, 316static int s3c2443_ac97_hw_mic_params(struct snd_pcm_substream *substream,
316 struct snd_pcm_hw_params *params) 317 struct snd_pcm_hw_params *params,
318 struct snd_soc_dai *dai)
317{ 319{
318 struct snd_soc_pcm_runtime *rtd = substream->private_data; 320 struct snd_soc_pcm_runtime *rtd = substream->private_data;
319 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 321 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
@@ -327,7 +329,7 @@ static int s3c2443_ac97_hw_mic_params(struct snd_pcm_substream *substream,
327} 329}
328 330
329static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream, 331static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream,
330 int cmd) 332 int cmd, struct snd_soc_dai *dai)
331{ 333{
332 u32 ac_glbctrl; 334 u32 ac_glbctrl;
333 335
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
index c18977bceaf2..1bac9dd3dbd4 100644
--- a/sound/soc/s3c24xx/s3c24xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
@@ -243,7 +243,8 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
243} 243}
244 244
245static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, 245static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
246 struct snd_pcm_hw_params *params) 246 struct snd_pcm_hw_params *params,
247 struct snd_soc_dai *dai)
247{ 248{
248 struct snd_soc_pcm_runtime *rtd = substream->private_data; 249 struct snd_soc_pcm_runtime *rtd = substream->private_data;
249 u32 iismod; 250 u32 iismod;
@@ -279,7 +280,8 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
279 return 0; 280 return 0;
280} 281}
281 282
282static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd) 283static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
284 struct snd_soc_dai *dai)
283{ 285{
284 int ret = 0; 286 int ret = 0;
285 287
@@ -475,8 +477,7 @@ struct snd_soc_dai s3c24xx_i2s_dai = {
475 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE,}, 477 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE,},
476 .ops = { 478 .ops = {
477 .trigger = s3c24xx_i2s_trigger, 479 .trigger = s3c24xx_i2s_trigger,
478 .hw_params = s3c24xx_i2s_hw_params,}, 480 .hw_params = s3c24xx_i2s_hw_params,
479 .dai_ops = {
480 .set_fmt = s3c24xx_i2s_set_fmt, 481 .set_fmt = s3c24xx_i2s_set_fmt,
481 .set_clkdiv = s3c24xx_i2s_set_clkdiv, 482 .set_clkdiv = s3c24xx_i2s_set_clkdiv,
482 .set_sysclk = s3c24xx_i2s_set_sysclk, 483 .set_sysclk = s3c24xx_i2s_set_sysclk,
diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c
index df7bc345c320..3318071dc80f 100644
--- a/sound/soc/sh/hac.c
+++ b/sound/soc/sh/hac.c
@@ -236,7 +236,8 @@ struct snd_ac97_bus_ops soc_ac97_ops = {
236EXPORT_SYMBOL_GPL(soc_ac97_ops); 236EXPORT_SYMBOL_GPL(soc_ac97_ops);
237 237
238static int hac_hw_params(struct snd_pcm_substream *substream, 238static int hac_hw_params(struct snd_pcm_substream *substream,
239 struct snd_pcm_hw_params *params) 239 struct snd_pcm_hw_params *params,
240 struct snd_soc_dai *dai)
240{ 241{
241 struct snd_soc_pcm_runtime *rtd = substream->private_data; 242 struct snd_soc_pcm_runtime *rtd = substream->private_data;
242 struct hac_priv *hac = &hac_cpu_data[rtd->dai->cpu_dai->id]; 243 struct hac_priv *hac = &hac_cpu_data[rtd->dai->cpu_dai->id];
diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c
index 55c3464163ab..52a233840d27 100644
--- a/sound/soc/sh/ssi.c
+++ b/sound/soc/sh/ssi.c
@@ -89,7 +89,8 @@ struct ssi_priv {
89 * track usage of the SSI; it is simplex-only so prevent attempts of 89 * track usage of the SSI; it is simplex-only so prevent attempts of
90 * concurrent playback + capture. FIXME: any locking required? 90 * concurrent playback + capture. FIXME: any locking required?
91 */ 91 */
92static int ssi_startup(struct snd_pcm_substream *substream) 92static int ssi_startup(struct snd_pcm_substream *substream,
93 struct snd_soc_dai *dai)
93{ 94{
94 struct snd_soc_pcm_runtime *rtd = substream->private_data; 95 struct snd_soc_pcm_runtime *rtd = substream->private_data;
95 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id]; 96 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id];
@@ -101,7 +102,8 @@ static int ssi_startup(struct snd_pcm_substream *substream)
101 return 0; 102 return 0;
102} 103}
103 104
104static void ssi_shutdown(struct snd_pcm_substream *substream) 105static void ssi_shutdown(struct snd_pcm_substream *substream,
106 struct snd_soc_dai *dai)
105{ 107{
106 struct snd_soc_pcm_runtime *rtd = substream->private_data; 108 struct snd_soc_pcm_runtime *rtd = substream->private_data;
107 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id]; 109 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id];
@@ -109,7 +111,8 @@ static void ssi_shutdown(struct snd_pcm_substream *substream)
109 ssi->inuse = 0; 111 ssi->inuse = 0;
110} 112}
111 113
112static int ssi_trigger(struct snd_pcm_substream *substream, int cmd) 114static int ssi_trigger(struct snd_pcm_substream *substream, int cmd,
115 struct snd_soc_dai *dai)
113{ 116{
114 struct snd_soc_pcm_runtime *rtd = substream->private_data; 117 struct snd_soc_pcm_runtime *rtd = substream->private_data;
115 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id]; 118 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id];
@@ -129,7 +132,8 @@ static int ssi_trigger(struct snd_pcm_substream *substream, int cmd)
129} 132}
130 133
131static int ssi_hw_params(struct snd_pcm_substream *substream, 134static int ssi_hw_params(struct snd_pcm_substream *substream,
132 struct snd_pcm_hw_params *params) 135 struct snd_pcm_hw_params *params,
136 struct snd_soc_dai *dai)
133{ 137{
134 struct snd_soc_pcm_runtime *rtd = substream->private_data; 138 struct snd_soc_pcm_runtime *rtd = substream->private_data;
135 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id]; 139 struct ssi_priv *ssi = &ssi_cpu_data[rtd->dai->cpu_dai->id];
@@ -354,8 +358,6 @@ struct snd_soc_dai sh4_ssi_dai[] = {
354 .shutdown = ssi_shutdown, 358 .shutdown = ssi_shutdown,
355 .trigger = ssi_trigger, 359 .trigger = ssi_trigger,
356 .hw_params = ssi_hw_params, 360 .hw_params = ssi_hw_params,
357 },
358 .dai_ops = {
359 .set_sysclk = ssi_set_sysclk, 361 .set_sysclk = ssi_set_sysclk,
360 .set_clkdiv = ssi_set_clkdiv, 362 .set_clkdiv = ssi_set_clkdiv,
361 .set_fmt = ssi_set_fmt, 363 .set_fmt = ssi_set_fmt,
@@ -383,8 +385,6 @@ struct snd_soc_dai sh4_ssi_dai[] = {
383 .shutdown = ssi_shutdown, 385 .shutdown = ssi_shutdown,
384 .trigger = ssi_trigger, 386 .trigger = ssi_trigger,
385 .hw_params = ssi_hw_params, 387 .hw_params = ssi_hw_params,
386 },
387 .dai_ops = {
388 .set_sysclk = ssi_set_sysclk, 388 .set_sysclk = ssi_set_sysclk,
389 .set_clkdiv = ssi_set_clkdiv, 389 .set_clkdiv = ssi_set_clkdiv,
390 .set_fmt = ssi_set_fmt, 390 .set_fmt = ssi_set_fmt,
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c5cb9516fea4..43f4060dbe75 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -134,7 +134,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
134 134
135 /* startup the audio subsystem */ 135 /* startup the audio subsystem */
136 if (cpu_dai->ops.startup) { 136 if (cpu_dai->ops.startup) {
137 ret = cpu_dai->ops.startup(substream); 137 ret = cpu_dai->ops.startup(substream, cpu_dai);
138 if (ret < 0) { 138 if (ret < 0) {
139 printk(KERN_ERR "asoc: can't open interface %s\n", 139 printk(KERN_ERR "asoc: can't open interface %s\n",
140 cpu_dai->name); 140 cpu_dai->name);
@@ -151,7 +151,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
151 } 151 }
152 152
153 if (codec_dai->ops.startup) { 153 if (codec_dai->ops.startup) {
154 ret = codec_dai->ops.startup(substream); 154 ret = codec_dai->ops.startup(substream, codec_dai);
155 if (ret < 0) { 155 if (ret < 0) {
156 printk(KERN_ERR "asoc: can't open codec %s\n", 156 printk(KERN_ERR "asoc: can't open codec %s\n",
157 codec_dai->name); 157 codec_dai->name);
@@ -248,7 +248,7 @@ codec_dai_err:
248 248
249platform_err: 249platform_err:
250 if (cpu_dai->ops.shutdown) 250 if (cpu_dai->ops.shutdown)
251 cpu_dai->ops.shutdown(substream); 251 cpu_dai->ops.shutdown(substream, cpu_dai);
252out: 252out:
253 mutex_unlock(&pcm_mutex); 253 mutex_unlock(&pcm_mutex);
254 return ret; 254 return ret;
@@ -339,10 +339,10 @@ static int soc_codec_close(struct snd_pcm_substream *substream)
339 snd_soc_dai_digital_mute(codec_dai, 1); 339 snd_soc_dai_digital_mute(codec_dai, 1);
340 340
341 if (cpu_dai->ops.shutdown) 341 if (cpu_dai->ops.shutdown)
342 cpu_dai->ops.shutdown(substream); 342 cpu_dai->ops.shutdown(substream, cpu_dai);
343 343
344 if (codec_dai->ops.shutdown) 344 if (codec_dai->ops.shutdown)
345 codec_dai->ops.shutdown(substream); 345 codec_dai->ops.shutdown(substream, codec_dai);
346 346
347 if (machine->ops && machine->ops->shutdown) 347 if (machine->ops && machine->ops->shutdown)
348 machine->ops->shutdown(substream); 348 machine->ops->shutdown(substream);
@@ -406,7 +406,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
406 } 406 }
407 407
408 if (codec_dai->ops.prepare) { 408 if (codec_dai->ops.prepare) {
409 ret = codec_dai->ops.prepare(substream); 409 ret = codec_dai->ops.prepare(substream, codec_dai);
410 if (ret < 0) { 410 if (ret < 0) {
411 printk(KERN_ERR "asoc: codec DAI prepare error\n"); 411 printk(KERN_ERR "asoc: codec DAI prepare error\n");
412 goto out; 412 goto out;
@@ -414,7 +414,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
414 } 414 }
415 415
416 if (cpu_dai->ops.prepare) { 416 if (cpu_dai->ops.prepare) {
417 ret = cpu_dai->ops.prepare(substream); 417 ret = cpu_dai->ops.prepare(substream, cpu_dai);
418 if (ret < 0) { 418 if (ret < 0) {
419 printk(KERN_ERR "asoc: cpu DAI prepare error\n"); 419 printk(KERN_ERR "asoc: cpu DAI prepare error\n");
420 goto out; 420 goto out;
@@ -491,7 +491,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
491 } 491 }
492 492
493 if (codec_dai->ops.hw_params) { 493 if (codec_dai->ops.hw_params) {
494 ret = codec_dai->ops.hw_params(substream, params); 494 ret = codec_dai->ops.hw_params(substream, params, codec_dai);
495 if (ret < 0) { 495 if (ret < 0) {
496 printk(KERN_ERR "asoc: can't set codec %s hw params\n", 496 printk(KERN_ERR "asoc: can't set codec %s hw params\n",
497 codec_dai->name); 497 codec_dai->name);
@@ -500,7 +500,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
500 } 500 }
501 501
502 if (cpu_dai->ops.hw_params) { 502 if (cpu_dai->ops.hw_params) {
503 ret = cpu_dai->ops.hw_params(substream, params); 503 ret = cpu_dai->ops.hw_params(substream, params, cpu_dai);
504 if (ret < 0) { 504 if (ret < 0) {
505 printk(KERN_ERR "asoc: interface %s hw params failed\n", 505 printk(KERN_ERR "asoc: interface %s hw params failed\n",
506 cpu_dai->name); 506 cpu_dai->name);
@@ -523,11 +523,11 @@ out:
523 523
524platform_err: 524platform_err:
525 if (cpu_dai->ops.hw_free) 525 if (cpu_dai->ops.hw_free)
526 cpu_dai->ops.hw_free(substream); 526 cpu_dai->ops.hw_free(substream, cpu_dai);
527 527
528interface_err: 528interface_err:
529 if (codec_dai->ops.hw_free) 529 if (codec_dai->ops.hw_free)
530 codec_dai->ops.hw_free(substream); 530 codec_dai->ops.hw_free(substream, codec_dai);
531 531
532codec_err: 532codec_err:
533 if (machine->ops && machine->ops->hw_free) 533 if (machine->ops && machine->ops->hw_free)
@@ -566,10 +566,10 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
566 566
567 /* now free hw params for the DAI's */ 567 /* now free hw params for the DAI's */
568 if (codec_dai->ops.hw_free) 568 if (codec_dai->ops.hw_free)
569 codec_dai->ops.hw_free(substream); 569 codec_dai->ops.hw_free(substream, codec_dai);
570 570
571 if (cpu_dai->ops.hw_free) 571 if (cpu_dai->ops.hw_free)
572 cpu_dai->ops.hw_free(substream); 572 cpu_dai->ops.hw_free(substream, cpu_dai);
573 573
574 mutex_unlock(&pcm_mutex); 574 mutex_unlock(&pcm_mutex);
575 return 0; 575 return 0;
@@ -586,7 +586,7 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
586 int ret; 586 int ret;
587 587
588 if (codec_dai->ops.trigger) { 588 if (codec_dai->ops.trigger) {
589 ret = codec_dai->ops.trigger(substream, cmd); 589 ret = codec_dai->ops.trigger(substream, cmd, codec_dai);
590 if (ret < 0) 590 if (ret < 0)
591 return ret; 591 return ret;
592 } 592 }
@@ -598,7 +598,7 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
598 } 598 }
599 599
600 if (cpu_dai->ops.trigger) { 600 if (cpu_dai->ops.trigger) {
601 ret = cpu_dai->ops.trigger(substream, cmd); 601 ret = cpu_dai->ops.trigger(substream, cmd, cpu_dai);
602 if (ret < 0) 602 if (ret < 0)
603 return ret; 603 return ret;
604 } 604 }
@@ -637,10 +637,10 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
637 snd_power_change_state(codec->card, SNDRV_CTL_POWER_D3hot); 637 snd_power_change_state(codec->card, SNDRV_CTL_POWER_D3hot);
638 638
639 /* mute any active DAC's */ 639 /* mute any active DAC's */
640 for (i = 0; i < machine->num_links; i++) { 640 for (i = 0; i < card->num_links; i++) {
641 struct snd_soc_dai *dai = machine->dai_link[i].codec_dai; 641 struct snd_soc_dai *dai = card->dai_link[i].codec_dai;
642 if (dai->dai_ops.digital_mute && dai->playback.active) 642 if (dai->ops.digital_mute && dai->playback.active)
643 dai->dai_ops.digital_mute(dai, 1); 643 dai->ops.digital_mute(dai, 1);
644 } 644 }
645 645
646 /* suspend all pcms */ 646 /* suspend all pcms */
@@ -733,10 +733,10 @@ static void soc_resume_deferred(struct work_struct *work)
733 } 733 }
734 734
735 /* unmute any active DACs */ 735 /* unmute any active DACs */
736 for (i = 0; i < machine->num_links; i++) { 736 for (i = 0; i < card->num_links; i++) {
737 struct snd_soc_dai *dai = machine->dai_link[i].codec_dai; 737 struct snd_soc_dai *dai = card->dai_link[i].codec_dai;
738 if (dai->dai_ops.digital_mute && dai->playback.active) 738 if (dai->ops.digital_mute && dai->playback.active)
739 dai->dai_ops.digital_mute(dai, 0); 739 dai->ops.digital_mute(dai, 0);
740 } 740 }
741 741
742 for (i = 0; i < card->num_links; i++) { 742 for (i = 0; i < card->num_links; i++) {
@@ -1849,8 +1849,8 @@ EXPORT_SYMBOL_GPL(snd_soc_put_volsw_s8);
1849int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, 1849int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
1850 unsigned int freq, int dir) 1850 unsigned int freq, int dir)
1851{ 1851{
1852 if (dai->dai_ops.set_sysclk) 1852 if (dai->ops.set_sysclk)
1853 return dai->dai_ops.set_sysclk(dai, clk_id, freq, dir); 1853 return dai->ops.set_sysclk(dai, clk_id, freq, dir);
1854 else 1854 else
1855 return -EINVAL; 1855 return -EINVAL;
1856} 1856}
@@ -1869,8 +1869,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_sysclk);
1869int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, 1869int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai,
1870 int div_id, int div) 1870 int div_id, int div)
1871{ 1871{
1872 if (dai->dai_ops.set_clkdiv) 1872 if (dai->ops.set_clkdiv)
1873 return dai->dai_ops.set_clkdiv(dai, div_id, div); 1873 return dai->ops.set_clkdiv(dai, div_id, div);
1874 else 1874 else
1875 return -EINVAL; 1875 return -EINVAL;
1876} 1876}
@@ -1888,8 +1888,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_clkdiv);
1888int snd_soc_dai_set_pll(struct snd_soc_dai *dai, 1888int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
1889 int pll_id, unsigned int freq_in, unsigned int freq_out) 1889 int pll_id, unsigned int freq_in, unsigned int freq_out)
1890{ 1890{
1891 if (dai->dai_ops.set_pll) 1891 if (dai->ops.set_pll)
1892 return dai->dai_ops.set_pll(dai, pll_id, freq_in, freq_out); 1892 return dai->ops.set_pll(dai, pll_id, freq_in, freq_out);
1893 else 1893 else
1894 return -EINVAL; 1894 return -EINVAL;
1895} 1895}
@@ -1905,8 +1905,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_pll);
1905 */ 1905 */
1906int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) 1906int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1907{ 1907{
1908 if (dai->dai_ops.set_fmt) 1908 if (dai->ops.set_fmt)
1909 return dai->dai_ops.set_fmt(dai, fmt); 1909 return dai->ops.set_fmt(dai, fmt);
1910 else 1910 else
1911 return -EINVAL; 1911 return -EINVAL;
1912} 1912}
@@ -1924,8 +1924,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_fmt);
1924int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, 1924int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
1925 unsigned int mask, int slots) 1925 unsigned int mask, int slots)
1926{ 1926{
1927 if (dai->dai_ops.set_sysclk) 1927 if (dai->ops.set_sysclk)
1928 return dai->dai_ops.set_tdm_slot(dai, mask, slots); 1928 return dai->ops.set_tdm_slot(dai, mask, slots);
1929 else 1929 else
1930 return -EINVAL; 1930 return -EINVAL;
1931} 1931}
@@ -1940,8 +1940,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_tdm_slot);
1940 */ 1940 */
1941int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate) 1941int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate)
1942{ 1942{
1943 if (dai->dai_ops.set_sysclk) 1943 if (dai->ops.set_sysclk)
1944 return dai->dai_ops.set_tristate(dai, tristate); 1944 return dai->ops.set_tristate(dai, tristate);
1945 else 1945 else
1946 return -EINVAL; 1946 return -EINVAL;
1947} 1947}
@@ -1956,8 +1956,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_tristate);
1956 */ 1956 */
1957int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute) 1957int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute)
1958{ 1958{
1959 if (dai->dai_ops.digital_mute) 1959 if (dai->ops.digital_mute)
1960 return dai->dai_ops.digital_mute(dai, mute); 1960 return dai->ops.digital_mute(dai, mute);
1961 else 1961 else
1962 return -EINVAL; 1962 return -EINVAL;
1963} 1963}