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=-4.0 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 5ED55C433E2 for ; Mon, 31 Aug 2020 09:41:04 +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 CF127206C0 for ; Mon, 31 Aug 2020 09:41:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="ALQtYvI4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF127206C0 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 3E71E171C; Mon, 31 Aug 2020 11:40:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3E71E171C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1598866862; bh=eaVf1EMCSJNpZH7VY/jtrhonBx5yT6vxCcf/+Ag4CZk=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ALQtYvI4iU1OiJ2x4qOrvEcnVYJooKT/PWWm3Fw1SIvuNnArOmC2U2E06Az1RXnLO 03lPB4nAVpApOYOxOvIKu5ah+RtOdIlhMV+E51A8nghZ2pMZaTZE9BIpjkqJR6jjG9 gyYLROYyAjG+uZV3Frn539krBhtQ9Puwpke8jTKg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AA986F801DA; Mon, 31 Aug 2020 11:40:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D7EABF80212; Mon, 31 Aug 2020 11:40:09 +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 7CE13F80058 for ; Mon, 31 Aug 2020 11:40:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CE13F80058 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 4D3FBACF2; Mon, 31 Aug 2020 09:40:35 +0000 (UTC) Date: Mon, 31 Aug 2020 11:40:00 +0200 Message-ID: From: Takashi Iwai To: "Jillela, Emmanuel" Subject: Re: [PATCH v2] ALSA: HDA: Early Forbid of runtime PM In-Reply-To: References: <1598569536-9450-1-git-send-email-harshapriya.n@intel.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: "N, Harshapriya" , "alsa-devel@alsa-project.org" , Kai Vehmanen 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, 28 Aug 2020 19:06:51 +0200, Jillela, Emmanuel wrote: > > > > Subject: Re: [PATCH v2] ALSA: HDA: Early Forbid of runtime PM > > > > Hey, > > > > On Fri, 28 Aug 2020, Takashi Iwai wrote: > > > > > On Fri, 28 Aug 2020 01:05:36 +0200, Harsha Priya wrote: > > > > This issue being common across all codecs, pm_runtime_forbid() is > > > > called when the codec object is created to fix this issue. > > > > A codec enables or disables runtime pm in its own probe function. > > > > > > Thanks. The only concern is about the influence on the relevant ASoC > > > code, especially hdac_hda.c. > > > > > > Kai, could you check whether this still works? > > > > I believe Harsha is testing mostly with ASoC, so hdac_hda.c should be covered. > > > > I did queue a SOF CI job for this v2 patch and I'm seeing some failures in module > > load/unload test that might be related and need checking before we merge: > > > > https://sof-ci.01.org/linuxpr/PR2403/build4400/devicetest/ > > > > The actual runtime-PM tests in our test set pass, but module load/unload has failures >on > > some platforms. I'll follow-up when I have a better understanding what goes wrong. > > > > Br, Kai > I am just trying to think ahead to get something that may work. We can add an if check around the pm_runtime_forbid like below > If (!codec->auto_runtime_pm) > Pm_runtime_forbid(&codec->core.dev) > Do you think that will work?? snd_hda_codec_device_new() is called before setting the flag, so it's no use for adding the conditional. thanks, Takashi