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=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 BEDC0C433E0 for ; Fri, 29 Jan 2021 15:39:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 014D664E09 for ; Fri, 29 Jan 2021 15:39:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 014D664E09 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4336C16B8; Fri, 29 Jan 2021 16:38:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4336C16B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1611934761; bh=Xx1E0OToD1LOcnM9o3BZfsKZYtXxWkDt3JP/pCT2x8Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=eEMHS5LeDMVEadtOL2JUlQFSQzqGFOQ1SFVgpBadUT21E4RdOptwQKzNxOJ85GVqP OqBgrT2e1Ako2nTBgJXFfqauH2kcN/4B2U0vnD9j4920QINjyLcqqxMd7oP8UkX3Z3 VDMNk2blRLMOg4/FpBNBMSzvNm7X7RouBEpHm1VA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 93D2EF8026B; Fri, 29 Jan 2021 16:37:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 972A4F80259; Fri, 29 Jan 2021 16:37:37 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2BF9AF800E9; Fri, 29 Jan 2021 16:37:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2BF9AF800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZlNDvJHA" Received: by mail.kernel.org (Postfix) with ESMTPSA id 03CFA64E11; Fri, 29 Jan 2021 15:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611934647; bh=Xx1E0OToD1LOcnM9o3BZfsKZYtXxWkDt3JP/pCT2x8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZlNDvJHA+zdzlDuYUEGmGSYD1VeOS6O/9EKpflj1zo3Hdo4TjuSQIUIboLWD35ciy CQtRONB1YJYxcj+lLQKsSmZbzPu+pMuJZDQ89d1CkiaWeMHgPZ7wJVX2Ez7iZEpavW Dx/Tm6T3GowESK1VamQl3Oj7hMBekYfl9MDhTDzCoSYBxcrxAPbetHkc0wtBy2GxkJ HBlWe6gbvsdca1juk2ju3G2EsUgrdl3Nncl8DTNDCpzOsiHybxn5cul27SA67RapVm Ryk8tR5ugY1F2+4R1vxNuyyGBADGVkR+Z7IPYfVOeLL347MXUcDz1orsgBQZvLaCbt QlJhuXL6KRYBw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 12/41] ASoC: SOF: Intel: hda: Resume codec to do jack detection Date: Fri, 29 Jan 2021 10:36:43 -0500 Message-Id: <20210129153713.1592185-12-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210129153713.1592185-1-sashal@kernel.org> References: <20210129153713.1592185-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Cc: Sasha Levin , Mark Brown , Kai-Heng Feng , alsa-devel@alsa-project.org, sound-open-firmware@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kai-Heng Feng [ Upstream commit bcd7059abc19e6ec5b2260dff6a008fb99c4eef9 ] Instead of queueing jackpoll_work, runtime resume the codec to let it use different jack detection methods based on jackpoll_interval. This partially matches SOF driver's behavior with commit a6e7d0a4bdb0 ("ALSA: hda: fix jack detection with Realtek codecs when in D3"), the difference is SOF unconditionally resumes the codec. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20210112181128.1229827-1-kai.heng.feng@canonical.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sof/intel/hda-codec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index 8b0ddc4b8227b..8d65004c917a1 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -93,8 +93,7 @@ void hda_codec_jack_check(struct snd_sof_dev *sdev) * has been recorded in STATESTS */ if (codec->jacktbl.used) - schedule_delayed_work(&codec->jackpoll_work, - codec->jackpoll_interval); + pm_request_resume(&codec->core.dev); } #else void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev) {} -- 2.27.0