diff options
author | Oder Chiou <oder_chiou@realtek.com> | 2021-07-16 16:58:53 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-07-16 13:55:00 +0100 |
commit | 6a503e1c455316fd0bfd8188c0a62cce7c5525ca (patch) | |
tree | 53fc942b33fd2a1bf4523ae44c1823ea121aba9f | |
parent | 7883490cba002121a5870e786a1dc0acce5e1caf (diff) | |
download | lwn-6a503e1c455316fd0bfd8188c0a62cce7c5525ca.tar.gz lwn-6a503e1c455316fd0bfd8188c0a62cce7c5525ca.zip |
ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend
While using the DMIC recording, the garbled data will be captured by the
DMIC. It is caused by the critical power of PLL closed in the jack detect
function.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20210716085853.20170-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt5682.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index e4c91571abae..abcd6f483788 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -973,10 +973,14 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert) rt5682_enable_push_button_irq(component, false); snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1, RT5682_TRIG_JD_MASK, RT5682_TRIG_JD_LOW); - if (!snd_soc_dapm_get_pin_status(dapm, "MICBIAS")) + if (!snd_soc_dapm_get_pin_status(dapm, "MICBIAS") && + !snd_soc_dapm_get_pin_status(dapm, "PLL1") && + !snd_soc_dapm_get_pin_status(dapm, "PLL2B")) snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1, RT5682_PWR_MB, 0); - if (!snd_soc_dapm_get_pin_status(dapm, "Vref2")) + if (!snd_soc_dapm_get_pin_status(dapm, "Vref2") && + !snd_soc_dapm_get_pin_status(dapm, "PLL1") && + !snd_soc_dapm_get_pin_status(dapm, "PLL2B")) snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1, RT5682_PWR_VREF2, 0); snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3, |