diff options
Diffstat (limited to 'include/sound/wss.h')
-rw-r--r-- | include/sound/wss.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/sound/wss.h b/include/sound/wss.h index 2cc1f1462d8e..c896f6e1f937 100644 --- a/include/sound/wss.h +++ b/include/sound/wss.h | |||
@@ -193,6 +193,31 @@ int snd_wss_put_single(struct snd_kcontrol *kcontrol, | |||
193 | .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | \ | 193 | .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | \ |
194 | (shift_right << 19) | (mask << 24) | (invert << 22) } | 194 | (shift_right << 19) | (mask << 24) | (invert << 22) } |
195 | 195 | ||
196 | #define WSS_SINGLE_TLV(xname, xindex, reg, shift, mask, invert, xtlv) \ | ||
197 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | ||
198 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \ | ||
199 | .name = xname, \ | ||
200 | .index = xindex, \ | ||
201 | .info = snd_wss_info_single, \ | ||
202 | .get = snd_wss_get_single, \ | ||
203 | .put = snd_wss_put_single, \ | ||
204 | .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24), \ | ||
205 | .tlv = { .p = (xtlv) } } | ||
206 | |||
207 | #define WSS_DOUBLE_TLV(xname, xindex, left_reg, right_reg, \ | ||
208 | shift_left, shift_right, mask, invert, xtlv) \ | ||
209 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | ||
210 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \ | ||
211 | .name = xname, \ | ||
212 | .index = xindex, \ | ||
213 | .info = snd_wss_info_double, \ | ||
214 | .get = snd_wss_get_double, \ | ||
215 | .put = snd_wss_put_double, \ | ||
216 | .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | \ | ||
217 | (shift_right << 19) | (mask << 24) | (invert << 22), \ | ||
218 | .tlv = { .p = (xtlv) } } | ||
219 | |||
220 | |||
196 | int snd_wss_info_double(struct snd_kcontrol *kcontrol, | 221 | int snd_wss_info_double(struct snd_kcontrol *kcontrol, |
197 | struct snd_ctl_elem_info *uinfo); | 222 | struct snd_ctl_elem_info *uinfo); |
198 | int snd_wss_get_double(struct snd_kcontrol *kcontrol, | 223 | int snd_wss_get_double(struct snd_kcontrol *kcontrol, |