ASoC: rt5682: fix the wrong jack type detected
authorDerek Fang <derek.fang@realtek.com>
Tue, 14 Dec 2021 10:50:33 +0000 (18:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:29:01 +0000 (12:29 +0100)
commitaa50406f36a163676922b8edcbb2dac935e328ed
treee82a84878745152989490cc313c767ccebdfa302
parent46b3fe1eb2b73d5658d919c6a325e580230280d2
ASoC: rt5682: fix the wrong jack type detected

commit 8deb34a90f06374fd26f722c2a79e15160f66be7 upstream.

Some powers were changed during the jack insert detection
and clk's enable/disable in CCF.
If in parallel, the influence has a chance to detect
the wrong jack type, so add a lock.

Signed-off-by: Derek Fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/20211214105033.471-1-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/rt5682.c