Skip to contentSkip to conversation

ASoC: Automatically manage WM8996 MICBIAS regulating mode

PATCH In review Mark Brown 2 participants 2 messages Aug 20, 2011 – Aug 22, 2011

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Automatically manage WM8996 MICBIAS regulating mode

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.

---
 sound/soc/codecs/wm8996.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8996.c +4 -0
index 0936ae5..d3277d1 100644
@@ -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),
 
@@ -1137,7 +1139,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" },
Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines · Mark Brown

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.

---
 sound/soc/codecs/wm8996.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8996.c +2 -0
index 0936ae5..d3277d1 100644
@@ -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),
 

sound/soc/codecs/wm8996.c static const struct snd_soc_dapm_route wm8996_dapm_routes[] = { · line 1147

Quoted 9 lines
sound/soc/codecs/wm8996.c +2 -0
@@ -1137,7 +1139,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" },