diff options
author | Hebbar Gururaja <gururaja.hebbar@ti.com> | 2013-01-31 18:23:04 +0530 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-02-04 18:35:19 +0000 |
commit | e2e8bfdf61573c98162d1112b971d8d00f00fcf8 (patch) | |
tree | 3cfe1c7a55fa32bad47edd3b5541fcbb7380e876 /include/sound | |
parent | 88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff) | |
download | blackbird-obmc-linux-e2e8bfdf61573c98162d1112b971d8d00f00fcf8.tar.gz blackbird-obmc-linux-e2e8bfdf61573c98162d1112b971d8d00f00fcf8.zip |
ASoC: tlv320aic3x: Convert mic bias to a supply widget
Convert MicBias widgets to supply widget.
On tlv320aic3x, Mic bias power on/off shares the same register bits
with output mic bias voltage. So, when power on mic bias, we need
reclaim it to voltage value.
Provide a new platform data so that the micbias voltage can be sent
according to board requirement. Now since tlv320aic3x codec driver
is DT aware, update dt files and functions to handle this new
"micbias-vg" platform data.
Because of sharing of bits, when enabling the micbias, voltage also
needs to be updated. So use SND_SOC_DAPM_POST_PMU & SND_SOC_DAPM_PRE_PMD
macro to create an event to handle this.
Since micbias is converted to supply widget, updated machine drivers as
well.
This change is runtime tested on da850-evm with audio loopback
(arecord|aplay) for confirmation.
Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/tlv320aic3x.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/tlv320aic3x.h b/include/sound/tlv320aic3x.h index ffd9bc793105..9407fd00363b 100644 --- a/include/sound/tlv320aic3x.h +++ b/include/sound/tlv320aic3x.h @@ -46,6 +46,13 @@ enum { AIC3X_GPIO2_FUNC_BUTTON_PRESS_IRQ = 15 }; +enum aic3x_micbias_voltage { + AIC3X_MICBIAS_OFF = 0, + AIC3X_MICBIAS_2_0V = 1, + AIC3X_MICBIAS_2_5V = 2, + AIC3X_MICBIAS_AVDDV = 3, +}; + struct aic3x_setup_data { unsigned int gpio_func[2]; }; @@ -53,6 +60,9 @@ struct aic3x_setup_data { struct aic3x_pdata { int gpio_reset; /* < 0 if not used */ struct aic3x_setup_data *setup; + + /* Selects the micbias voltage */ + enum aic3x_micbias_voltage micbias_vg; }; #endif |