]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: codecs: va-macro: use fsgen as clock
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Wed, 27 Jul 2022 12:47:49 +0000 (13:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:45:51 +0000 (11:45 +0200)
commit1c5be8157340edde440a9bb160b8789f01451ce2
tree2616ede72a7f150cbdddc2556e9bf08d0130221a
parent8044f035b0c7e3c5cc3af001e702288ca64af1ca
ASoC: codecs: va-macro: use fsgen as clock

[ Upstream commit 30097967e0566cac817273ef76add100f6b0f463 ]

VA Macro fsgen clock is supplied to other LPASS Macros using proper
clock apis, however the internal user uses the registers directly without
clk apis. This approch has race condition where in external users of
the clock might cut the clock while VA macro is actively using this.

Moving the internal usage to clk apis would provide a proper refcounting
and avoid such race conditions.

This issue was noticed while headset was pulled out while recording is
in progress and shifting record patch to DMIC.

Reported-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/20220727124749.4604-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/lpass-va-macro.c