[PATCH v8 03/14] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit

Maxime Ripard maxime at cerno.tech
Tue Oct 27 18:50:16 CET 2020


On Mon, Oct 26, 2020 at 07:52:28PM +0100, Clément Péron wrote:
> 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: 619c15f7fac9 ("ASoC: sun4i-i2s: Change SR and WSS computation")
> Reviewed-by: Chen-Yu Tsai <wens at csie.org>
> Signed-off-by: Clément Péron <peron.clem at gmail.com>

Acked-by: Maxime Ripard <mripard at kernel.org>

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20201027/6a2cd5e9/attachment.sig>


More information about the Alsa-devel mailing list