Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [alsa-devel] [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes
@ 2019-10-09 10:21 Srinivas Kandagatla
  2019-10-09 16:59 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Kandagatla @ 2019-10-09 10:21 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, bgoswami, spapothi, lgirdwood, linux-kernel, vkoul,
	Srinivas Kandagatla

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [alsa-devel] [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes
  2019-10-09 10:21 [alsa-devel] [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes Srinivas Kandagatla
@ 2019-10-09 16:59 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2019-10-09 16:59 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: alsa-devel, bgoswami, spapothi, lgirdwood, linux-kernel, vkoul

[-- Attachment #1.1: Type: text/plain, Size: 965 bytes --]

On Wed, Oct 09, 2019 at 11:21:27AM +0100, Srinivas Kandagatla wrote:
> 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

The whole point with this check is that as you say we're
validating everything as we instantiate the card, not piecemeal
while the map is partially constructed.  Doing that is wasteful
and noisy.

> before sound card instantiation, these widgets are
> not invalidated until a playback or recording usecase
> is started.

You said yourself that we sync everything when the card is
instantiated.  Not on first capture or record, when the card is
instantiated.  If for some reason there is some problem with that
on your system please fix that, don't add a bodge somewhere else
to mask the problem.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 10:21 [alsa-devel] [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes Srinivas Kandagatla
2019-10-09 16:59 ` Mark Brown

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org alsa-devel@archiver.kernel.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox