diff options
Diffstat (limited to 'sound/soc/codecs/rt286.c')
-rw-r--r-- | sound/soc/codecs/rt286.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index bc08f0c5a5f6..1bd31644a782 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c | |||
@@ -266,6 +266,8 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic) | |||
266 | } else { | 266 | } else { |
267 | *mic = false; | 267 | *mic = false; |
268 | regmap_write(rt286->regmap, RT286_SET_MIC1, 0x20); | 268 | regmap_write(rt286->regmap, RT286_SET_MIC1, 0x20); |
269 | regmap_update_bits(rt286->regmap, | ||
270 | RT286_CBJ_CTRL1, 0x0400, 0x0000); | ||
269 | } | 271 | } |
270 | } else { | 272 | } else { |
271 | regmap_read(rt286->regmap, RT286_GET_HP_SENSE, &buf); | 273 | regmap_read(rt286->regmap, RT286_GET_HP_SENSE, &buf); |
@@ -470,24 +472,6 @@ static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w, | |||
470 | return 0; | 472 | return 0; |
471 | } | 473 | } |
472 | 474 | ||
473 | static int rt286_vref_event(struct snd_soc_dapm_widget *w, | ||
474 | struct snd_kcontrol *kcontrol, int event) | ||
475 | { | ||
476 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); | ||
477 | |||
478 | switch (event) { | ||
479 | case SND_SOC_DAPM_PRE_PMU: | ||
480 | snd_soc_update_bits(codec, | ||
481 | RT286_CBJ_CTRL1, 0x0400, 0x0000); | ||
482 | mdelay(50); | ||
483 | break; | ||
484 | default: | ||
485 | return 0; | ||
486 | } | ||
487 | |||
488 | return 0; | ||
489 | } | ||
490 | |||
491 | static int rt286_ldo2_event(struct snd_soc_dapm_widget *w, | 475 | static int rt286_ldo2_event(struct snd_soc_dapm_widget *w, |
492 | struct snd_kcontrol *kcontrol, int event) | 476 | struct snd_kcontrol *kcontrol, int event) |
493 | { | 477 | { |
@@ -536,7 +520,7 @@ static const struct snd_soc_dapm_widget rt286_dapm_widgets[] = { | |||
536 | SND_SOC_DAPM_SUPPLY_S("HV", 1, RT286_POWER_CTRL1, | 520 | SND_SOC_DAPM_SUPPLY_S("HV", 1, RT286_POWER_CTRL1, |
537 | 12, 1, NULL, 0), | 521 | 12, 1, NULL, 0), |
538 | SND_SOC_DAPM_SUPPLY("VREF", RT286_POWER_CTRL1, | 522 | SND_SOC_DAPM_SUPPLY("VREF", RT286_POWER_CTRL1, |
539 | 0, 1, rt286_vref_event, SND_SOC_DAPM_PRE_PMU), | 523 | 0, 1, NULL, 0), |
540 | SND_SOC_DAPM_SUPPLY_S("LDO1", 1, RT286_POWER_CTRL2, | 524 | SND_SOC_DAPM_SUPPLY_S("LDO1", 1, RT286_POWER_CTRL2, |
541 | 2, 0, NULL, 0), | 525 | 2, 0, NULL, 0), |
542 | SND_SOC_DAPM_SUPPLY_S("LDO2", 2, RT286_POWER_CTRL1, | 526 | SND_SOC_DAPM_SUPPLY_S("LDO2", 2, RT286_POWER_CTRL1, |
@@ -911,8 +895,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec, | |||
911 | case SND_SOC_BIAS_ON: | 895 | case SND_SOC_BIAS_ON: |
912 | mdelay(10); | 896 | mdelay(10); |
913 | snd_soc_update_bits(codec, | 897 | snd_soc_update_bits(codec, |
914 | RT286_CBJ_CTRL1, 0x0400, 0x0400); | ||
915 | snd_soc_update_bits(codec, | ||
916 | RT286_DC_GAIN, 0x200, 0x0); | 898 | RT286_DC_GAIN, 0x200, 0x0); |
917 | 899 | ||
918 | break; | 900 | break; |
@@ -920,8 +902,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec, | |||
920 | case SND_SOC_BIAS_STANDBY: | 902 | case SND_SOC_BIAS_STANDBY: |
921 | snd_soc_write(codec, | 903 | snd_soc_write(codec, |
922 | RT286_SET_AUDIO_POWER, AC_PWRST_D3); | 904 | RT286_SET_AUDIO_POWER, AC_PWRST_D3); |
923 | snd_soc_update_bits(codec, | ||
924 | RT286_CBJ_CTRL1, 0x0400, 0x0000); | ||
925 | break; | 905 | break; |
926 | 906 | ||
927 | default: | 907 | default: |