]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm8960: Fix clock configuration on slave mode
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 13 Oct 2021 05:17:04 +0000 (13:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Oct 2021 07:54:25 +0000 (09:54 +0200)
commit60bccfafd95b0a44e1d59d9860b15888387b836b
treecabd85f1c6207432a60c71bc34f969752d1d0365
parentb2d7b43d933965ce5c49440c99ab85a70fcc49ea
ASoC: wm8960: Fix clock configuration on slave mode

[ Upstream commit dcf0432a18a043cec28cbeacc5788f0dfe2d46ec ]

There is a noise issue for 8kHz sample rate on slave mode.
Compared with master mode, the difference is the DACDIV
setting, after correcting the DACDIV, the noise is gone.

There is no noise issue for 48kHz sample rate, because
the default value of DACDIV is correct for 48kHz.

So wm8960_configure_clocking() should be functional for
ADC and DAC function even if it is slave mode.

In order to be compatible for old use case, just add
condition for checking that sysclk is zero with
slave mode.

Fixes: 3de0fea9a9fa ("ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/1634102224-3922-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/wm8960.c