aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-01-16 10:02:11 -0500
committerMark Brown <broonie@linaro.org>2014-02-03 07:44:50 -0500
commitcd21b123346c6a2f033d8c3bd2bf240198b5712a (patch)
treeaa8374e3da4e4f360de590812529099cbe6f74a7 /include/sound
parentf227b88f0fce5f9b82aa934f8829a741c2e06d82 (diff)
ASoC: core: Add SOC_DOUBLE_R_S_TLV
Add a macro for signed mixer with two registers and tlv array. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a25f3ccb3fde..c4be7ab89399 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -45,6 +45,11 @@
45 ((unsigned long)&(struct soc_mixer_control) \ 45 ((unsigned long)&(struct soc_mixer_control) \
46 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \ 46 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
47 .max = xmax, .platform_max = xmax, .invert = xinvert}) 47 .max = xmax, .platform_max = xmax, .invert = xinvert})
48#define SOC_DOUBLE_R_S_VALUE(xlreg, xrreg, xshift, xmin, xmax, xsign_bit, xinvert) \
49 ((unsigned long)&(struct soc_mixer_control) \
50 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
51 .max = xmax, .min = xmin, .platform_max = xmax, .sign_bit = xsign_bit, \
52 .invert = xinvert})
48#define SOC_DOUBLE_R_RANGE_VALUE(xlreg, xrreg, xshift, xmin, xmax, xinvert) \ 53#define SOC_DOUBLE_R_RANGE_VALUE(xlreg, xrreg, xshift, xmin, xmax, xinvert) \
49 ((unsigned long)&(struct soc_mixer_control) \ 54 ((unsigned long)&(struct soc_mixer_control) \
50 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \ 55 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
@@ -152,6 +157,15 @@
152 {.reg = xreg, .rreg = xrreg, \ 157 {.reg = xreg, .rreg = xrreg, \
153 .shift = xshift, .rshift = xshift, \ 158 .shift = xshift, .rshift = xshift, \
154 .max = xmax, .min = xmin} } 159 .max = xmax, .min = xmin} }
160#define SOC_DOUBLE_R_S_TLV(xname, reg_left, reg_right, xshift, xmin, xmax, xsign_bit, xinvert, tlv_array) \
161{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
162 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
163 SNDRV_CTL_ELEM_ACCESS_READWRITE,\
164 .tlv.p = (tlv_array), \
165 .info = snd_soc_info_volsw, \
166 .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
167 .private_value = SOC_DOUBLE_R_S_VALUE(reg_left, reg_right, xshift, \
168 xmin, xmax, xsign_bit, xinvert) }
155#define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \ 169#define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \
156{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ 170{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
157 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ 171 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \