Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Add SOC_SINGLE_RANGE_EXT_TLV macro

Add a version of the SOC_SINGLE_RANGE_TLV macro that allows a custom get
and put to be specified.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Charles Keepax and committed by
Mark Brown
a54e22f4 002b083b

+12
+12
include/sound/soc.h
··· 226 226 .info = snd_soc_info_volsw, \ 227 227 .get = xhandler_get, .put = xhandler_put, \ 228 228 .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, 0) } 229 + #define SOC_SINGLE_RANGE_EXT_TLV(xname, xreg, xshift, xmin, xmax, xinvert, \ 230 + xhandler_get, xhandler_put, tlv_array) \ 231 + { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 232 + .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ 233 + SNDRV_CTL_ELEM_ACCESS_READWRITE,\ 234 + .tlv.p = (tlv_array), \ 235 + .info = snd_soc_info_volsw_range, \ 236 + .get = xhandler_get, .put = xhandler_put, \ 237 + .private_value = (unsigned long)&(struct soc_mixer_control) \ 238 + {.reg = xreg, .rreg = xreg, .shift = xshift, \ 239 + .rshift = xshift, .min = xmin, .max = xmax, \ 240 + .platform_max = xmax, .invert = xinvert} } 229 241 #define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\ 230 242 xhandler_get, xhandler_put, tlv_array) \ 231 243 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \