]> git.ipfire.org Git - people/arne_f/kernel.git/commit
ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 12 Mar 2019 17:40:06 +0000 (18:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 May 2019 15:53:09 +0000 (17:53 +0200)
commit97916fe0b8fa34954c7a5fa5b515e458d2b48043
treefe052c4e4c48dfd95dce4b56c36e8baaffe70cca
parent4e244b64fbdf4d7200f5dfcf31f44e0e0f971bf2
ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate

[ Upstream commit 2b13bee3884926cba22061efa75bd315e871de24 ]

After commit fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample rate
handling") the audio root clock frequency is configured improperly for
44100 sample rate. Due to clock rate rounding it's 20070401 Hz instead
of 22579000 Hz. This results in a too low value of the PSR clock divider
in the CPU DAI driver and too fast actual sample rate for fs=44100. E.g.
1 kHz tone has actual 1780 Hz frequency (1 kHz * 20070401/22579000 * 2).

Fix this by increasing the correction passed to clk_set_rate() to take
into account inaccuracy of the EPLL frequency properly.

Fixes: fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample rate handling")
Reported-by: JaeChul Lee <jcsing.lee@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/samsung/odroid.c