ASoS: samsung: odroid: Fix clock configuration for 44100 sample rate 25/201125/1
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 8 Mar 2019 15:36:38 +0000 (16:36 +0100)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 8 Mar 2019 15:36:38 +0000 (16:36 +0100)
commitf707903a809938ef09f4bcf6368e6cc83b2fc991
treea25d65d7c36690c038ce11708d66de8e75717142
parent7316ba0d62bb4f6ee663e8307ed2f352ffe24dec
ASoS: samsung: odroid: Fix clock configuration for 44100 sample rate

After commit fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample
rate handling") due to clock rounding error CODEC master clock frequency
is being set to 20070401 Hz instead of 22579000 Hz.
This results in too fast actual sample rate for fs=44100, e.g. 2 kHz tone
has really 3555 Hz frequency (2000 Hz * 20070401/22579000 * 2).

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

Change-Id: I8d08bec8e70394421c115bde1d511b730885bbe2
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
sound/soc/samsung/odroid.c