diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2009-07-15 07:33:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-15 11:59:06 -0400 |
commit | d0af93db12639c425adee795fabadedb52182346 (patch) | |
tree | e631b2f730ae9957827fca03761aad4da665cf58 /include/sound | |
parent | 4b75e9476737dffef44a66818a4a481edd2512a1 (diff) |
ASoC: add SOC_DOUBLE_EXT_TLV control type
This is a macro for double controls with special callback function and
TLV. The SOC_DOUBLE_EXT_TLV needs one register and two shifts 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')
-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 94fcc65609b6..795a6b4a67ee 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -135,6 +135,17 @@ | |||
135 | .info = snd_soc_info_volsw, \ | 135 | .info = snd_soc_info_volsw, \ |
136 | .get = xhandler_get, .put = xhandler_put, \ | 136 | .get = xhandler_get, .put = xhandler_put, \ |
137 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } | 137 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } |
138 | #define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\ | ||
139 | xhandler_get, xhandler_put, tlv_array) \ | ||
140 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | ||
141 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | ||
142 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | ||
143 | .tlv.p = (tlv_array), \ | ||
144 | .info = snd_soc_info_volsw, \ | ||
145 | .get = xhandler_get, .put = xhandler_put, \ | ||
146 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | ||
147 | {.reg = xreg, .shift = shift_left, .rshift = shift_right, \ | ||
148 | .max = xmax, .invert = xinvert} } | ||
138 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ | 149 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ |
139 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 150 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
140 | .info = snd_soc_info_bool_ext, \ | 151 | .info = snd_soc_info_bool_ext, \ |