summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-29 00:51:05 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-29 00:51:05 +0800
commit06dc374c70fd75fb3f81a4c1f6586d7c5b8e3833 (patch)
treec14018309adcae62979c2f73c4197a16280a923e /sound
parent7480800ea682b70b0a15cda00eed7eedc90ceb9c (diff)
parent2d30b5751d3fdcc589985929ffb3969520f6c828 (diff)
Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adsp
Conflicts: sound/soc/codecs/wm_adsp.c
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm_adsp.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 888316484541..f3a9b559e0fe 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -110,9 +110,12 @@
#define ADSP1_CLK_SEL_SHIFT 0 /* CLK_SEL_ENA */
#define ADSP1_CLK_SEL_WIDTH 3 /* CLK_SEL_ENA */
-#define ADSP2_CONTROL 0
-#define ADSP2_CLOCKING 1
-#define ADSP2_STATUS1 4
+#define ADSP2_CONTROL 0x0
+#define ADSP2_CLOCKING 0x1
+#define ADSP2_STATUS1 0x4
+#define ADSP2_WDMA_CONFIG_1 0x30
+#define ADSP2_WDMA_CONFIG_2 0x31
+#define ADSP2_RDMA_CONFIG_1 0x34
/*
* ADSP2 Control
@@ -688,7 +691,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
hdr = (void*)&firmware->data[0];
if (memcmp(hdr->magic, "WMDR", 4) != 0) {
adsp_err(dsp, "%s: invalid magic\n", file);
- return -EINVAL;
+ goto out_fw;
}
switch (be32_to_cpu(hdr->rev) & 0xff) {
@@ -1027,6 +1030,11 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
ADSP2_SYS_ENA | ADSP2_CORE_ENA |
ADSP2_START, 0);
+ /* Make sure DMAs are quiesced */
+ 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);
+
if (dsp->dvfs) {
ret = regulator_set_voltage(dsp->dvfs, 1200000,
1800000);