diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2009-07-15 07:33:50 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-15 11:59:06 -0400 |
commit | 3ce91d5a5a47eca6308c0a64f768c7a4466e0407 (patch) | |
tree | 4e0bf4501e995cc9e45ad62c43689a7ddc37294c /include/sound/soc.h | |
parent | d0af93db12639c425adee795fabadedb52182346 (diff) |
ASoC: add SOC_DOUBLE_R_EXT_TLV control type
This is a macro for double controls with special callback function and
TLV. The SOC_DOUBLE_R_EXT_TLV needs two registers and one shift for
double controls.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 795a6b4a67ee..756fb59772d1 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -146,6 +146,17 @@ | |||
146 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 146 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
147 | {.reg = xreg, .shift = shift_left, .rshift = shift_right, \ | 147 | {.reg = xreg, .shift = shift_left, .rshift = shift_right, \ |
148 | .max = xmax, .invert = xinvert} } | 148 | .max = xmax, .invert = xinvert} } |
149 | #define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert,\ | ||
150 | xhandler_get, xhandler_put, tlv_array) \ | ||
151 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | ||
152 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | ||
153 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | ||
154 | .tlv.p = (tlv_array), \ | ||
155 | .info = snd_soc_info_volsw_2r, \ | ||
156 | .get = xhandler_get, .put = xhandler_put, \ | ||
157 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | ||
158 | {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ | ||
159 | .max = xmax, .invert = xinvert} } | ||
149 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ | 160 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ |
150 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 161 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
151 | .info = snd_soc_info_bool_ext, \ | 162 | .info = snd_soc_info_bool_ext, \ |