Skip to contentSkip to conversation

ASoC: omap-pcm: Initialize DMA configuration

PATCH In review J.D. Schroeder 3 participants 3 messages Apr 25, 2016 – Apr 26, 2016

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

PATCH 1/1 ASoC: omap-pcm: Initialize DMA configuration

From: Jim Lodes <[email protected]>

Initialize the dma_slave_config for PCM DMA transfers, instead of leaving it uninitialized. Keeps previous data on the stack from giving us invalid values in uninitialized members of the config structure.

---
 sound/soc/omap/omap-pcm.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/omap/omap-pcm.c +2 -0
index 99381a2..a84f677 100644
@@ -82,6 +82,8 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream,
 	struct dma_chan *chan;
 	int err = 0;
 
+	memset(&config, 0x00, sizeof(config));
+
 	dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
 
 	/* return if this is a bufferless transfer e.g.
Signature · 1 line
1.9.1
Acked-by Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · J.D. Schroeder

From: Jim Lodes <[email protected]>

Initialize the dma_slave_config for PCM DMA transfers, instead of leaving it uninitialized. Keeps previous data on the stack from giving us invalid values in uninitialized members of the config structure.

---
 sound/soc/omap/omap-pcm.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/omap/omap-pcm.c +0 -0
index 99381a2..a84f677 100644

sound/soc/omap/omap-pcm.c static int omap_pcm_hw_params(struct snd_pcm_substream *substream, · line 85

Quoted 4 lines
sound/soc/omap/omap-pcm.c +1 -0
@@ -82,6 +82,8 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream,
 	struct dma_chan *chan;
 	int err = 0;
 
+	memset(&config, 0x00, sizeof(config));

Based on a894bd7fb539 ("ASoC: generic-dmaengine-pcm: Clear slave_config memory")

maintainer
#2 lore raw

Applied "ASoC: omap-pcm: Initialize DMA configuration" to the asoc tree

In reply to J.D. Schroeder

The patch

ASoC: omap-pcm: Initialize DMA configuration

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

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

Quoted 1 line

From 989ff7754a27a1fcc0c3b2794c985b31811871a0 Mon Sep 17 00:00:00 2001

From: Jim Lodes <[email protected]>
Date: Mon, 25 Apr 2016 11:10:07 -0500
Subject: [PATCH] ASoC: omap-pcm: Initialize DMA configuration

Initialize the dma_slave_config for PCM DMA transfers, instead of leaving it uninitialized. Keeps previous data on the stack from giving us invalid values in uninitialized members of the config structure.

---
 sound/soc/omap/omap-pcm.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/omap/omap-pcm.c +2 -0
index 6bb623a2a4df..eb81b9a2293a 100644
@@ -82,6 +82,8 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream,
 	struct dma_chan *chan;
 	int err = 0;
 
+	memset(&config, 0x00, sizeof(config));
+
 	dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
 
 	/* return if this is a bufferless transfer e.g.
Signature · 1 line
2.8.0.rc3