Skip to content

Commit

Permalink
ASoC: generic-dmaengine-pcm: Clear slave_config memory
Browse files Browse the repository at this point in the history
We currently assume that the DMA Slave Config will be fully populated
by the platform, however some DMA Engines make decisions based on zero
(default) flags such as DMA_SLAVE_BUSWIDTH_UNDEFINED and as this is a
static declaration we need to memset it to clear the data area.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Lee Jones authored and Mark Brown committed Nov 7, 2013
1 parent f82bf8e commit a894bd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/soc-generic-dmaengine-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream,
struct dma_slave_config slave_config;
int ret;

memset(&slave_config, 0, sizeof(slave_config));

if (!pcm->config)
prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config;
else
Expand Down

0 comments on commit a894bd7

Please sign in to comment.