aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 697e7ffe39d7..65e9d03ed4f5 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -170,6 +170,21 @@
170 .get = xhandler_get, .put = xhandler_put, \ 170 .get = xhandler_get, .put = xhandler_put, \
171 .private_value = (unsigned long)&xenum } 171 .private_value = (unsigned long)&xenum }
172 172
173#define SOC_DOUBLE_R_SX_TLV(xname, xreg_left, xreg_right, xshift,\
174 xmin, xmax, tlv_array) \
175{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
176 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
177 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
178 .tlv.p = (tlv_array), \
179 .info = snd_soc_info_volsw_2r_sx, \
180 .get = snd_soc_get_volsw_2r_sx, \
181 .put = snd_soc_put_volsw_2r_sx, \
182 .private_value = (unsigned long)&(struct soc_mixer_control) \
183 {.reg = xreg_left, \
184 .rreg = xreg_right, .shift = xshift, \
185 .min = xmin, .max = xmax} }
186
187
173/* 188/*
174 * Simplified versions of above macros, declaring a struct and calculating 189 * Simplified versions of above macros, declaring a struct and calculating
175 * ARRAY_SIZE internally 190 * ARRAY_SIZE internally
@@ -329,6 +344,12 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
329 struct snd_ctl_elem_value *ucontrol); 344 struct snd_ctl_elem_value *ucontrol);
330int snd_soc_limit_volume(struct snd_soc_codec *codec, 345int snd_soc_limit_volume(struct snd_soc_codec *codec,
331 const char *name, int max); 346 const char *name, int max);
347int snd_soc_info_volsw_2r_sx(struct snd_kcontrol *kcontrol,
348 struct snd_ctl_elem_info *uinfo);
349int snd_soc_get_volsw_2r_sx(struct snd_kcontrol *kcontrol,
350 struct snd_ctl_elem_value *ucontrol);
351int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol,
352 struct snd_ctl_elem_value *ucontrol);
332 353
333/** 354/**
334 * struct snd_soc_jack_pin - Describes a pin to update based on jack detection 355 * struct snd_soc_jack_pin - Describes a pin to update based on jack detection