summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorSimon Trimmer <simont@opensource.wolfsonmicro.com>2016-06-22 15:31:03 +0100
committerMark Brown <broonie@kernel.org>2016-06-22 15:45:06 +0100
commit6facd2d10f828d14dd7a38153cd7814d92a47397 (patch)
tree3ab09ea70ac00c829876d1b090db5dd1993c9fca /sound
parent28ee3d73773e2d9ae922f7496723ab5c92cc16de (diff)
ASoC: wm_adsp: Disable DMAs before clearing the transfer length
This patch reorders the clearing of the DMA masks to avoid potential artefacts being introduced. Signed-off-by: Simon Trimmer <simont@opensource.wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm_adsp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 7e42474d7ae4..f6eb2e5b2c07 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -2366,13 +2366,15 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
dsp->running = false;
regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL,
- ADSP2_SYS_ENA | ADSP2_CORE_ENA |
- ADSP2_START, 0);
+ ADSP2_CORE_ENA | ADSP2_START, 0);
/* Make sure DMAs are quiesced */
+ regmap_write(dsp->regmap, dsp->base + ADSP2_RDMA_CONFIG_1, 0);
regmap_write(dsp->regmap, dsp->base + ADSP2_WDMA_CONFIG_1, 0);
regmap_write(dsp->regmap, dsp->base + ADSP2_WDMA_CONFIG_2, 0);
- regmap_write(dsp->regmap, dsp->base + ADSP2_RDMA_CONFIG_1, 0);
+
+ regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL,
+ ADSP2_SYS_ENA, 0);
list_for_each_entry(ctl, &dsp->ctl_list, list)
ctl->enabled = 0;