diff mbox

[v4,8/8] ASoC: core: Add a warning for link_dai_widget in the multicodec case

Message ID 1404200881-32253-9-git-send-email-bcousson@baylibre.com (mailing list archive)
State New, archived
Headers show

Commit Message

Benoit Cousson July 1, 2014, 7:48 a.m. UTC
Multicodec links are not supported in the case of CODEC to CODEC links.
Just print a warning if it happens.

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
---
 sound/soc/soc-core.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Lars-Peter Clausen July 1, 2014, 1:41 p.m. UTC | #1
On 07/01/2014 09:48 AM, Benoit Cousson wrote:
> Multicodec links are not supported in the case of CODEC to CODEC links.
> Just print a warning if it happens.
>
> Signed-off-by: Benoit Cousson <bcousson@baylibre.com>

This looks good, by maybe just squash it into the other patch that updates 
soc-core.c

> ---
>   sound/soc/soc-core.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 3764150..3640242 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -1486,6 +1486,9 @@ static int soc_link_dai_widgets(struct snd_soc_card *card,
>   	struct snd_soc_dapm_widget *play_w, *capture_w;
>   	int ret;
>
> +	if (rtd->num_codecs > 1)
> +		dev_warn(card->dev, "ASoC: Multiple codecs not supported yet\n");
> +
>   	/* link the DAI widgets */
>   	play_w = codec_dai->playback_widget;
>   	capture_w = cpu_dai->capture_widget;
>
diff mbox

Patch

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 3764150..3640242 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1486,6 +1486,9 @@  static int soc_link_dai_widgets(struct snd_soc_card *card,
 	struct snd_soc_dapm_widget *play_w, *capture_w;
 	int ret;
 
+	if (rtd->num_codecs > 1)
+		dev_warn(card->dev, "ASoC: Multiple codecs not supported yet\n");
+
 	/* link the DAI widgets */
 	play_w = codec_dai->playback_widget;
 	capture_w = cpu_dai->capture_widget;