summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>2016-07-25 03:52:43 +0200
committerMark Brown <broonie@kernel.org>2016-07-27 21:12:30 +0200
commit93ca33c99f22a0a096f83f19c9f887aeb67507a1 (patch)
tree524ee7c94a4fa566935bd8d773203a718fe4a2b0 /sound
parentLinux 4.7 (diff)
downloadlinux-93ca33c99f22a0a096f83f19c9f887aeb67507a1.tar.xz
linux-93ca33c99f22a0a096f83f19c9f887aeb67507a1.zip
ASoC: rsnd: Fixup SRCm_IFSVR calculate method
This patch fixes the calculation accuracy degradation of SRCm_IFSVR register value. Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sh/rcar/src.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index e39f916d0f2f..969a5169de25 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -226,8 +226,12 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
ifscr = 0;
fsrate = 0;
if (fin != fout) {
+ u64 n;
+
ifscr = 1;
- fsrate = 0x0400000 / fout * fin;
+ n = (u64)0x0400000 * fin;
+ do_div(n, fout);
+ fsrate = n;
}
/*