Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6138284iog; Thu, 23 Jun 2022 12:08:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sXl4UPmehFLkknFWQV7rNFNnEWy4kauBKwGMqBBDWkjWPOtLEEpKNuDceJJ34NvpQtiEhH X-Received: by 2002:a17:907:968f:b0:722:f8ef:ab42 with SMTP id hd15-20020a170907968f00b00722f8efab42mr7834093ejc.258.1656011321272; Thu, 23 Jun 2022 12:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011321; cv=none; d=google.com; s=arc-20160816; b=FFeXyRkEVQdh61kSMvVP8ajP/39yjYmuIG2za3WvZusnKdxGPuliSitfyonFSX1kXH mUYH3DyeOAptQBdcfjpY53o1CzV2jdxjaNHTITYSidytUWKFn0iIcrWbVXyki87jdiot l0kKJIo/DAYeIEfp3BeZRoDTOCjC01PVja/gaLexbYvPm/8YNgFKrmSF5QbV6BOcb5lu vxIFgqAGmrc4XByTsbcJSk5+/9pLRiXrXejSl0PxUfsEn5x6AjklyaP+ygINmWEKtKXI ltB+Jq9pxUaTcj2viikBZWbizNdJ9uhYfhigi12KGW4SwYNAmb7rf8Eq8dolvW0F2zKd SOag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vqllr1zDRAwp7UnSBve+XMHc5OZLQVnHjzVKi0/h6Lw=; b=Ik6R2BDgml/3D0kqMyxqJhdojtAJnDV43ThO909S8vLVlOHdwhAGRZ51XvLi1A5jaD U6Kcc1fmDgCfxAf8+72JqR297tbpXA3mr3tTIBZdZZM+NIcjfjB5AIdNJM945Zb7bSSf Co0buU062k0XZhcCC+yBBdoAIs1eaG44aiYq8TBW2kL7tPHTzcWz0MBR952lQnnXye6a yvkmZ9UhOMfnGWpL3k0N/1wfTWg8xHU4CtrrPYH2LdAEqVHNijJ8qKM8Xsg/btjn8qxN F1eZdKLWaAEcqbO+0ZmUT3gia8nH8fdwjenHyvveDbgTOvnvCFLXEncEYMbnBDk9N+5e RDfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="14L/Fsui"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a056402440800b00435d7a4a529si442261eda.346.2022.06.23.12.08.11; Thu, 23 Jun 2022 12:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="14L/Fsui"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236722AbiFWSPz (ORCPT + 99 others); Thu, 23 Jun 2022 14:15:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236608AbiFWSPV (ORCPT ); Thu, 23 Jun 2022 14:15:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4967C162B; Thu, 23 Jun 2022 10:21:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9C235B824C1; Thu, 23 Jun 2022 17:21:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF392C341C7; Thu, 23 Jun 2022 17:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004903; bh=j0DqSOb4wtciB8qs+NUib1IbtaMB3GxRIMriNsXMyFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=14L/FsuiT4TDH6uAEYcs/jVIpdk0wnjWDUwlQHJVD+jc95Mae+AkDLFMa9Ory/ldX Plr2v4M2GcAWESFOBWu+Xh6aaeM6r0lIADnFHI1vxoYjFl+Y/AZYFkl3m5RENdLdQI pK6yv+8GhEjV7bqM/+WqbyueWyRhOG33QXJPkbaQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adam Ford , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 4.19 187/234] ASoC: wm8962: Fix suspend while playing music Date: Thu, 23 Jun 2022 18:44:14 +0200 Message-Id: <20220623164348.341166132@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adam Ford [ Upstream commit d1f5272c0f7d2e53c6f2480f46725442776f5f78 ] If the audio CODEC is playing sound when the system is suspended, it can be left in a state which throws the following error: wm8962 3-001a: ASoC: error at soc_component_read_no_lock on wm8962.3-001a: -16 Once this error has occurred, the audio will not work again until rebooted. Fix this by configuring SET_SYSTEM_SLEEP_PM_OPS. Signed-off-by: Adam Ford Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20220526182129.538472-1-aford173@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm8962.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index dde015fd70a4..3f75cb3209ff 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3861,6 +3861,7 @@ static int wm8962_runtime_suspend(struct device *dev) #endif static const struct dev_pm_ops wm8962_pm = { + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) SET_RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL) }; -- 2.35.1