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>
This commit is contained in:

committed by
Mark Brown

parent
88b62b915b
commit
e2e8bfdf61
@@ -230,8 +230,8 @@ static const struct snd_soc_dapm_route audio_map[] = {
|
||||
{"Ext Spk", NULL, "LLOUT"},
|
||||
{"Ext Spk", NULL, "RLOUT"},
|
||||
|
||||
{"DMic Rate 64", NULL, "Mic Bias 2V"},
|
||||
{"Mic Bias 2V", NULL, "DMic"},
|
||||
{"DMic Rate 64", NULL, "Mic Bias"},
|
||||
{"Mic Bias", NULL, "DMic"},
|
||||
};
|
||||
|
||||
static const char *spk_function[] = {"Off", "On"};
|
||||
|
@@ -248,16 +248,16 @@ static const struct snd_soc_dapm_route audio_map[] = {
|
||||
{"FM Transmitter", NULL, "LLOUT"},
|
||||
{"FM Transmitter", NULL, "RLOUT"},
|
||||
|
||||
{"DMic Rate 64", NULL, "Mic Bias 2V"},
|
||||
{"Mic Bias 2V", NULL, "DMic"},
|
||||
{"DMic Rate 64", NULL, "Mic Bias"},
|
||||
{"Mic Bias", NULL, "DMic"},
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route audio_mapb[] = {
|
||||
{"b LINE2R", NULL, "MONO_LOUT"},
|
||||
{"Earphone", NULL, "b HPLOUT"},
|
||||
|
||||
{"LINE1L", NULL, "b Mic Bias 2.5V"},
|
||||
{"b Mic Bias 2.5V", NULL, "HS Mic"}
|
||||
{"LINE1L", NULL, "b Mic Bias"},
|
||||
{"b Mic Bias", NULL, "HS Mic"}
|
||||
};
|
||||
|
||||
static const char *spk_function[] = {"Off", "On"};
|
||||
|
Reference in New Issue
Block a user