]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/sound/soc.h
ASoC: Introduce SOC_SINGLE_S8_TLV() macro
[karo-tx-linux.git] / include / sound / soc.h
index fb955e69a78ea29f79bd4382b492bca009cd6fe7..fecde5b4d97865fee59a29ac7477f9ceebf530e5 100644 (file)
        .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
        .private_value = SOC_DOUBLE_R_S_VALUE(reg_left, reg_right, xshift, \
                                            xmin, xmax, xsign_bit, xinvert) }
+#define SOC_SINGLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \
+{      .iface  = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
+       .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
+                 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
+       .tlv.p  = (tlv_array), \
+       .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
+       .put = snd_soc_put_volsw, \
+       .private_value = (unsigned long)&(struct soc_mixer_control) \
+       {.reg = xreg, .rreg = xreg,  \
+        .min = xmin, .max = xmax, .platform_max = xmax, \
+       .sign_bit = 7,} }
 #define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \
 {      .iface  = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
        .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \