aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dapm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r--include/sound/soc-dapm.h38
1 files changed, 7 insertions, 31 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 05aaaf689ac0..ef78f562f4a8 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -108,13 +108,9 @@ struct device;
108 SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ 108 SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
109 .kcontrol_news = wcontrols, .num_kcontrols = 1} 109 .kcontrol_news = wcontrols, .num_kcontrols = 1}
110#define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ 110#define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \
111{ .id = snd_soc_dapm_virt_mux, .name = wname, \ 111 SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols)
112 SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
113 .kcontrol_news = wcontrols, .num_kcontrols = 1}
114#define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \ 112#define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \
115{ .id = snd_soc_dapm_value_mux, .name = wname, \ 113 SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols)
116 SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
117 .kcontrol_news = wcontrols, .num_kcontrols = 1}
118 114
119/* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ 115/* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */
120#define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\ 116#define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\
@@ -172,10 +168,8 @@ struct device;
172 .event = wevent, .event_flags = wflags} 168 .event = wevent, .event_flags = wflags}
173#define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ 169#define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \
174 wevent, wflags) \ 170 wevent, wflags) \
175{ .id = snd_soc_dapm_virt_mux, .name = wname, \ 171 SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, wevent, \
176 SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ 172 wflags)
177 .kcontrol_news = wcontrols, .num_kcontrols = 1, \
178 .event = wevent, .event_flags = wflags}
179 173
180/* additional sequencing control within an event type */ 174/* additional sequencing control within an event type */
181#define SND_SOC_DAPM_PGA_S(wname, wsubseq, wreg, wshift, winvert, \ 175#define SND_SOC_DAPM_PGA_S(wname, wsubseq, wreg, wshift, winvert, \
@@ -311,12 +305,8 @@ struct device;
311 .get = snd_soc_dapm_get_enum_double, \ 305 .get = snd_soc_dapm_get_enum_double, \
312 .put = snd_soc_dapm_put_enum_double, \ 306 .put = snd_soc_dapm_put_enum_double, \
313 .private_value = (unsigned long)&xenum } 307 .private_value = (unsigned long)&xenum }
314#define SOC_DAPM_ENUM_VIRT(xname, xenum) \ 308#define SOC_DAPM_ENUM_VIRT(xname, xenum) \
315{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 309 SOC_DAPM_ENUM(xname, xenum)
316 .info = snd_soc_info_enum_double, \
317 .get = snd_soc_dapm_get_enum_virt, \
318 .put = snd_soc_dapm_put_enum_virt, \
319 .private_value = (unsigned long)&xenum }
320#define SOC_DAPM_ENUM_EXT(xname, xenum, xget, xput) \ 310#define SOC_DAPM_ENUM_EXT(xname, xenum, xget, xput) \
321{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 311{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
322 .info = snd_soc_info_enum_double, \ 312 .info = snd_soc_info_enum_double, \
@@ -324,11 +314,7 @@ struct device;
324 .put = xput, \ 314 .put = xput, \
325 .private_value = (unsigned long)&xenum } 315 .private_value = (unsigned long)&xenum }
326#define SOC_DAPM_VALUE_ENUM(xname, xenum) \ 316#define SOC_DAPM_VALUE_ENUM(xname, xenum) \
327{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 317 SOC_DAPM_ENUM(xname, xenum)
328 .info = snd_soc_info_enum_double, \
329 .get = snd_soc_dapm_get_value_enum_double, \
330 .put = snd_soc_dapm_put_value_enum_double, \
331 .private_value = (unsigned long)&xenum }
332#define SOC_DAPM_PIN_SWITCH(xname) \ 318#define SOC_DAPM_PIN_SWITCH(xname) \
333{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname " Switch", \ 319{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname " Switch", \
334 .info = snd_soc_dapm_info_pin_switch, \ 320 .info = snd_soc_dapm_info_pin_switch, \
@@ -392,14 +378,6 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol,
392 struct snd_ctl_elem_value *ucontrol); 378 struct snd_ctl_elem_value *ucontrol);
393int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, 379int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
394 struct snd_ctl_elem_value *ucontrol); 380 struct snd_ctl_elem_value *ucontrol);
395int snd_soc_dapm_get_enum_virt(struct snd_kcontrol *kcontrol,
396 struct snd_ctl_elem_value *ucontrol);
397int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol,
398 struct snd_ctl_elem_value *ucontrol);
399int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol,
400 struct snd_ctl_elem_value *ucontrol);
401int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol,
402 struct snd_ctl_elem_value *ucontrol);
403int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol, 381int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol,
404 struct snd_ctl_elem_info *uinfo); 382 struct snd_ctl_elem_info *uinfo);
405int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol, 383int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,
@@ -484,8 +462,6 @@ enum snd_soc_dapm_type {
484 snd_soc_dapm_input = 0, /* input pin */ 462 snd_soc_dapm_input = 0, /* input pin */
485 snd_soc_dapm_output, /* output pin */ 463 snd_soc_dapm_output, /* output pin */
486 snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ 464 snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */
487 snd_soc_dapm_virt_mux, /* virtual version of snd_soc_dapm_mux */
488 snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */
489 snd_soc_dapm_mixer, /* mixes several analog signals together */ 465 snd_soc_dapm_mixer, /* mixes several analog signals together */
490 snd_soc_dapm_mixer_named_ctl, /* mixer with named controls */ 466 snd_soc_dapm_mixer_named_ctl, /* mixer with named controls */
491 snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ 467 snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */