mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan()
@ 2026-09-15 10:04 Andy Shevchenko
  2026-09-15 10:04 ` [PATCH v1 1/7] ASoC: stm32: spdifrx: Drop mention of the deprecated and unused call Andy Shevchenko
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

Convert the last users (mostly in ASoC) to use dma_request_chan() and
drop deprecated dma_request_slave_channel() completely.

I think the best is to allow Mark to take the whole lot and provide an
immutable tag or branch to others (DMAengine and GPIB).

Andy Shevchenko (7):
  ASoC: stm32: spdifrx: Drop mention of the deprecated and unused call
  ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan()
  ASoC: soc-generic-dmaengine-pcm: Replace dma_request_slave_channel()
    by dma_request_chan()
  ASoC: pxa: Replace dma_request_slave_channel() by dma_request_chan()
  ASoC: fsl_asrc: Replace dma_request_slave_channel() by
    dma_request_chan()
  gpib: fmh_gpib: Replace dma_request_slave_channel() by
    dma_request_chan()
  dmaengine: Remove deprecated dma_request_slave_channel()

 drivers/gpib/fmh_gpib/fmh_gpib.c      |  7 ++++---
 include/linux/dmaengine.h             |  9 ---------
 sound/soc/fsl/fsl_asrc.c              |  2 +-
 sound/soc/fsl/fsl_asrc_dma.c          | 13 +++++++------
 sound/soc/fsl/fsl_asrc_m2m.c          |  8 ++++----
 sound/soc/fsl/fsl_easrc.c             |  2 +-
 sound/soc/pxa/pxa2xx-pcm-lib.c        | 10 +++++++---
 sound/soc/soc-generic-dmaengine-pcm.c |  8 +++++---
 sound/soc/sprd/sprd-pcm-compress.c    |  7 +++----
 sound/soc/sprd/sprd-pcm-dma.c         |  7 +++----
 sound/soc/stm/stm32_spdifrx.c         |  2 +-
 11 files changed, 36 insertions(+), 39 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 1/7] ASoC: stm32: spdifrx: Drop mention of the deprecated and unused call
  2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
@ 2026-09-15 10:04 ` Andy Shevchenko
  2026-09-15 10:04 ` [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan() Andy Shevchenko
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

The error message was not updated while driver moved from the
deprecated dma_request_slave_channel() to the dma_request_chan().
Update the message by replacing it with the correct function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/stm/stm32_spdifrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
index e0fef47a227e..0ece54740773 100644
--- a/sound/soc/stm/stm32_spdifrx.c
+++ b/sound/soc/stm/stm32_spdifrx.c
@@ -400,7 +400,7 @@ static int stm32_spdifrx_dma_ctrl_register(struct device *dev,
 	spdifrx->ctrl_chan = dma_request_chan(dev, "rx-ctrl");
 	if (IS_ERR(spdifrx->ctrl_chan))
 		return dev_err_probe(dev, PTR_ERR(spdifrx->ctrl_chan),
-				     "dma_request_slave_channel error\n");
+				     "dma_request_chan error\n");
 
 	spdifrx->dmab = devm_kzalloc(dev, sizeof(struct snd_dma_buffer),
 				     GFP_KERNEL);
-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
  2026-09-15 10:04 ` [PATCH v1 1/7] ASoC: stm32: spdifrx: Drop mention of the deprecated and unused call Andy Shevchenko
@ 2026-09-15 10:04 ` Andy Shevchenko
  2026-09-15 10:54   ` Baolin Wang
  2026-09-15 17:35   ` Mark Brown
  2026-09-15 10:04 ` [PATCH v1 3/7] ASoC: soc-generic-dmaengine-pcm: " Andy Shevchenko
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/sprd/sprd-pcm-compress.c | 7 +++----
 sound/soc/sprd/sprd-pcm-dma.c      | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sprd/sprd-pcm-compress.c b/sound/soc/sprd/sprd-pcm-compress.c
index e5249924b54d..5613c25fffd7 100644
--- a/sound/soc/sprd/sprd-pcm-compress.c
+++ b/sound/soc/sprd/sprd-pcm-compress.c
@@ -153,11 +153,10 @@ static int sprd_platform_compr_dma_config(struct snd_soc_component *component,
 		return -EINVAL;
 	}
 
-	dma->chan = dma_request_slave_channel(dev,
-					      dma_params->chan_name[channel]);
-	if (!dma->chan) {
+	dma->chan = dma_request_chan(dev, dma_params->chan_name[channel]);
+	if (IS_ERR(dma->chan)) {
 		dev_err(dev, "failed to request dma channel\n");
-		return -ENODEV;
+		return PTR_ERR(dma->chan);
 	}
 
 	sgt = sg = kzalloc_objs(*sg, sg_num);
diff --git a/sound/soc/sprd/sprd-pcm-dma.c b/sound/soc/sprd/sprd-pcm-dma.c
index f509a4601de2..1586eff61120 100644
--- a/sound/soc/sprd/sprd-pcm-dma.c
+++ b/sound/soc/sprd/sprd-pcm-dma.c
@@ -171,13 +171,12 @@ static int sprd_pcm_request_dma_channel(struct snd_soc_component *component,
 	for (i = 0; i < channels; i++) {
 		struct sprd_pcm_dma_data *data = &dma_private->data[i];
 
-		data->chan = dma_request_slave_channel(dev,
-						       dma_params->chan_name[i]);
-		if (!data->chan) {
+		data->chan = dma_request_chan(dev, dma_params->chan_name[i]);
+		if (IS_ERR(data->chan)) {
 			dev_err(dev, "failed to request dma channel:%s\n",
 				dma_params->chan_name[i]);
 			sprd_pcm_release_dma_channel(substream);
-			return -ENODEV;
+			return PTR_ERR(data->chan);
 		}
 	}
 
-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 3/7] ASoC: soc-generic-dmaengine-pcm: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
  2026-09-15 10:04 ` [PATCH v1 1/7] ASoC: stm32: spdifrx: Drop mention of the deprecated and unused call Andy Shevchenko
  2026-09-15 10:04 ` [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan() Andy Shevchenko
@ 2026-09-15 10:04 ` Andy Shevchenko
  2026-09-15 10:29   ` Cezary Rojewski
  2026-09-15 10:04 ` [PATCH v1 4/7] ASoC: pxa: " Andy Shevchenko
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/soc-generic-dmaengine-pcm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index 65b7ec52a054..6d1dbee8f6c1 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -242,9 +242,11 @@ static int dmaengine_pcm_new(struct snd_soc_component *component,
 		if (!substream)
 			continue;
 
-		if (!pcm->chan[i] && config->chan_names[i])
-			pcm->chan[i] = dma_request_slave_channel(dev,
-				config->chan_names[i]);
+		if (!pcm->chan[i] && config->chan_names[i]) {
+			pcm->chan[i] = dma_request_chan(dev, config->chan_names[i]);
+			if (IS_ERR(pcm->chan[i]))
+				pcm->chan[i] = NULL;
+		}
 
 		if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) {
 			pcm->chan[i] = dmaengine_pcm_compat_request_channel(
-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 4/7] ASoC: pxa: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
                   ` (2 preceding siblings ...)
  2026-09-15 10:04 ` [PATCH v1 3/7] ASoC: soc-generic-dmaengine-pcm: " Andy Shevchenko
@ 2026-09-15 10:04 ` Andy Shevchenko
  2026-09-15 10:04 ` [PATCH v1 5/7] ASoC: fsl_asrc: " Andy Shevchenko
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/pxa/pxa2xx-pcm-lib.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-pcm-lib.c b/sound/soc/pxa/pxa2xx-pcm-lib.c
index 88a9d3226302..0ccf88aa1138 100644
--- a/sound/soc/pxa/pxa2xx-pcm-lib.c
+++ b/sound/soc/pxa/pxa2xx-pcm-lib.c
@@ -79,6 +79,7 @@ static int pxa2xx_pcm_open(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct snd_dmaengine_dai_dma_data *dma_params;
+	struct dma_chan *chan;
 	int ret;
 
 	runtime->hw = pxa2xx_pcm_hardware;
@@ -107,9 +108,12 @@ static int pxa2xx_pcm_open(struct snd_pcm_substream *substream)
 	if (ret < 0)
 		return ret;
 
-	return snd_dmaengine_pcm_open(
-		substream, dma_request_slave_channel(snd_soc_rtd_to_cpu(rtd, 0)->dev,
-						     dma_params->chan_name));
+	chan = dma_request_chan(snd_soc_rtd_to_cpu(rtd, 0)->dev, dma_params->chan_name);
+	ret = PTR_ERR_OR_ZERO(chan);
+	if (ret)
+		return ret;
+
+	return snd_dmaengine_pcm_open(substream, chan);
 }
 
 static int pxa2xx_pcm_close(struct snd_pcm_substream *substream)
-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 5/7] ASoC: fsl_asrc: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
                   ` (3 preceding siblings ...)
  2026-09-15 10:04 ` [PATCH v1 4/7] ASoC: pxa: " Andy Shevchenko
@ 2026-09-15 10:04 ` Andy Shevchenko
  2026-09-15 14:02   ` Frank Li
  2026-09-16  3:30   ` Shengjiu Wang
  2026-09-15 10:04 ` [PATCH v1 6/7] gpib: fmh_gpib: " Andy Shevchenko
  2026-09-15 10:04 ` [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel() Andy Shevchenko
  6 siblings, 2 replies; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/fsl/fsl_asrc.c     |  2 +-
 sound/soc/fsl/fsl_asrc_dma.c | 13 +++++++------
 sound/soc/fsl/fsl_asrc_m2m.c |  8 ++++----
 sound/soc/fsl/fsl_easrc.c    |  2 +-
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index b24737add001..ae682bf450f6 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -638,7 +638,7 @@ static struct dma_chan *fsl_asrc_get_dma_channel(struct fsl_asrc_pair *pair,
 
 	sprintf(name, "%cx%c", dir == IN ? 'r' : 't', index + 'a');
 
-	return dma_request_slave_channel(&asrc->pdev->dev, name);
+	return dma_request_chan(&asrc->pdev->dev, name);
 }
 
 static int fsl_asrc_dai_startup(struct snd_pcm_substream *substream,
diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
index 2f662bdf14d0..5cd12781c604 100644
--- a/sound/soc/fsl/fsl_asrc_dma.c
+++ b/sound/soc/fsl/fsl_asrc_dma.c
@@ -191,9 +191,10 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
 	dma_params_fe->maxburst = dma_params_be->maxburst;
 
 	pair->dma_chan[!dir] = asrc->get_dma_channel(pair, !dir);
-	if (!pair->dma_chan[!dir]) {
+	ret = PTR_ERR_OR_ZERO(pair->dma_chan[!dir]);
+	if (ret) {
 		dev_err(dev, "failed to request DMA channel\n");
-		return -EINVAL;
+		return ret;
 	}
 
 	ret = snd_dmaengine_pcm_prepare_slave_config(substream, params, &config_fe);
@@ -404,9 +405,9 @@ static int fsl_asrc_dma_startup(struct snd_soc_component *component,
 
 	/* Request a dummy dma channel, which will be released later. */
 	tmp_chan = asrc->get_dma_channel(pair, dir);
-	if (!tmp_chan) {
+	ret = PTR_ERR_OR_ZERO(tmp_chan);
+	if (ret) {
 		dev_err(dev, "failed to get dma channel\n");
-		ret = -EINVAL;
 		goto dma_chan_err;
 	}
 
@@ -497,9 +498,9 @@ static int fsl_asrc_dma_pcm_new(struct snd_soc_component *component,
 
 	/* Request a dma channel, which will be released later. */
 	chan = asrc->get_dma_channel(pair, IN);
-	if (!chan) {
+	ret = PTR_ERR_OR_ZERO(chan);
+	if (ret) {
 		dev_err(dev, "failed to get dma channel\n");
-		ret = -EINVAL;
 		goto dma_chan_err;
 	}
 
diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
index 4bc40f328f58..e440cc083ebb 100644
--- a/sound/soc/fsl/fsl_asrc_m2m.c
+++ b/sound/soc/fsl/fsl_asrc_m2m.c
@@ -503,16 +503,16 @@ static int fsl_asrc_m2m_comp_task_create(struct snd_compr_stream *stream,
 
 	/* Request dma channels */
 	pair->dma_chan[IN] = asrc->get_dma_channel(pair, IN);
-	if (!pair->dma_chan[IN]) {
+	ret = PTR_ERR_OR_ZERO(pair->dma_chan[IN]);
+	if (ret) {
 		dev_err(dev, "[ctx%d] failed to get input DMA channel\n", pair->index);
-		ret = -EBUSY;
 		goto err_dma_channel_in;
 	}
 
 	pair->dma_chan[OUT] = asrc->get_dma_channel(pair, OUT);
-	if (!pair->dma_chan[OUT]) {
+	ret = PTR_ERR_OR_ZERO(pair->dma_chan[OUT]);
+	if (ret) {
 		dev_err(dev, "[ctx%d] failed to get output DMA channel\n", pair->index);
-		ret = -EBUSY;
 		goto err_dma_channel_out;
 	}
 
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index aced16d1228a..d30cc3e90215 100644
--- a/sound/soc/fsl/fsl_easrc.c
+++ b/sound/soc/fsl/fsl_easrc.c
@@ -1433,7 +1433,7 @@ static struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx,
 	/* Example of dma name: ctx0_rx */
 	sprintf(name, "ctx%c_%cx", index + '0', dir == IN ? 'r' : 't');
 
-	return dma_request_slave_channel(&easrc->pdev->dev, name);
+	return dma_request_chan(&easrc->pdev->dev, name);
 };
 
 static const unsigned int easrc_rates[] = {
-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 6/7] gpib: fmh_gpib: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
                   ` (4 preceding siblings ...)
  2026-09-15 10:04 ` [PATCH v1 5/7] ASoC: fsl_asrc: " Andy Shevchenko
@ 2026-09-15 10:04 ` Andy Shevchenko
  2026-09-15 14:16   ` Dave Penkler
  2026-09-15 10:04 ` [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel() Andy Shevchenko
  6 siblings, 1 reply; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpib/fmh_gpib/fmh_gpib.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpib/fmh_gpib/fmh_gpib.c b/drivers/gpib/fmh_gpib/fmh_gpib.c
index 5e10e9353fed..3fdcc673ec8b 100644
--- a/drivers/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/gpib/fmh_gpib/fmh_gpib.c
@@ -1458,10 +1458,11 @@ static int fmh_gpib_attach_impl(struct gpib_board *board, const struct gpib_boar
 	e_priv->irq = irq;
 
 	if (acquire_dma) {
-		e_priv->dma_channel = dma_request_slave_channel(board->dev, "rxtx");
-		if (!e_priv->dma_channel) {
+		e_priv->dma_channel = dma_request_chan(board->dev, "rxtx");
+		retval = PTR_ERR_OR_ZERO(e_priv->dma_channel);
+		if (retval) {
 			dev_err(board->dev, "failed to acquire dma channel \"rxtx\".\n");
-			return -EIO;
+			return retval;
 		}
 	}
 	/*
-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel()
  2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
                   ` (5 preceding siblings ...)
  2026-09-15 10:04 ` [PATCH v1 6/7] gpib: fmh_gpib: " Andy Shevchenko
@ 2026-09-15 10:04 ` Andy Shevchenko
  2026-09-15 14:03   ` Frank Li
  2026-09-15 17:37   ` Vinod Koul
  6 siblings, 2 replies; 16+ messages in thread
From: Andy Shevchenko @ 2026-09-15 10:04 UTC (permalink / raw)
  To: Frank Li, Andy Shevchenko, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

No more users.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/dmaengine.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c50497ecd52d..7596ebdac466 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -1763,15 +1763,6 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
 #define dma_request_channel(mask, x, y) \
 	__dma_request_channel(&(mask), x, y, NULL)
 
-/* Deprecated, please use dma_request_chan() directly */
-static inline struct dma_chan * __deprecated
-dma_request_slave_channel(struct device *dev, const char *name)
-{
-	struct dma_chan *ch = dma_request_chan(dev, name);
-
-	return IS_ERR(ch) ? NULL : ch;
-}
-
 static inline struct dma_chan
 *dma_request_slave_channel_compat(const dma_cap_mask_t mask,
 				  dma_filter_fn fn, void *fn_param,
-- 
2.50.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 3/7] ASoC: soc-generic-dmaengine-pcm: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 ` [PATCH v1 3/7] ASoC: soc-generic-dmaengine-pcm: " Andy Shevchenko
@ 2026-09-15 10:29   ` Cezary Rojewski
  0 siblings, 0 replies; 16+ messages in thread
From: Cezary Rojewski @ 2026-09-15 10:29 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue, Frank Li, Mark Brown,
	Shengjiu Wang, bui duc phuc, Tianchu Chen, linux-kernel,
	dmaengine, linux-sound, linuxppc-dev, linux-arm-kernel,
	linux-stm32

On 9/15/2026 12:04 PM, Andy Shevchenko wrote:
> Replace dma_request_slave_channel() by dma_request_chan() as suggested
> since the former is deprecated.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  sound/soc/soc-generic-dmaengine-pcm.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
> index 65b7ec52a054..6d1dbee8f6c1 100644
> --- a/sound/soc/soc-generic-dmaengine-pcm.c
> +++ b/sound/soc/soc-generic-dmaengine-pcm.c
> @@ -242,9 +242,11 @@ static int dmaengine_pcm_new(struct snd_soc_component *component,
>  		if (!substream)
>  			continue;
>  
> -		if (!pcm->chan[i] && config->chan_names[i])
> -			pcm->chan[i] = dma_request_slave_channel(dev,
> -				config->chan_names[i]);
> +		if (!pcm->chan[i] && config->chan_names[i]) {
> +			pcm->chan[i] = dma_request_chan(dev, config->chan_names[i]);
> +			if (IS_ERR(pcm->chan[i]))
> +				pcm->chan[i] = NULL;
> +		}
>  
>  		if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) {
>  			pcm->chan[i] = dmaengine_pcm_compat_request_channel(

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 ` [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan() Andy Shevchenko
@ 2026-09-15 10:54   ` Baolin Wang
  2026-09-15 17:35   ` Mark Brown
  1 sibling, 0 replies; 16+ messages in thread
From: Baolin Wang @ 2026-09-15 10:54 UTC (permalink / raw)
  To: Andy Shevchenko, Frank Li, Mark Brown, Shengjiu Wang,
	bui duc phuc, Tianchu Chen, linux-kernel, dmaengine, linux-sound,
	linuxppc-dev, linux-arm-kernel, linux-stm32
  Cc: Dave Penkler, Greg Kroah-Hartman, Vinod Koul, Frank Li,
	Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen, Maxime Coquelin,
	Alexandre Torgue



On 9/15/26 6:04 PM, Andy Shevchenko wrote:
> Replace dma_request_slave_channel() by dma_request_chan() as suggested
> since the former is deprecated.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

LGTM. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 5/7] ASoC: fsl_asrc: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 ` [PATCH v1 5/7] ASoC: fsl_asrc: " Andy Shevchenko
@ 2026-09-15 14:02   ` Frank Li
  2026-09-16  3:30   ` Shengjiu Wang
  1 sibling, 0 replies; 16+ messages in thread
From: Frank Li @ 2026-09-15 14:02 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Frank Li, Mark Brown, Shengjiu Wang, bui duc phuc, Tianchu Chen,
	linux-kernel, dmaengine, linux-sound, linuxppc-dev,
	linux-arm-kernel, linux-stm32, Dave Penkler, Greg Kroah-Hartman,
	Vinod Koul, Frank Li, Shengjiu Wang, Xiubo Li, Fabio Estevam,
	Nicolin Chen, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Olivier Moysan,
	Arnaud Pouliquen, Maxime Coquelin, Alexandre Torgue

On Tue, Sep 15, 2026 at 12:04:26PM +0200, Andy Shevchenko wrote:
> Replace dma_request_slave_channel() by dma_request_chan() as suggested
> since the former is deprecated.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  sound/soc/fsl/fsl_asrc.c     |  2 +-
>  sound/soc/fsl/fsl_asrc_dma.c | 13 +++++++------
>  sound/soc/fsl/fsl_asrc_m2m.c |  8 ++++----
>  sound/soc/fsl/fsl_easrc.c    |  2 +-
>  4 files changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
> index b24737add001..ae682bf450f6 100644
> --- a/sound/soc/fsl/fsl_asrc.c
> +++ b/sound/soc/fsl/fsl_asrc.c
> @@ -638,7 +638,7 @@ static struct dma_chan *fsl_asrc_get_dma_channel(struct fsl_asrc_pair *pair,
>
>  	sprintf(name, "%cx%c", dir == IN ? 'r' : 't', index + 'a');
>
> -	return dma_request_slave_channel(&asrc->pdev->dev, name);
> +	return dma_request_chan(&asrc->pdev->dev, name);
>  }
>
>  static int fsl_asrc_dai_startup(struct snd_pcm_substream *substream,
> diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
> index 2f662bdf14d0..5cd12781c604 100644
> --- a/sound/soc/fsl/fsl_asrc_dma.c
> +++ b/sound/soc/fsl/fsl_asrc_dma.c
> @@ -191,9 +191,10 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
>  	dma_params_fe->maxburst = dma_params_be->maxburst;
>
>  	pair->dma_chan[!dir] = asrc->get_dma_channel(pair, !dir);
> -	if (!pair->dma_chan[!dir]) {
> +	ret = PTR_ERR_OR_ZERO(pair->dma_chan[!dir]);
> +	if (ret) {
>  		dev_err(dev, "failed to request DMA channel\n");
> -		return -EINVAL;
> +		return ret;


It progagate error to caller, it should be okay. I think it'd better
mention at commit message

Frank

>  	}
>
>  	ret = snd_dmaengine_pcm_prepare_slave_config(substream, params, &config_fe);
> @@ -404,9 +405,9 @@ static int fsl_asrc_dma_startup(struct snd_soc_component *component,
>
>  	/* Request a dummy dma channel, which will be released later. */
>  	tmp_chan = asrc->get_dma_channel(pair, dir);
> -	if (!tmp_chan) {
> +	ret = PTR_ERR_OR_ZERO(tmp_chan);
> +	if (ret) {
>  		dev_err(dev, "failed to get dma channel\n");
> -		ret = -EINVAL;
>  		goto dma_chan_err;
>  	}
>
> @@ -497,9 +498,9 @@ static int fsl_asrc_dma_pcm_new(struct snd_soc_component *component,
>
>  	/* Request a dma channel, which will be released later. */
>  	chan = asrc->get_dma_channel(pair, IN);
> -	if (!chan) {
> +	ret = PTR_ERR_OR_ZERO(chan);
> +	if (ret) {
>  		dev_err(dev, "failed to get dma channel\n");
> -		ret = -EINVAL;
>  		goto dma_chan_err;
>  	}
>
> diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
> index 4bc40f328f58..e440cc083ebb 100644
> --- a/sound/soc/fsl/fsl_asrc_m2m.c
> +++ b/sound/soc/fsl/fsl_asrc_m2m.c
> @@ -503,16 +503,16 @@ static int fsl_asrc_m2m_comp_task_create(struct snd_compr_stream *stream,
>
>  	/* Request dma channels */
>  	pair->dma_chan[IN] = asrc->get_dma_channel(pair, IN);
> -	if (!pair->dma_chan[IN]) {
> +	ret = PTR_ERR_OR_ZERO(pair->dma_chan[IN]);
> +	if (ret) {
>  		dev_err(dev, "[ctx%d] failed to get input DMA channel\n", pair->index);
> -		ret = -EBUSY;
>  		goto err_dma_channel_in;
>  	}
>
>  	pair->dma_chan[OUT] = asrc->get_dma_channel(pair, OUT);
> -	if (!pair->dma_chan[OUT]) {
> +	ret = PTR_ERR_OR_ZERO(pair->dma_chan[OUT]);
> +	if (ret) {
>  		dev_err(dev, "[ctx%d] failed to get output DMA channel\n", pair->index);
> -		ret = -EBUSY;
>  		goto err_dma_channel_out;
>  	}
>
> diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
> index aced16d1228a..d30cc3e90215 100644
> --- a/sound/soc/fsl/fsl_easrc.c
> +++ b/sound/soc/fsl/fsl_easrc.c
> @@ -1433,7 +1433,7 @@ static struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx,
>  	/* Example of dma name: ctx0_rx */
>  	sprintf(name, "ctx%c_%cx", index + '0', dir == IN ? 'r' : 't');
>
> -	return dma_request_slave_channel(&easrc->pdev->dev, name);
> +	return dma_request_chan(&easrc->pdev->dev, name);
>  };
>
>  static const unsigned int easrc_rates[] = {
> --
> 2.50.1
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel()
  2026-09-15 10:04 ` [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel() Andy Shevchenko
@ 2026-09-15 14:03   ` Frank Li
  2026-09-15 17:37   ` Vinod Koul
  1 sibling, 0 replies; 16+ messages in thread
From: Frank Li @ 2026-09-15 14:03 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Frank Li, Mark Brown, Shengjiu Wang, bui duc phuc, Tianchu Chen,
	linux-kernel, dmaengine, linux-sound, linuxppc-dev,
	linux-arm-kernel, linux-stm32, Dave Penkler, Greg Kroah-Hartman,
	Vinod Koul, Frank Li, Shengjiu Wang, Xiubo Li, Fabio Estevam,
	Nicolin Chen, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Olivier Moysan,
	Arnaud Pouliquen, Maxime Coquelin, Alexandre Torgue

On Tue, Sep 15, 2026 at 12:04:28PM +0200, Andy Shevchenko wrote:
> No more users.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  include/linux/dmaengine.h | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index c50497ecd52d..7596ebdac466 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -1763,15 +1763,6 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
>  #define dma_request_channel(mask, x, y) \
>  	__dma_request_channel(&(mask), x, y, NULL)
>
> -/* Deprecated, please use dma_request_chan() directly */
> -static inline struct dma_chan * __deprecated
> -dma_request_slave_channel(struct device *dev, const char *name)
> -{
> -	struct dma_chan *ch = dma_request_chan(dev, name);
> -
> -	return IS_ERR(ch) ? NULL : ch;
> -}
> -
>  static inline struct dma_chan
>  *dma_request_slave_channel_compat(const dma_cap_mask_t mask,
>  				  dma_filter_fn fn, void *fn_param,
> --
> 2.50.1
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 6/7] gpib: fmh_gpib: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 ` [PATCH v1 6/7] gpib: fmh_gpib: " Andy Shevchenko
@ 2026-09-15 14:16   ` Dave Penkler
  0 siblings, 0 replies; 16+ messages in thread
From: Dave Penkler @ 2026-09-15 14:16 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Frank Li, Mark Brown, Shengjiu Wang, bui duc phuc, Tianchu Chen,
	linux-kernel, dmaengine, linux-sound, linuxppc-dev,
	linux-arm-kernel, linux-stm32, Greg Kroah-Hartman, Vinod Koul,
	Frank Li, Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

On Tue, Sep 15, 2026 at 12:04:27PM +0200, Andy Shevchenko wrote:
> Replace dma_request_slave_channel() by dma_request_chan() as suggested
> since the former is deprecated.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpib/fmh_gpib/fmh_gpib.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpib/fmh_gpib/fmh_gpib.c b/drivers/gpib/fmh_gpib/fmh_gpib.c
> index 5e10e9353fed..3fdcc673ec8b 100644
> --- a/drivers/gpib/fmh_gpib/fmh_gpib.c
> +++ b/drivers/gpib/fmh_gpib/fmh_gpib.c
> @@ -1458,10 +1458,11 @@ static int fmh_gpib_attach_impl(struct gpib_board *board, const struct gpib_boar
>  	e_priv->irq = irq;
>  
>  	if (acquire_dma) {
> -		e_priv->dma_channel = dma_request_slave_channel(board->dev, "rxtx");
> -		if (!e_priv->dma_channel) {
> +		e_priv->dma_channel = dma_request_chan(board->dev, "rxtx");
> +		retval = PTR_ERR_OR_ZERO(e_priv->dma_channel);
> +		if (retval) {
>  			dev_err(board->dev, "failed to acquire dma channel \"rxtx\".\n");
> -			return -EIO;
> +			return retval;
>  		}
>  	}

Reviewed-by: Dave Penkler <dpenkler@gmail.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 ` [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan() Andy Shevchenko
  2026-09-15 10:54   ` Baolin Wang
@ 2026-09-15 17:35   ` Mark Brown
  1 sibling, 0 replies; 16+ messages in thread
From: Mark Brown @ 2026-09-15 17:35 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Frank Li, Shengjiu Wang, bui duc phuc, Tianchu Chen,
	linux-kernel, dmaengine, linux-sound, linuxppc-dev,
	linux-arm-kernel, linux-stm32, Dave Penkler, Greg Kroah-Hartman,
	Vinod Koul, Frank Li, Shengjiu Wang, Xiubo Li, Fabio Estevam,
	Nicolin Chen, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Olivier Moysan,
	Arnaud Pouliquen, Maxime Coquelin, Alexandre Torgue

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

On Tue, Sep 15, 2026 at 12:04:23PM +0200, Andy Shevchenko wrote:
> Replace dma_request_slave_channel() by dma_request_chan() as suggested
> since the former is deprecated.

> @@ -171,13 +171,12 @@ static int sprd_pcm_request_dma_channel(struct snd_soc_component *component,
>  	for (i = 0; i < channels; i++) {
>  		struct sprd_pcm_dma_data *data = &dma_private->data[i];
>  
> -		data->chan = dma_request_slave_channel(dev,
> -						       dma_params->chan_name[i]);
> -		if (!data->chan) {
> +		data->chan = dma_request_chan(dev, dma_params->chan_name[i]);
> +		if (IS_ERR(data->chan)) {
>  			dev_err(dev, "failed to request dma channel:%s\n",
>  				dma_params->chan_name[i]);
>  			sprd_pcm_release_dma_channel(substream);
> -			return -ENODEV;
> +			return PTR_ERR(data->chan);

sprd_pcm_release_dma_channel() does:

                if (data->chan) {
                        dma_release_channel(data->chan);
                        data->chan = NULL;

so this won't DTRT with propagating the return code.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel()
  2026-09-15 10:04 ` [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel() Andy Shevchenko
  2026-09-15 14:03   ` Frank Li
@ 2026-09-15 17:37   ` Vinod Koul
  1 sibling, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2026-09-15 17:37 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Frank Li, Mark Brown, Shengjiu Wang, bui duc phuc, Tianchu Chen,
	linux-kernel, dmaengine, linux-sound, linuxppc-dev,
	linux-arm-kernel, linux-stm32, Dave Penkler, Greg Kroah-Hartman,
	Frank Li, Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

On 15-09-26, 12:04, Andy Shevchenko wrote:
> No more users.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 5/7] ASoC: fsl_asrc: Replace dma_request_slave_channel() by dma_request_chan()
  2026-09-15 10:04 ` [PATCH v1 5/7] ASoC: fsl_asrc: " Andy Shevchenko
  2026-09-15 14:02   ` Frank Li
@ 2026-09-16  3:30   ` Shengjiu Wang
  1 sibling, 0 replies; 16+ messages in thread
From: Shengjiu Wang @ 2026-09-16  3:30 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Frank Li, Mark Brown, Shengjiu Wang, bui duc phuc, Tianchu Chen,
	linux-kernel, dmaengine, linux-sound, linuxppc-dev,
	linux-arm-kernel, linux-stm32, Dave Penkler, Greg Kroah-Hartman,
	Vinod Koul, Frank Li, Xiubo Li, Fabio Estevam, Nicolin Chen,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Lars-Peter Clausen, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Olivier Moysan, Arnaud Pouliquen,
	Maxime Coquelin, Alexandre Torgue

On Tue, Sep 15, 2026 at 6:09 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Replace dma_request_slave_channel() by dma_request_chan() as suggested
> since the former is deprecated.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Shengjiu Wang <shengjiu.wang@gmail.com>

Best regards
Shengjiu Wang
> ---
>  sound/soc/fsl/fsl_asrc.c     |  2 +-
>  sound/soc/fsl/fsl_asrc_dma.c | 13 +++++++------
>  sound/soc/fsl/fsl_asrc_m2m.c |  8 ++++----
>  sound/soc/fsl/fsl_easrc.c    |  2 +-
>  4 files changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
> index b24737add001..ae682bf450f6 100644
> --- a/sound/soc/fsl/fsl_asrc.c
> +++ b/sound/soc/fsl/fsl_asrc.c
> @@ -638,7 +638,7 @@ static struct dma_chan *fsl_asrc_get_dma_channel(struct fsl_asrc_pair *pair,
>
>         sprintf(name, "%cx%c", dir == IN ? 'r' : 't', index + 'a');
>
> -       return dma_request_slave_channel(&asrc->pdev->dev, name);
> +       return dma_request_chan(&asrc->pdev->dev, name);
>  }
>
>  static int fsl_asrc_dai_startup(struct snd_pcm_substream *substream,
> diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
> index 2f662bdf14d0..5cd12781c604 100644
> --- a/sound/soc/fsl/fsl_asrc_dma.c
> +++ b/sound/soc/fsl/fsl_asrc_dma.c
> @@ -191,9 +191,10 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
>         dma_params_fe->maxburst = dma_params_be->maxburst;
>
>         pair->dma_chan[!dir] = asrc->get_dma_channel(pair, !dir);
> -       if (!pair->dma_chan[!dir]) {
> +       ret = PTR_ERR_OR_ZERO(pair->dma_chan[!dir]);
> +       if (ret) {
>                 dev_err(dev, "failed to request DMA channel\n");
> -               return -EINVAL;
> +               return ret;
>         }
>
>         ret = snd_dmaengine_pcm_prepare_slave_config(substream, params, &config_fe);
> @@ -404,9 +405,9 @@ static int fsl_asrc_dma_startup(struct snd_soc_component *component,
>
>         /* Request a dummy dma channel, which will be released later. */
>         tmp_chan = asrc->get_dma_channel(pair, dir);
> -       if (!tmp_chan) {
> +       ret = PTR_ERR_OR_ZERO(tmp_chan);
> +       if (ret) {
>                 dev_err(dev, "failed to get dma channel\n");
> -               ret = -EINVAL;
>                 goto dma_chan_err;
>         }
>
> @@ -497,9 +498,9 @@ static int fsl_asrc_dma_pcm_new(struct snd_soc_component *component,
>
>         /* Request a dma channel, which will be released later. */
>         chan = asrc->get_dma_channel(pair, IN);
> -       if (!chan) {
> +       ret = PTR_ERR_OR_ZERO(chan);
> +       if (ret) {
>                 dev_err(dev, "failed to get dma channel\n");
> -               ret = -EINVAL;
>                 goto dma_chan_err;
>         }
>
> diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
> index 4bc40f328f58..e440cc083ebb 100644
> --- a/sound/soc/fsl/fsl_asrc_m2m.c
> +++ b/sound/soc/fsl/fsl_asrc_m2m.c
> @@ -503,16 +503,16 @@ static int fsl_asrc_m2m_comp_task_create(struct snd_compr_stream *stream,
>
>         /* Request dma channels */
>         pair->dma_chan[IN] = asrc->get_dma_channel(pair, IN);
> -       if (!pair->dma_chan[IN]) {
> +       ret = PTR_ERR_OR_ZERO(pair->dma_chan[IN]);
> +       if (ret) {
>                 dev_err(dev, "[ctx%d] failed to get input DMA channel\n", pair->index);
> -               ret = -EBUSY;
>                 goto err_dma_channel_in;
>         }
>
>         pair->dma_chan[OUT] = asrc->get_dma_channel(pair, OUT);
> -       if (!pair->dma_chan[OUT]) {
> +       ret = PTR_ERR_OR_ZERO(pair->dma_chan[OUT]);
> +       if (ret) {
>                 dev_err(dev, "[ctx%d] failed to get output DMA channel\n", pair->index);
> -               ret = -EBUSY;
>                 goto err_dma_channel_out;
>         }
>
> diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
> index aced16d1228a..d30cc3e90215 100644
> --- a/sound/soc/fsl/fsl_easrc.c
> +++ b/sound/soc/fsl/fsl_easrc.c
> @@ -1433,7 +1433,7 @@ static struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx,
>         /* Example of dma name: ctx0_rx */
>         sprintf(name, "ctx%c_%cx", index + '0', dir == IN ? 'r' : 't');
>
> -       return dma_request_slave_channel(&easrc->pdev->dev, name);
> +       return dma_request_chan(&easrc->pdev->dev, name);
>  };
>
>  static const unsigned int easrc_rates[] = {
> --
> 2.50.1
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-09-16  3:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 10:04 [PATCH v1 0/7] ASoC et alia: Convert to use dma_request_chan() Andy Shevchenko
2026-09-15 10:04 ` [PATCH v1 1/7] ASoC: stm32: spdifrx: Drop mention of the deprecated and unused call Andy Shevchenko
2026-09-15 10:04 ` [PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan() Andy Shevchenko
2026-09-15 10:54   ` Baolin Wang
2026-09-15 17:35   ` Mark Brown
2026-09-15 10:04 ` [PATCH v1 3/7] ASoC: soc-generic-dmaengine-pcm: " Andy Shevchenko
2026-09-15 10:29   ` Cezary Rojewski
2026-09-15 10:04 ` [PATCH v1 4/7] ASoC: pxa: " Andy Shevchenko
2026-09-15 10:04 ` [PATCH v1 5/7] ASoC: fsl_asrc: " Andy Shevchenko
2026-09-15 14:02   ` Frank Li
2026-09-16  3:30   ` Shengjiu Wang
2026-09-15 10:04 ` [PATCH v1 6/7] gpib: fmh_gpib: " Andy Shevchenko
2026-09-15 14:16   ` Dave Penkler
2026-09-15 10:04 ` [PATCH v1 7/7] dmaengine: Remove deprecated dma_request_slave_channel() Andy Shevchenko
2026-09-15 14:03   ` Frank Li
2026-09-15 17:37   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®