Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp678583ybh; Tue, 10 Mar 2020 06:20:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtqgySiITk/FgR9ePphnfW2Edq2Uuvaqtq1BgKe4oeoqaH3MwW62UKaEuF304KeoRIgBBYW X-Received: by 2002:aca:ef82:: with SMTP id n124mr1079266oih.73.1583846418811; Tue, 10 Mar 2020 06:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583846418; cv=none; d=google.com; s=arc-20160816; b=dw1f/94fcd/LXnnnmUAZ+FYxfOhVuzZUhtS/rkw/zljh2n0WYOHKXvbUfHgY5pESJ8 HEKGyOku4ggB4RysZOCBuOvL/NdKZQWG3e2cFU6mLAe1obk0KCGK4eExQhffUhyui2z8 PSGIsmSZtlzl6hGh+uxYR7vbjqqhLznfXYQE/fdHS9bMksLkKYm96y2sixQc7LbCXdd8 Zjj2DMxZbycl8AkGY0wuZP5o3uzPykMqfvAB4q2u/2putTz1Lw5gfmY3WYBOjLzRVb9B feLyp+pe9wF0Z/0ybVENPQrF5Cdwuc9qRiO8yrCk8zTA+1AdVETDZvAeWwGxaTZnrAKc 0eqw== 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=Fo0s5y30+QaMTaHV/7CX8OW9ZfPs+j2n6ub6G2ZS1YI=; b=U6XK3YzOGiKqyRDvPNoM3HKEOQlg8Y/XfoZrqpx+bvDtMd+K6qkioLRTIsDKmW6w6W 44DvxumnsKdV957pbUHpT6r6igoe36v9XsSGB71QJ93VGg9Zl4rVThXbzDT1ybZHfKYt mkXfdNbRU43AklsMD+fblCFUmnaEKeW+5JrXsodMOOryvU0AE35CZvVJA7YJP0L/dUjk aVI+6pl/kx7OEUiYWcNTdzq/BKtsmHx1cW3G947OfBzac+E+lSKa6ifIbQaGU4cBwZ3t 5XY+/1PK3hLDJiikjGfokvTM33h2wKn8Gi+kdWe3nDUUpsaJv7NnwZ0LVYRz/65wh0z7 nJog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J40CDwX8; 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 18si5507171oin.182.2020.03.10.06.20.06; Tue, 10 Mar 2020 06:20:18 -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=J40CDwX8; 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 S1730412AbgCJNSg (ORCPT + 99 others); Tue, 10 Mar 2020 09:18:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:59974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730650AbgCJNKd (ORCPT ); Tue, 10 Mar 2020 09:10:33 -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 8A4CE208E4; Tue, 10 Mar 2020 13:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583845833; bh=E3EhBWcEq5pdHu/iHbfF2I3g5wRmXGkx1phYs45uAU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J40CDwX8gRCnZd6EZvSBFuSEDMgXkfHnO6ghnNOYEEpygZLqufH6O1BzOoUoa4FjN TFWXP2pBAMhumzJppPpM1CDZjQnRkyYE8qL5AaNtN39u50DsjVSvRupV2VeGq0lJS6 zZbB23wkXRYSNVaXi7e69v2LcF1eqU9dF5tgaLY0= 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.14 116/126] ASoC: dapm: Correct DAPM handling of active widgets during shutdown Date: Tue, 10 Mar 2020 13:42:17 +0100 Message-Id: <20200310124210.912557251@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310124203.704193207@linuxfoundation.org> References: <20200310124203.704193207@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 @@ -4481,7 +4481,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; } }