alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, bgoswami@codeaurora.org,
	spapothi@codeaurora.org, lgirdwood@gmail.com,
	linux-kernel@vger.kernel.org, vkoul@kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [alsa-devel] [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes
Date: Wed,  9 Oct 2019 11:21:27 +0100	[thread overview]
Message-ID: <20191009102127.7860-1-srinivas.kandagatla@linaro.org> (raw)

From: Sudheer Papothi <spapothi@codeaurora.org>

During sound card registration, dapm adds routes of
codec and other component paths, but the invalidation of
the widgets in these paths will happen only when the
sound card is instantiated. As these routes are added
before sound card instantiation, these widgets are
not invalidated until a playback or recording usecase
is started.

Audio playback or recording usecase is not started in
the case of codec loopback. So, if codec loopback is
performed just after soundcard registration, then the
widgets are not powered up as those widgets are not
invalidated, results into codec loopback failure.

Change is to remove the sound card instantiation check
condition in dapm add paths, so widgets get invalidated
whenever they are added.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/soc-dapm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b6378f025836..13544f7c850b 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2862,8 +2862,7 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
 		dapm_mark_dirty(widgets[dir], "Route added");
 	}
 
-	if (dapm->card->instantiated && path->connect)
-		dapm_path_invalidate(path);
+	dapm_path_invalidate(path);
 
 	return 0;
 err:
-- 
2.21.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

             reply	other threads:[~2019-10-09 10:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 10:21 Srinivas Kandagatla [this message]
2019-10-09 16:59 ` [alsa-devel] [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes 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=20191009102127.7860-1-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spapothi@codeaurora.org \
    --cc=vkoul@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).