diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-09-14 14:05:57 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-22 17:13:02 +0200 |
commit | bcd6da7bfd1bc3e9d5f8887967ec3d550ce56c70 (patch) | |
tree | 185bd9cd57ba3dbf3e223fe83e6bbd1a7ed8a92f /sound/soc/omap/omap-mcbsp.c | |
parent | ASoC: omap-pcm, omap-dmic: Change the use of omap_pcm_dma_data->data_type (diff) | |
download | linux-bcd6da7bfd1bc3e9d5f8887967ec3d550ce56c70.tar.xz linux-bcd6da7bfd1bc3e9d5f8887967ec3d550ce56c70.zip |
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-mcbsp.c')
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index a23064644e58..fef2f5933bb2 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -151,6 +151,9 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 2); } + snd_soc_dai_set_dma_data(cpu_dai, substream, + &mcbsp->dma_data[substream->stream]); + return err; } @@ -228,7 +231,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, int pkt_size = 0; unsigned int format, div, framesize, master; - dma_data = &mcbsp->dma_data[substream->stream]; + dma_data = snd_soc_dai_get_dma_data(cpu_dai, substream); channels = params_channels(params); switch (params_format(params)) { @@ -277,8 +280,6 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, dma_data->packet_size = pkt_size; - snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); - if (mcbsp->configured) { /* McBSP already configured by another stream */ return 0; |