OSDN Git Service

ASoC: cs42l51: manage mclk shutdown delay
authorOlivier Moysan <olivier.moysan@st.com>
Tue, 20 Oct 2020 15:01:09 +0000 (17:01 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 23 Oct 2020 17:28:51 +0000 (18:28 +0100)
commit20afe581c9b980848ad097c4d54dde9bec7593ef
tree555381780ca78e4db8415f2a01d130ba370a8aa4
parent3f48b6eba15ea342ef4cb420b580f5ed6605669f
ASoC: cs42l51: manage mclk shutdown delay

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>
sound/soc/codecs/cs42l51.c