Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: fsl: lpc3xxx-i2s: Fix error handling and DMA configuration
@ 2026-11-18 10:06 phucduc.bui
  2026-11-18 10:06 ` [PATCH 1/2] ASoC: fsl: lpc3xxx-i2s: Simplify error handling phucduc.bui
  2026-11-18 10:06 ` [PATCH 2/2] ASoC: fsl: lpc3xxx-i2s: Fix DMA depth configuration phucduc.bui
  0 siblings, 2 replies; 3+ messages in thread
From: phucduc.bui @ 2026-11-18 10:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, jonathan.downing,
	Piotr Wojtaszczyk, Vladimir Zapolskiy, linux-sound, linux-kernel,
	linuxppc-dev, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Hi all,

This series simplifies error handling and fixes incorrect 
DMA depth macro usage.

Compile-tested only.

Best regards,
Phuc

bui duc phuc (2):
  ASoC: fsl: lpc3xxx-i2s: Simplify error handling
  ASoC: fsl: lpc3xxx-i2s: Fix DMA depth configuration

 sound/soc/fsl/lpc3xxx-i2s.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

-- 
2.43.0


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

* [PATCH 1/2] ASoC: fsl: lpc3xxx-i2s: Simplify error handling
  2026-11-18 10:06 [PATCH 0/2] ASoC: fsl: lpc3xxx-i2s: Fix error handling and DMA configuration phucduc.bui
@ 2026-11-18 10:06 ` phucduc.bui
  2026-11-18 10:06 ` [PATCH 2/2] ASoC: fsl: lpc3xxx-i2s: Fix DMA depth configuration phucduc.bui
  1 sibling, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-11-18 10:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, jonathan.downing,
	Piotr Wojtaszczyk, Vladimir Zapolskiy, linux-sound, linux-kernel,
	linuxppc-dev, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Return -EBUSY directly when the I2S channel is already in use.

Also remove the redundant error pointer from the regmap initialization
error message, as dev_err_probe() already reports the error.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/fsl/lpc3xxx-i2s.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/lpc3xxx-i2s.c b/sound/soc/fsl/lpc3xxx-i2s.c
index 757e0619d368..75bd148c1432 100644
--- a/sound/soc/fsl/lpc3xxx-i2s.c
+++ b/sound/soc/fsl/lpc3xxx-i2s.c
@@ -82,8 +82,7 @@ static int lpc3xxx_i2s_startup(struct snd_pcm_substream *substream, struct snd_s
 
 	if (flag & i2s_info_p->streams_in_use) {
 		dev_warn(dev, "I2S channel is busy\n");
-		ret = -EBUSY;
-		return ret;
+		return -EBUSY;
 	}
 
 	if (i2s_info_p->streams_in_use == 0) {
@@ -320,7 +319,7 @@ static int lpc32xx_i2s_probe(struct platform_device *pdev)
 	i2s_info_p->regs = devm_regmap_init_mmio(dev, iomem, &lpc32xx_i2s_regconfig);
 	if (IS_ERR(i2s_info_p->regs))
 		return dev_err_probe(dev, PTR_ERR(i2s_info_p->regs),
-				     "failed to init register map: %pe\n", i2s_info_p->regs);
+				     "failed to init register map\n");
 
 	i2s_info_p->clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(i2s_info_p->clk))
-- 
2.43.0


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

* [PATCH 2/2] ASoC: fsl: lpc3xxx-i2s: Fix DMA depth configuration
  2026-11-18 10:06 [PATCH 0/2] ASoC: fsl: lpc3xxx-i2s: Fix error handling and DMA configuration phucduc.bui
  2026-11-18 10:06 ` [PATCH 1/2] ASoC: fsl: lpc3xxx-i2s: Simplify error handling phucduc.bui
@ 2026-11-18 10:06 ` phucduc.bui
  1 sibling, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-11-18 10:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, jonathan.downing,
	Piotr Wojtaszczyk, Vladimir Zapolskiy, linux-sound, linux-kernel,
	linuxppc-dev, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

The transmit and receive paths use the wrong DMA depth macros.
Use the macros corresponding to the DMA registers being configured.

Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/fsl/lpc3xxx-i2s.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/lpc3xxx-i2s.c b/sound/soc/fsl/lpc3xxx-i2s.c
index 75bd148c1432..67bbc69dc2d2 100644
--- a/sound/soc/fsl/lpc3xxx-i2s.c
+++ b/sound/soc/fsl/lpc3xxx-i2s.c
@@ -198,12 +198,12 @@ static int lpc3xxx_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		regmap_write(regs, LPC3XXX_REG_I2S_DMA1,
-			     LPC3XXX_I2S_DMA1_TX_EN | LPC3XXX_I2S_DMA0_TX_DEPTH(4));
+			     LPC3XXX_I2S_DMA1_TX_EN | LPC3XXX_I2S_DMA1_TX_DEPTH(4));
 		regmap_write(regs, LPC3XXX_REG_I2S_TX_RATE, (clkx << 8) | clky);
 		regmap_write(regs, LPC3XXX_REG_I2S_DAO, tmp);
 	} else {
 		regmap_write(regs, LPC3XXX_REG_I2S_DMA0,
-			     LPC3XXX_I2S_DMA0_RX_EN | LPC3XXX_I2S_DMA1_RX_DEPTH(4));
+			     LPC3XXX_I2S_DMA0_RX_EN | LPC3XXX_I2S_DMA0_RX_DEPTH(4));
 		regmap_write(regs, LPC3XXX_REG_I2S_RX_RATE, (clkx << 8) | clky);
 		regmap_write(regs, LPC3XXX_REG_I2S_DAI, tmp);
 	}
-- 
2.43.0


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

end of thread, other threads:[~2026-11-18 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 10:06 [PATCH 0/2] ASoC: fsl: lpc3xxx-i2s: Fix error handling and DMA configuration phucduc.bui
2026-11-18 10:06 ` [PATCH 1/2] ASoC: fsl: lpc3xxx-i2s: Simplify error handling phucduc.bui
2026-11-18 10:06 ` [PATCH 2/2] ASoC: fsl: lpc3xxx-i2s: Fix DMA depth configuration phucduc.bui

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