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=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 42B16C4363A for ; Fri, 23 Oct 2020 13:05:57 +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 67DEB207FF for ; Fri, 23 Oct 2020 13:05:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="E9nayDvs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67DEB207FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de 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 612681826; Fri, 23 Oct 2020 15:05:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 612681826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1603458354; bh=hL48z54QXctMhAMtCt3f6/eReiAssLd2ksf5TzU8qug=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E9nayDvsnZLx9WL/sxwXE9brcV72t7IIFTuzNirf6Oc3UhwvAdRb4JdDoETGcXkmi 3+Y6a7Novd+jE/sZiRj5Hm0EmrWQg51ldkmqdf2LQ2jMQSsaALjb/y61gilxAmWjqB AR/Ljc1YT+MF6U1I+W+3i04XCeOuQILSKKd/HZsI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9E0ADF80247; Fri, 23 Oct 2020 15:05:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8BE48F8025A; Fri, 23 Oct 2020 15:05:01 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 31E88F80247 for ; Fri, 23 Oct 2020 15:04:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31E88F80247 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C7B9AB210; Fri, 23 Oct 2020 13:04:58 +0000 (UTC) Date: Fri, 23 Oct 2020 15:04:58 +0200 Message-ID: From: Takashi Iwai To: Kai-Heng Feng Subject: Re: [PATCH 1/4] ALSA: hda: Refactor codec PM to use direct-complete optimization In-Reply-To: <9D7D9C4C-3245-41A3-B0C4-D74FBB5FE91A@canonical.com> References: <20201023102340.25494-1-kai.heng.feng@canonical.com> <9D7D9C4C-3245-41A3-B0C4-D74FBB5FE91A@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: "moderated list:SOUND" , Randy Dunlap , Kai Vehmanen , "Gustavo A. R. Silva" , Harsha Priya , open list , tiwai@suse.com, Pierre-Louis Bossart , Ranjani Sridharan , Mark Brown 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" On Fri, 23 Oct 2020 14:44:18 +0200, Kai-Heng Feng wrote: > > > > > On Oct 23, 2020, at 19:32, Takashi Iwai wrote: > > > > On Fri, 23 Oct 2020 12:23:35 +0200, > > Kai-Heng Feng wrote: > >> > >> +static void hda_codec_pm_complete(struct device *dev) > >> { > >> struct hda_codec *codec = dev_to_hda_codec(dev); > >> - int ret; > >> > >> - ret = pm_runtime_force_resume(dev); > >> - /* schedule jackpoll work for jack detection update */ > >> - if (codec->jackpoll_interval || > >> - (pm_runtime_suspended(dev) && hda_codec_need_resume(codec))) > >> - schedule_delayed_work(&codec->jackpoll_work, > >> - codec->jackpoll_interval); > >> - return ret; > >> + if (pm_runtime_suspended(dev) && > >> + (hda_codec_need_resume(codec) || codec->forced_resume)) > >> + pm_request_resume(dev); > > > > You shouldn't drop the check of codec->jackpoll_interval. If this > > field is set, the codec driver has to resume no matter what it was, so > > that the polling can start up again. > > Ok, will address in v2. Thanks. And, could you submit v2 series with a cover letter? Takashi