diff options
author | Hiroyuki Yokoyama | 2016-07-25 01:52:43 +0000 |
---|---|---|
committer | Mark Brown | 2016-07-27 20:12:30 +0100 |
commit | 93ca33c99f22a0a096f83f19c9f887aeb67507a1 (patch) | |
tree | 524ee7c94a4fa566935bd8d773203a718fe4a2b0 /sound/soc/sh | |
parent | 523d939ef98fd712632d93a5a2b588e477a7565e (diff) |
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.c | 6 |
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; } /* |