Unverified Commit 25abdc15 authored by Shuming Fan's avatar Shuming Fan Committed by Mark Brown
Browse files

ASoC: rt1320: fix the remainder calculation of r0 value



This patch fixes the remainder calculation of r0 value.

Fixes: 836ecc74 ("ASoC: rt1320: fix 32-bit link failure")
Signed-off-by: default avatarShuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20251226064255.993735-1-shumingf@realtek.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fc22dfb1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1093,8 +1093,8 @@ static void rt1320_calc_r0(struct rt1320_sdw_priv *rt1320)

	l_calir0 = rt1320->r0_l_reg >> 27;
	r_calir0 = rt1320->r0_r_reg >> 27;
	l_calir0_lo = (rt1320->r0_l_reg & ((1ull << 27) - 1) * 1000) >> 27;
	r_calir0_lo = (rt1320->r0_r_reg & ((1ull << 27) - 1) * 1000) >> 27;
	l_calir0_lo = ((rt1320->r0_l_reg & ((1ull << 27) - 1)) * 1000) >> 27;
	r_calir0_lo = ((rt1320->r0_r_reg & ((1ull << 27) - 1)) * 1000) >> 27;

	dev_dbg(dev, "%s, l_calir0=%lld.%03lld ohm, r_calir0=%lld.%03lld ohm\n", __func__,
		l_calir0, l_calir0_lo, r_calir0, r_calir0_lo);