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: 175613 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp550522ill; Wed, 9 Oct 2019 03:22:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPgkISF743fkiytgn04ciOG9oSRcjgjkJYj0NP+vHVrQWD52a5ozQE62rO28lxHwxHnzkd X-Received: by 2002:a17:906:46c7:: with SMTP id k7mr2065745ejs.112.1570616560281; Wed, 09 Oct 2019 03:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570616560; cv=none; d=google.com; s=arc-20160816; b=dcZZAPi8wW6QK6AGH9vS+b/pPqDocSYNc4ylTaM2dBNOUMp3RySdafiJV87CJyLSDD gAwv49DpSgWZ1RCoasO9ZIE5loGU21RTl0ktkyv6S3N+Sa+1JfmLgAY66nW1z22hxKTx EnzB2FIWNm1cKEDU9XhgzJ8cXqfx5Vrg/jjiqhO7GrVbGefAiNt5ZyVVpKstkQR2Qw+g BUAzcCKCgfi+ds8a3+QYw9qRcQfLo2JN7EN9peGCywoQ9XqbsZg05Aka2sNXQkTb6stS gRN9+K+0KoVURV1bTw5IeaON/MhnsFrw8zrXDfcqFRQu1q2B3JC5ZdVZ3ud/QbBMLj3I 7fvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sstpw1xzoTcys4bTI2z5iT/eq7Z/Z/zzCvHhmA4A8rU=; b=OEYseUvkwTbMp1hKSNhs9E7C003bCHAkEnKy1GVCJUxKAkxN4vrnGMPZr7LE3oiRkD 3FfNua0ux9vD4kLZmq00PgSEV1N5vDicLDqkzFp9Te+GR9NTmQDjJG30FmDTq2H9sisW DIWQgr747goGzsca4qQ4TSp8qwJll+YEhznCFNJO2YLhbwmp+kha9xkyYyRhu1laepQp nPWAfUceeVJFBhVSppCsrn0ne457SVuOwYRHi5lTWDf/B/0NU8Biniz8yW/WgR+hjR3L icuAomVw1es/yDHr8VkndI4uyznUxDndiVmdBoUG+bLqN1sbId+GjIT2lIWSV1hAQXmM +usQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="X4t2Dq/u"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si825003ejr.368.2019.10.09.03.22.40; Wed, 09 Oct 2019 03:22:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="X4t2Dq/u"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730588AbfJIKWj (ORCPT + 26 others); Wed, 9 Oct 2019 06:22:39 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37620 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbfJIKWi (ORCPT ); Wed, 9 Oct 2019 06:22:38 -0400 Received: by mail-wm1-f68.google.com with SMTP id f22so1927379wmc.2 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=pTY72Bwib2+FIrG4OYu8EfULEBBCeL2H5lgPoIeV4Ks3cPxVYOcwJz1+G6p+A/Yeps D6Rfh9QVVVfv7szoReGO2E15hATNJtMXdqELEnSOAIdWR15fY5Lnkb9BQfg0wuiesp6d LAtDXjydRnXqLLH5ZiMwopN0cumo+/i+HKaF4xd3KieH6omA5H2vFbhRDITxWcB3UnTE OEBOdriQig9Ek+v4spelTSx91XL0Ki15sUo0uOWpn76g1bj5OvWsdNXp/Y23hrwzbr6D uMdpnuyciX4VpIIQVTYvau7UiRQU6IrQXTGQCAjQNxDn0Rei/h3Ta+syuqzOeulTszSP m3Qw== X-Gm-Message-State: APjAAAWDrKw6nhfqJW6JiaZ2T747ZdJeflm6lSzvF3GNL7EzRddlrVZB YqeFE9X6Uog4RD4a7ZY3WGXv8w== 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 Cc: spapothi@codeaurora.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, vkoul@kernel.org, bgoswami@codeaurora.org, Srinivas Kandagatla Subject: [RFC PATCH] ASoC: soc-dapm: Invalidate DAPM path during dapm addition of routes 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.21.0 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: