aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown2017-10-18 12:28:37 +0100
committerMark Brown2017-10-18 12:28:37 +0100
commitfc3c546a22154398324d01d89aa1ec4757033e40 (patch)
tree8ccedee46e0ed93801951834ebef3173e2a8ea31
parent364497aca1f5fdf220bd314e0550881b97d2f0fc (diff)
parent7c761b593e2c1dc6bc6c0c15ec338af1f00cabd7 (diff)
Merge branch 'topic/helpers' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
-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 d22de9712c45..deacbafbae17 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1720,6 +1720,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