ASoC: Automatically manage WM8996 MICBIAS regulating mode
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 20 Aug 2011 18:00:50 +0000 (19:00 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 22 Aug 2011 11:37:27 +0000 (12:37 +0100)
For non-audio uses like accessory detection we can use a lower quality,
unregulated microphone bias, saving a little power. As the hardware can
manually enable and disable the biases we can select regulating mode
automatically with supply widgets connected to the biases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/codecs/wm8996.c

index ab8e9d1aaff0a0194138cb08a06a806ea8e0559e..2a0a612a4edb700a182b0bbccea3ee0d0ddcfd9c 100644 (file)
@@ -982,6 +982,8 @@ SND_SOC_DAPM_SUPPLY_S("Charge Pump", 2, WM8996_CHARGE_PUMP_1, 15, 0, cp_event,
                      SND_SOC_DAPM_POST_PMU),
 
 SND_SOC_DAPM_SUPPLY("LDO2", WM8996_POWER_MANAGEMENT_2, 1, 0, NULL, 0),
+SND_SOC_DAPM_SUPPLY("MICB1 Audio", WM8996_MICBIAS_1, 4, 1, NULL, 0),
+SND_SOC_DAPM_SUPPLY("MICB2 Audio", WM8996_MICBIAS_2, 4, 1, NULL, 0),
 SND_SOC_DAPM_MICBIAS("MICB2", WM8996_POWER_MANAGEMENT_1, 9, 0),
 SND_SOC_DAPM_MICBIAS("MICB1", WM8996_POWER_MANAGEMENT_1, 8, 0),
 
@@ -1142,7 +1144,9 @@ static const struct snd_soc_dapm_route wm8996_dapm_routes[] = {
        { "Charge Pump", NULL, "SYSCLK" },
 
        { "MICB1", NULL, "LDO2" },
+       { "MICB1", NULL, "MICB1 Audio" },
        { "MICB2", NULL, "LDO2" },
+       { "MICB2", NULL, "MICB2 Audio" },
 
        { "IN1L PGA", NULL, "IN2LN" },
        { "IN1L PGA", NULL, "IN2LP" },