* [v3,09/14] ASoC: pxa: remove the dmaengine compat need
@ 2018-06-21 8:50 Robert Jarzmik
0 siblings, 0 replies; 3+ messages in thread
From: Robert Jarzmik @ 2018-06-21 8:50 UTC (permalink / raw)
To: Mark Brown, Daniel Mack
Cc: Haojian Zhuang, Bartlomiej Zolnierkiewicz, Tejun Heo, Vinod Koul,
Mauro Carvalho Chehab, Ulf Hansson, Miquel Raynal,
Boris Brezillon, David Woodhouse, Brian Norris, Marek Vasut,
Richard Weinberger, Nicolas Pitre, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, linux-arm-kernel, linux-kernel, linux-ide,
dmaengine, linux-media, linux-mmc, linux-mtd, netdev, alsa-devel
Daniel Mack <daniel@zonque.org> writes:
> Hi Mark,
>
> I prepared a series of patches for 4.18 that conflict with this one. Instead of
> letting other people resolve this down the road, I'd prefer if this one went
> through the ASoC tree, if you don't mind.
>
> I've talked to Robert off-list, and he's fine with this approach.
That's right.
I'll tentativaly queue this patch to my pxa/for-next tree. As soon as I hear
that Mark queued it up in his tree, I'll drop it from mine.
Cheers.
---
Robert
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* [v3,09/14] ASoC: pxa: remove the dmaengine compat need
@ 2018-06-17 18:17 Daniel Mack
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Mack @ 2018-06-17 18:17 UTC (permalink / raw)
To: Robert Jarzmik, Haojian Zhuang, Bartlomiej Zolnierkiewicz,
Tejun Heo, Vinod Koul, Mauro Carvalho Chehab, Ulf Hansson,
Miquel Raynal, Boris Brezillon, David Woodhouse, Brian Norris,
Marek Vasut, Richard Weinberger, Nicolas Pitre, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Mark Brown
Cc: linux-arm-kernel, linux-kernel, linux-ide, dmaengine, linux-media,
linux-mmc, linux-mtd, netdev, alsa-devel
Hi Mark,
I prepared a series of patches for 4.18 that conflict with this one.
Instead of letting other people resolve this down the road, I'd prefer
if this one went through the ASoC tree, if you don't mind.
I've talked to Robert off-list, and he's fine with this approach.
Thanks,
Daniel
On Sunday, June 17, 2018 07:02 PM, Robert Jarzmik wrote:
> 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>
> Reviewed-by: Daniel Mack <daniel@zonque.org>
> Acked-by: Mark Brown <broonie@kernel.org>
> ---
> sound/arm/pxa2xx-ac97.c | 14 ++------------
> sound/arm/pxa2xx-pcm-lib.c | 6 +++---
> sound/soc/pxa/pxa2xx-ac97.c | 32 +++++---------------------------
> sound/soc/pxa/pxa2xx-i2s.c | 6 ++----
> 4 files changed, 12 insertions(+), 46 deletions(-)
>
> diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
> index 4bc244c40f80..236a63cdaf9f 100644
> --- a/sound/arm/pxa2xx-ac97.c
> +++ b/sound/arm/pxa2xx-ac97.c
> @@ -63,28 +63,18 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
> .reset = pxa2xx_ac97_legacy_reset,
> };
>
> -static struct pxad_param pxa2xx_ac97_pcm_out_req = {
> - .prio = PXAD_PRIO_LOWEST,
> - .drcmr = 12,
> -};
> -
> static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_out = {
> .addr = __PREG(PCDR),
> .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
> + .chan_name = "pcm_pcm_stereo_out",
> .maxburst = 32,
> - .filter_data = &pxa2xx_ac97_pcm_out_req,
> -};
> -
> -static struct pxad_param pxa2xx_ac97_pcm_in_req = {
> - .prio = PXAD_PRIO_LOWEST,
> - .drcmr = 11,
> };
>
> static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_in = {
> .addr = __PREG(PCDR),
> .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
> + .chan_name = "pcm_pcm_stereo_in",
> .maxburst = 32,
> - .filter_data = &pxa2xx_ac97_pcm_in_req,
> };
>
> static struct snd_pcm *pxa2xx_ac97_pcm;
> diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
> index e8da3b8ee721..dcbe7ecc1835 100644
> --- a/sound/arm/pxa2xx-pcm-lib.c
> +++ b/sound/arm/pxa2xx-pcm-lib.c
> @@ -125,9 +125,9 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream)
> if (ret < 0)
> return ret;
>
> - return snd_dmaengine_pcm_open_request_chan(substream,
> - pxad_filter_fn,
> - dma_params->filter_data);
> + return snd_dmaengine_pcm_open(
> + substream, dma_request_slave_channel(rtd->cpu_dai->dev,
> + dma_params->chan_name));
> }
> EXPORT_SYMBOL(__pxa2xx_pcm_open);
>
> diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
> index 803818aabee9..1b41c0f2a8fb 100644
> --- a/sound/soc/pxa/pxa2xx-ac97.c
> +++ b/sound/soc/pxa/pxa2xx-ac97.c
> @@ -68,61 +68,39 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
> .reset = pxa2xx_ac97_cold_reset,
> };
>
> -static struct pxad_param pxa2xx_ac97_pcm_stereo_in_req = {
> - .prio = PXAD_PRIO_LOWEST,
> - .drcmr = 11,
> -};
> -
> static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = {
> .addr = __PREG(PCDR),
> .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
> + .chan_name = "pcm_pcm_stereo_in",
> .maxburst = 32,
> - .filter_data = &pxa2xx_ac97_pcm_stereo_in_req,
> -};
> -
> -static struct pxad_param pxa2xx_ac97_pcm_stereo_out_req = {
> - .prio = PXAD_PRIO_LOWEST,
> - .drcmr = 12,
> };
>
> static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_out = {
> .addr = __PREG(PCDR),
> .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
> + .chan_name = "pcm_pcm_stereo_out",
> .maxburst = 32,
> - .filter_data = &pxa2xx_ac97_pcm_stereo_out_req,
> };
>
> -static struct pxad_param pxa2xx_ac97_pcm_aux_mono_out_req = {
> - .prio = PXAD_PRIO_LOWEST,
> - .drcmr = 10,
> -};
> static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_out = {
> .addr = __PREG(MODR),
> .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
> + .chan_name = "pcm_aux_mono_out",
> .maxburst = 16,
> - .filter_data = &pxa2xx_ac97_pcm_aux_mono_out_req,
> };
>
> -static struct pxad_param pxa2xx_ac97_pcm_aux_mono_in_req = {
> - .prio = PXAD_PRIO_LOWEST,
> - .drcmr = 9,
> -};
> static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_in = {
> .addr = __PREG(MODR),
> .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
> + .chan_name = "pcm_aux_mono_in",
> .maxburst = 16,
> - .filter_data = &pxa2xx_ac97_pcm_aux_mono_in_req,
> };
>
> -static struct pxad_param pxa2xx_ac97_pcm_aux_mic_mono_req = {
> - .prio = PXAD_PRIO_LOWEST,
> - .drcmr = 8,
> -};
> static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_mic_mono_in = {
> .addr = __PREG(MCDR),
> .addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
> + .chan_name = "pcm_aux_mic_mono",
> .maxburst = 16,
> - .filter_data = &pxa2xx_ac97_pcm_aux_mic_mono_req,
> };
>
> static int pxa2xx_ac97_hifi_startup(struct snd_pcm_substream *substream,
> diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
> index 3fb60baf6eab..e7184de0de04 100644
> --- a/sound/soc/pxa/pxa2xx-i2s.c
> +++ b/sound/soc/pxa/pxa2xx-i2s.c
> @@ -82,20 +82,18 @@ static struct pxa_i2s_port pxa_i2s;
> static struct clk *clk_i2s;
> static int clk_ena = 0;
>
> -static unsigned long pxa2xx_i2s_pcm_stereo_out_req = 3;
> static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
> .addr = __PREG(SADR),
> .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
> + .chan_name = "tx",
> .maxburst = 32,
> - .filter_data = &pxa2xx_i2s_pcm_stereo_out_req,
> };
>
> -static unsigned long pxa2xx_i2s_pcm_stereo_in_req = 2;
> static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
> .addr = __PREG(SADR),
> .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
> + .chan_name = "rx",
> .maxburst = 32,
> - .filter_data = &pxa2xx_i2s_pcm_stereo_in_req,
> };
>
> static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
>
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread* [v3,09/14] ASoC: pxa: remove the dmaengine compat need
@ 2018-06-17 17:02 Robert Jarzmik
0 siblings, 0 replies; 3+ messages in thread
From: Robert Jarzmik @ 2018-06-17 17:02 UTC (permalink / raw)
To: Daniel Mack, Haojian Zhuang, Robert Jarzmik,
Bartlomiej Zolnierkiewicz, Tejun Heo, Vinod Koul,
Mauro Carvalho Chehab, Ulf Hansson, Miquel Raynal,
Boris Brezillon, David Woodhouse, Brian Norris, Marek Vasut,
Richard Weinberger, Nicolas Pitre, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, Mark Brown
Cc: linux-arm-kernel, linux-kernel, linux-ide, dmaengine, linux-media,
linux-mmc, linux-mtd, netdev, alsa-devel
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>
Reviewed-by: Daniel Mack <daniel@zonque.org>
Acked-by: Mark Brown <broonie@kernel.org>
---
sound/arm/pxa2xx-ac97.c | 14 ++------------
sound/arm/pxa2xx-pcm-lib.c | 6 +++---
sound/soc/pxa/pxa2xx-ac97.c | 32 +++++---------------------------
sound/soc/pxa/pxa2xx-i2s.c | 6 ++----
4 files changed, 12 insertions(+), 46 deletions(-)
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 4bc244c40f80..236a63cdaf9f 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -63,28 +63,18 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
.reset = pxa2xx_ac97_legacy_reset,
};
-static struct pxad_param pxa2xx_ac97_pcm_out_req = {
- .prio = PXAD_PRIO_LOWEST,
- .drcmr = 12,
-};
-
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_out = {
.addr = __PREG(PCDR),
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+ .chan_name = "pcm_pcm_stereo_out",
.maxburst = 32,
- .filter_data = &pxa2xx_ac97_pcm_out_req,
-};
-
-static struct pxad_param pxa2xx_ac97_pcm_in_req = {
- .prio = PXAD_PRIO_LOWEST,
- .drcmr = 11,
};
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_in = {
.addr = __PREG(PCDR),
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+ .chan_name = "pcm_pcm_stereo_in",
.maxburst = 32,
- .filter_data = &pxa2xx_ac97_pcm_in_req,
};
static struct snd_pcm *pxa2xx_ac97_pcm;
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index e8da3b8ee721..dcbe7ecc1835 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -125,9 +125,9 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream)
if (ret < 0)
return ret;
- return snd_dmaengine_pcm_open_request_chan(substream,
- pxad_filter_fn,
- dma_params->filter_data);
+ return snd_dmaengine_pcm_open(
+ substream, dma_request_slave_channel(rtd->cpu_dai->dev,
+ dma_params->chan_name));
}
EXPORT_SYMBOL(__pxa2xx_pcm_open);
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 803818aabee9..1b41c0f2a8fb 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -68,61 +68,39 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
.reset = pxa2xx_ac97_cold_reset,
};
-static struct pxad_param pxa2xx_ac97_pcm_stereo_in_req = {
- .prio = PXAD_PRIO_LOWEST,
- .drcmr = 11,
-};
-
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = {
.addr = __PREG(PCDR),
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+ .chan_name = "pcm_pcm_stereo_in",
.maxburst = 32,
- .filter_data = &pxa2xx_ac97_pcm_stereo_in_req,
-};
-
-static struct pxad_param pxa2xx_ac97_pcm_stereo_out_req = {
- .prio = PXAD_PRIO_LOWEST,
- .drcmr = 12,
};
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_out = {
.addr = __PREG(PCDR),
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+ .chan_name = "pcm_pcm_stereo_out",
.maxburst = 32,
- .filter_data = &pxa2xx_ac97_pcm_stereo_out_req,
};
-static struct pxad_param pxa2xx_ac97_pcm_aux_mono_out_req = {
- .prio = PXAD_PRIO_LOWEST,
- .drcmr = 10,
-};
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_out = {
.addr = __PREG(MODR),
.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
+ .chan_name = "pcm_aux_mono_out",
.maxburst = 16,
- .filter_data = &pxa2xx_ac97_pcm_aux_mono_out_req,
};
-static struct pxad_param pxa2xx_ac97_pcm_aux_mono_in_req = {
- .prio = PXAD_PRIO_LOWEST,
- .drcmr = 9,
-};
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_aux_mono_in = {
.addr = __PREG(MODR),
.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
+ .chan_name = "pcm_aux_mono_in",
.maxburst = 16,
- .filter_data = &pxa2xx_ac97_pcm_aux_mono_in_req,
};
-static struct pxad_param pxa2xx_ac97_pcm_aux_mic_mono_req = {
- .prio = PXAD_PRIO_LOWEST,
- .drcmr = 8,
-};
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_mic_mono_in = {
.addr = __PREG(MCDR),
.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
+ .chan_name = "pcm_aux_mic_mono",
.maxburst = 16,
- .filter_data = &pxa2xx_ac97_pcm_aux_mic_mono_req,
};
static int pxa2xx_ac97_hifi_startup(struct snd_pcm_substream *substream,
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 3fb60baf6eab..e7184de0de04 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -82,20 +82,18 @@ static struct pxa_i2s_port pxa_i2s;
static struct clk *clk_i2s;
static int clk_ena = 0;
-static unsigned long pxa2xx_i2s_pcm_stereo_out_req = 3;
static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_out = {
.addr = __PREG(SADR),
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+ .chan_name = "tx",
.maxburst = 32,
- .filter_data = &pxa2xx_i2s_pcm_stereo_out_req,
};
-static unsigned long pxa2xx_i2s_pcm_stereo_in_req = 2;
static struct snd_dmaengine_dai_dma_data pxa2xx_i2s_pcm_stereo_in = {
.addr = __PREG(SADR),
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
+ .chan_name = "rx",
.maxburst = 32,
- .filter_data = &pxa2xx_i2s_pcm_stereo_in_req,
};
static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-21 8:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-21 8:50 [v3,09/14] ASoC: pxa: remove the dmaengine compat need Robert Jarzmik
-- strict thread matches above, loose matches on Subject: below --
2018-06-17 18:17 Daniel Mack
2018-06-17 17:02 Robert Jarzmik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox