diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-dapm.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index af3326c63504..9fd5ee818e89 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1343,6 +1343,29 @@ int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec, | |||
1343 | EXPORT_SYMBOL_GPL(snd_soc_dapm_set_endpoint); | 1343 | EXPORT_SYMBOL_GPL(snd_soc_dapm_set_endpoint); |
1344 | 1344 | ||
1345 | /** | 1345 | /** |
1346 | * snd_soc_dapm_get_endpoint_status - get audio endpoint status | ||
1347 | * @codec: audio codec | ||
1348 | * @endpoint: audio signal endpoint (or start point) | ||
1349 | * | ||
1350 | * Get audio endpoint status - connected or disconnected. | ||
1351 | * | ||
1352 | * Returns status | ||
1353 | */ | ||
1354 | int snd_soc_dapm_get_endpoint_status(struct snd_soc_codec *codec, | ||
1355 | char *endpoint) | ||
1356 | { | ||
1357 | struct snd_soc_dapm_widget *w; | ||
1358 | |||
1359 | list_for_each_entry(w, &codec->dapm_widgets, list) { | ||
1360 | if (!strcmp(w->name, endpoint)) | ||
1361 | return w->connected; | ||
1362 | } | ||
1363 | |||
1364 | return 0; | ||
1365 | } | ||
1366 | EXPORT_SYMBOL_GPL(snd_soc_dapm_get_endpoint); | ||
1367 | |||
1368 | /** | ||
1346 | * snd_soc_dapm_free - free dapm resources | 1369 | * snd_soc_dapm_free - free dapm resources |
1347 | * @socdev: SoC device | 1370 | * @socdev: SoC device |
1348 | * | 1371 | * |