Skip to content

Commit

Permalink
ASoC: wm_adsp: Disable DMAs before clearing the transfer length
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Trimmer authored and Mark Brown committed Jun 22, 2016
1 parent 28ee3d7 commit 6facd2d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6facd2d

Please sign in to comment.