Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: pxa: remove the dmaengine compat need

As the pxa architecture switched towards the dmaengine slave map, the
old compatibility mechanism to acquire the dma requestor line number and
priority are not needed anymore.

This patch simplifies the dma resource acquisition, using the more
generic function dma_request_slave_channel().

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Robert Jarzmik and committed by
Mark Brown
8f54061d 4f2bd18b

+12 -46
+2 -12
sound/arm/pxa2xx-ac97.c
··· 63 63 .reset = pxa2xx_ac97_legacy_reset, 64 64 }; 65 65 66 - static struct pxad_param pxa2xx_ac97_pcm_out_req = { 67 - .prio = PXAD_PRIO_LOWEST, 68 - .drcmr = 12, 69 - }; 70 - 71 66 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_out = { 72 67 .addr = __PREG(PCDR), 73 68 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 69 + .chan_name = "pcm_pcm_stereo_out", 74 70 .maxburst = 32, 75 - .filter_data = &pxa2xx_ac97_pcm_out_req, 76 - }; 77 - 78 - static struct pxad_param pxa2xx_ac97_pcm_in_req = { 79 - .prio = PXAD_PRIO_LOWEST, 80 - .drcmr = 11, 81 71 }; 82 72 83 73 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_in = { 84 74 .addr = __PREG(PCDR), 85 75 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 76 + .chan_name = "pcm_pcm_stereo_in", 86 77 .maxburst = 32, 87 - .filter_data = &pxa2xx_ac97_pcm_in_req, 88 78 }; 89 79 90 80 static struct snd_pcm *pxa2xx_ac97_pcm;
+3 -3
sound/arm/pxa2xx-pcm-lib.c
··· 125 125 if (ret < 0) 126 126 return ret; 127 127 128 - return snd_dmaengine_pcm_open_request_chan(substream, 129 - pxad_filter_fn, 130 - dma_params->filter_data); 128 + return snd_dmaengine_pcm_open( 129 + substream, dma_request_slave_channel(rtd->cpu_dai->dev, 130 + dma_params->chan_name)); 131 131 } 132 132 EXPORT_SYMBOL(__pxa2xx_pcm_open); 133 133
+5 -27
sound/soc/pxa/pxa2xx-ac97.c
··· 68 68 .reset = pxa2xx_ac97_cold_reset, 69 69 }; 70 70 71 - static struct pxad_param pxa2xx_ac97_pcm_stereo_in_req = { 72 - .prio = PXAD_PRIO_LOWEST, 73 - .drcmr = 11, 74 - }; 75 - 76 71 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = { 77 72 .addr = __PREG(PCDR), 78 73 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 74 + .chan_name = "pcm_pcm_stereo_in", 79 75 .maxburst = 32, 80 - .filter_data = &pxa2xx_ac97_pcm_stereo_in_req, 81 - }; 82 - 83 - static struct pxad_param pxa2xx_ac97_pcm_stereo_out_req = { 84 - .prio = PXAD_PRIO_LOWEST, 85 - .drcmr = 12, 86 76 }; 87 77 88 78 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_out = { 89 79 .addr = __PREG(PCDR), 90 80 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 81 + .chan_name = "pcm_pcm_stereo_out", 91 82 .maxburst = 32, 92 - .filter_data = &pxa2xx_ac97_pcm_stereo_out_req, 93 83 }; 94 84 95 - static struct pxad_param pxa2xx_ac97_pcm_aux_mono_out_req = { 96 - .prio = PXAD_PRIO_LOWEST, 97 - .drcmr = 10, 98 - }; 99 85 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_out = { 100 86 .addr = __PREG(MODR), 101 87 .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES, 88 + .chan_name = "pcm_aux_mono_out", 102 89 .maxburst = 16, 103 - .filter_data = &pxa2xx_ac97_pcm_aux_mono_out_req, 104 90 }; 105 91 106 - static struct pxad_param pxa2xx_ac97_pcm_aux_mono_in_req = { 107 - .prio = PXAD_PRIO_LOWEST, 108 - .drcmr = 9, 109 - }; 110 92 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_in = { 111 93 .addr = __PREG(MODR), 112 94 .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES, 95 + .chan_name = "pcm_aux_mono_in", 113 96 .maxburst = 16, 114 - .filter_data = &pxa2xx_ac97_pcm_aux_mono_in_req, 115 97 }; 116 98 117 - static struct pxad_param pxa2xx_ac97_pcm_aux_mic_mono_req = { 118 - .prio = PXAD_PRIO_LOWEST, 119 - .drcmr = 8, 120 - }; 121 99 static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_mic_mono_in = { 122 100 .addr = __PREG(MCDR), 123 101 .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES, 102 + .chan_name = "pcm_aux_mic_mono", 124 103 .maxburst = 16, 125 - .filter_data = &pxa2xx_ac97_pcm_aux_mic_mono_req, 126 104 }; 127 105 128 106 static int pxa2xx_ac97_hifi_startup(struct snd_pcm_substream *substream,
+2 -4
sound/soc/pxa/pxa2xx-i2s.c
··· 82 82 static struct clk *clk_i2s; 83 83 static int clk_ena = 0; 84 84 85 - static unsigned long pxa2xx_i2s_pcm_stereo_out_req = 3; 86 85 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = { 87 86 .addr = __PREG(SADR), 88 87 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 88 + .chan_name = "tx", 89 89 .maxburst = 32, 90 - .filter_data = &pxa2xx_i2s_pcm_stereo_out_req, 91 90 }; 92 91 93 - static unsigned long pxa2xx_i2s_pcm_stereo_in_req = 2; 94 92 static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = { 95 93 .addr = __PREG(SADR), 96 94 .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, 95 + .chan_name = "rx", 97 96 .maxburst = 32, 98 - .filter_data = &pxa2xx_i2s_pcm_stereo_in_req, 99 97 }; 100 98 101 99 static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,