diff options
author | Joachim Eastwood <joachim.eastwood@jotron.com> | 2012-01-01 02:14:24 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-20 13:58:25 +0000 |
commit | 6296914ccefe6efefee811436dd7cfad6545f2eb (patch) | |
tree | 9416880b5553cf4447e60c44bd40ba27357fc554 /sound/soc/fsl/fsl_dma.c | |
parent | 3294c4c603a1c4ce00e5b8495e99dd3ba076f1e3 (diff) | |
download | op-kernel-dev-6296914ccefe6efefee811436dd7cfad6545f2eb.zip op-kernel-dev-6296914ccefe6efefee811436dd7cfad6545f2eb.tar.gz |
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/fsl_dma.c')
-rw-r--r-- | sound/soc/fsl/fsl_dma.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 4f59bba..96bb92d 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) * should allocate a DMA buffer only for the streams that are valid. */ - if (pcm->streams[0].substream) { + if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, fsl_dma_hardware.buffer_bytes_max, - &pcm->streams[0].substream->dma_buffer); + &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer); if (ret) { dev_err(card->dev, "can't alloc playback dma buffer\n"); return ret; } } - if (pcm->streams[1].substream) { + if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, fsl_dma_hardware.buffer_bytes_max, - &pcm->streams[1].substream->dma_buffer); + &pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->dma_buffer); if (ret) { dev_err(card->dev, "can't alloc capture dma buffer\n"); - snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); + snd_dma_free_pages(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer); return ret; } } |