]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: tlv320dac33: Correct the OSCSET calculation
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>
Tue, 16 Feb 2010 11:23:16 +0000 (13:23 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 16 Feb 2010 19:14:53 +0000 (19:14 +0000)
OSCSET calculation was not correct in case of 44.1KHz
sampling rate.
With small adjustment both 48 and 44.1 KHz calculation
now gives the correct value.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/tlv320dac33.c

index dab7fd5be86786df663ef9a229f19b5a97000743..f9f367d29a9095e8bc5a44be2da0da9b45f4ba7e 100644 (file)
@@ -700,7 +700,7 @@ static int dac33_hw_params(struct snd_pcm_substream *substream,
 }
 
 #define CALC_OSCSET(rate, refclk) ( \
-       ((((rate * 10000) / refclk) * 4096) + 5000) / 10000)
+       ((((rate * 10000) / refclk) * 4096) + 7000) / 10000)
 #define CALC_RATIOSET(rate, refclk) ( \
        ((((refclk  * 100000) / rate) * 16384) + 50000) / 100000)