diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-02-25 11:46:57 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-03-01 20:15:38 +0100 |
commit | f1088d4b813fb4d20fc9e8e8db5ca252923f25eb (patch) | |
tree | ed962f3d6b6c238324d2df62a9a4bf2d95e03cca /sound/soc/codecs/rt5651.c | |
parent | ASoC: rt5651: Only configure OVCD once at set_jack time (diff) | |
download | linux-f1088d4b813fb4d20fc9e8e8db5ca252923f25eb.tar.xz linux-f1088d4b813fb4d20fc9e8e8db5ca252923f25eb.zip |
ASoC: rt5651: Always keep OVCD enabled
OVCD is not only useful for jack-type detection, but is also useful
to protect against over-current faults in general, so always keep
OVCD enabled, instead of only enabling it for jack-type detection.
Tested-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5651.c')
-rw-r--r-- | sound/soc/codecs/rt5651.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c index 41d7c192ac03..55bcc74e344f 100644 --- a/sound/soc/codecs/rt5651.c +++ b/sound/soc/codecs/rt5651.c @@ -1642,7 +1642,7 @@ static int rt5651_set_jack(struct snd_soc_component *component, RT5651_MIC1_OVTH_MASK | RT5651_PWR_CLK12M_MASK | RT5651_PWR_MB_MASK, - RT5651_MIC1_OVCD_DIS | + RT5651_MIC1_OVCD_EN | RT5651_MIC1_OVTH_600UA | RT5651_PWR_MB_PU | RT5651_PWR_CLK12M_PU); @@ -1849,9 +1849,6 @@ static int rt5651_jack_detect(struct snd_soc_component *component, int jack_inse if (jack_insert) { rt5651_enable_micbias1_for_ovcd(component); - snd_soc_component_update_bits(component, RT5651_MICBIAS, - RT5651_MIC1_OVCD_MASK, - RT5651_MIC1_OVCD_EN); msleep(100); if (snd_soc_component_read32(component, RT5651_IRQ_CTRL2) & RT5651_MB1_OC_CLR) jack_type = SND_JACK_HEADPHONE; @@ -1862,10 +1859,6 @@ static int rt5651_jack_detect(struct snd_soc_component *component, int jack_inse rt5651_disable_micbias1_for_ovcd(component); } else { /* jack out */ jack_type = 0; - - snd_soc_component_update_bits(component, RT5651_MICBIAS, - RT5651_MIC1_OVCD_MASK, - RT5651_MIC1_OVCD_DIS); } return jack_type; |