diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:10:02 +0000 |
---|---|---|
committer | Andy Green <andy@openmoko.com> | 2008-11-19 17:10:02 +0000 |
commit | 34ac2463b89696291a2da51a45b9caf826a17369 (patch) | |
tree | 3f2b2ddead54c102582dc54d8964a537f33dd9be /sound/soc/soc-dapm.c | |
parent | 62530373240149883720de4fbda2a60444ddee80 (diff) |
tracking-2.6.27-rc1-snd_soc_dapm_set_endpoint.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6a41d200487..6e71e4e57d1 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1549,6 +1549,32 @@ int snd_soc_dapm_get_endpoint(struct snd_soc_codec *codec, EXPORT_SYMBOL_GPL(snd_soc_dapm_get_endpoint); /** + * snd_soc_dapm_set_endpoint - set audio endpoint status + * @codec: audio codec + * @endpoint: audio signal endpoint (or start point) + * @status: point status + * + * Set audio endpoint status - connected or disconnected. + * + * Returns 0 for success else error. + */ +int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec, + char *endpoint, int status) +{ + struct snd_soc_dapm_widget *w; + + list_for_each_entry(w, &codec->dapm_widgets, list) { + if (!strcmp(w->name, endpoint)) { + w->connected = status; + return 0; + } + } + + return -ENODEV; +} +EXPORT_SYMBOL_GPL(snd_soc_dapm_set_endpoint); + +/** * snd_soc_dapm_free - free dapm resources * @socdev: SoC device * |