From: Benoit Cousson <bcousson@baylibre.com>
To: broonie@kernel.org, lgirdwood@gmail.com, lars@metafoo.de
Cc: Vinod Koul <vinod.koul@intel.com>,
misael.lopez@ti.com, alsa-devel@alsa-project.org,
Benoit Cousson <bcousson@baylibre.com>
Subject: [PATCH v5 4/5] ASoC: compress: Prevent multicodec for compressed stream
Date: Fri, 4 Jul 2014 18:07:54 +0200 [thread overview]
Message-ID: <1404490075-24997-5-git-send-email-bcousson@baylibre.com> (raw)
In-Reply-To: <1404490075-24997-1-git-send-email-bcousson@baylibre.com>
Multiple codecs does not make sense in the case of compressed
stream.
Exit with error if it happens.
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/soc-compress.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index f96fb96..27c06ac 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -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);
--
1.9.1
next prev parent reply other threads:[~2014-07-04 16:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 16:07 [PATCH v5 0/5] ASoC: core: Add support for DAI multicodec Benoit Cousson
2014-07-04 16:07 ` [PATCH v5 1/5] ASoC: core: Add initial " Benoit Cousson
2014-07-04 16:07 ` [PATCH v5 2/5] ASoC: pcm: Add " Benoit Cousson
2014-07-06 14:18 ` Lars-Peter Clausen
2014-07-06 20:23 ` Benoit Cousson
2014-07-04 16:07 ` [PATCH v5 3/5] ASoC: dapm: " Benoit Cousson
2014-07-04 16:07 ` Benoit Cousson [this message]
2014-07-07 8:50 ` [PATCH v5 4/5] ASoC: compress: Prevent multicodec for compressed stream Vinod Koul
2014-07-04 16:07 ` [PATCH v5 5/5] ASoC: pcm: Add soc_dai_hw_params helper Benoit Cousson
2014-07-06 14:16 ` [PATCH v5 0/5] ASoC: core: Add support for DAI multicodec Lars-Peter Clausen
2014-07-06 14:20 ` Lars-Peter Clausen
2014-07-06 20:49 ` Benoit Cousson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404490075-24997-5-git-send-email-bcousson@baylibre.com \
--to=bcousson@baylibre.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=misael.lopez@ti.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox