diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-05-28 12:58:05 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-05-29 02:10:49 -0400 |
commit | e13ac2e9b18bde51cf32c69c2209df25791ab3e5 (patch) | |
tree | 67d308f63015d0da00998c7e1c1d12c55df7c6f9 /include | |
parent | a93bbaa77ea61c6bad684263a65f812b31bf9791 (diff) |
[ALSA] ASoC: Add SOC_DOUBLE_S8_TLV control type
The SOC_DOUBLE_S8_TLV control type was originally implemented in the
UDA1380 driver by Philipp Zabel and was moved into the core by me.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/soc.h | 15 |
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); |
268 | int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, | 277 | int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, |
269 | struct snd_ctl_elem_value *ucontrol); | 278 | struct snd_ctl_elem_value *ucontrol); |
279 | int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol, | ||
280 | struct snd_ctl_elem_info *uinfo); | ||
281 | int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, | ||
282 | struct snd_ctl_elem_value *ucontrol); | ||
283 | int 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 */ |
272 | struct snd_soc_pcm_stream { | 287 | struct snd_soc_pcm_stream { |