ASoC: arizona: Add delay after powering up line level outputs
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 24 Mar 2013 22:50:23 +0000 (22:50 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 26 Mar 2013 18:49:04 +0000 (18:49 +0000)
Ensure that the outputs are fully enabled before we begin passing audio
through them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/arizona.c

index abdd019c5b6e17b488d06838ff59b7e839b5dcc4..389f232538311fcf57f1e2431ddd3da8a8c146eb 100644 (file)
@@ -579,6 +579,24 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
                   struct snd_kcontrol *kcontrol,
                   int event)
 {
+       switch (event) {
+       case SND_SOC_DAPM_POST_PMU:
+               switch (w->shift) {
+               case ARIZONA_OUT1L_ENA_SHIFT:
+               case ARIZONA_OUT1R_ENA_SHIFT:
+               case ARIZONA_OUT2L_ENA_SHIFT:
+               case ARIZONA_OUT2R_ENA_SHIFT:
+               case ARIZONA_OUT3L_ENA_SHIFT:
+               case ARIZONA_OUT3R_ENA_SHIFT:
+                       msleep(17);
+                       break;
+
+               default:
+                       break;
+               }
+               break;
+       }
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(arizona_out_ev);