Received: by 2002:a05:6520:2f93:b029:af:d4db:7a05 with SMTP id 19csp2364919lkf; Fri, 5 Feb 2021 11:13:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHKzRzREzY+tCVrQ3ihjoymkAccZOzMLFwd5iCu3/YwN8iDcJzBHTjWaR/K5J3A9rmySrY X-Received: by 2002:a17:906:55c5:: with SMTP id z5mr5445151ejp.275.1612552381481; Fri, 05 Feb 2021 11:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612552381; cv=none; d=google.com; s=arc-20160816; b=PxTVG23UWGzeu4kztw8ND+QnM2+fU270GO7yRA5S+pQUaZJsEsATQ9Iqtu2uhJUOSx 7YZ3DqRZE02mIe0F/uqxWmqyYKqz9TZZFR59KtOg5riGjQ+tO4Zzl6SFdTXxQfqUQW6U C83SVxSHkl7qkRGzAkwNEyWffd8miQTczu6iHdAGNIoHzYJrNaLEuJXnlBewNm6t8s3S pu4fDElNfkKEnHw8Gz3mu3qdCpjVb97IlNniuh5tjkzMQok3Bb2tJ63Xv6RrX9pCaC7n eonbRk6NgqhDh/ogl3FZe8m2JCaF6LX4cvEYR3pv+WiI/0LsFM8furtV8HOimGsgfIV/ dMPQ== 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=qBw7YcDN1znyBTawF9Z2AGTmW8vRYNglQy0S9GwL0Dk=; b=LvK9BkKInJJPAtVB+q5DmgqHvBwGCMN2UIxfukVHx7lUpn93Gen90nR7gcV6yPJ+Xq daz+4Ivr0qmqwP37KZNt8XLAmcJojAysus/b7L41XNewBGoUYStSGRXQt3jtslsTbJWu o1db4O5ELi2pY1bbeT2LFvivdA7vFSRi/qOU/ib58oD51o/pAqrXp8HWhx5j7nK95zbO im5HjWwpUN8/mX/uWm/pGTLNSLeR9n0jyo8LCZ2n+YdQVQAoevBiVrKuw8txnEhJ0nno G3S3m1UkQJ/3qUO4iNwxBsmPE2PRfZm/Otyk+ezPTRI30x05LArAYNclZ59dA1MwrGRc FYDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b8AwMGNA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h27si6834847ejd.660.2021.02.05.11.12.36; Fri, 05 Feb 2021 11:13:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b8AwMGNA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233540AbhBER15 (ORCPT + 99 others); Fri, 5 Feb 2021 12:27:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:54520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233479AbhBEQAH (ORCPT ); Fri, 5 Feb 2021 11:00:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D27CF65077; Fri, 5 Feb 2021 14:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612534394; bh=NXNouyx6VKhBlXzANDlHY8thWjXibcwa2KqZUbE4TQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b8AwMGNAgUzH8hH8IRN3kHJohOP1FkfmzJG1vhK3aoYe+gjRh6prpo4m0qSOwkHpP czjoTF/GVZlDYyr5FDai5gAwtX7fujwRhnK0enZKpFpMZC/c6W8z+cX+N+rdM/v9P/ DBS5zFLwIUiCYfxc5lW6Ue44gQNJg1JTT1dZ8dTo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai-Heng Feng , Mark Brown , Sasha Levin Subject: [PATCH 5.4 21/32] ASoC: SOF: Intel: hda: Resume codec to do jack detection Date: Fri, 5 Feb 2021 15:07:36 +0100 Message-Id: <20210205140653.252101754@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205140652.348864025@linuxfoundation.org> References: <20210205140652.348864025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 9e8233c10d860..df38616c431a6 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -68,8 +68,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