diff options
author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2020-02-25 16:39:16 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-26 20:35:04 +0300 |
commit | 6e1276a5e613d25af71e3494b2dcb331d24f06ce (patch) | |
tree | 8cd4d4b736ffb3997e4a90c7c4a5fdd4999ea18f /sound/soc/soc-compress.c | |
parent | de6214a33633d8ce1c1490336f8e798e75ccd004 (diff) | |
download | linux-6e1276a5e613d25af71e3494b2dcb331d24f06ce.tar.xz |
ASoC: Return error if the function does not support multi-cpu
Multi cpu is not supported by all functions yet. Add an error message
and return.
Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200225133917.21314-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-compress.c')
-rw-r--r-- | sound/soc/soc-compress.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 392a1c5b15d3..50062eb79adb 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -810,9 +810,10 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) int playback = 0, capture = 0; int i; - if (rtd->num_codecs > 1) { + if (rtd->num_cpus > 1 || + rtd->num_codecs > 1) { dev_err(rtd->card->dev, - "Compress ASoC: Multicodec not supported\n"); + "Compress ASoC: Multi CPU/Codec not supported\n"); return -EINVAL; } |