aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h3
-rw-r--r--sound/soc/atmel/atmel-pcm.c6
-rw-r--r--sound/soc/au1x/dbdma2.c7
-rw-r--r--sound/soc/blackfin/bf5xx-ac97-pcm.c6
-rw-r--r--sound/soc/blackfin/bf5xx-i2s-pcm.c6
-rw-r--r--sound/soc/blackfin/bf5xx-tdm-pcm.c6
-rw-r--r--sound/soc/davinci/davinci-pcm.c6
-rw-r--r--sound/soc/ep93xx/ep93xx-pcm.c6
-rw-r--r--sound/soc/fsl/fsl_dma.c6
-rw-r--r--sound/soc/fsl/mpc5200_dma.c7
-rw-r--r--sound/soc/imx/imx-pcm-fiq.c8
-rw-r--r--sound/soc/imx/imx-ssi.c7
-rw-r--r--sound/soc/imx/imx-ssi.h3
-rw-r--r--sound/soc/jz4740/jz4740-pcm.c6
-rw-r--r--sound/soc/kirkwood/kirkwood-dma.c6
-rw-r--r--sound/soc/mid-x86/sst_platform.c5
-rw-r--r--sound/soc/nuc900/nuc900-pcm.c7
-rw-r--r--sound/soc/omap/omap-pcm.c6
-rw-r--r--sound/soc/pxa/pxa2xx-pcm.c6
-rw-r--r--sound/soc/s6000/s6000-pcm.c7
-rw-r--r--sound/soc/samsung/dma.c6
-rw-r--r--sound/soc/sh/dma-sh7760.c6
-rw-r--r--sound/soc/sh/fsi.c6
-rw-r--r--sound/soc/sh/siu_pcm.c5
-rw-r--r--sound/soc/soc-core.c3
-rw-r--r--sound/soc/tegra/tegra_pcm.c6
-rw-r--r--sound/soc/txx9/txx9aclc.c5
27 files changed, 96 insertions, 61 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index f55efc1a63a2..74093be65709 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -624,8 +624,7 @@ struct snd_soc_platform_driver {
624 int (*resume)(struct snd_soc_dai *dai); 624 int (*resume)(struct snd_soc_dai *dai);
625 625
626 /* pcm creation and destruction */ 626 /* pcm creation and destruction */
627 int (*pcm_new)(struct snd_card *, struct snd_soc_dai *, 627 int (*pcm_new)(struct snd_soc_pcm_runtime *);
628 struct snd_pcm *);
629 void (*pcm_free)(struct snd_pcm *); 628 void (*pcm_free)(struct snd_pcm *);
630 629
631 /* 630 /*
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c
index 51dde4e1a89e..f81d4c3f8956 100644
--- a/sound/soc/atmel/atmel-pcm.c
+++ b/sound/soc/atmel/atmel-pcm.c
@@ -364,9 +364,11 @@ static struct snd_pcm_ops atmel_pcm_ops = {
364\*--------------------------------------------------------------------------*/ 364\*--------------------------------------------------------------------------*/
365static u64 atmel_pcm_dmamask = 0xffffffff; 365static u64 atmel_pcm_dmamask = 0xffffffff;
366 366
367static int atmel_pcm_new(struct snd_card *card, 367static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd)
368 struct snd_soc_dai *dai, struct snd_pcm *pcm)
369{ 368{
369 struct snd_card *card = rtd->card->snd_card;
370 struct snd_soc_dai *dai = rtd->cpu_dai;
371 struct snd_pcm *pcm = rtd->pcm;
370 int ret = 0; 372 int ret = 0;
371 373
372 if (!card->dev->dma_mask) 374 if (!card->dev->dma_mask)
diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c
index 10fdd2854e58..20bb53a837b1 100644
--- a/sound/soc/au1x/dbdma2.c
+++ b/sound/soc/au1x/dbdma2.c
@@ -319,10 +319,11 @@ static void au1xpsc_pcm_free_dma_buffers(struct snd_pcm *pcm)
319 snd_pcm_lib_preallocate_free_for_all(pcm); 319 snd_pcm_lib_preallocate_free_for_all(pcm);
320} 320}
321 321
322static int au1xpsc_pcm_new(struct snd_card *card, 322static int au1xpsc_pcm_new(struct snd_soc_pcm_runtime *rtd)
323 struct snd_soc_dai *dai,
324 struct snd_pcm *pcm)
325{ 323{
324 struct snd_card *card = rtd->card->snd_card;
325 struct snd_pcm *pcm = rtd->pcm;
326
326 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 327 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
327 card->dev, AU1XPSC_BUFFER_MIN_BYTES, (4096 * 1024) - 1); 328 card->dev, AU1XPSC_BUFFER_MIN_BYTES, (4096 * 1024) - 1);
328 329
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c
index 98b44b316e78..9e59f680bc19 100644
--- a/sound/soc/blackfin/bf5xx-ac97-pcm.c
+++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c
@@ -418,9 +418,11 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
418 418
419static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); 419static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
420 420
421int bf5xx_pcm_ac97_new(struct snd_card *card, struct snd_soc_dai *dai, 421int bf5xx_pcm_ac97_new(struct snd_soc_pcm_runtime *rtd)
422 struct snd_pcm *pcm)
423{ 422{
423 struct snd_card *card = rtd->card->snd_card;
424 struct snd_soc_dai *dai = rtd->cpu_dai;
425 struct snd_pcm *pcm = rtd->pcm;
424 int ret = 0; 426 int ret = 0;
425 427
426 pr_debug("%s enter\n", __func__); 428 pr_debug("%s enter\n", __func__);
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c
index b5101efd1c87..96d0d9060768 100644
--- a/sound/soc/blackfin/bf5xx-i2s-pcm.c
+++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c
@@ -248,9 +248,11 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
248 248
249static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); 249static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
250 250
251int bf5xx_pcm_i2s_new(struct snd_card *card, struct snd_soc_dai *dai, 251int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd)
252 struct snd_pcm *pcm)
253{ 252{
253 struct snd_card *card = rtd->card->snd_card;
254 struct snd_soc_dai *dai = rtd->cpu_dai;
255 struct snd_pcm *pcm = rtd->pcm;
254 int ret = 0; 256 int ret = 0;
255 257
256 pr_debug("%s enter\n", __func__); 258 pr_debug("%s enter\n", __func__);
diff --git a/sound/soc/blackfin/bf5xx-tdm-pcm.c b/sound/soc/blackfin/bf5xx-tdm-pcm.c
index 07cfc7a9e49a..c95cc03d583d 100644
--- a/sound/soc/blackfin/bf5xx-tdm-pcm.c
+++ b/sound/soc/blackfin/bf5xx-tdm-pcm.c
@@ -283,9 +283,11 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
283 283
284static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); 284static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
285 285
286static int bf5xx_pcm_tdm_new(struct snd_card *card, struct snd_soc_dai *dai, 286static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd)
287 struct snd_pcm *pcm)
288{ 287{
288 struct snd_card *card = rtd->card->snd_card;
289 struct snd_soc_dai *dai = rtd->cpu_dai;
290 struct snd_pcm *pcm = rtd->pcm;
289 int ret = 0; 291 int ret = 0;
290 292
291 if (!card->dev->dma_mask) 293 if (!card->dev->dma_mask)
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index c9e0320f6289..a49e667373bc 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -833,9 +833,11 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
833 833
834static u64 davinci_pcm_dmamask = 0xffffffff; 834static u64 davinci_pcm_dmamask = 0xffffffff;
835 835
836static int davinci_pcm_new(struct snd_card *card, 836static int davinci_pcm_new(struct snd_soc_pcm_runtime *rtd)
837 struct snd_soc_dai *dai, struct snd_pcm *pcm)
838{ 837{
838 struct snd_card *card = rtd->card->snd_card;
839 struct snd_soc_dai *dai = rtd->cpu_dai;
840 struct snd_pcm *pcm = rtd->pcm;
839 int ret; 841 int ret;
840 842
841 if (!card->dev->dma_mask) 843 if (!card->dev->dma_mask)
diff --git a/sound/soc/ep93xx/ep93xx-pcm.c b/sound/soc/ep93xx/ep93xx-pcm.c
index a456e491155f..e27c417da437 100644
--- a/sound/soc/ep93xx/ep93xx-pcm.c
+++ b/sound/soc/ep93xx/ep93xx-pcm.c
@@ -266,9 +266,11 @@ static void ep93xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
266 266
267static u64 ep93xx_pcm_dmamask = 0xffffffff; 267static u64 ep93xx_pcm_dmamask = 0xffffffff;
268 268
269static int ep93xx_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 269static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd)
270 struct snd_pcm *pcm)
271{ 270{
271 struct snd_card *card = rtd->card->snd_card;
272 struct snd_soc_dai *dai = rtd->cpu_dai;
273 struct snd_pcm *pcm = rtd->pcm;
272 int ret = 0; 274 int ret = 0;
273 275
274 if (!card->dev->dma_mask) 276 if (!card->dev->dma_mask)
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 15dac0f20cd8..50b5df8c095f 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -294,9 +294,11 @@ static irqreturn_t fsl_dma_isr(int irq, void *dev_id)
294 * Regardless of where the memory is actually allocated, since the device can 294 * Regardless of where the memory is actually allocated, since the device can
295 * technically DMA to any 36-bit address, we do need to set the DMA mask to 36. 295 * technically DMA to any 36-bit address, we do need to set the DMA mask to 36.
296 */ 296 */
297static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai, 297static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd)
298 struct snd_pcm *pcm)
299{ 298{
299 struct snd_card *card = rtd->card->snd_card;
300 struct snd_soc_dai *dai = rtd->cpu_dai;
301 struct snd_pcm *pcm = rtd->pcm;
300 static u64 fsl_dma_dmamask = DMA_BIT_MASK(36); 302 static u64 fsl_dma_dmamask = DMA_BIT_MASK(36);
301 int ret; 303 int ret;
302 304
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index fff695ccdd3e..19ad0c1be67e 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -299,10 +299,11 @@ static struct snd_pcm_ops psc_dma_ops = {
299}; 299};
300 300
301static u64 psc_dma_dmamask = 0xffffffff; 301static u64 psc_dma_dmamask = 0xffffffff;
302static int psc_dma_new(struct snd_card *card, struct snd_soc_dai *dai, 302static int psc_dma_new(struct snd_soc_pcm_runtime *rtd)
303 struct snd_pcm *pcm)
304{ 303{
305 struct snd_soc_pcm_runtime *rtd = pcm->private_data; 304 struct snd_card *card = rtd->card->snd_card;
305 struct snd_soc_dai *dai = rtd->cpu_dai;
306 struct snd_pcm *pcm = rtd->pcm;
306 struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(rtd->cpu_dai); 307 struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(rtd->cpu_dai);
307 size_t size = psc_dma_hardware.buffer_bytes_max; 308 size_t size = psc_dma_hardware.buffer_bytes_max;
308 int rc = 0; 309 int rc = 0;
diff --git a/sound/soc/imx/imx-pcm-fiq.c b/sound/soc/imx/imx-pcm-fiq.c
index 413b78da248f..309c59e6fb6c 100644
--- a/sound/soc/imx/imx-pcm-fiq.c
+++ b/sound/soc/imx/imx-pcm-fiq.c
@@ -238,12 +238,14 @@ static struct snd_pcm_ops imx_pcm_ops = {
238 238
239static int ssi_irq = 0; 239static int ssi_irq = 0;
240 240
241static int imx_pcm_fiq_new(struct snd_card *card, struct snd_soc_dai *dai, 241static int imx_pcm_fiq_new(struct snd_soc_pcm_runtime *rtd)
242 struct snd_pcm *pcm)
243{ 242{
243 struct snd_card *card = rtd->card->snd_card;
244 struct snd_soc_dai *dai = rtd->cpu_dai;
245 struct snd_pcm *pcm = rtd->pcm;
244 int ret; 246 int ret;
245 247
246 ret = imx_pcm_new(card, dai, pcm); 248 ret = imx_pcm_new(rtd);
247 if (ret) 249 if (ret)
248 return ret; 250 return ret;
249 251
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
index 5b13feca7537..158a91c1efad 100644
--- a/sound/soc/imx/imx-ssi.c
+++ b/sound/soc/imx/imx-ssi.c
@@ -388,10 +388,11 @@ static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
388 388
389static u64 imx_pcm_dmamask = DMA_BIT_MASK(32); 389static u64 imx_pcm_dmamask = DMA_BIT_MASK(32);
390 390
391int imx_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 391int imx_pcm_new(struct snd_soc_pcm_runtime *rtd)
392 struct snd_pcm *pcm)
393{ 392{
394 393 struct snd_card *card = rtd->card->snd_card;
394 struct snd_soc_dai *dai = rtd->cpu_dai;
395 struct snd_pcm *pcm = rtd->pcm;
395 int ret = 0; 396 int ret = 0;
396 397
397 if (!card->dev->dma_mask) 398 if (!card->dev->dma_mask)
diff --git a/sound/soc/imx/imx-ssi.h b/sound/soc/imx/imx-ssi.h
index dc8a87530e3e..0a84cec3599e 100644
--- a/sound/soc/imx/imx-ssi.h
+++ b/sound/soc/imx/imx-ssi.h
@@ -225,8 +225,7 @@ struct snd_soc_platform *imx_ssi_dma_mx2_init(struct platform_device *pdev,
225 struct imx_ssi *ssi); 225 struct imx_ssi *ssi);
226 226
227int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma); 227int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma);
228int imx_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 228int imx_pcm_new(struct snd_soc_pcm_runtime *rtd);
229 struct snd_pcm *pcm);
230void imx_pcm_free(struct snd_pcm *pcm); 229void imx_pcm_free(struct snd_pcm *pcm);
231 230
232/* 231/*
diff --git a/sound/soc/jz4740/jz4740-pcm.c b/sound/soc/jz4740/jz4740-pcm.c
index fb1483f7c966..a7c9578be983 100644
--- a/sound/soc/jz4740/jz4740-pcm.c
+++ b/sound/soc/jz4740/jz4740-pcm.c
@@ -299,9 +299,11 @@ static void jz4740_pcm_free(struct snd_pcm *pcm)
299 299
300static u64 jz4740_pcm_dmamask = DMA_BIT_MASK(32); 300static u64 jz4740_pcm_dmamask = DMA_BIT_MASK(32);
301 301
302int jz4740_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 302int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd)
303 struct snd_pcm *pcm)
304{ 303{
304 struct snd_card *card = rtd->card->snd_card;
305 struct snd_soc_dai *dai = rtd->cpu_dai;
306 struct snd_pcm *pcm = rtd->pcm;
305 int ret = 0; 307 int ret = 0;
306 308
307 if (!card->dev->dma_mask) 309 if (!card->dev->dma_mask)
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c
index e13c6ce46328..cd33de1c5b7a 100644
--- a/sound/soc/kirkwood/kirkwood-dma.c
+++ b/sound/soc/kirkwood/kirkwood-dma.c
@@ -312,9 +312,11 @@ static int kirkwood_dma_preallocate_dma_buffer(struct snd_pcm *pcm,
312 return 0; 312 return 0;
313} 313}
314 314
315static int kirkwood_dma_new(struct snd_card *card, 315static int kirkwood_dma_new(struct snd_soc_pcm_runtime *rtd)
316 struct snd_soc_dai *dai, struct snd_pcm *pcm)
317{ 316{
317 struct snd_card *card = rtd->card->snd_card;
318 struct snd_soc_dai *dai = rtd->cpu_dai;
319 struct snd_pcm *pcm = rtd->pcm;
318 int ret; 320 int ret;
319 321
320 if (!card->dev->dma_mask) 322 if (!card->dev->dma_mask)
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index 5a946b4115a2..3e7826058efe 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -402,9 +402,10 @@ static void sst_pcm_free(struct snd_pcm *pcm)
402 snd_pcm_lib_preallocate_free_for_all(pcm); 402 snd_pcm_lib_preallocate_free_for_all(pcm);
403} 403}
404 404
405int sst_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 405int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)
406 struct snd_pcm *pcm)
407{ 406{
407 struct snd_soc_dai *dai = rtd->cpu_dai;
408 struct snd_pcm *pcm = rtd->pcm;
408 int retval = 0; 409 int retval = 0;
409 410
410 pr_debug("sst_pcm_new called\n"); 411 pr_debug("sst_pcm_new called\n");
diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c
index 8263f56dc665..d589ef14e917 100644
--- a/sound/soc/nuc900/nuc900-pcm.c
+++ b/sound/soc/nuc900/nuc900-pcm.c
@@ -315,9 +315,12 @@ static void nuc900_dma_free_dma_buffers(struct snd_pcm *pcm)
315} 315}
316 316
317static u64 nuc900_pcm_dmamask = DMA_BIT_MASK(32); 317static u64 nuc900_pcm_dmamask = DMA_BIT_MASK(32);
318static int nuc900_dma_new(struct snd_card *card, 318static int nuc900_dma_new(struct snd_soc_pcm_runtime *rtd)
319 struct snd_soc_dai *dai, struct snd_pcm *pcm)
320{ 319{
320 struct snd_card *card = rtd->card->snd_card;
321 struct snd_soc_dai *dai = rtd->cpu_dai;
322 struct snd_pcm *pcm = rtd->pcm;
323
321 if (!card->dev->dma_mask) 324 if (!card->dev->dma_mask)
322 card->dev->dma_mask = &nuc900_pcm_dmamask; 325 card->dev->dma_mask = &nuc900_pcm_dmamask;
323 if (!card->dev->coherent_dma_mask) 326 if (!card->dev->coherent_dma_mask)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index e6a6b991d05f..b2f5751edae3 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -366,9 +366,11 @@ static void omap_pcm_free_dma_buffers(struct snd_pcm *pcm)
366 } 366 }
367} 367}
368 368
369static int omap_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 369static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd)
370 struct snd_pcm *pcm)
371{ 370{
371 struct snd_card *card = rtd->card->snd_card;
372 struct snd_soc_dai *dai = rtd->cpu_dai;
373 struct snd_pcm *pcm = rtd->pcm;
372 int ret = 0; 374 int ret = 0;
373 375
374 if (!card->dev->dma_mask) 376 if (!card->dev->dma_mask)
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index 2ce0b2d891d5..d73d6f6fb12d 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -85,9 +85,11 @@ static struct snd_pcm_ops pxa2xx_pcm_ops = {
85 85
86static u64 pxa2xx_pcm_dmamask = DMA_BIT_MASK(32); 86static u64 pxa2xx_pcm_dmamask = DMA_BIT_MASK(32);
87 87
88static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 88static int pxa2xx_soc_pcm_new(struct snd_soc_pcm_runtime *rtd)
89 struct snd_pcm *pcm)
90{ 89{
90 struct snd_card *card = rtd->card->snd_card;
91 struct snd_soc_dai *dai = rtd->cpu_dai;
92 struct snd_pcm *pcm = rtd->pcm;
91 int ret = 0; 93 int ret = 0;
92 94
93 if (!card->dev->dma_mask) 95 if (!card->dev->dma_mask)
diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c
index ab3ccaec72d2..80c85fd64e1a 100644
--- a/sound/soc/s6000/s6000-pcm.c
+++ b/sound/soc/s6000/s6000-pcm.c
@@ -443,10 +443,11 @@ static void s6000_pcm_free(struct snd_pcm *pcm)
443 443
444static u64 s6000_pcm_dmamask = DMA_BIT_MASK(32); 444static u64 s6000_pcm_dmamask = DMA_BIT_MASK(32);
445 445
446static int s6000_pcm_new(struct snd_card *card, 446static int s6000_pcm_new(struct snd_soc_pcm_runtime *runtime)
447 struct snd_soc_dai *dai, struct snd_pcm *pcm)
448{ 447{
449 struct snd_soc_pcm_runtime *runtime = pcm->private_data; 448 struct snd_card *card = runtime->card->snd_card;
449 struct snd_soc_dai *dai = runtime->cpu_dai;
450 struct snd_pcm *pcm = runtime->pcm;
450 struct s6000_pcm_dma_params *params; 451 struct s6000_pcm_dma_params *params;
451 int res; 452 int res;
452 453
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index 5cb3b880f0d5..9465588b02f2 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -425,9 +425,11 @@ static void dma_free_dma_buffers(struct snd_pcm *pcm)
425 425
426static u64 dma_mask = DMA_BIT_MASK(32); 426static u64 dma_mask = DMA_BIT_MASK(32);
427 427
428static int dma_new(struct snd_card *card, 428static int dma_new(struct snd_soc_pcm_runtime *rtd)
429 struct snd_soc_dai *dai, struct snd_pcm *pcm)
430{ 429{
430 struct snd_card *card = rtd->card->snd_card;
431 struct snd_soc_dai *dai = rtd->cpu_dai;
432 struct snd_pcm *pcm = rtd->pcm;
431 int ret = 0; 433 int ret = 0;
432 434
433 pr_debug("Entered %s\n", __func__); 435 pr_debug("Entered %s\n", __func__);
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c
index c326d29992fe..db74005f37ce 100644
--- a/sound/soc/sh/dma-sh7760.c
+++ b/sound/soc/sh/dma-sh7760.c
@@ -327,10 +327,10 @@ static void camelot_pcm_free(struct snd_pcm *pcm)
327 snd_pcm_lib_preallocate_free_for_all(pcm); 327 snd_pcm_lib_preallocate_free_for_all(pcm);
328} 328}
329 329
330static int camelot_pcm_new(struct snd_card *card, 330static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd)
331 struct snd_soc_dai *dai,
332 struct snd_pcm *pcm)
333{ 331{
332 struct snd_pcm *pcm = rtd->pcm;
333
334 /* dont use SNDRV_DMA_TYPE_DEV, since it will oops the SH kernel 334 /* dont use SNDRV_DMA_TYPE_DEV, since it will oops the SH kernel
335 * in MMAP mode (i.e. aplay -M) 335 * in MMAP mode (i.e. aplay -M)
336 */ 336 */
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index d2f17cefa92f..8e112ccffb13 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1168,10 +1168,10 @@ static void fsi_pcm_free(struct snd_pcm *pcm)
1168 snd_pcm_lib_preallocate_free_for_all(pcm); 1168 snd_pcm_lib_preallocate_free_for_all(pcm);
1169} 1169}
1170 1170
1171static int fsi_pcm_new(struct snd_card *card, 1171static int fsi_pcm_new(struct snd_soc_pcm_runtime *rtd)
1172 struct snd_soc_dai *dai,
1173 struct snd_pcm *pcm)
1174{ 1172{
1173 struct snd_pcm *pcm = rtd->pcm;
1174
1175 /* 1175 /*
1176 * dont use SNDRV_DMA_TYPE_DEV, since it will oops the SH kernel 1176 * dont use SNDRV_DMA_TYPE_DEV, since it will oops the SH kernel
1177 * in MMAP mode (i.e. aplay -M) 1177 * in MMAP mode (i.e. aplay -M)
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index a423babcf145..f8f681690a71 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -527,10 +527,11 @@ static snd_pcm_uframes_t siu_pcm_pointer_dma(struct snd_pcm_substream *ss)
527 return bytes_to_frames(ss->runtime, ptr); 527 return bytes_to_frames(ss->runtime, ptr);
528} 528}
529 529
530static int siu_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 530static int siu_pcm_new(struct snd_soc_pcm_runtime *rtd)
531 struct snd_pcm *pcm)
532{ 531{
533 /* card->dev == socdev->dev, see snd_soc_new_pcms() */ 532 /* card->dev == socdev->dev, see snd_soc_new_pcms() */
533 struct snd_card *card = rtd->card->snd_card;
534 struct snd_pcm *pcm = rtd->pcm;
534 struct siu_info *info = siu_i2s_data; 535 struct siu_info *info = siu_i2s_data;
535 struct platform_device *pdev = to_platform_device(card->dev); 536 struct platform_device *pdev = to_platform_device(card->dev);
536 int ret; 537 int ret;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c53f5d589591..29bf9fbd3e29 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2143,8 +2143,7 @@ static int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
2143 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &soc_pcm_ops); 2143 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &soc_pcm_ops);
2144 2144
2145 if (platform->driver->pcm_new) { 2145 if (platform->driver->pcm_new) {
2146 ret = platform->driver->pcm_new(rtd->card->snd_card, 2146 ret = platform->driver->pcm_new(rtd);
2147 codec_dai, pcm);
2148 if (ret < 0) { 2147 if (ret < 0) {
2149 pr_err("asoc: platform pcm constructor failed\n"); 2148 pr_err("asoc: platform pcm constructor failed\n");
2150 return ret; 2149 return ret;
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
index 3c271f953582..ff86e5e3db68 100644
--- a/sound/soc/tegra/tegra_pcm.c
+++ b/sound/soc/tegra/tegra_pcm.c
@@ -322,9 +322,11 @@ static void tegra_pcm_deallocate_dma_buffer(struct snd_pcm *pcm, int stream)
322 322
323static u64 tegra_dma_mask = DMA_BIT_MASK(32); 323static u64 tegra_dma_mask = DMA_BIT_MASK(32);
324 324
325static int tegra_pcm_new(struct snd_card *card, 325static int tegra_pcm_new(struct snd_soc_pcm_runtime *rtd)
326 struct snd_soc_dai *dai, struct snd_pcm *pcm)
327{ 326{
327 struct snd_card *card = rtd->card->snd_card;
328 struct snd_soc_dai *dai = rtd->cpu_dai;
329 struct snd_pcm *pcm = rtd->pcm;
328 int ret = 0; 330 int ret = 0;
329 331
330 if (!card->dev->dma_mask) 332 if (!card->dev->dma_mask)
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c
index f4aa4e03c888..34aa972669ed 100644
--- a/sound/soc/txx9/txx9aclc.c
+++ b/sound/soc/txx9/txx9aclc.c
@@ -288,9 +288,10 @@ static void txx9aclc_pcm_free_dma_buffers(struct snd_pcm *pcm)
288 snd_pcm_lib_preallocate_free_for_all(pcm); 288 snd_pcm_lib_preallocate_free_for_all(pcm);
289} 289}
290 290
291static int txx9aclc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 291static int txx9aclc_pcm_new(struct snd_soc_pcm_runtime *rtd)
292 struct snd_pcm *pcm)
293{ 292{
293 struct snd_soc_dai *dai = rtd->cpu_dai;
294 struct snd_pcm *pcm = rtd->pcm;
294 struct platform_device *pdev = to_platform_device(dai->platform->dev); 295 struct platform_device *pdev = to_platform_device(dai->platform->dev);
295 struct txx9aclc_soc_device *dev; 296 struct txx9aclc_soc_device *dev;
296 struct resource *r; 297 struct resource *r;