Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp647046ybh; Tue, 10 Mar 2020 05:48:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs50bnstoyxMaY817hS02L26X6Hs0b9YjUhqdhOnPCigkcEfvGNu6tF6ggrsWqe94/0OjBo X-Received: by 2002:a9d:178:: with SMTP id 111mr17482866otu.238.1583844532528; Tue, 10 Mar 2020 05:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583844532; cv=none; d=google.com; s=arc-20160816; b=RKWPaipZQDRaIBjKIDZ9Oyalm+a+rdrsrSQh9LTea8fIcc3TR5dnRDtIiz9Ci39HBp 7w2ClV/m5lS+pt3rRMZfpNYFN8Ri5XcQ97d0mMs5dIzC0G1lMADLwhQSVMMxve27RBK9 Pk41INeHCIiBKyWVVPAb22YLubzsjE881/RQuUwDA49vXLyRVw+YnNNSMRJ7/+kE8kOF rDBAobH4+gEHtFOIAk8I/EkFJijCw/mpsca1T2v3vu7zbP8n3pHkLEJv3itK5AWBp1vd ecEne7GpKceSGKThgTV/V7lEc9JIRpIoPsOp6pBci68su0b7GEuXFbclab9WGM9sNInA XLKQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=61rFJyr1w9/puILhq4uNs6c+OR+alGn5GYgOPfwgtDI=; b=PCRK1/hKHIUWDZx9u37j5T2rMR4rjqSpwGllMbMzQkD2fmM97ToKf1fVA8j4SBtIIh +p+oyxSU1nChF069GsDgzIOXtHHt6PkDVltxetv1+lBJzwr3H6GvsPBxTwNAXgPdpQxZ /P/oIr/Eou93UjijAFhTHGk6yq2KHy0mwG5QzBZtQfPL9UV//aAX92mDBtk1CFvLHeko 9AMFWe8PrR3Fgw/UH6JPesWGOY2uRrMtjCrm5cNqX/O9NHuGl0kqA2N7Cu0mzm9I6uSK kGu9eiV5IZakizbDxGTIh0utAYvlgfIDWdXIeg4vaunABdA4XCnGdFyYzoUzqiKMEyEN qPIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KSBvStdH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si7734096oth.325.2020.03.10.05.48.40; Tue, 10 Mar 2020 05:48:52 -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=KSBvStdH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728243AbgCJMr5 (ORCPT + 99 others); Tue, 10 Mar 2020 08:47:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:51856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728237AbgCJMry (ORCPT ); Tue, 10 Mar 2020 08:47:54 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 68AAC2468D; Tue, 10 Mar 2020 12:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844473; bh=XT/MO7aK5SsWIBRiMbJ29n7rSEC/rEmTvtY415pZyWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KSBvStdHp++J+4rQN/ba8goRiYbrgRLCHDkArO4s2VLLEsaEFRBZqfSjMBA5bUqeN AHEB9IykHtGFSyv3X5DPmQmUQx7a0nUNaald67fHg8cd7sYCt/rJV1J/vMgWBsRn4q XmpvvQhHNVUXzGxiRUJCO3AazuE2/GytYloyNBy0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Charles Keepax , Mark Brown Subject: [PATCH 4.9 80/88] ASoC: dapm: Correct DAPM handling of active widgets during shutdown Date: Tue, 10 Mar 2020 13:39:28 +0100 Message-Id: <20200310123624.461651289@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123606.543939933@linuxfoundation.org> References: <20200310123606.543939933@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Charles Keepax commit 9b3193089e77d3b59b045146ff1c770dd899acb1 upstream. commit c2caa4da46a4 ("ASoC: Fix widget powerdown on shutdown") added a set of the power state during snd_soc_dapm_shutdown to ensure the widgets powered off. However, when commit 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written") added the new_power member of the widget structure, to differentiate between the current power state and the target power state, it did not update the shutdown to use the new_power member. As new_power has not updated it will be left in the state set by the last DAPM sequence, ie. 1 for active widgets. So as the DAPM sequence for the shutdown proceeds it will turn the widgets on (despite them already being on) rather than turning them off. Fixes: 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200228153145.21013-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -4363,7 +4363,7 @@ static void soc_dapm_shutdown_dapm(struc continue; if (w->power) { dapm_seq_insert(w, &down_list, false); - w->power = 0; + w->new_power = 0; powerdown = 1; } }