Skip to contentSkip to conversation

ASoC: amd: renoir: fix disable_pdm_interrupts() to clear mask bits

PATCH In review [email protected] 2 participants 3 messages Aug 24 – Sep 1

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ASoC: amd: renoir: fix disable_pdm_interrupts() to clear mask bits

From: wangdicheng <[email protected]>

disable_pdm_interrupts() uses |= ~PDM_DMA_INTR_MASK which sets all bits except the PDM DMA interrupt bit instead of clearing only the PDM DMA interrupt bit. Use &= ~PDM_DMA_INTR_MASK to clear only the target bit.

Fixes f621a3676d3f ("ASoC: amd: add ACP3x PDM platform driver")
---
 sound/soc/amd/renoir/acp3x-pdm-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/renoir/acp3x-pdm-dma.c +1 -1
index e60e3821703c..3f59b753243d 100644
@@ -104,7 +104,7 @@ static void disable_pdm_interrupts(void __iomem *acp_base)
 	u32 ext_int_ctrl;
 
 	ext_int_ctrl = rn_readl(acp_base + ACP_EXTERNAL_INTR_CNTL);
-	ext_int_ctrl |= ~PDM_DMA_INTR_MASK;
+	ext_int_ctrl &= ~PDM_DMA_INTR_MASK;
 	rn_writel(ext_int_ctrl, acp_base + ACP_EXTERNAL_INTR_CNTL);
 }
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 ASoC: amd: yc: fix memory leak in acp6x_pdm_dma_close()

From: wangdicheng <[email protected]>

acp6x_pdm_dma_close() does not free the runtime->private_data buffer allocated in acp6x_pdm_dma_open(). Add the missing kfree.

Fixes 7610174a5bfe ("ASoC: amd: add acp6x pdm platform driver")
---
 sound/soc/amd/yc/acp6x-pdm-dma.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/amd/yc/acp6x-pdm-dma.c +2 -0
index 710db721ffa4..40c4d833f4ed 100644
@@ -275,9 +275,11 @@ static int acp6x_pdm_dma_close(struct snd_soc_component *component,
 			       struct snd_pcm_substream *substream)
 {
 	struct pdm_dev_data *adata = dev_get_drvdata(component->dev);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	acp6x_disable_pdm_interrupts(adata->acp6x_base);
 	adata->capture_stream = NULL;
+	kfree(runtime->private_data);
 	return 0;
 }
 
Signature · 1 line
2.25.1
maintainer
#2 lore raw
In reply to [email protected]
Quoted 1 line · On Mon, 24 Aug 2026 14:35:06 +0800, [email protected] wrote:

ASoC: amd: renoir: fix disable_pdm_interrupts() to clear mask bits

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/2] ASoC: amd: renoir: fix disable_pdm_interrupts() to clear mask bits

      https://git.kernel.org/broonie/sound/c/0c06c4ce0206
[2/2] ASoC: amd: yc: fix memory leak in acp6x_pdm_dma_close()
      https://git.kernel.org/broonie/sound/c/1b67e0d3b969

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark