aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/nocodec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/sof/nocodec.c')
-rw-r--r--sound/soc/sof/nocodec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c
index f84b4344dcc3..906cd6bdd54f 100644
--- a/sound/soc/sof/nocodec.c
+++ b/sound/soc/sof/nocodec.c
@@ -14,6 +14,7 @@
static struct snd_soc_card sof_nocodec_card = {
.name = "nocodec", /* the sof- prefix is added by the core */
+ .owner = THIS_MODULE
};
static int sof_nocodec_bes_setup(struct device *dev,
@@ -39,8 +40,10 @@ static int sof_nocodec_bes_setup(struct device *dev,
links[i].platform_name = dev_name(dev);
links[i].codec_dai_name = "snd-soc-dummy-dai";
links[i].codec_name = "snd-soc-dummy";
- links[i].dpcm_playback = 1;
- links[i].dpcm_capture = 1;
+ if (ops->drv[i].playback.channels_min)
+ links[i].dpcm_playback = 1;
+ if (ops->drv[i].capture.channels_min)
+ links[i].dpcm_capture = 1;
}
card->dai_link = links;