From: John Lin Date: Tue, 12 May 2015 12:43:03 +0000 (+0800) Subject: ASoC: rt5645: remove unnecessary power in JD function X-Git-Tag: v4.14-rc1~4700^2~80^2~11^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47ba5bb295431c7d2bd0e48b63b4cdce600248d3;p=platform%2Fkernel%2Flinux-rpi.git 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: John Lin Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index e3658b2..0571a60 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -2802,10 +2802,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, "Mic Det Power"); @@ -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);