Skip to content
Unverified Commit 9c2d255f authored by Clément Péron's avatar Clément Péron Committed by Mark Brown
Browse files

ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit



We are actually using a complex formula to just return a bunch of
simple values. Also this formula is wrong for sun4i when calling
get_wss() the function return 4 instead of 3.

Replace this with a simpler switch case.

Also drop the i2s params which is unused and return a simple int as
returning an error code could be out of range for an s8 and there is
no optim to return a s8 here.

Fixes: 619c15f7 ("ASoC: sun4i-i2s: Change SR and WSS computation")
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarClément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-5-peron.clem@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 73adf87b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment