diff options
-rw-r--r-- | sound/soc/atmel/atmel-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-ac97-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-tdm-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/ep93xx/ep93xx-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/jz4740/jz4740-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood-dma.c | 5 | ||||
-rw-r--r-- | sound/soc/mid-x86/sst_platform.c | 5 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/samsung/dma.c | 5 | ||||
-rw-r--r-- | sound/soc/samsung/idma.c | 3 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 5 |
13 files changed, 25 insertions, 38 deletions
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index 60de05525c06..a21ff459e5d3 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c | |||
@@ -367,7 +367,6 @@ static u64 atmel_pcm_dmamask = 0xffffffff; | |||
367 | static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd) | 367 | static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd) |
368 | { | 368 | { |
369 | struct snd_card *card = rtd->card->snd_card; | 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 | struct snd_pcm *pcm = rtd->pcm; |
372 | int ret = 0; | 371 | int ret = 0; |
373 | 372 | ||
@@ -376,14 +375,14 @@ static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
376 | if (!card->dev->coherent_dma_mask) | 375 | if (!card->dev->coherent_dma_mask) |
377 | card->dev->coherent_dma_mask = 0xffffffff; | 376 | card->dev->coherent_dma_mask = 0xffffffff; |
378 | 377 | ||
379 | if (dai->driver->playback.channels_min) { | 378 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
380 | ret = atmel_pcm_preallocate_dma_buffer(pcm, | 379 | ret = atmel_pcm_preallocate_dma_buffer(pcm, |
381 | SNDRV_PCM_STREAM_PLAYBACK); | 380 | SNDRV_PCM_STREAM_PLAYBACK); |
382 | if (ret) | 381 | if (ret) |
383 | goto out; | 382 | goto out; |
384 | } | 383 | } |
385 | 384 | ||
386 | if (dai->driver->capture.channels_min) { | 385 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
387 | pr_debug("atmel-pcm:" | 386 | pr_debug("atmel-pcm:" |
388 | "Allocating PCM capture DMA buffer\n"); | 387 | "Allocating PCM capture DMA buffer\n"); |
389 | ret = atmel_pcm_preallocate_dma_buffer(pcm, | 388 | ret = atmel_pcm_preallocate_dma_buffer(pcm, |
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c index fcff58390848..d7dc9bde0976 100644 --- a/sound/soc/blackfin/bf5xx-ac97-pcm.c +++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c | |||
@@ -421,7 +421,6 @@ static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | |||
421 | static int bf5xx_pcm_ac97_new(struct snd_soc_pcm_runtime *rtd) | 421 | static int bf5xx_pcm_ac97_new(struct snd_soc_pcm_runtime *rtd) |
422 | { | 422 | { |
423 | struct snd_card *card = rtd->card->snd_card; | 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 | struct snd_pcm *pcm = rtd->pcm; |
426 | int ret = 0; | 425 | int ret = 0; |
427 | 426 | ||
@@ -431,14 +430,14 @@ static int bf5xx_pcm_ac97_new(struct snd_soc_pcm_runtime *rtd) | |||
431 | if (!card->dev->coherent_dma_mask) | 430 | if (!card->dev->coherent_dma_mask) |
432 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 431 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
433 | 432 | ||
434 | if (dai->driver->playback.channels_min) { | 433 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
435 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 434 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
436 | SNDRV_PCM_STREAM_PLAYBACK); | 435 | SNDRV_PCM_STREAM_PLAYBACK); |
437 | if (ret) | 436 | if (ret) |
438 | goto out; | 437 | goto out; |
439 | } | 438 | } |
440 | 439 | ||
441 | if (dai->driver->capture.channels_min) { | 440 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
442 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 441 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
443 | SNDRV_PCM_STREAM_CAPTURE); | 442 | SNDRV_PCM_STREAM_CAPTURE); |
444 | if (ret) | 443 | if (ret) |
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index 6ec3d41b9b6d..63205d723eab 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c | |||
@@ -260,7 +260,6 @@ static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | |||
260 | static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) | 260 | static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) |
261 | { | 261 | { |
262 | struct snd_card *card = rtd->card->snd_card; | 262 | struct snd_card *card = rtd->card->snd_card; |
263 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
264 | struct snd_pcm *pcm = rtd->pcm; | 263 | struct snd_pcm *pcm = rtd->pcm; |
265 | int ret = 0; | 264 | int ret = 0; |
266 | 265 | ||
@@ -270,14 +269,14 @@ static int bf5xx_pcm_i2s_new(struct snd_soc_pcm_runtime *rtd) | |||
270 | if (!card->dev->coherent_dma_mask) | 269 | if (!card->dev->coherent_dma_mask) |
271 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 270 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
272 | 271 | ||
273 | if (dai->driver->playback.channels_min) { | 272 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
274 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 273 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
275 | SNDRV_PCM_STREAM_PLAYBACK); | 274 | SNDRV_PCM_STREAM_PLAYBACK); |
276 | if (ret) | 275 | if (ret) |
277 | goto out; | 276 | goto out; |
278 | } | 277 | } |
279 | 278 | ||
280 | if (dai->driver->capture.channels_min) { | 279 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
281 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 280 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
282 | SNDRV_PCM_STREAM_CAPTURE); | 281 | SNDRV_PCM_STREAM_CAPTURE); |
283 | if (ret) | 282 | if (ret) |
diff --git a/sound/soc/blackfin/bf5xx-tdm-pcm.c b/sound/soc/blackfin/bf5xx-tdm-pcm.c index 4406f9a865ae..254490cf1876 100644 --- a/sound/soc/blackfin/bf5xx-tdm-pcm.c +++ b/sound/soc/blackfin/bf5xx-tdm-pcm.c | |||
@@ -286,7 +286,6 @@ static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32); | |||
286 | static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd) | 286 | static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd) |
287 | { | 287 | { |
288 | struct snd_card *card = rtd->card->snd_card; | 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 | struct snd_pcm *pcm = rtd->pcm; |
291 | int ret = 0; | 290 | int ret = 0; |
292 | 291 | ||
@@ -295,14 +294,14 @@ static int bf5xx_pcm_tdm_new(struct snd_soc_pcm_runtime *rtd) | |||
295 | if (!card->dev->coherent_dma_mask) | 294 | if (!card->dev->coherent_dma_mask) |
296 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 295 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
297 | 296 | ||
298 | if (dai->driver->playback.channels_min) { | 297 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
299 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 298 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
300 | SNDRV_PCM_STREAM_PLAYBACK); | 299 | SNDRV_PCM_STREAM_PLAYBACK); |
301 | if (ret) | 300 | if (ret) |
302 | goto out; | 301 | goto out; |
303 | } | 302 | } |
304 | 303 | ||
305 | if (dai->driver->capture.channels_min) { | 304 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
306 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, | 305 | ret = bf5xx_pcm_preallocate_dma_buffer(pcm, |
307 | SNDRV_PCM_STREAM_CAPTURE); | 306 | SNDRV_PCM_STREAM_CAPTURE); |
308 | if (ret) | 307 | if (ret) |
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index 65bff3d30dd7..b26401f87b85 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c | |||
@@ -831,7 +831,6 @@ static u64 davinci_pcm_dmamask = 0xffffffff; | |||
831 | static int davinci_pcm_new(struct snd_soc_pcm_runtime *rtd) | 831 | static int davinci_pcm_new(struct snd_soc_pcm_runtime *rtd) |
832 | { | 832 | { |
833 | struct snd_card *card = rtd->card->snd_card; | 833 | struct snd_card *card = rtd->card->snd_card; |
834 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
835 | struct snd_pcm *pcm = rtd->pcm; | 834 | struct snd_pcm *pcm = rtd->pcm; |
836 | int ret; | 835 | int ret; |
837 | 836 | ||
@@ -840,7 +839,7 @@ static int davinci_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
840 | if (!card->dev->coherent_dma_mask) | 839 | if (!card->dev->coherent_dma_mask) |
841 | card->dev->coherent_dma_mask = 0xffffffff; | 840 | card->dev->coherent_dma_mask = 0xffffffff; |
842 | 841 | ||
843 | if (dai->driver->playback.channels_min) { | 842 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
844 | ret = davinci_pcm_preallocate_dma_buffer(pcm, | 843 | ret = davinci_pcm_preallocate_dma_buffer(pcm, |
845 | SNDRV_PCM_STREAM_PLAYBACK, | 844 | SNDRV_PCM_STREAM_PLAYBACK, |
846 | pcm_hardware_playback.buffer_bytes_max); | 845 | pcm_hardware_playback.buffer_bytes_max); |
@@ -848,7 +847,7 @@ static int davinci_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
848 | return ret; | 847 | return ret; |
849 | } | 848 | } |
850 | 849 | ||
851 | if (dai->driver->capture.channels_min) { | 850 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
852 | ret = davinci_pcm_preallocate_dma_buffer(pcm, | 851 | ret = davinci_pcm_preallocate_dma_buffer(pcm, |
853 | SNDRV_PCM_STREAM_CAPTURE, | 852 | SNDRV_PCM_STREAM_CAPTURE, |
854 | pcm_hardware_capture.buffer_bytes_max); | 853 | pcm_hardware_capture.buffer_bytes_max); |
diff --git a/sound/soc/ep93xx/ep93xx-pcm.c b/sound/soc/ep93xx/ep93xx-pcm.c index a2de9c42b702..3fc96130d1a6 100644 --- a/sound/soc/ep93xx/ep93xx-pcm.c +++ b/sound/soc/ep93xx/ep93xx-pcm.c | |||
@@ -286,7 +286,6 @@ static u64 ep93xx_pcm_dmamask = 0xffffffff; | |||
286 | static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd) | 286 | static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd) |
287 | { | 287 | { |
288 | struct snd_card *card = rtd->card->snd_card; | 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 | struct snd_pcm *pcm = rtd->pcm; |
291 | int ret = 0; | 290 | int ret = 0; |
292 | 291 | ||
@@ -295,14 +294,14 @@ static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
295 | if (!card->dev->coherent_dma_mask) | 294 | if (!card->dev->coherent_dma_mask) |
296 | card->dev->coherent_dma_mask = 0xffffffff; | 295 | card->dev->coherent_dma_mask = 0xffffffff; |
297 | 296 | ||
298 | if (dai->driver->playback.channels_min) { | 297 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
299 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, | 298 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, |
300 | SNDRV_PCM_STREAM_PLAYBACK); | 299 | SNDRV_PCM_STREAM_PLAYBACK); |
301 | if (ret) | 300 | if (ret) |
302 | return ret; | 301 | return ret; |
303 | } | 302 | } |
304 | 303 | ||
305 | if (dai->driver->capture.channels_min) { | 304 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
306 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, | 305 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, |
307 | SNDRV_PCM_STREAM_CAPTURE); | 306 | SNDRV_PCM_STREAM_CAPTURE); |
308 | if (ret) | 307 | if (ret) |
diff --git a/sound/soc/jz4740/jz4740-pcm.c b/sound/soc/jz4740/jz4740-pcm.c index 50cda9ea9156..9b8cf256847d 100644 --- a/sound/soc/jz4740/jz4740-pcm.c +++ b/sound/soc/jz4740/jz4740-pcm.c | |||
@@ -302,7 +302,6 @@ static u64 jz4740_pcm_dmamask = DMA_BIT_MASK(32); | |||
302 | static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) | 302 | static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) |
303 | { | 303 | { |
304 | struct snd_card *card = rtd->card->snd_card; | 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 | struct snd_pcm *pcm = rtd->pcm; |
307 | int ret = 0; | 306 | int ret = 0; |
308 | 307 | ||
@@ -312,14 +311,14 @@ static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
312 | if (!card->dev->coherent_dma_mask) | 311 | if (!card->dev->coherent_dma_mask) |
313 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 312 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
314 | 313 | ||
315 | if (dai->driver->playback.channels_min) { | 314 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
316 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, | 315 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, |
317 | SNDRV_PCM_STREAM_PLAYBACK); | 316 | SNDRV_PCM_STREAM_PLAYBACK); |
318 | if (ret) | 317 | if (ret) |
319 | goto err; | 318 | goto err; |
320 | } | 319 | } |
321 | 320 | ||
322 | if (dai->driver->capture.channels_min) { | 321 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
323 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, | 322 | ret = jz4740_pcm_preallocate_dma_buffer(pcm, |
324 | SNDRV_PCM_STREAM_CAPTURE); | 323 | SNDRV_PCM_STREAM_CAPTURE); |
325 | if (ret) | 324 | if (ret) |
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c index 210438261a49..d4a17780cef4 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c | |||
@@ -315,7 +315,6 @@ static int kirkwood_dma_preallocate_dma_buffer(struct snd_pcm *pcm, | |||
315 | static int kirkwood_dma_new(struct snd_soc_pcm_runtime *rtd) | 315 | static int kirkwood_dma_new(struct snd_soc_pcm_runtime *rtd) |
316 | { | 316 | { |
317 | struct snd_card *card = rtd->card->snd_card; | 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 | struct snd_pcm *pcm = rtd->pcm; |
320 | int ret; | 319 | int ret; |
321 | 320 | ||
@@ -324,14 +323,14 @@ static int kirkwood_dma_new(struct snd_soc_pcm_runtime *rtd) | |||
324 | if (!card->dev->coherent_dma_mask) | 323 | if (!card->dev->coherent_dma_mask) |
325 | card->dev->coherent_dma_mask = 0xffffffff; | 324 | card->dev->coherent_dma_mask = 0xffffffff; |
326 | 325 | ||
327 | if (dai->driver->playback.channels_min) { | 326 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
328 | ret = kirkwood_dma_preallocate_dma_buffer(pcm, | 327 | ret = kirkwood_dma_preallocate_dma_buffer(pcm, |
329 | SNDRV_PCM_STREAM_PLAYBACK); | 328 | SNDRV_PCM_STREAM_PLAYBACK); |
330 | if (ret) | 329 | if (ret) |
331 | return ret; | 330 | return ret; |
332 | } | 331 | } |
333 | 332 | ||
334 | if (dai->driver->capture.channels_min) { | 333 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
335 | ret = kirkwood_dma_preallocate_dma_buffer(pcm, | 334 | ret = kirkwood_dma_preallocate_dma_buffer(pcm, |
336 | SNDRV_PCM_STREAM_CAPTURE); | 335 | SNDRV_PCM_STREAM_CAPTURE); |
337 | if (ret) | 336 | if (ret) |
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index c2bf172a196e..d34563b12c3b 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c | |||
@@ -446,13 +446,12 @@ static void sst_pcm_free(struct snd_pcm *pcm) | |||
446 | 446 | ||
447 | static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd) | 447 | static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd) |
448 | { | 448 | { |
449 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
450 | struct snd_pcm *pcm = rtd->pcm; | 449 | struct snd_pcm *pcm = rtd->pcm; |
451 | int retval = 0; | 450 | int retval = 0; |
452 | 451 | ||
453 | pr_debug("sst_pcm_new called\n"); | 452 | pr_debug("sst_pcm_new called\n"); |
454 | if (dai->driver->playback.channels_min || | 453 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream || |
455 | dai->driver->capture.channels_min) { | 454 | pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
456 | retval = snd_pcm_lib_preallocate_pages_for_all(pcm, | 455 | retval = snd_pcm_lib_preallocate_pages_for_all(pcm, |
457 | SNDRV_DMA_TYPE_CONTINUOUS, | 456 | SNDRV_DMA_TYPE_CONTINUOUS, |
458 | snd_dma_continuous_data(GFP_KERNEL), | 457 | snd_dma_continuous_data(GFP_KERNEL), |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 52a0f634948e..a59bd352d342 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -378,7 +378,6 @@ static void omap_pcm_free_dma_buffers(struct snd_pcm *pcm) | |||
378 | static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) | 378 | static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) |
379 | { | 379 | { |
380 | struct snd_card *card = rtd->card->snd_card; | 380 | struct snd_card *card = rtd->card->snd_card; |
381 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
382 | struct snd_pcm *pcm = rtd->pcm; | 381 | struct snd_pcm *pcm = rtd->pcm; |
383 | int ret = 0; | 382 | int ret = 0; |
384 | 383 | ||
@@ -387,14 +386,14 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
387 | if (!card->dev->coherent_dma_mask) | 386 | if (!card->dev->coherent_dma_mask) |
388 | card->dev->coherent_dma_mask = DMA_BIT_MASK(64); | 387 | card->dev->coherent_dma_mask = DMA_BIT_MASK(64); |
389 | 388 | ||
390 | if (dai->driver->playback.channels_min) { | 389 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
391 | ret = omap_pcm_preallocate_dma_buffer(pcm, | 390 | ret = omap_pcm_preallocate_dma_buffer(pcm, |
392 | SNDRV_PCM_STREAM_PLAYBACK); | 391 | SNDRV_PCM_STREAM_PLAYBACK); |
393 | if (ret) | 392 | if (ret) |
394 | goto out; | 393 | goto out; |
395 | } | 394 | } |
396 | 395 | ||
397 | if (dai->driver->capture.channels_min) { | 396 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
398 | ret = omap_pcm_preallocate_dma_buffer(pcm, | 397 | ret = omap_pcm_preallocate_dma_buffer(pcm, |
399 | SNDRV_PCM_STREAM_CAPTURE); | 398 | SNDRV_PCM_STREAM_CAPTURE); |
400 | if (ret) | 399 | if (ret) |
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index 797c3d5e79e5..427ae0d9817b 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c | |||
@@ -403,7 +403,6 @@ static u64 dma_mask = DMA_BIT_MASK(32); | |||
403 | static int dma_new(struct snd_soc_pcm_runtime *rtd) | 403 | static int dma_new(struct snd_soc_pcm_runtime *rtd) |
404 | { | 404 | { |
405 | struct snd_card *card = rtd->card->snd_card; | 405 | struct snd_card *card = rtd->card->snd_card; |
406 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
407 | struct snd_pcm *pcm = rtd->pcm; | 406 | struct snd_pcm *pcm = rtd->pcm; |
408 | int ret = 0; | 407 | int ret = 0; |
409 | 408 | ||
@@ -414,14 +413,14 @@ static int dma_new(struct snd_soc_pcm_runtime *rtd) | |||
414 | if (!card->dev->coherent_dma_mask) | 413 | if (!card->dev->coherent_dma_mask) |
415 | card->dev->coherent_dma_mask = 0xffffffff; | 414 | card->dev->coherent_dma_mask = 0xffffffff; |
416 | 415 | ||
417 | if (dai->driver->playback.channels_min) { | 416 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
418 | ret = preallocate_dma_buffer(pcm, | 417 | ret = preallocate_dma_buffer(pcm, |
419 | SNDRV_PCM_STREAM_PLAYBACK); | 418 | SNDRV_PCM_STREAM_PLAYBACK); |
420 | if (ret) | 419 | if (ret) |
421 | goto out; | 420 | goto out; |
422 | } | 421 | } |
423 | 422 | ||
424 | if (dai->driver->capture.channels_min) { | 423 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
425 | ret = preallocate_dma_buffer(pcm, | 424 | ret = preallocate_dma_buffer(pcm, |
426 | SNDRV_PCM_STREAM_CAPTURE); | 425 | SNDRV_PCM_STREAM_CAPTURE); |
427 | if (ret) | 426 | if (ret) |
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index 2bcf75815624..3ba6aba8e2b9 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c | |||
@@ -387,7 +387,6 @@ static u64 idma_mask = DMA_BIT_MASK(32); | |||
387 | static int idma_new(struct snd_soc_pcm_runtime *rtd) | 387 | static int idma_new(struct snd_soc_pcm_runtime *rtd) |
388 | { | 388 | { |
389 | struct snd_card *card = rtd->card->snd_card; | 389 | struct snd_card *card = rtd->card->snd_card; |
390 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
391 | struct snd_pcm *pcm = rtd->pcm; | 390 | struct snd_pcm *pcm = rtd->pcm; |
392 | int ret = 0; | 391 | int ret = 0; |
393 | 392 | ||
@@ -396,7 +395,7 @@ static int idma_new(struct snd_soc_pcm_runtime *rtd) | |||
396 | if (!card->dev->coherent_dma_mask) | 395 | if (!card->dev->coherent_dma_mask) |
397 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 396 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
398 | 397 | ||
399 | if (dai->driver->playback.channels_min) | 398 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
400 | ret = preallocate_idma_buffer(pcm, | 399 | ret = preallocate_idma_buffer(pcm, |
401 | SNDRV_PCM_STREAM_PLAYBACK); | 400 | SNDRV_PCM_STREAM_PLAYBACK); |
402 | 401 | ||
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 90345ee138f3..c22431516ab2 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c | |||
@@ -330,7 +330,6 @@ static u64 tegra_dma_mask = DMA_BIT_MASK(32); | |||
330 | static int tegra_pcm_new(struct snd_soc_pcm_runtime *rtd) | 330 | static int tegra_pcm_new(struct snd_soc_pcm_runtime *rtd) |
331 | { | 331 | { |
332 | struct snd_card *card = rtd->card->snd_card; | 332 | struct snd_card *card = rtd->card->snd_card; |
333 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
334 | struct snd_pcm *pcm = rtd->pcm; | 333 | struct snd_pcm *pcm = rtd->pcm; |
335 | int ret = 0; | 334 | int ret = 0; |
336 | 335 | ||
@@ -339,14 +338,14 @@ static int tegra_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
339 | if (!card->dev->coherent_dma_mask) | 338 | if (!card->dev->coherent_dma_mask) |
340 | card->dev->coherent_dma_mask = 0xffffffff; | 339 | card->dev->coherent_dma_mask = 0xffffffff; |
341 | 340 | ||
342 | if (dai->driver->playback.channels_min) { | 341 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
343 | ret = tegra_pcm_preallocate_dma_buffer(pcm, | 342 | ret = tegra_pcm_preallocate_dma_buffer(pcm, |
344 | SNDRV_PCM_STREAM_PLAYBACK); | 343 | SNDRV_PCM_STREAM_PLAYBACK); |
345 | if (ret) | 344 | if (ret) |
346 | goto err; | 345 | goto err; |
347 | } | 346 | } |
348 | 347 | ||
349 | if (dai->driver->capture.channels_min) { | 348 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
350 | ret = tegra_pcm_preallocate_dma_buffer(pcm, | 349 | ret = tegra_pcm_preallocate_dma_buffer(pcm, |
351 | SNDRV_PCM_STREAM_CAPTURE); | 350 | SNDRV_PCM_STREAM_CAPTURE); |
352 | if (ret) | 351 | if (ret) |