From patchwork Wed Oct 9 10:21:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 11180967 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 752D613BD for ; Wed, 9 Oct 2019 10:23:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66D57206C0 for ; Wed, 9 Oct 2019 10:23:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="au+wHufo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X4t2Dq/u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66D57206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4A28E10E; Wed, 9 Oct 2019 12:22:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4A28E10E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1570616611; bh=U4XN1lJWo30d80AfhtswIoHw8VH1rnpI48A54jur0Wc=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=au+wHufoV5+PEurGfRt8WR+Ijpj8PIgAoXNr31k0FSuhAPtBr/RnhIvYzYO7XvJzr qx2t0AvMR1I7a3ULZ2MUez3f83L+Qqye/le8oWwAAKggbREinBFd+YeKvdYejVeM+Z ylMKjgtQbowCEETd9BxBnGHpf6oH+fWuMchdNbOA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D0A72F80113; Wed, 9 Oct 2019 12:22:40 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4BF26F802BD; Wed, 9 Oct 2019 12:22:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C8404F80113 for ; Wed, 9 Oct 2019 12:22:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8404F80113 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X4t2Dq/u" Received: by mail-wm1-x344.google.com with SMTP id r17so4424619wme.0 for ; Wed, 09 Oct 2019 03:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sstpw1xzoTcys4bTI2z5iT/eq7Z/Z/zzCvHhmA4A8rU=; b=X4t2Dq/uhpHhMBk6MlJ5LGM/9j59VfzyXMcipbRZXLDmuFaszNoIi7uuNObDq9DKVI DZDbdXUxdsdQed/9mO21N71hPS9dduzZQKaflkEV+tTaQzsJD7Jdruo0u76ZHW2d0/xz rDTK/jP8jQL7cbpBPpdy8M/6R6ZTRV7cvjqkoK52SseFeXi5/hhmRyikwRLXZzK0tFg/ aORskQ7zGOeMH36xr6NrI311cxs6oCR5SHTjsC1y8uN6ZyjAXZsBjmOfvDgkyC17adAq BuzrR368owE+VkR/zaqNESXB5Gokxx9bv+2GsZD1T67/y4W6k9amHdySCvP66sER4K5j isUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sstpw1xzoTcys4bTI2z5iT/eq7Z/Z/zzCvHhmA4A8rU=; b=nVzD6heTsmUBu40NolWKbXdL/sfhzX1Ssi/U3OSzeud+f+xepWgN33lNyEjtztD9JK itCMH2xNKEJr3+Xqe+/ZYgqdF/m/3YkOZVATt/FG+jAT93bnqI1rZuoyDgTf8Vwg7n2P iUxDOzhu4BVOWkf507JskCUC2kfbk1THjXsEtmyBisYOwy28BpzBjihxvJ0eb//9sYaU r43cuCCQbZWn9uJftN6cXpkAr1fTn0Nv96+3fcNWSUUuLwZZopr4s2hFnTk4d9C60mnP Zjg/Lr+4Z2lpoM4oEBXl2Luml9viWR2H6+S/zcvRUBkVQ80U4ngh5TLXVjlOd5n8OZSK XsEg== X-Gm-Message-State: APjAAAXr/zcsP0djQlAGLPepZSsUIbqK9mUObBzQKG/HB9xkMOkoCmt6 iWMlKnb2VqgedulbiwRes8U8Fw== X-Google-Smtp-Source: APXvYqySTdm1+ZynCCZE5I6c+aQVO46sCHFw7En9hCntPJymIhkKXfobUTWKUmKX2Hfeo1ALaRjGrA== X-Received: by 2002:a1c:2cc4:: with SMTP id s187mr2036135wms.166.1570616556682; Wed, 09 Oct 2019 03:22:36 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id q22sm1657407wmj.5.2019.10.09.03.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 03:22:35 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Date: Wed, 9 Oct 2019 11:21:27 +0100 Message-Id: <20191009102127.7860-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 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 Subject: [alsa-devel] [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Sudheer Papothi 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 Signed-off-by: Srinivas Kandagatla --- 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: