Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99018
b: refs/heads/master
c: eeec12b
h: refs/heads/master
v: v3
  • Loading branch information
Graeme Gregory authored and Jaroslav Kysela committed May 19, 2008
1 parent 8996981 commit 50d8450
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54e7e6167d29a4a98207884b2fbd28b0b3fe91f6
refs/heads/master: eeec12bf7b7d80d1c9cae5aae0dff7e2f928c64b
2 changes: 2 additions & 0 deletions trunk/include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ int snd_soc_dapm_sys_add(struct device *dev);
/* dapm audio endpoint control */
int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec,
char *pin, int status);
int snd_soc_dapm_get_endpoint_status(struct snd_soc_codec *codec,
char *pin);
int snd_soc_dapm_sync_endpoints(struct snd_soc_codec *codec);

/* dapm widget types */
Expand Down
23 changes: 23 additions & 0 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,29 @@ int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec,
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_set_endpoint);

/**
* snd_soc_dapm_get_endpoint_status - 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_status(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
Expand Down

0 comments on commit 50d8450

Please sign in to comment.