aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2009-01-08 06:34:29 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-08 08:09:52 -0500
commit741555568f8ba307c626019787c412f4386cafdc (patch)
tree6d1d8683d13d838e9eeb87899718b8ba5a1fddc4 /include/sound
parent227b4dc6432d271eecd0ff0aefe6f0897ec47397 (diff)
ASoC: Merge the soc_value_enum to soc_enum struct
Merge the recently introduced soc_value_enum structure to the soc_enum. The value based enums are still handled separately from the normal enum types, but with the merge some of the newly introduced functions can be removed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h2
-rw-r--r--include/sound/soc.h15
2 files changed, 2 insertions, 15 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 4af1083e3287..93a4edb148b5 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -178,7 +178,7 @@
178 .private_value = (unsigned long)&xenum } 178 .private_value = (unsigned long)&xenum }
179#define SOC_DAPM_VALUE_ENUM(xname, xenum) \ 179#define SOC_DAPM_VALUE_ENUM(xname, xenum) \
180{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 180{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
181 .info = snd_soc_info_value_enum_double, \ 181 .info = snd_soc_info_enum_double, \
182 .get = snd_soc_dapm_get_value_enum_double, \ 182 .get = snd_soc_dapm_get_value_enum_double, \
183 .put = snd_soc_dapm_put_value_enum_double, \ 183 .put = snd_soc_dapm_put_value_enum_double, \
184 .private_value = (unsigned long)&xenum } 184 .private_value = (unsigned long)&xenum }
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9b930d342116..24593ac3ea19 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -106,7 +106,7 @@
106 .private_value = (unsigned long)&xenum } 106 .private_value = (unsigned long)&xenum }
107#define SOC_VALUE_ENUM(xname, xenum) \ 107#define SOC_VALUE_ENUM(xname, xenum) \
108{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\ 108{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\
109 .info = snd_soc_info_value_enum_double, \ 109 .info = snd_soc_info_enum_double, \
110 .get = snd_soc_get_value_enum_double, \ 110 .get = snd_soc_get_value_enum_double, \
111 .put = snd_soc_put_value_enum_double, \ 111 .put = snd_soc_put_value_enum_double, \
112 .private_value = (unsigned long)&xenum } 112 .private_value = (unsigned long)&xenum }
@@ -211,8 +211,6 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
211 struct snd_ctl_elem_value *ucontrol); 211 struct snd_ctl_elem_value *ucontrol);
212int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, 212int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
213 struct snd_ctl_elem_value *ucontrol); 213 struct snd_ctl_elem_value *ucontrol);
214int snd_soc_info_value_enum_double(struct snd_kcontrol *kcontrol,
215 struct snd_ctl_elem_info *uinfo);
216int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol, 214int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol,
217 struct snd_ctl_elem_value *ucontrol); 215 struct snd_ctl_elem_value *ucontrol);
218int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol, 216int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol,
@@ -419,17 +417,6 @@ struct soc_enum {
419 unsigned char shift_l; 417 unsigned char shift_l;
420 unsigned char shift_r; 418 unsigned char shift_r;
421 unsigned int max; 419 unsigned int max;
422 const char **texts;
423 void *dapm;
424};
425
426/* semi enumerated kcontrol */
427struct soc_value_enum {
428 unsigned short reg;
429 unsigned short reg2;
430 unsigned char shift_l;
431 unsigned char shift_r;
432 unsigned int max;
433 unsigned int mask; 420 unsigned int mask;
434 const char **texts; 421 const char **texts;
435 const unsigned int *values; 422 const unsigned int *values;