Commit 8151d5e6 authored by Benoit Cousson's avatar Benoit Cousson Committed by Mark Brown

ASoC: compress: Prevent multicodec for compressed stream

Multiple codecs does not make sense in the case of compressed
stream.

Exit with error if it happens.
Signed-off-by: default avatarBenoit Cousson <bcousson@baylibre.com>
Tested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 44ba2641
......@@ -629,6 +629,11 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
char new_name[64];
int ret = 0, direction = 0;
if (rtd->num_codecs > 1) {
dev_err(rtd->card->dev, "Multicodec not supported for compressed stream\n");
return -EINVAL;
}
/* check client and interface hw capabilities */
snprintf(new_name, sizeof(new_name), "%s %s-%d",
rtd->dai_link->stream_name, codec_dai->name, num);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment