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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index bca9538d9e50..9fa2093e74eb 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -73,6 +73,15 @@
73 .get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \ 73 .get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \
74 .private_value = (reg_left) | ((shift) << 8) | \ 74 .private_value = (reg_left) | ((shift) << 8) | \
75 ((max) << 12) | ((invert) << 20) | ((reg_right) << 24) } 75 ((max) << 12) | ((invert) << 20) | ((reg_right) << 24) }
76#define SOC_DOUBLE_S8_TLV(xname, reg, min, max, tlv_array) \
77{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
78 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
79 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
80 .tlv.p = (tlv_array), \
81 .info = snd_soc_info_volsw_s8, .get = snd_soc_get_volsw_s8, \
82 .put = snd_soc_put_volsw_s8, \
83 .private_value = (reg) | (((signed char)max) << 16) | \
84 (((signed char)min) << 24) }
76#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \ 85#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \
77{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ 86{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
78 .mask = xmask, .texts = xtexts } 87 .mask = xmask, .texts = xtexts }
@@ -267,6 +276,12 @@ int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol,
267 struct snd_ctl_elem_value *ucontrol); 276 struct snd_ctl_elem_value *ucontrol);
268int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, 277int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol,
269 struct snd_ctl_elem_value *ucontrol); 278 struct snd_ctl_elem_value *ucontrol);
279int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol,
280 struct snd_ctl_elem_info *uinfo);
281int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
282 struct snd_ctl_elem_value *ucontrol);
283int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
284 struct snd_ctl_elem_value *ucontrol);
270 285
271/* SoC PCM stream information */ 286/* SoC PCM stream information */
272struct snd_soc_pcm_stream { 287struct snd_soc_pcm_stream {