]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: cs42l51: manage mclk shutdown delay
authorOlivier Moysan <olivier.moysan@st.com>
Tue, 20 Oct 2020 15:01:09 +0000 (17:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:09 +0000 (19:22 +0100)
commitc9a05f6ef65e9f6e4c57355f6872aa52e67f4c6a
tree44cd91bec4ea315bcedb374996cf5fbda3707e65
parent0aba4532c183c2643638d16e873df7ec9f620222
ASoC: cs42l51: manage mclk shutdown delay

[ Upstream commit 20afe581c9b980848ad097c4d54dde9bec7593ef ]

A delay must be introduced before the shutdown down of the mclk,
as stated in CS42L51 datasheet. Otherwise the codec may
produce some noise after the end of DAPM power down sequence.
The delay between DAC and CLOCK_SUPPLY widgets is too short.
Add a delay in mclk shutdown request to manage the shutdown delay
explicitly. From experiments, at least 10ms delay is necessary.
Set delay to 20ms as recommended in Documentation/timers/timers-howto.rst
when using msleep().

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/20201020150109.482-1-olivier.moysan@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cs42l51.c