Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a671468d authored by Daniel Mack's avatar Daniel Mack Committed by Mark Brown
Browse files

ASoC: pxa: pxa-ssp: set dma filter data from startup hook



With the new dmaengine implementation, the filter_data parameter has
to be set earlier, from pxa_ssp_startup().

Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
Acked-by: default avatarMark Brown <broonie@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent d65a1458
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ static void pxa_ssp_disable(struct ssp_device *ssp)
static void pxa_ssp_set_dma_params(struct ssp_device *ssp, int width4,
			int out, struct snd_dmaengine_dai_dma_data *dma)
{
	dma->filter_data = out ? &ssp->drcmr_tx : &ssp->drcmr_rx;
	dma->addr_width = width4 ? DMA_SLAVE_BUSWIDTH_4_BYTES :
				   DMA_SLAVE_BUSWIDTH_2_BYTES;
	dma->maxburst = 16;
@@ -107,6 +106,10 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
	dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL);
	if (!dma)
		return -ENOMEM;

	dma->filter_data = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ?
				&ssp->drcmr_tx : &ssp->drcmr_rx;

	snd_soc_dai_set_dma_data(cpu_dai, substream, dma);

	return ret;