From 1fdc7dd537b78e73dfaca1ebfe497a05a2d34c9e Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Tue, 7 Sep 2010 17:04:18 +0300 Subject: 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: Vasily Khoruzhick Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/s3c24xx/rx1950_uda1380.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/soc/s3c24xx/rx1950_uda1380.c') diff --git a/sound/soc/s3c24xx/rx1950_uda1380.c b/sound/soc/s3c24xx/rx1950_uda1380.c index 9552296d27d9..ffd5cf2fb0a9 100644 --- a/sound/soc/s3c24xx/rx1950_uda1380.c +++ b/sound/soc/s3c24xx/rx1950_uda1380.c @@ -171,9 +171,9 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream, case 16000: case 48000: clk_source = S3C24XX_CLKSRC_PCLK; - fs_mode = S3C2410_IISMOD_384FS; - div = s3c24xx_i2s_get_clockrate() / (384 * rate); - if (s3c24xx_i2s_get_clockrate() % (384 * rate) > (182 * rate)) + fs_mode = S3C2410_IISMOD_256FS; + div = s3c24xx_i2s_get_clockrate() / (256 * rate); + if (s3c24xx_i2s_get_clockrate() % (256 * rate) > (128 * rate)) div++; break; case 44100: -- cgit v1.2.1