ASoC: rt5650: add mutex to avoid the jack detection failure
authorShuming Fan <shumingf@realtek.com>
Wed, 22 Nov 2023 10:01:23 +0000 (18:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:51:40 +0000 (11:51 +0100)
commit8f82f2e4d9c4966282e494ae67b0bc05a6c2b904
tree87541cd7a94837c5bd8a24936e25dba9d36f3093
parentd568aed978dabf2e4257eaa0b1ec35cd99cab423
ASoC: rt5650: add mutex to avoid the jack detection failure

[ Upstream commit cdba4301adda7c60a2064bf808e48fccd352aaa9 ]

This patch adds the jd_mutex to protect the jack detection control flow.
And only the headset type could check the button status.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20231122100123.2831753-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/rt5645.c