aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/mpc5200_dma.c
diff options
context:
space:
mode:
authorJoachim Eastwood <joachim.eastwood@jotron.com>2012-01-01 02:14:24 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-20 13:58:25 +0000
commit6296914ccefe6efefee811436dd7cfad6545f2eb (patch)
tree9416880b5553cf4447e60c44bd40ba27357fc554 /sound/soc/fsl/mpc5200_dma.c
parentASoC: Convert WM8955 to table based DAPM and control init (diff)
downloadlinux-dev-6296914ccefe6efefee811436dd7cfad6545f2eb.tar.xz
linux-dev-6296914ccefe6efefee811436dd7cfad6545f2eb.zip
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/mpc5200_dma.c')
-rw-r--r--sound/soc/fsl/mpc5200_dma.c12
1 files changed, 6 insertions, 6 deletions
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)
if (!card->dev->coherent_dma_mask)
card->dev->coherent_dma_mask = 0xffffffff;
- if (pcm->streams[0].substream) {
+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev,
- size, &pcm->streams[0].substream->dma_buffer);
+ size, &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
if (rc)
goto playback_alloc_err;
}
- if (pcm->streams[1].substream) {
+ if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev,
- size, &pcm->streams[1].substream->dma_buffer);
+ size, &pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->dma_buffer);
if (rc)
goto capture_alloc_err;
}
@@ -336,8 +336,8 @@ static int psc_dma_new(struct snd_soc_pcm_runtime *rtd)
return 0;
capture_alloc_err:
- if (pcm->streams[0].substream)
- snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer);
+ if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream)
+ snd_dma_free_pages(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer);
playback_alloc_err:
dev_err(card->dev, "Cannot allocate buffer(s)\n");