Skip to contentSkip to conversation

ASoC: pcm: Fix DPCM for aux_devs

PATCH In review Mark Brown 2 participants 2 messages May 8, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: pcm: Fix DPCM for aux_devs

When we instantiate an aux_dev we use a fake rtd as part of the process which doesn't have a dai_link associated with it. Fix the dpcm startup code to cope with this.

---
 sound/soc/soc-pcm.c |    3 +++
 1 file changed, 3 insertions(+)
sound/soc/soc-pcm.c +3 -0
index a94512c..a3ea8a7 100644
@@ -2332,6 +2332,9 @@ static const struct file_operations dpcm_state_fops = {
 
 int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
 {
+	if (!rtd->dai_link)
+		return 0;
+
 	rtd->debugfs_dpcm_root = debugfs_create_dir(rtd->dai_link->name,
 			rtd->card->debugfs_card_root);
 	if (!rtd->debugfs_dpcm_root) {
Signature · 1 line
1.7.10