summaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-11-10 22:30:53 +0100
committerMark Brown <broonie@kernel.org>2017-11-10 22:30:53 +0100
commitc44ff31ae03c0970e1b3cfe1e37f347865a9dc8b (patch)
treed940401ba6bee67ad8e03b6d099e3e797c40600a /include/sound/soc.h
parentMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next (diff)
parentASoC: hdac_hdmi: Fix possible memory leak on parse and map nid failure (diff)
downloadlinux-c44ff31ae03c0970e1b3cfe1e37f347865a9dc8b.tar.xz
linux-c44ff31ae03c0970e1b3cfe1e37f347865a9dc8b.zip
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 0668cbd9f0b5..1a7323238c49 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1821,6 +1821,20 @@ struct snd_soc_dai *snd_soc_find_dai(
#include <sound/soc-dai.h>
+static inline
+struct snd_soc_dai *snd_soc_card_get_codec_dai(struct snd_soc_card *card,
+ const char *dai_name)
+{
+ struct snd_soc_pcm_runtime *rtd;
+
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ if (!strcmp(rtd->codec_dai->name, dai_name))
+ return rtd->codec_dai;
+ }
+
+ return NULL;
+}
+
#ifdef CONFIG_DEBUG_FS
extern struct dentry *snd_soc_debugfs_root;
#endif