aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/pxa-ssp.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-08-12 04:42:40 -0400
committerMark Brown <broonie@linaro.org>2013-08-15 06:29:07 -0400
commita671468d336bc6c482ab04e88e6eaf38532270ee (patch)
treef6f623ff3893f0c5f76ba543626c0057289cfce8 /sound/soc/pxa/pxa-ssp.c
parentd65a14587a9be853a887a1407db133df1fb68e29 (diff)
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: Daniel Mack <zonque@gmail.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/pxa/pxa-ssp.c')
-rw-r--r--sound/soc/pxa/pxa-ssp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index c0dcc3538e35..a3119a00d8fa 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -84,7 +84,6 @@ static void pxa_ssp_disable(struct ssp_device *ssp)
84static void pxa_ssp_set_dma_params(struct ssp_device *ssp, int width4, 84static void pxa_ssp_set_dma_params(struct ssp_device *ssp, int width4,
85 int out, struct snd_dmaengine_dai_dma_data *dma) 85 int out, struct snd_dmaengine_dai_dma_data *dma)
86{ 86{
87 dma->filter_data = out ? &ssp->drcmr_tx : &ssp->drcmr_rx;
88 dma->addr_width = width4 ? DMA_SLAVE_BUSWIDTH_4_BYTES : 87 dma->addr_width = width4 ? DMA_SLAVE_BUSWIDTH_4_BYTES :
89 DMA_SLAVE_BUSWIDTH_2_BYTES; 88 DMA_SLAVE_BUSWIDTH_2_BYTES;
90 dma->maxburst = 16; 89 dma->maxburst = 16;
@@ -107,6 +106,10 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
107 dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL); 106 dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL);
108 if (!dma) 107 if (!dma)
109 return -ENOMEM; 108 return -ENOMEM;
109
110 dma->filter_data = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ?
111 &ssp->drcmr_tx : &ssp->drcmr_rx;
112
110 snd_soc_dai_set_dma_data(cpu_dai, substream, dma); 113 snd_soc_dai_set_dma_data(cpu_dai, substream, dma);
111 114
112 return ret; 115 return ret;