diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-10-05 03:29:25 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-05 12:10:10 -0400 |
commit | 974815ba4f88f3f12f6f01384e822b23be058323 (patch) | |
tree | d3b702b3b1189615106d889b19d192b37afc08d7 /include/sound/soc.h | |
parent | f7915d997554d4e2ce123c7a4ddd28e12c2e034c (diff) |
ASoC: core: Combine snd_soc_put_volsw/put_volsw_2r functions
Handle the put_volsw/put_volsw_2r in one function.
To avoid build breakage in twl6040 keep the
snd_soc_put_volsw_2r as define, and map it snd_soc_put_volsw.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index e5e424ef3f7d..1738c2b6b373 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -64,7 +64,7 @@ | |||
64 | #define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert) \ | 64 | #define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert) \ |
65 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 65 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ |
66 | .info = snd_soc_info_volsw, \ | 66 | .info = snd_soc_info_volsw, \ |
67 | .get = snd_soc_get_volsw, .put = snd_soc_put_volsw_2r, \ | 67 | .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \ |
68 | .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \ | 68 | .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \ |
69 | xmax, xinvert) } | 69 | xmax, xinvert) } |
70 | #define SOC_DOUBLE_TLV(xname, reg, shift_left, shift_right, max, invert, tlv_array) \ | 70 | #define SOC_DOUBLE_TLV(xname, reg, shift_left, shift_right, max, invert, tlv_array) \ |
@@ -82,7 +82,7 @@ | |||
82 | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ | 82 | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ |
83 | .tlv.p = (tlv_array), \ | 83 | .tlv.p = (tlv_array), \ |
84 | .info = snd_soc_info_volsw, \ | 84 | .info = snd_soc_info_volsw, \ |
85 | .get = snd_soc_get_volsw, .put = snd_soc_put_volsw_2r, \ | 85 | .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \ |
86 | .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \ | 86 | .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \ |
87 | xmax, xinvert) } | 87 | xmax, xinvert) } |
88 | #define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \ | 88 | #define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \ |
@@ -393,8 +393,7 @@ int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, | |||
393 | struct snd_ctl_elem_value *ucontrol); | 393 | struct snd_ctl_elem_value *ucontrol); |
394 | int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, | 394 | int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, |
395 | struct snd_ctl_elem_value *ucontrol); | 395 | struct snd_ctl_elem_value *ucontrol); |
396 | int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, | 396 | #define snd_soc_put_volsw_2r snd_soc_put_volsw |
397 | struct snd_ctl_elem_value *ucontrol); | ||
398 | int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol, | 397 | int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol, |
399 | struct snd_ctl_elem_info *uinfo); | 398 | struct snd_ctl_elem_info *uinfo); |
400 | int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, | 399 | int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, |