summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>2016-07-25 01:52:43 +0000
committerMark Brown <broonie@kernel.org>2016-07-27 20:12:30 +0100
commit93ca33c99f22a0a096f83f19c9f887aeb67507a1 (patch)
tree524ee7c94a4fa566935bd8d773203a718fe4a2b0 /sound/soc/sh
parent523d939ef98fd712632d93a5a2b588e477a7565e (diff)
downloadlinux-93ca33c99f22a0a096f83f19c9f887aeb67507a1.tar.bz2
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/soc/sh')
-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;
}
/*