Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp674254ybh; Tue, 10 Mar 2020 06:16:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvBqurx1wgNm2/2DlLh+U1L7rCLvpLCFiawKLXrb8XIloEqJHoPUecLZbbM0haEK4345VWP X-Received: by 2002:aca:fc95:: with SMTP id a143mr1064860oii.66.1583846166485; Tue, 10 Mar 2020 06:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583846166; cv=none; d=google.com; s=arc-20160816; b=IHyOU6Uv06Km7IUfa/qAAnYORjhhgslEsGgM4brtcq2hi58dxhkg4I0P/BOdb8So+q z6hINCOW2C7zDxg5hkhgU5JNT0BqeyAPmwTmocnC95Xx+fwngOkLsJtEuZ7bOgR+YMDJ jE0EdZpQ+2E/e3Kbm/Z3DvIaPk9heiJUAmP276dSh+27fTbtc6HwCo42DTO2lGQ6+FWx KgbtcWfZppGgWvz9elTb9H8HQYXrCn6JSOT2tJRQHeZT4LyObCKozXrF4NlIzHxHdUL/ Avay0Pbe2aSOD71sDwlCd/b/c1lAKoXnkgfHoCfkGM+mm9HJO1wxA6u3x4XuOxXAjY+J UBtA== 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=CnEFpP/66GkxY6kP0GbCSxUwFFAWqNpYBVe6mGssgIA=; b=bE2d4Zl5pqBtEtr+D7Wm8NjKS6RgYQ9PzfKlh86xNO6ZiMtInLlZ9Rw9VIodIjkPj6 LhmVS8cf3UoetW6dhirkE5bn4T2P5zi06j0ZKLcCPwJGh1T9GDhM39TOqCATldY1fEpH Ov7bgjZIFtPu5Nyu+6YgCN/YsQtH1GP+YBr0qMYGHDY22XluFS75IMVw9hh4nenwXdDO bStQcpj0/epVj0FeNhYBzlRHSP8yQf5kYGRVGEz942UL63mrN0Xf6qSDIpTIYG4kdslZ H/u8N0yAaeZuleWM88MEA51CTUJFpy5Cdpn9P2yyfHgL6yrFTgrWTSQmP77D5eNLPYaX TwYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sdFdL60e; 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 l11si3779950otk.207.2020.03.10.06.15.54; Tue, 10 Mar 2020 06:16:06 -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=sdFdL60e; 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 S1731659AbgCJNO2 (ORCPT + 99 others); Tue, 10 Mar 2020 09:14:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:38190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731876AbgCJNO0 (ORCPT ); Tue, 10 Mar 2020 09:14:26 -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 851C32467D; Tue, 10 Mar 2020 13:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583846066; bh=JS39Wn7Lg3DEMyJEdPgfrdA9deBJWy0Ua3B2Q8wJ/bg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sdFdL60eeu3yJ13mDpewopLZ9Ys9i9ahcEIWKjP1TyWCUcsYDjctlLPghsyQdQzuW GrLUJBxAVjAUL37h1rA2z5xH+VBAlbTlhp9akX+C0Rc6yRGBAKETwTsQWWDjL8YpNB HUr8g8uXTGm8lEDlkV3V9HqPVZLpDyNxPi0rH3uc= 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.19 67/86] ASoC: dapm: Correct DAPM handling of active widgets during shutdown Date: Tue, 10 Mar 2020 13:45:31 +0100 Message-Id: <20200310124534.399943895@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310124530.808338541@linuxfoundation.org> References: <20200310124530.808338541@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 @@ -4551,7 +4551,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; } }