提交 05679092 编写于 作者: M Mark Brown 提交者: Mark Brown

ASoC: pcm: Require both CODEC and CPU support when declaring stream caps

When declaring playback and capture capabilities check for both CODEC
side and CPU side support rather than only checking for CODEC side
support.  While it is unusual some CPUs do have unidirectional DAIs.
Reported-by: NFabio Estevam <fabio.estevam@freescale.com>
Tested-by: NFabio Estevam <fabio.estevam@freescale.com>
Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 e4aa937e
......@@ -2011,9 +2011,11 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
if (cpu_dai->driver->capture.channels_min)
capture = 1;
} else {
if (codec_dai->driver->playback.channels_min)
if (codec_dai->driver->playback.channels_min &&
cpu_dai->driver->playback.channels_min)
playback = 1;
if (codec_dai->driver->capture.channels_min)
if (codec_dai->driver->capture.channels_min &&
cpu_dai->driver->capture.channels_min)
capture = 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册