mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate
After commitfbeec965b8
("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:fbeec965b8
("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>
This commit is contained in:
parent
54d1cf78b0
commit
2b13bee388
1 changed files with 2 additions and 2 deletions
|
@ -91,11 +91,11 @@ static int odroid_card_be_hw_params(struct snd_pcm_substream *substream,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We add 1 to the rclk_freq value in order to avoid too low clock
|
* We add 2 to the rclk_freq value in order to avoid too low clock
|
||||||
* frequency values due to the EPLL output frequency not being exact
|
* frequency values due to the EPLL output frequency not being exact
|
||||||
* multiple of the audio sampling rate.
|
* multiple of the audio sampling rate.
|
||||||
*/
|
*/
|
||||||
rclk_freq = params_rate(params) * rfs + 1;
|
rclk_freq = params_rate(params) * rfs + 2;
|
||||||
|
|
||||||
ret = clk_set_rate(priv->sclk_i2s, rclk_freq);
|
ret = clk_set_rate(priv->sclk_i2s, rclk_freq);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Reference in a new issue