Skip to content

Commit 8f54061

Browse files
rjarzmikbroonie
authored andcommitted
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>
1 parent 4f2bd18 commit 8f54061

4 files changed

Lines changed: 12 additions & 46 deletions

File tree

‎sound/arm/pxa2xx-ac97.c‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,28 +63,18 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
6363
.reset = pxa2xx_ac97_legacy_reset,
6464
};
6565

66-
static struct pxad_param pxa2xx_ac97_pcm_out_req = {
67-
.prio = PXAD_PRIO_LOWEST,
68-
.drcmr = 12,
69-
};
70-
7166
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_out = {
7267
.addr = __PREG(PCDR),
7368
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
69+
.chan_name = "pcm_pcm_stereo_out",
7470
.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,
8171
};
8272

8373
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_in = {
8474
.addr = __PREG(PCDR),
8575
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
76+
.chan_name = "pcm_pcm_stereo_in",
8677
.maxburst = 32,
87-
.filter_data = &pxa2xx_ac97_pcm_in_req,
8878
};
8979

9080
static struct snd_pcm *pxa2xx_ac97_pcm;

‎sound/arm/pxa2xx-pcm-lib.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream)
125125
if (ret < 0)
126126
return ret;
127127

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));
131131
}
132132
EXPORT_SYMBOL(__pxa2xx_pcm_open);
133133

‎sound/soc/pxa/pxa2xx-ac97.c‎

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -68,61 +68,39 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
6868
.reset = pxa2xx_ac97_cold_reset,
6969
};
7070

71-
static struct pxad_param pxa2xx_ac97_pcm_stereo_in_req = {
72-
.prio = PXAD_PRIO_LOWEST,
73-
.drcmr = 11,
74-
};
75-
7671
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = {
7772
.addr = __PREG(PCDR),
7873
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
74+
.chan_name = "pcm_pcm_stereo_in",
7975
.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,
8676
};
8777

8878
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_out = {
8979
.addr = __PREG(PCDR),
9080
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
81+
.chan_name = "pcm_pcm_stereo_out",
9182
.maxburst = 32,
92-
.filter_data = &pxa2xx_ac97_pcm_stereo_out_req,
9383
};
9484

95-
static struct pxad_param pxa2xx_ac97_pcm_aux_mono_out_req = {
96-
.prio = PXAD_PRIO_LOWEST,
97-
.drcmr = 10,
98-
};
9985
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_out = {
10086
.addr = __PREG(MODR),
10187
.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
88+
.chan_name = "pcm_aux_mono_out",
10289
.maxburst = 16,
103-
.filter_data = &pxa2xx_ac97_pcm_aux_mono_out_req,
10490
};
10591

106-
static struct pxad_param pxa2xx_ac97_pcm_aux_mono_in_req = {
107-
.prio = PXAD_PRIO_LOWEST,
108-
.drcmr = 9,
109-
};
11092
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_in = {
11193
.addr = __PREG(MODR),
11294
.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
95+
.chan_name = "pcm_aux_mono_in",
11396
.maxburst = 16,
114-
.filter_data = &pxa2xx_ac97_pcm_aux_mono_in_req,
11597
};
11698

117-
static struct pxad_param pxa2xx_ac97_pcm_aux_mic_mono_req = {
118-
.prio = PXAD_PRIO_LOWEST,
119-
.drcmr = 8,
120-
};
12199
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_mic_mono_in = {
122100
.addr = __PREG(MCDR),
123101
.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
102+
.chan_name = "pcm_aux_mic_mono",
124103
.maxburst = 16,
125-
.filter_data = &pxa2xx_ac97_pcm_aux_mic_mono_req,
126104
};
127105

128106
static int pxa2xx_ac97_hifi_startup(struct snd_pcm_substream *substream,

‎sound/soc/pxa/pxa2xx-i2s.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,18 @@ static struct pxa_i2s_port pxa_i2s;
8282
static struct clk *clk_i2s;
8383
static int clk_ena = 0;
8484

85-
static unsigned long pxa2xx_i2s_pcm_stereo_out_req = 3;
8685
static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
8786
.addr = __PREG(SADR),
8887
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
88+
.chan_name = "tx",
8989
.maxburst = 32,
90-
.filter_data = &pxa2xx_i2s_pcm_stereo_out_req,
9190
};
9291

93-
static unsigned long pxa2xx_i2s_pcm_stereo_in_req = 2;
9492
static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
9593
.addr = __PREG(SADR),
9694
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
95+
.chan_name = "rx",
9796
.maxburst = 32,
98-
.filter_data = &pxa2xx_i2s_pcm_stereo_in_req,
9997
};
10098

10199
static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,

0 commit comments

Comments
 (0)