From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93408C10F27 for ; Tue, 10 Mar 2020 13:14:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BE00208E4 for ; Tue, 10 Mar 2020 13:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583846070; bh=JS39Wn7Lg3DEMyJEdPgfrdA9deBJWy0Ua3B2Q8wJ/bg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=bEJZXFUzSwE96Wr1Yt/4BphSFei7yqdaVPgozoby0NWsEJaga2D2TiI7w5Yf1gApC Jee0kkHSp7HMV8SRr3eRDBqt1TxzNiSUF/QSTZEbufiEHfbYN+HKPXEw15R0D6OS2E 8r/TyACsCK0OSiKE4Ix/eI6Z5sLvEmYftSRE+juA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731884AbgCJNO2 (ORCPT ); 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; } }