|
@@ -55,6 +55,18 @@
|
|
|
.info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
|
|
|
.put = snd_soc_put_volsw, \
|
|
|
.private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
|
|
|
+#define SOC_SINGLE_SX_TLV(xname, xreg, xshift, 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_sx,\
|
|
|
+ .put = snd_soc_put_volsw_sx, \
|
|
|
+ .private_value = (unsigned long)&(struct soc_mixer_control) \
|
|
|
+ {.reg = xreg, .rreg = xreg, \
|
|
|
+ .shift = xshift, .rshift = xshift, \
|
|
|
+ .max = xmax, .min = xmin} }
|
|
|
#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \
|
|
|
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
|
|
|
.info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \
|
|
@@ -85,6 +97,18 @@
|
|
|
.get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
|
|
|
.private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
|
|
|
xmax, xinvert) }
|
|
|
+#define SOC_DOUBLE_R_SX_TLV(xname, xreg, xrreg, xshift, 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_sx, \
|
|
|
+ .put = snd_soc_put_volsw_sx, \
|
|
|
+ .private_value = (unsigned long)&(struct soc_mixer_control) \
|
|
|
+ {.reg = xreg, .rreg = xrreg, \
|
|
|
+ .shift = xshift, .rshift = xshift, \
|
|
|
+ .max = xmax, .min = xmin} }
|
|
|
#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 | \
|
|
@@ -171,20 +195,6 @@
|
|
|
.get = xhandler_get, .put = xhandler_put, \
|
|
|
.private_value = (unsigned long)&xenum }
|
|
|
|
|
|
-#define SOC_DOUBLE_R_SX_TLV(xname, xreg_left, xreg_right, xshift,\
|
|
|
- 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_2r_sx, \
|
|
|
- .get = snd_soc_get_volsw_2r_sx, \
|
|
|
- .put = snd_soc_put_volsw_2r_sx, \
|
|
|
- .private_value = (unsigned long)&(struct soc_mixer_control) \
|
|
|
- {.reg = xreg_left, \
|
|
|
- .rreg = xreg_right, .shift = xshift, \
|
|
|
- .min = xmin, .max = xmax} }
|
|
|
-
|
|
|
#define SND_SOC_BYTES(xname, xbase, xregs) \
|
|
|
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
|
|
|
.info = snd_soc_bytes_info, .get = snd_soc_bytes_get, \
|
|
@@ -418,6 +428,10 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
|
|
|
struct snd_ctl_elem_value *ucontrol);
|
|
|
#define snd_soc_get_volsw_2r snd_soc_get_volsw
|
|
|
#define snd_soc_put_volsw_2r snd_soc_put_volsw
|
|
|
+int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol,
|
|
|
+ struct snd_ctl_elem_value *ucontrol);
|
|
|
+int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
|
|
|
+ struct snd_ctl_elem_value *ucontrol);
|
|
|
int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol,
|
|
|
struct snd_ctl_elem_info *uinfo);
|
|
|
int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
|
|
@@ -426,12 +440,6 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
|
|
|
struct snd_ctl_elem_value *ucontrol);
|
|
|
int snd_soc_limit_volume(struct snd_soc_codec *codec,
|
|
|
const char *name, int max);
|
|
|
-int snd_soc_info_volsw_2r_sx(struct snd_kcontrol *kcontrol,
|
|
|
- struct snd_ctl_elem_info *uinfo);
|
|
|
-int snd_soc_get_volsw_2r_sx(struct snd_kcontrol *kcontrol,
|
|
|
- struct snd_ctl_elem_value *ucontrol);
|
|
|
-int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol,
|
|
|
- struct snd_ctl_elem_value *ucontrol);
|
|
|
int snd_soc_bytes_info(struct snd_kcontrol *kcontrol,
|
|
|
struct snd_ctl_elem_info *uinfo);
|
|
|
int snd_soc_bytes_get(struct snd_kcontrol *kcontrol,
|