Commit 1fdc7dd5 authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Mark Brown

ASoC: rx1950: Fix clkdiv for 16khz and 48khz

Usage of 256 as clkdiv gives better rounding error (<1%)
for 16khz and 48khz
Signed-off-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8e3dce4d
...@@ -171,9 +171,9 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream, ...@@ -171,9 +171,9 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream,
case 16000: case 16000:
case 48000: case 48000:
clk_source = S3C24XX_CLKSRC_PCLK; clk_source = S3C24XX_CLKSRC_PCLK;
fs_mode = S3C2410_IISMOD_384FS; fs_mode = S3C2410_IISMOD_256FS;
div = s3c24xx_i2s_get_clockrate() / (384 * rate); div = s3c24xx_i2s_get_clockrate() / (256 * rate);
if (s3c24xx_i2s_get_clockrate() % (384 * rate) > (182 * rate)) if (s3c24xx_i2s_get_clockrate() % (256 * rate) > (128 * rate))
div++; div++;
break; break;
case 44100: case 44100:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment