diff options
Diffstat (limited to 'sound/soc')
| -rw-r--r-- | sound/soc/soc-generic-dmaengine-pcm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 0c469cbbe881..6ad4c7a47f5d 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include <sound/dmaengine_pcm.h> | 25 | #include <sound/dmaengine_pcm.h> |
| 26 | 26 | ||
| 27 | struct dmaengine_pcm { | 27 | struct dmaengine_pcm { |
| 28 | struct dma_chan *chan[SNDRV_PCM_STREAM_CAPTURE + 1]; | 28 | struct dma_chan *chan[SNDRV_PCM_STREAM_LAST + 1]; |
| 29 | const struct snd_dmaengine_pcm_config *config; | 29 | const struct snd_dmaengine_pcm_config *config; |
| 30 | struct snd_soc_platform platform; | 30 | struct snd_soc_platform platform; |
| 31 | unsigned int flags; | 31 | unsigned int flags; |
| @@ -90,6 +90,8 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream, | |||
| 90 | struct dma_slave_config slave_config; | 90 | struct dma_slave_config slave_config; |
| 91 | int ret; | 91 | int ret; |
| 92 | 92 | ||
| 93 | memset(&slave_config, 0, sizeof(slave_config)); | ||
| 94 | |||
| 93 | if (!pcm->config) | 95 | if (!pcm->config) |
| 94 | prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; | 96 | prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; |
| 95 | else | 97 | else |
