diff options
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 289aebc15529..1f302de44052 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2911,8 +2911,17 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) int i; if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { - playback = rtd->dai_link->dpcm_playback; - capture = rtd->dai_link->dpcm_capture; + cpu_dai = asoc_rtd_to_cpu(rtd, 0); + if (rtd->num_cpus > 1) { + dev_err(rtd->dev, + "DPCM doesn't support Multi CPU yet\n"); + return -EINVAL; + } + + playback = rtd->dai_link->dpcm_playback && + snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_PLAYBACK); + capture = rtd->dai_link->dpcm_capture && + snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_CAPTURE); } else { /* Adapt stream for codec2codec links */ int cpu_capture = rtd->dai_link->params ? |