ASoC: rt5645: remove unnecessary power in JD function
authorJohn Lin <john.lin@realtek.com>
Tue, 12 May 2015 12:43:03 +0000 (20:43 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 12 May 2015 18:50:40 +0000 (19:50 +0100)
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 <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c

index e3658b2b7fb3bf7dbe9e0c8b1ebb46fe85176a97..0571a6018a3a6e029fa48bde51f2b55a3dd06c47 100644 (file)
@@ -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);