ASoC: tlv320aic31xx: Turn power off only once.
authorJyri Sarha <jsarha@ti.com>
Mon, 17 Mar 2014 07:31:31 +0000 (09:31 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 17 Mar 2014 13:16:59 +0000 (13:16 +0000)
Regulator code keep count of enables and disables. Double disable
causes an ugly warning.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/tlv320aic31xx.c

index d3517a9197769d21c17eb0ff71bd2cb6de0086ca..1f243c2c98fd71b333453fc62f88e124c3beb059 100644 (file)
@@ -1020,7 +1020,8 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec,
                }
                break;
        case SND_SOC_BIAS_OFF:
-               aic31xx_power_off(codec);
+               if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY)
+                       aic31xx_power_off(codec);
                break;
        }
        codec->dapm.bias_level = level;