Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6053456iog; Thu, 23 Jun 2022 10:20:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1szKsL8FhsEV+GevYoalnw6bi44YewRtEuaR9h9X6ZaWN9Ki8wP2PciBHeHd/z6XoHmjZ92 X-Received: by 2002:a17:907:d15:b0:71c:9ef2:2440 with SMTP id gn21-20020a1709070d1500b0071c9ef22440mr9243497ejc.266.1656004813802; Thu, 23 Jun 2022 10:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656004813; cv=none; d=google.com; s=arc-20160816; b=P2RGUPb4uxuq2pMgKUWDz+Ly2Ln0ie5Soxibw74fEKWLBdSM1OMjWNdxP1CXMr0M6H FNhEPKEykOwPzbPlEBJVNjsOdVzap5LvWnbez/ibiT7Lg+khLgRaZQW8aUa+VQjog9uV wqDUjnsl+2+E8upFGiwg50DlGNiSopqQLDfA2xLozM0+vBkEJQAjboWu9RxGl98K7YQi R9uLqBatdVxTn27xZzYfTP/3GNQECUtJtLO5IL/CyRNog9T1rwYhiOIiQ1Lc03COidsr HrLg8/tSsxAS0n5wYYqOuVEBe/o/J5KNoYirs0QQNj11RRnehLvnKdW6l1VzUglYG8c9 BW2g== 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=UE6Of7UfRaaiLoFU3YuWI4KG1ZBD8QqPwSzVzAayxgI=; b=PN4WriOyJB6rLiFtzU/FoBxMD7O2VqNVQq7dAdJPKJ8MrwA/ueZVMuYIjjPWNrra+8 Yh3/ySLBmWCTh2UO3aGEXbe0jZ+ZOpX6S9NhEN8H599ZjeW+LYKNUSFgIIVHgXRwea61 AT3IGlGPKxSBDTDNvf/51go8Lb65H/DfIHjRxm8R8apry24ivG4zEKZ4c/rpTivxb0GR FtlOcfxhrct+pXu0HVlJrqKAVIG8gP0JsDpycgie/SwqjFWUYajFLjKEPHK3ERxZ0giA +/3V41DxMLulzuzU1jP1KPGetAJ87X2tCx6E+ogToPXhu0SWaNDsAPYeMMIDV3sxl8q5 RMvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NmkqmTDm; 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 gb35-20020a170907962300b00725eb97f7a0si2478415ejc.480.2022.06.23.10.19.47; Thu, 23 Jun 2022 10:20:13 -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=NmkqmTDm; 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 S230200AbiFWRK4 (ORCPT + 99 others); Thu, 23 Jun 2022 13:10:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233841AbiFWRIS (ORCPT ); Thu, 23 Jun 2022 13:08:18 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA60E49B5E; Thu, 23 Jun 2022 09:56:56 -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 sin.source.kernel.org (Postfix) with ESMTPS id B3A73CE24F9; Thu, 23 Jun 2022 16:56:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2DA6C341C5; Thu, 23 Jun 2022 16:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003410; bh=OhAGgrsd2hb8cxfZVSqxF5k5FDAbFKwyrNdGMaFnscM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NmkqmTDmGk14NWsAONTZXBbG7usZGdGRC7AiK82yZBZQFTvQXKxajbi7Dm4aiC5nY lw4FZRObBftbAhyKPvkNtjxMW5D2WD6NtHlT9Adt5tDdlCOXEJVXx3tlC5Kbt8fOll Ge3N+s4PhejBxPWm+Zv0M8vT4U483be2EUTlaImU= 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.9 230/264] ASoC: wm8962: Fix suspend while playing music Date: Thu, 23 Jun 2022 18:43:43 +0200 Message-Id: <20220623164350.585693097@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@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 0e8008d38161..d46881f96c16 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