Unverified Commit 1e3cd64a authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown
Browse files

ASoC: ops: Factor out common code from get callbacks



There are only two differences between snd_soc_get_volsw() and
snd_soc_get_volsw_sx(). The maximum field is handled differently, and
snd_soc_get_volsw() supports double controls with both values in the
same register.

Factor out the common code into a new helper and pass in the
appropriate max value such that it is handled correctly for each
control.

Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250319175123.3835849-2-ckeepax@opensource.cirrus.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 318e8794
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment