ASoC: Don't restart an already running WM8958 DSP2
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 16 May 2011 01:18:56 +0000 (18:18 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 16 May 2011 15:55:52 +0000 (08:55 -0700)
Don't want to upset the DSP.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
sound/soc/codecs/wm8958-dsp2.c

index ca26779bb6b21c99a92c9738ef6372c28b840864..0293763debe5811160fb3b7cc23284a91df2a94a 100644 (file)
@@ -362,6 +362,10 @@ static void wm8958_dsp_apply(struct snd_soc_codec *codec, int path, int start)
                path, wm8994->dsp_active, start, pwr_reg, reg);
 
        if (start && ena) {
+               /* If the DSP is already running then noop */
+               if (reg & WM8958_DSP2_ENA)
+                       return;
+
                /* If either AIFnCLK is not yet enabled postpone */
                if (!(snd_soc_read(codec, WM8994_AIF1_CLOCKING_1)
                      & WM8994_AIF1CLK_ENA_MASK) &&