aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 884e728b09d9..a8b4b9c8b1d2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -86,7 +86,7 @@
86 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ 86 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
87 SNDRV_CTL_ELEM_ACCESS_READWRITE, \ 87 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
88 .tlv.p = (tlv_array),\ 88 .tlv.p = (tlv_array),\
89 .info = snd_soc_info_volsw, \ 89 .info = snd_soc_info_volsw_sx, \
90 .get = snd_soc_get_volsw_sx,\ 90 .get = snd_soc_get_volsw_sx,\
91 .put = snd_soc_put_volsw_sx, \ 91 .put = snd_soc_put_volsw_sx, \
92 .private_value = (unsigned long)&(struct soc_mixer_control) \ 92 .private_value = (unsigned long)&(struct soc_mixer_control) \
@@ -156,7 +156,7 @@
156 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ 156 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
157 SNDRV_CTL_ELEM_ACCESS_READWRITE, \ 157 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
158 .tlv.p = (tlv_array), \ 158 .tlv.p = (tlv_array), \
159 .info = snd_soc_info_volsw, \ 159 .info = snd_soc_info_volsw_sx, \
160 .get = snd_soc_get_volsw_sx, \ 160 .get = snd_soc_get_volsw_sx, \
161 .put = snd_soc_put_volsw_sx, \ 161 .put = snd_soc_put_volsw_sx, \
162 .private_value = (unsigned long)&(struct soc_mixer_control) \ 162 .private_value = (unsigned long)&(struct soc_mixer_control) \
@@ -217,6 +217,13 @@
217 .get = xhandler_get, .put = xhandler_put, \ 217 .get = xhandler_get, .put = xhandler_put, \
218 .private_value = \ 218 .private_value = \
219 SOC_DOUBLE_VALUE(reg, shift_left, shift_right, max, invert, 0) } 219 SOC_DOUBLE_VALUE(reg, shift_left, shift_right, max, invert, 0) }
220#define SOC_DOUBLE_R_EXT(xname, reg_left, reg_right, xshift, xmax, xinvert,\
221 xhandler_get, xhandler_put) \
222{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
223 .info = snd_soc_info_volsw, \
224 .get = xhandler_get, .put = xhandler_put, \
225 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
226 xmax, xinvert) }
220#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\ 227#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\
221 xhandler_get, xhandler_put, tlv_array) \ 228 xhandler_get, xhandler_put, tlv_array) \
222{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 229{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
@@ -226,6 +233,18 @@
226 .info = snd_soc_info_volsw, \ 233 .info = snd_soc_info_volsw, \
227 .get = xhandler_get, .put = xhandler_put, \ 234 .get = xhandler_get, .put = xhandler_put, \
228 .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, 0) } 235 .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, 0) }
236#define SOC_SINGLE_RANGE_EXT_TLV(xname, xreg, xshift, xmin, xmax, xinvert, \
237 xhandler_get, xhandler_put, tlv_array) \
238{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
239 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
240 SNDRV_CTL_ELEM_ACCESS_READWRITE,\
241 .tlv.p = (tlv_array), \
242 .info = snd_soc_info_volsw_range, \
243 .get = xhandler_get, .put = xhandler_put, \
244 .private_value = (unsigned long)&(struct soc_mixer_control) \
245 {.reg = xreg, .rreg = xreg, .shift = xshift, \
246 .rshift = xshift, .min = xmin, .max = xmax, \
247 .platform_max = xmax, .invert = xinvert} }
229#define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\ 248#define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\
230 xhandler_get, xhandler_put, tlv_array) \ 249 xhandler_get, xhandler_put, tlv_array) \
231{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ 250{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
@@ -440,7 +459,9 @@ int snd_soc_platform_read(struct snd_soc_platform *platform,
440int snd_soc_platform_write(struct snd_soc_platform *platform, 459int snd_soc_platform_write(struct snd_soc_platform *platform,
441 unsigned int reg, unsigned int val); 460 unsigned int reg, unsigned int val);
442int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num); 461int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num);
443int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num); 462#ifdef CONFIG_SND_SOC_COMPRESS
463int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num);
464#endif
444 465
445struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card, 466struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
446 const char *dai_link, int stream); 467 const char *dai_link, int stream);
@@ -574,6 +595,8 @@ int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
574 struct snd_ctl_elem_value *ucontrol); 595 struct snd_ctl_elem_value *ucontrol);
575int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, 596int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
576 struct snd_ctl_elem_info *uinfo); 597 struct snd_ctl_elem_info *uinfo);
598int snd_soc_info_volsw_sx(struct snd_kcontrol *kcontrol,
599 struct snd_ctl_elem_info *uinfo);
577#define snd_soc_info_bool_ext snd_ctl_boolean_mono_info 600#define snd_soc_info_bool_ext snd_ctl_boolean_mono_info
578int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, 601int snd_soc_get_volsw(struct snd_kcontrol *kcontrol,
579 struct snd_ctl_elem_value *ucontrol); 602 struct snd_ctl_elem_value *ucontrol);
@@ -591,7 +614,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
591 struct snd_ctl_elem_value *ucontrol); 614 struct snd_ctl_elem_value *ucontrol);
592int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol, 615int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
593 struct snd_ctl_elem_value *ucontrol); 616 struct snd_ctl_elem_value *ucontrol);
594int snd_soc_limit_volume(struct snd_soc_codec *codec, 617int snd_soc_limit_volume(struct snd_soc_card *card,
595 const char *name, int max); 618 const char *name, int max);
596int snd_soc_bytes_info(struct snd_kcontrol *kcontrol, 619int snd_soc_bytes_info(struct snd_kcontrol *kcontrol,
597 struct snd_ctl_elem_info *uinfo); 620 struct snd_ctl_elem_info *uinfo);
@@ -1601,6 +1624,8 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card,
1601int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, 1624int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
1602 const char *propname); 1625 const char *propname);
1603int snd_soc_of_parse_tdm_slot(struct device_node *np, 1626int snd_soc_of_parse_tdm_slot(struct device_node *np,
1627 unsigned int *tx_mask,
1628 unsigned int *rx_mask,
1604 unsigned int *slots, 1629 unsigned int *slots,
1605 unsigned int *slot_width); 1630 unsigned int *slot_width);
1606void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, 1631void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card,