diff options
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r-- | include/sound/soc-dapm.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index dfa804958820..a7def6a9a030 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -76,6 +76,11 @@ | |||
76 | wcontrols, wncontrols)\ | 76 | wcontrols, wncontrols)\ |
77 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 77 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
78 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 78 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} |
79 | #define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ | ||
80 | wcontrols, wncontrols)\ | ||
81 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | ||
82 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | ||
83 | .num_kcontrols = wncontrols} | ||
79 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ | 84 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ |
80 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 85 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
81 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} | 86 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} |
@@ -101,6 +106,11 @@ | |||
101 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 106 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
102 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 107 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ |
103 | .event = wevent, .event_flags = wflags} | 108 | .event = wevent, .event_flags = wflags} |
109 | #define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ | ||
110 | wcontrols, wncontrols, wevent, wflags) \ | ||
111 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
112 | .invert = winvert, .kcontrols = wcontrols, \ | ||
113 | .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} | ||
104 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ | 114 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ |
105 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 115 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
106 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ | 116 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ |
@@ -182,6 +192,12 @@ | |||
182 | .get = snd_soc_dapm_get_value_enum_double, \ | 192 | .get = snd_soc_dapm_get_value_enum_double, \ |
183 | .put = snd_soc_dapm_put_value_enum_double, \ | 193 | .put = snd_soc_dapm_put_value_enum_double, \ |
184 | .private_value = (unsigned long)&xenum } | 194 | .private_value = (unsigned long)&xenum } |
195 | #define SOC_DAPM_PIN_SWITCH(xname) \ | ||
196 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname " Switch", \ | ||
197 | .info = snd_soc_dapm_info_pin_switch, \ | ||
198 | .get = snd_soc_dapm_get_pin_switch, \ | ||
199 | .put = snd_soc_dapm_put_pin_switch, \ | ||
200 | .private_value = (unsigned long)xname } | ||
185 | 201 | ||
186 | /* dapm stream operations */ | 202 | /* dapm stream operations */ |
187 | #define SND_SOC_DAPM_STREAM_NOP 0x0 | 203 | #define SND_SOC_DAPM_STREAM_NOP 0x0 |
@@ -228,6 +244,12 @@ int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, | |||
228 | struct snd_ctl_elem_value *ucontrol); | 244 | struct snd_ctl_elem_value *ucontrol); |
229 | int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, | 245 | int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, |
230 | struct snd_ctl_elem_value *ucontrol); | 246 | struct snd_ctl_elem_value *ucontrol); |
247 | int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol, | ||
248 | struct snd_ctl_elem_info *uinfo); | ||
249 | int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol, | ||
250 | struct snd_ctl_elem_value *uncontrol); | ||
251 | int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, | ||
252 | struct snd_ctl_elem_value *uncontrol); | ||
231 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, | 253 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, |
232 | const struct snd_soc_dapm_widget *widget); | 254 | const struct snd_soc_dapm_widget *widget); |
233 | int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, | 255 | int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, |
@@ -250,10 +272,10 @@ int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev, | |||
250 | int snd_soc_dapm_sys_add(struct device *dev); | 272 | int snd_soc_dapm_sys_add(struct device *dev); |
251 | 273 | ||
252 | /* dapm audio pin control and status */ | 274 | /* dapm audio pin control and status */ |
253 | int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, char *pin); | 275 | int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, const char *pin); |
254 | int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin); | 276 | int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, const char *pin); |
255 | int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, char *pin); | 277 | int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, const char *pin); |
256 | int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin); | 278 | int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, const char *pin); |
257 | int snd_soc_dapm_sync(struct snd_soc_codec *codec); | 279 | int snd_soc_dapm_sync(struct snd_soc_codec *codec); |
258 | 280 | ||
259 | /* dapm widget types */ | 281 | /* dapm widget types */ |
@@ -263,6 +285,7 @@ enum snd_soc_dapm_type { | |||
263 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ | 285 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ |
264 | snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */ | 286 | snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */ |
265 | snd_soc_dapm_mixer, /* mixes several analog signals together */ | 287 | snd_soc_dapm_mixer, /* mixes several analog signals together */ |
288 | snd_soc_dapm_mixer_named_ctl, /* mixer with named controls */ | ||
266 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ | 289 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ |
267 | snd_soc_dapm_adc, /* analog to digital converter */ | 290 | snd_soc_dapm_adc, /* analog to digital converter */ |
268 | snd_soc_dapm_dac, /* digital to analog converter */ | 291 | snd_soc_dapm_dac, /* digital to analog converter */ |