ASoC: core: add SOC_DOUBLE_RANGE_TLV() helper macro
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 5 Mar 2024 14:36:30 +0000 (15:36 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 26 Mar 2024 14:55:20 +0000 (14:55 +0000)
commitd75a21611a6e723d81db3f827e131ad39b69186c
tree02435ce6b95496ee40769d7e997fba29d5296ef5
parentcce4cbb157493483f03c21213753b66425a31430
ASoC: core: add SOC_DOUBLE_RANGE_TLV() helper macro

No macro currently allows handling a stereo control that has left and right
in the same register and whose minimum register value is not zero. Add one
that does that.

Note that even though the snd_soc_*_volsw_range() look more appropriate
given the _range suffix, they are not suitable because they don't honor the
two shift values. The snd_soc_*_volsw() look more generic and are suitable
for the task.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://msgid.link/r/20240305-rk3308-audio-codec-v4-3-312acdbe628f@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h