diff options
Diffstat (limited to 'include/sound/soc-dapm.h')
| -rw-r--r-- | include/sound/soc-dapm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index c1410e3191e3..c5c95e1da65b 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -206,6 +206,12 @@ | |||
| 206 | .get = snd_soc_dapm_get_enum_double, \ | 206 | .get = snd_soc_dapm_get_enum_double, \ |
| 207 | .put = snd_soc_dapm_put_enum_double, \ | 207 | .put = snd_soc_dapm_put_enum_double, \ |
| 208 | .private_value = (unsigned long)&xenum } | 208 | .private_value = (unsigned long)&xenum } |
| 209 | #define SOC_DAPM_ENUM_VIRT(xname, xenum) \ | ||
| 210 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
| 211 | .info = snd_soc_info_enum_double, \ | ||
| 212 | .get = snd_soc_dapm_get_enum_virt, \ | ||
| 213 | .put = snd_soc_dapm_put_enum_virt, \ | ||
| 214 | .private_value = (unsigned long)&xenum } | ||
| 209 | #define SOC_DAPM_VALUE_ENUM(xname, xenum) \ | 215 | #define SOC_DAPM_VALUE_ENUM(xname, xenum) \ |
| 210 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 216 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
| 211 | .info = snd_soc_info_enum_double, \ | 217 | .info = snd_soc_info_enum_double, \ |
| @@ -260,6 +266,10 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol, | |||
| 260 | struct snd_ctl_elem_value *ucontrol); | 266 | struct snd_ctl_elem_value *ucontrol); |
| 261 | int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, | 267 | int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, |
| 262 | struct snd_ctl_elem_value *ucontrol); | 268 | struct snd_ctl_elem_value *ucontrol); |
| 269 | int snd_soc_dapm_get_enum_virt(struct snd_kcontrol *kcontrol, | ||
| 270 | struct snd_ctl_elem_value *ucontrol); | ||
| 271 | int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol, | ||
| 272 | struct snd_ctl_elem_value *ucontrol); | ||
| 263 | int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, | 273 | int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, |
| 264 | struct snd_ctl_elem_value *ucontrol); | 274 | struct snd_ctl_elem_value *ucontrol); |
| 265 | int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, | 275 | int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, |
| @@ -333,6 +343,10 @@ struct snd_soc_dapm_route { | |||
| 333 | const char *sink; | 343 | const char *sink; |
| 334 | const char *control; | 344 | const char *control; |
| 335 | const char *source; | 345 | const char *source; |
| 346 | |||
| 347 | /* Note: currently only supported for links where source is a supply */ | ||
| 348 | int (*connected)(struct snd_soc_dapm_widget *source, | ||
| 349 | struct snd_soc_dapm_widget *sink); | ||
| 336 | }; | 350 | }; |
| 337 | 351 | ||
| 338 | /* dapm audio path between two widgets */ | 352 | /* dapm audio path between two widgets */ |
| @@ -349,6 +363,9 @@ struct snd_soc_dapm_path { | |||
| 349 | u32 connect:1; /* source and sink widgets are connected */ | 363 | u32 connect:1; /* source and sink widgets are connected */ |
| 350 | u32 walked:1; /* path has been walked */ | 364 | u32 walked:1; /* path has been walked */ |
| 351 | 365 | ||
| 366 | int (*connected)(struct snd_soc_dapm_widget *source, | ||
| 367 | struct snd_soc_dapm_widget *sink); | ||
| 368 | |||
| 352 | struct list_head list_source; | 369 | struct list_head list_source; |
| 353 | struct list_head list_sink; | 370 | struct list_head list_sink; |
| 354 | struct list_head list; | 371 | struct list_head list; |
