Browse Source

ASoC: tlv320aic31xx: Turn power off only once.

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>
Jyri Sarha 11 years ago
parent
commit
fd218aa3e5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      sound/soc/codecs/tlv320aic31xx.c

+ 2 - 1
sound/soc/codecs/tlv320aic31xx.c

@@ -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;