Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Songhee Baek <sbaek@nvidia.com>,
	Arun Shamanna Lakshmi <aruns@nvidia.com>,
	alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH v2 1/5] ASoC: dapm: Skip CODEC<->CODEC links in connect_dai_link_widgets()
Date: Wed,  7 May 2014 16:20:24 +0200	[thread overview]
Message-ID: <1399472428-11034-1-git-send-email-lars@metafoo.de> (raw)

For CODEC to CODEC DAI links the paths are created in snd_soc_dapm_new_pcm().
Also for CODEC to CODEC links the widgets are connected cross-over via a DAI
link widget, meaning that the capture widget of one CODEC will be connected to
the playback widget of the other and vice versa. Whereas
snd_soc_dapm_connect_dai_link_widgets() directly connects the playback widget of
the CPU DAI to the playback widget of the CODEC DAI and the capture widget of
the CPU DAI to the capture widget of the CODEC DAI. So not skipping
CODEC<->CODEC links in snd_soc_dapm_connect_dai_link_widgets() will create
incorrect connections between the two CODECs which will cause DAPM to detect
active paths where there are none and unnecessarily power up widgets.

Fixes: b893ea5 ("ASoC: sapm: Automatically connect DAI link widgets in DAPM graph.")
Cc: <stable@vger.kernel.org> (for 3.14+)
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/soc-dapm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index fb6c7b7..142a738 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3410,8 +3410,11 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card)
 		cpu_dai = rtd->cpu_dai;
 		codec_dai = rtd->codec_dai;
 
-		/* dynamic FE links have no fixed DAI mapping */
-		if (rtd->dai_link->dynamic)
+		/*
+		 * dynamic FE links have no fixed DAI mapping.
+		 * CODEC<->CODEC links have no direct connection.
+		 */
+		if (rtd->dai_link->dynamic || rtd->dai_link->params)
 			continue;
 
 		/* there is no point in connecting BE DAI links with dummies */
-- 
1.8.0

             reply	other threads:[~2014-05-07 14:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 14:20 Lars-Peter Clausen [this message]
2014-05-07 14:20 ` [PATCH v2 2/5] ASoC: Revert "ASoC: dapm: Fix double prefix addition" Lars-Peter Clausen
2014-05-12 15:00   ` Lars-Peter Clausen
2014-05-12 20:22     ` Arun Shamanna Lakshmi
2014-05-12 20:35   ` Mark Brown
2014-05-07 14:20 ` [PATCH v2 3/5] ASoC: dapm: Use snd_soc_dapm_add_path() in connect_dai_link_widgets() Lars-Peter Clausen
2014-05-12 20:35   ` Mark Brown
2014-05-07 14:20 ` [PATCH v2 4/5] ASoC: dapm: Use snd_soc_dapm_add_path() in snd_soc_dapm_new_pcm() Lars-Peter Clausen
2014-05-12 20:35   ` Mark Brown
2014-05-07 14:20 ` [PATCH v2 5/5] ASoC: dapm: Simplify snd_soc_dapm_link_dai_widgets() Lars-Peter Clausen
2014-05-12 14:37   ` Charles Keepax
2014-05-12 14:38     ` Lars-Peter Clausen
2014-05-12 20:37   ` Mark Brown
2014-05-12 20:34 ` [PATCH v2 1/5] ASoC: dapm: Skip CODEC<->CODEC links in connect_dai_link_widgets() Mark Brown

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=1399472428-11034-1-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=aruns@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=sbaek@nvidia.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