Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
[sfrench/cifs-2.6.git] / include / sound / soc.h
index 0668cbd9f0b525b3b7654775621a14b7e83a916d..1a7323238c495d7d51313f6ccd8780291ff3e9e5 100644 (file)
@@ -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