diff options
author | mokopatches <mokopatches@openmoko.org> | 2008-11-19 17:03:15 +0000 |
---|---|---|
committer | warmcat <andy@warmcat.com> | 2008-11-19 17:03:15 +0000 |
commit | 5915ea88b0b6ada7fc5234239feec5d4960887df (patch) | |
tree | 7ff043677dd2bac531fe096eab2aed70a3491732 /sound/soc/soc-dapm.c | |
parent | f30f7d454ad77de110b89e90cc27351a302ba651 (diff) |
gta02-sound.patch
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7351db9606e..6a41d200487 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1525,6 +1525,30 @@ int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin) EXPORT_SYMBOL_GPL(snd_soc_dapm_get_pin_status); /** + * snd_soc_dapm_get_endpoint - get audio endpoint status + * @codec: audio codec + * @endpoint: audio signal endpoint (or start point) + * + * Get audio endpoint status - connected or disconnected. + * + * Returns status + */ +int snd_soc_dapm_get_endpoint(struct snd_soc_codec *codec, + char *endpoint) +{ + struct snd_soc_dapm_widget *w; + + list_for_each_entry(w, &codec->dapm_widgets, list) { + if (!strcmp(w->name, endpoint)) { + return w->connected; + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_dapm_get_endpoint); + +/** * snd_soc_dapm_free - free dapm resources * @socdev: SoC device * |