Commit a894bd7f authored by Lee Jones's avatar Lee Jones Committed by Mark Brown

ASoC: generic-dmaengine-pcm: Clear slave_config memory

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: default avatarLee Jones <lee.jones@linaro.org>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent f82bf8e2
...@@ -90,6 +90,8 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -90,6 +90,8 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream,
struct dma_slave_config slave_config; struct dma_slave_config slave_config;
int ret; int ret;
memset(&slave_config, 0, sizeof(slave_config));
if (!pcm->config) if (!pcm->config)
prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment