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>
This commit is contained in:

committed by
Mark Brown

parent
f05cc9dac9
commit
bcd6da7bfd
@@ -267,9 +267,11 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream,
|
||||
}
|
||||
omap_mcpdm_open_streams(mcpdm);
|
||||
}
|
||||
|
||||
mutex_unlock(&mcpdm->mutex);
|
||||
|
||||
snd_soc_dai_set_dma_data(dai, substream,
|
||||
&omap_mcpdm_dai_dma_params[substream->stream]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -324,7 +326,7 @@ static int omap_mcpdm_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dma_data = &omap_mcpdm_dai_dma_params[stream];
|
||||
dma_data = snd_soc_dai_get_dma_data(dai, substream);
|
||||
|
||||
/* Configure McPDM channels, and DMA packet size */
|
||||
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
@@ -336,8 +338,6 @@ static int omap_mcpdm_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
dma_data->packet_size = mcpdm->up_threshold * channels;
|
||||
}
|
||||
|
||||
snd_soc_dai_set_dma_data(dai, substream, dma_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user