diff options
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index fadcb351f3e1..38769cc900c9 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -36,6 +36,11 @@ | |||
36 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ | 36 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ |
37 | .rshift = shift_right, .max = xmax, .platform_max = xmax, \ | 37 | .rshift = shift_right, .max = xmax, .platform_max = xmax, \ |
38 | .invert = xinvert, .autodisable = xautodisable}) | 38 | .invert = xinvert, .autodisable = xautodisable}) |
39 | #define SOC_DOUBLE_S_VALUE(xreg, shift_left, shift_right, xmin, xmax, xsign_bit, xinvert, xautodisable) \ | ||
40 | ((unsigned long)&(struct soc_mixer_control) \ | ||
41 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ | ||
42 | .rshift = shift_right, .min = xmin, .max = xmax, .platform_max = xmax, \ | ||
43 | .sign_bit = xsign_bit, .invert = xinvert, .autodisable = xautodisable}) | ||
39 | #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, xautodisable) \ | 44 | #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, xautodisable) \ |
40 | SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert, xautodisable) | 45 | SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert, xautodisable) |
41 | #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ | 46 | #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ |
@@ -171,11 +176,9 @@ | |||
171 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | 176 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ |
172 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | 177 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ |
173 | .tlv.p = (tlv_array), \ | 178 | .tlv.p = (tlv_array), \ |
174 | .info = snd_soc_info_volsw_s8, .get = snd_soc_get_volsw_s8, \ | 179 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ |
175 | .put = snd_soc_put_volsw_s8, \ | 180 | .put = snd_soc_put_volsw, \ |
176 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 181 | .private_value = SOC_DOUBLE_S_VALUE(xreg, 0, 8, xmin, xmax, 7, 0, 0) } |
177 | {.reg = xreg, .min = xmin, .max = xmax, \ | ||
178 | .platform_max = xmax} } | ||
179 | #define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xitems, xtexts) \ | 182 | #define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xitems, xtexts) \ |
180 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ | 183 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ |
181 | .items = xitems, .texts = xtexts, \ | 184 | .items = xitems, .texts = xtexts, \ |
@@ -541,12 +544,6 @@ int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol, | |||
541 | struct snd_ctl_elem_value *ucontrol); | 544 | struct snd_ctl_elem_value *ucontrol); |
542 | int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, | 545 | int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, |
543 | struct snd_ctl_elem_value *ucontrol); | 546 | struct snd_ctl_elem_value *ucontrol); |
544 | int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol, | ||
545 | struct snd_ctl_elem_info *uinfo); | ||
546 | int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, | ||
547 | struct snd_ctl_elem_value *ucontrol); | ||
548 | int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, | ||
549 | struct snd_ctl_elem_value *ucontrol); | ||
550 | int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol, | 547 | int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol, |
551 | struct snd_ctl_elem_info *uinfo); | 548 | struct snd_ctl_elem_info *uinfo); |
552 | int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, | 549 | int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, |
@@ -854,8 +851,6 @@ struct snd_soc_platform_driver { | |||
854 | 851 | ||
855 | int (*probe)(struct snd_soc_platform *); | 852 | int (*probe)(struct snd_soc_platform *); |
856 | int (*remove)(struct snd_soc_platform *); | 853 | int (*remove)(struct snd_soc_platform *); |
857 | int (*suspend)(struct snd_soc_dai *dai); | ||
858 | int (*resume)(struct snd_soc_dai *dai); | ||
859 | struct snd_soc_component_driver component_driver; | 854 | struct snd_soc_component_driver component_driver; |
860 | 855 | ||
861 | /* pcm creation and destruction */ | 856 | /* pcm creation and destruction */ |
@@ -880,7 +875,7 @@ struct snd_soc_platform_driver { | |||
880 | 875 | ||
881 | struct snd_soc_dai_link_component { | 876 | struct snd_soc_dai_link_component { |
882 | const char *name; | 877 | const char *name; |
883 | const struct device_node *of_node; | 878 | struct device_node *of_node; |
884 | const char *dai_name; | 879 | const char *dai_name; |
885 | }; | 880 | }; |
886 | 881 | ||
@@ -888,8 +883,6 @@ struct snd_soc_platform { | |||
888 | struct device *dev; | 883 | struct device *dev; |
889 | const struct snd_soc_platform_driver *driver; | 884 | const struct snd_soc_platform_driver *driver; |
890 | 885 | ||
891 | unsigned int suspended:1; /* platform is suspended */ | ||
892 | |||
893 | struct list_head list; | 886 | struct list_head list; |
894 | 887 | ||
895 | struct snd_soc_component component; | 888 | struct snd_soc_component component; |
@@ -984,7 +977,7 @@ struct snd_soc_codec_conf { | |||
984 | * DT/OF node, but not both. | 977 | * DT/OF node, but not both. |
985 | */ | 978 | */ |
986 | const char *dev_name; | 979 | const char *dev_name; |
987 | const struct device_node *of_node; | 980 | struct device_node *of_node; |
988 | 981 | ||
989 | /* | 982 | /* |
990 | * optional map of kcontrol, widget and path name prefixes that are | 983 | * optional map of kcontrol, widget and path name prefixes that are |
@@ -1001,7 +994,7 @@ struct snd_soc_aux_dev { | |||
1001 | * DT/OF node, but not both. | 994 | * DT/OF node, but not both. |
1002 | */ | 995 | */ |
1003 | const char *codec_name; | 996 | const char *codec_name; |
1004 | const struct device_node *codec_of_node; | 997 | struct device_node *codec_of_node; |
1005 | 998 | ||
1006 | /* codec/machine specific init - e.g. add machine controls */ | 999 | /* codec/machine specific init - e.g. add machine controls */ |
1007 | int (*init)(struct snd_soc_component *component); | 1000 | int (*init)(struct snd_soc_component *component); |