提交 93ca33c9 编写于 作者: H Hiroyuki Yokoyama 提交者: Mark Brown

ASoC: rsnd: Fixup SRCm_IFSVR calculate method

This patch fixes the calculation accuracy degradation of SRCm_IFSVR
register value.
Signed-off-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 523d939e
......@@ -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;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册