ASoC: wm_adsp: Move core_ena to be co-located with start bit
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 18 Nov 2014 16:25:27 +0000 (16:25 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 18 Nov 2014 17:27:02 +0000 (17:27 +0000)
Many firmwares do not wait for the start bit before they begin
processing audio, whilst this is a bug on the firmware side there are
too many such firmwares in the wild to ignore the situation. This patch
moves the core enable to happen at same time as the start, the firmware
looses the ability to overlap its own startup with the audio path bring
up but we ensure that all firmwares behave.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c

index 67124783558a5374b547f26d30d1ccc2bdc16ae4..cce9020933c6b50e646b45d5cdfa1a09284a2a67 100644 (file)
@@ -1595,13 +1595,6 @@ static void wm_adsp2_boot_work(struct work_struct *work)
        if (ret != 0)
                goto err;
 
-       ret = regmap_update_bits_async(dsp->regmap,
-                                      dsp->base + ADSP2_CONTROL,
-                                      ADSP2_CORE_ENA,
-                                      ADSP2_CORE_ENA);
-       if (ret != 0)
-               goto err;
-
        dsp->running = true;
 
        return;
@@ -1651,8 +1644,8 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
 
                ret = regmap_update_bits(dsp->regmap,
                                         dsp->base + ADSP2_CONTROL,
-                                        ADSP2_START,
-                                        ADSP2_START);
+                                        ADSP2_CORE_ENA | ADSP2_START,
+                                        ADSP2_CORE_ENA | ADSP2_START);
                if (ret != 0)
                        goto err;
                break;