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
@@ -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;
|
||||
|
Reference in New Issue
Block a user