Commit 47ba5bb2 authored by John Lin's avatar John Lin Committed by Mark Brown

ASoC: rt5645: remove unnecessary power in JD function

The power of "micbias1" and "micbias2" are unnecessary for jack detection.
So, we remove it in rt5645_set_jack_detect function.
Signed-off-by: default avatarJohn Lin <john.lin@realtek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d12d6c4e
......@@ -2801,10 +2801,6 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
if (jack_insert) {
if (codec->component.card->instantiated) {
snd_soc_dapm_force_enable_pin(&codec->dapm,
"micbias1");
snd_soc_dapm_force_enable_pin(&codec->dapm,
"micbias2");
snd_soc_dapm_force_enable_pin(&codec->dapm,
"LDO2");
snd_soc_dapm_force_enable_pin(&codec->dapm,
......@@ -2813,9 +2809,6 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
} else {
/* Power up necessary bits for JD if dapm is
not ready yet */
snd_soc_update_bits(codec, RT5645_PWR_ANLG2,
RT5645_PWR_MB1 | RT5645_PWR_MB2,
RT5645_PWR_MB1 | RT5645_PWR_MB2);
snd_soc_update_bits(codec, RT5645_PWR_MIXER,
RT5645_PWR_LDO2, RT5645_PWR_LDO2);
snd_soc_update_bits(codec, RT5645_PWR_VOL,
......@@ -2835,16 +2828,12 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
dev_dbg(codec->dev, "val = %d\n", val);
if (codec->component.card->instantiated) {
snd_soc_dapm_disable_pin(&codec->dapm, "micbias1");
snd_soc_dapm_disable_pin(&codec->dapm, "micbias2");
if (rt5645->pdata.jd_mode == 0)
snd_soc_dapm_disable_pin(&codec->dapm, "LDO2");
snd_soc_dapm_disable_pin(&codec->dapm,
"Mic Det Power");
snd_soc_dapm_sync(&codec->dapm);
} else {
snd_soc_update_bits(codec, RT5645_PWR_ANLG2,
RT5645_PWR_MB1 | RT5645_PWR_MB2, 0);
if (rt5645->pdata.jd_mode == 0)
snd_soc_update_bits(codec, RT5645_PWR_MIXER,
RT5645_PWR_LDO2, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment