aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorJoachim Eastwood <joachim.eastwood@jotron.com>2011-12-31 20:14:24 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-20 08:58:25 -0500
commit6296914ccefe6efefee811436dd7cfad6545f2eb (patch)
tree9416880b5553cf4447e60c44bd40ba27357fc554 /sound/soc/fsl
parent3294c4c603a1c4ce00e5b8495e99dd3ba076f1e3 (diff)
ASoC: use proper defines for stream directions in pcm engines
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/fsl_dma.c10
-rw-r--r--sound/soc/fsl/mpc5200_dma.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 4f59bbaba48f..96bb92dd174c 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -311,23 +311,23 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd)
311 * should allocate a DMA buffer only for the streams that are valid. 311 * should allocate a DMA buffer only for the streams that are valid.
312 */ 312 */
313 313
314 if (pcm->streams[0].substream) { 314 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
315 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, 315 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
316 fsl_dma_hardware.buffer_bytes_max, 316 fsl_dma_hardware.buffer_bytes_max,
317 &pcm->streams[0].substream->dma_buffer); 317 &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
318 if (ret) { 318 if (ret) {
319 dev_err(card->dev, "can't alloc playback dma buffer\n"); 319 dev_err(card->dev, "can't alloc playback dma buffer\n");
320 return ret; 320 return ret;
321 } 321 }
322 } 322 }
323 323
324 if (pcm->streams[1].substream) { 324 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
325 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, 325 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
326 fsl_dma_hardware.buffer_bytes_max, 326 fsl_dma_hardware.buffer_bytes_max,
327 &pcm->streams[1].substream->dma_buffer); 327 &pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->dma_buffer);
328 if (ret) { 328 if (ret) {
329 dev_err(card->dev, "can't alloc capture dma buffer\n"); 329 dev_err(card->dev, "can't alloc capture dma buffer\n");
330 snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); 330 snd_dma_free_pages(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
331 return ret; 331 return ret;
332 } 332 }
333 } 333 }
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index e7803d34c425..2112e224a4ac 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -316,16 +316,16 @@ static int psc_dma_new(struct snd_soc_pcm_runtime *rtd)
316 if (!card->dev->coherent_dma_mask) 316 if (!card->dev->coherent_dma_mask)
317 card->dev->coherent_dma_mask = 0xffffffff; 317 card->dev->coherent_dma_mask = 0xffffffff;
318 318
319 if (pcm->streams[0].substream) { 319 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
320 rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev, 320 rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev,
321 size, &pcm->streams[0].substream->dma_buffer); 321 size, &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
322 if (rc) 322 if (rc)
323 goto playback_alloc_err; 323 goto playback_alloc_err;
324 } 324 }
325 325
326 if (pcm->streams[1].substream) { 326 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
327 rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev, 327 rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev,
328 size, &pcm->streams[1].substream->dma_buffer); 328 size, &pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->dma_buffer);
329 if (rc) 329 if (rc)
330 goto capture_alloc_err; 330 goto capture_alloc_err;
331 } 331 }
@@ -336,8 +336,8 @@ static int psc_dma_new(struct snd_soc_pcm_runtime *rtd)
336 return 0; 336 return 0;
337 337
338 capture_alloc_err: 338 capture_alloc_err:
339 if (pcm->streams[0].substream) 339 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream)
340 snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); 340 snd_dma_free_pages(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
341 341
342 playback_alloc_err: 342 playback_alloc_err:
343 dev_err(card->dev, "Cannot allocate buffer(s)\n"); 343 dev_err(card->dev, "Cannot allocate buffer(s)\n");