ASoC: rt5682s: Stabilize the combo jack detection
authorDerek Fang <derek.fang@realtek.com>
Mon, 7 Mar 2022 10:21:54 +0000 (18:21 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 7 Mar 2022 13:14:52 +0000 (13:14 +0000)
commitb41d6195b2f0c5d5df009aa518958f3c46e66d9a
treeb5e5cad05e3ed625d77f03b93815c9d95637e60f
parentdb0350da8084ad549bca16cc0486c11cc70a1f9b
ASoC: rt5682s: Stabilize the combo jack detection

Changes:
1. Revise rt5682s_sar_power_mode and rt5682s_headset_detect to be more
   rational.
2. Manually set to the jack-unplugging state via rt5682s_headset_detect
   during going to suspend. Close unnecessary powers and prepare for
   re-detecting the CBJ during resuming.
3. Simplize rt5682s_resume.

Signed-off-by: Derek Fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/20220307102154.26065-1-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5682s.c