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.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 23c4efbe13a6..e4348d25fca3 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -47,6 +47,13 @@
47 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ 47 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
48 .put = snd_soc_put_volsw, \ 48 .put = snd_soc_put_volsw, \
49 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } 49 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
50#define SOC_SINGLE_RANGE(xname, xreg, xshift, xmin, xmax, xinvert) \
51{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
52 .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \
53 .put = snd_soc_put_volsw_range, \
54 .private_value = (unsigned long)&(struct soc_mixer_control) \
55 {.reg = xreg, .shift = xshift, .min = xmin,\
56 .max = xmax, .platform_max = xmax, .invert = xinvert} }
50#define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \ 57#define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \
51{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 58{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
52 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ 59 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
@@ -67,6 +74,16 @@
67 {.reg = xreg, .rreg = xreg, \ 74 {.reg = xreg, .rreg = xreg, \
68 .shift = xshift, .rshift = xshift, \ 75 .shift = xshift, .rshift = xshift, \
69 .max = xmax, .min = xmin} } 76 .max = xmax, .min = xmin} }
77#define SOC_SINGLE_RANGE_TLV(xname, xreg, xshift, xmin, xmax, xinvert, tlv_array) \
78{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
79 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
80 SNDRV_CTL_ELEM_ACCESS_READWRITE,\
81 .tlv.p = (tlv_array), \
82 .info = snd_soc_info_volsw_range, \
83 .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \
84 .private_value = (unsigned long)&(struct soc_mixer_control) \
85 {.reg = xreg, .shift = xshift, .min = xmin,\
86 .max = xmax, .platform_max = xmax, .invert = xinvert} }
70#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \ 87#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \
71{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 88{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
72 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ 89 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \
@@ -460,6 +477,12 @@ int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
460 struct snd_ctl_elem_value *ucontrol); 477 struct snd_ctl_elem_value *ucontrol);
461int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, 478int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
462 struct snd_ctl_elem_value *ucontrol); 479 struct snd_ctl_elem_value *ucontrol);
480int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol,
481 struct snd_ctl_elem_info *uinfo);
482int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
483 struct snd_ctl_elem_value *ucontrol);
484int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
485 struct snd_ctl_elem_value *ucontrol);
463int snd_soc_limit_volume(struct snd_soc_codec *codec, 486int snd_soc_limit_volume(struct snd_soc_codec *codec,
464 const char *name, int max); 487 const char *name, int max);
465int snd_soc_bytes_info(struct snd_kcontrol *kcontrol, 488int snd_soc_bytes_info(struct snd_kcontrol *kcontrol,