diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2011-07-25 07:45:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-27 14:16:51 -0400 |
commit | 25942fdc824a709c48190356ed058ef7be19fb6a (patch) | |
tree | cbe6493284f15f9972a8718d8d7e44c62979ba35 /sound/soc/au1x/dbdma2.c | |
parent | adbc7a5a61ee9225e0b80d3f5719e05a88db2b4c (diff) |
ASoC: au1x: use substream stream info directly
PCM_TX/RX are the same as SNDRV_PCM_STREAM_PLAYBACK/CAPTURE. Use
them directly.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/au1x/dbdma2.c')
-rw-r--r-- | sound/soc/au1x/dbdma2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index fd5378f7dece..d7d04e26eee5 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c | |||
@@ -169,7 +169,7 @@ static int au1x_pcm_dbdma_realloc(struct au1xpsc_audio_dmadata *pcd, | |||
169 | 169 | ||
170 | au1x_pcm_dbdma_free(pcd); | 170 | au1x_pcm_dbdma_free(pcd); |
171 | 171 | ||
172 | if (stype == PCM_RX) | 172 | if (stype == SNDRV_PCM_STREAM_CAPTURE) |
173 | pcd->ddma_chan = au1xxx_dbdma_chan_alloc(pcd->ddma_id, | 173 | pcd->ddma_chan = au1xxx_dbdma_chan_alloc(pcd->ddma_id, |
174 | DSCR_CMD0_ALWAYS, | 174 | DSCR_CMD0_ALWAYS, |
175 | au1x_pcm_dmarx_cb, (void *)pcd); | 175 | au1x_pcm_dmarx_cb, (void *)pcd); |
@@ -198,7 +198,7 @@ static inline struct au1xpsc_audio_dmadata *to_dmadata(struct snd_pcm_substream | |||
198 | struct snd_soc_pcm_runtime *rtd = ss->private_data; | 198 | struct snd_soc_pcm_runtime *rtd = ss->private_data; |
199 | struct au1xpsc_audio_dmadata *pcd = | 199 | struct au1xpsc_audio_dmadata *pcd = |
200 | snd_soc_platform_get_drvdata(rtd->platform); | 200 | snd_soc_platform_get_drvdata(rtd->platform); |
201 | return &pcd[SUBSTREAM_TYPE(ss)]; | 201 | return &pcd[ss->stream]; |
202 | } | 202 | } |
203 | 203 | ||
204 | static int au1xpsc_pcm_hw_params(struct snd_pcm_substream *substream, | 204 | static int au1xpsc_pcm_hw_params(struct snd_pcm_substream *substream, |
@@ -212,7 +212,7 @@ static int au1xpsc_pcm_hw_params(struct snd_pcm_substream *substream, | |||
212 | if (ret < 0) | 212 | if (ret < 0) |
213 | goto out; | 213 | goto out; |
214 | 214 | ||
215 | stype = SUBSTREAM_TYPE(substream); | 215 | stype = substream->stream; |
216 | pcd = to_dmadata(substream); | 216 | pcd = to_dmadata(substream); |
217 | 217 | ||
218 | DBG("runtime->dma_area = 0x%08lx dma_addr_t = 0x%08lx dma_size = %d " | 218 | DBG("runtime->dma_area = 0x%08lx dma_addr_t = 0x%08lx dma_size = %d " |
@@ -255,7 +255,7 @@ static int au1xpsc_pcm_prepare(struct snd_pcm_substream *substream) | |||
255 | 255 | ||
256 | au1xxx_dbdma_reset(pcd->ddma_chan); | 256 | au1xxx_dbdma_reset(pcd->ddma_chan); |
257 | 257 | ||
258 | if (SUBSTREAM_TYPE(substream) == PCM_RX) { | 258 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
259 | au1x_pcm_queue_rx(pcd); | 259 | au1x_pcm_queue_rx(pcd); |
260 | au1x_pcm_queue_rx(pcd); | 260 | au1x_pcm_queue_rx(pcd); |
261 | } else { | 261 | } else { |
@@ -295,7 +295,7 @@ static int au1xpsc_pcm_open(struct snd_pcm_substream *substream) | |||
295 | { | 295 | { |
296 | struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream); | 296 | struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream); |
297 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 297 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
298 | int stype = SUBSTREAM_TYPE(substream), *dmaids; | 298 | int stype = substream->stream, *dmaids; |
299 | 299 | ||
300 | dmaids = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 300 | dmaids = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
301 | if (!dmaids) | 301 | if (!dmaids) |