diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-09-14 08:05:57 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-22 11:13:02 -0400 |
commit | bcd6da7bfd1bc3e9d5f8887967ec3d550ce56c70 (patch) | |
tree | 185bd9cd57ba3dbf3e223fe83e6bbd1a7ed8a92f /sound/soc/omap/omap-mcpdm.c | |
parent | f05cc9dac99ac6403d057d2cccb3c754714d2f32 (diff) |
ASoC: OMAP: mcbsp, mcpdm, dmic, hdmi: Set dma_data at startup time
Set the dma_data for the stream (snd_soc_dai_set_dma_data) at dai_startup
time so omap-pcm will have access to the needed information regarding to
the DMA channel earlier.
This is needed for the clean dmaengine support.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap/omap-mcpdm.c')
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index 84743d47e687..775565032ce3 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -267,9 +267,11 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream, | |||
267 | } | 267 | } |
268 | omap_mcpdm_open_streams(mcpdm); | 268 | omap_mcpdm_open_streams(mcpdm); |
269 | } | 269 | } |
270 | |||
271 | mutex_unlock(&mcpdm->mutex); | 270 | mutex_unlock(&mcpdm->mutex); |
272 | 271 | ||
272 | snd_soc_dai_set_dma_data(dai, substream, | ||
273 | &omap_mcpdm_dai_dma_params[substream->stream]); | ||
274 | |||
273 | return 0; | 275 | return 0; |
274 | } | 276 | } |
275 | 277 | ||
@@ -324,7 +326,7 @@ static int omap_mcpdm_dai_hw_params(struct snd_pcm_substream *substream, | |||
324 | return -EINVAL; | 326 | return -EINVAL; |
325 | } | 327 | } |
326 | 328 | ||
327 | dma_data = &omap_mcpdm_dai_dma_params[stream]; | 329 | dma_data = snd_soc_dai_get_dma_data(dai, substream); |
328 | 330 | ||
329 | /* Configure McPDM channels, and DMA packet size */ | 331 | /* Configure McPDM channels, and DMA packet size */ |
330 | if (stream == SNDRV_PCM_STREAM_PLAYBACK) { | 332 | if (stream == SNDRV_PCM_STREAM_PLAYBACK) { |
@@ -336,8 +338,6 @@ static int omap_mcpdm_dai_hw_params(struct snd_pcm_substream *substream, | |||
336 | dma_data->packet_size = mcpdm->up_threshold * channels; | 338 | dma_data->packet_size = mcpdm->up_threshold * channels; |
337 | } | 339 | } |
338 | 340 | ||
339 | snd_soc_dai_set_dma_data(dai, substream, dma_data); | ||
340 | |||
341 | return 0; | 341 | return 0; |
342 | } | 342 | } |
343 | 343 | ||