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>
This commit is contained in:
Hiroyuki Yokoyama 2016-07-25 01:52:43 +00:00 committed by Mark Brown
parent 523d939ef9
commit 93ca33c99f
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}
/*