Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp256832ybd; Tue, 25 Jun 2019 20:53:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxCvoUWtz+H3KDOlPSPCxPpWLkGV6NSd5Ppx3NDpK1ZUQOKT72PgxWAuyJfTCtwIsgqitY X-Received: by 2002:a17:90a:2305:: with SMTP id f5mr1929641pje.128.1561521192333; Tue, 25 Jun 2019 20:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561521192; cv=none; d=google.com; s=arc-20160816; b=c5ZLY6kUQtkOsvYMZs46uWH1WFLusKn1Hs2xl5kP/1iEkoa+fVVCCBOcogf10gaSCe ZH5+gpU8OfTV/99UGIJyd0F13qTejf5VVeHS6YTU7eYYJGv8pmB8XMBPudrdmOPQZS5e NKV/gmM9VnX8o7vFUst46E4iJSoZF1gMJAheEFnVcMgAOgMApDnc1vkDlznLqP6MmKFW bhNFRjunt3IOlaRciVMwGrq1BNIfs1TCaJ5m2ZRSVrRLxB3Tzp65imvWxU08NNpQznXt OmcsfjCdMBxGs+4BZAiANHi42aErIQqrpWwA+c19Uq9LEMj/SqWQT+60eKAvgHilCpyJ mTsg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3fLRsC8kZ/Rm6CFzfQvlKCFColdADPdUdRbfKMiJFH0=; b=i7Qy57M+YEpVBjK6+V6dfs2DfBQ7ksCfANLI08bmGBpQkSUowYUr8faHjMrnW8xz6k i1chKhCOGh90QK1MjGxSUF9L7nbsufQkK6eUicfnxUvXt5fIm0RIQ3Yh/iwU1cTUcFEd QO5dwKfXnL0z66NU5i/qM9Bx2p7Ihf1nFJocZnQj+6ARH4tKEHA01xs7idhoHXdYmgs5 CWm/R0mEy/MPUCveTLl+RyeJz/XUqMrrVrdo4GVeCs/gatwz/py4DPLiuGZI4qSF4729 eD9ZMijR9sk1m2nx+OCo5nm7/1CvOxgBK0zujRkfkseU0ZHkcFaW0t7Fm1g+L+wg+uP2 Z1bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b6epzu6B; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si15711562pgi.218.2019.06.25.20.52.56; Tue, 25 Jun 2019 20:53:12 -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=@kernel.org header.s=default header.b=b6epzu6B; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726817AbfFZDlg (ORCPT + 99 others); Tue, 25 Jun 2019 23:41:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:51976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbfFZDlf (ORCPT ); Tue, 25 Jun 2019 23:41:35 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E002C2146E; Wed, 26 Jun 2019 03:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520495; bh=bDkVQeypVwfhZfCq1//tGQg0D9nICTUmO2ePc9iVSdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b6epzu6BdolQ6IDJJvGF27MzA3qoXZM/1sFZiISFvIxefN31YhE+jTxpDksiGmlfM C3HLWVo1Db5VPDDp8dYkj4GfitQgJcEVmmwC9iSd0FecurSdyeskeroaBRkzLqgAkt wU9y8N/ntLuyhxL5fVSjUyAshIZ9lwOGIAIUi2EM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kuninori Morimoto , Vinod Koul , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 5.1 07/51] ASoC: soc-dpm: fixup DAI active unbalance Date: Tue, 25 Jun 2019 23:40:23 -0400 Message-Id: <20190626034117.23247-7-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kuninori Morimoto [ Upstream commit f7c4842abfa1a219554a3ffd8c317e8fdd979bec ] snd_soc_dai_link_event() is updating snd_soc_dai :: active, but it is unbalance. It counts up if it has startup callback. case SND_SOC_DAPM_PRE_PMU: ... snd_soc_dapm_widget_for_each_source_path(w, path) { ... if (source->driver->ops->startup) { ... => source->active++; } ... } ... But, always counts down case SND_SOC_DAPM_PRE_PMD: ... snd_soc_dapm_widget_for_each_source_path(w, path) { ... => source->active--; ... } This patch always counts up when SND_SOC_DAPM_PRE_PMD. Signed-off-by: Kuninori Morimoto Reviewed-by: Vinod Koul Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-dapm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 5d9d7678e4fa..1ee67716d558 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3831,8 +3831,8 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w, ret); goto out; } - source->active++; } + source->active++; ret = soc_dai_hw_params(&substream, params, source); if (ret < 0) goto out; @@ -3853,8 +3853,8 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w, ret); goto out; } - sink->active++; } + sink->active++; ret = soc_dai_hw_params(&substream, params, sink); if (ret < 0) goto out; -- 2.20.1