Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2149997ybc; Wed, 20 Nov 2019 09:36:01 -0800 (PST) X-Google-Smtp-Source: APXvYqw8RqNBMAgOf8Z/lehXWSiqm0hIYZJSanjRCxdHMJAA+J5le9OVK9o5kBQ8v0riGFmmPU+A X-Received: by 2002:a17:907:205b:: with SMTP id pg27mr6611247ejb.144.1574271361176; Wed, 20 Nov 2019 09:36:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574271361; cv=none; d=google.com; s=arc-20160816; b=OQ5HFE2Rw2yiTDvKCEkbWx/f0rxvcttbQx5r+EbmNWChXWMPstvk50WlV2HbzrB9Nb OA7r7myJt/vio80t3sS2PivkhXBRgOdRaYgVVcmpwZ2TjFGjd9RruCAnnvGc181EI28K KuyZmdQgyU0ndylu5hIF/VyNy3McadEDeEvxLzJWZRmh6vhIUKUog+4r296vRgMcnUc1 6AXcFVWqJ7ix25PeMcS+bc/4Gdl27zGeNCeaHdguEctqSl2H0Ik7XbvVZs9YeBf58gVX fB+ye9kk9xKhatqjVVk89PAQq2C9KPEga87urT5V8WPEKca+Z6opdA7VKbKU11yE/YdX 1fuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=1Lkuxbp9t0VWh0VKcMQx4VSDk85RqD0Iqe1E/3UMxGY=; b=Cb2Uf6nmbC+cIYE+wggNDPqVEym4kHKPpQhdSL/NaFRDRrx2y09VeDK4b3XHKYC8C9 RnClGJdg8J5XL8kjx9/sZYni7VIOLnJ2rfjLOaTMwfu6LeHpfo5nWwOL7Lshv1XT9eKF QEBvRIE8jZ2Fj3S8KO3jp3TswvE5ahUsC9i2RTEXECHi838FAfm9o/iAL+ljlH7S+uzM RP8nn6hCYUaLUr9+a1+rgfabJJlicbl9kDjnvyIe6Gt2Kw9h5laVggkzBYw4NK+Dh5ZU +s2PBzLmfqiZ3O5kcsC8DmLwjAM2Qd50gRoy1R1A8FcS/Jp48AL0BKhr1VhlLEOTPphD qR0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si16495130eju.113.2019.11.20.09.35.36; Wed, 20 Nov 2019 09:36:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732681AbfKTQKi (ORCPT + 99 others); Wed, 20 Nov 2019 11:10:38 -0500 Received: from mga03.intel.com ([134.134.136.65]:54270 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728017AbfKTQKh (ORCPT ); Wed, 20 Nov 2019 11:10:37 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2019 08:10:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,222,1571727600"; d="scan'208";a="204862318" Received: from ngoel1-mobl1.amr.corp.intel.com (HELO [10.255.66.61]) ([10.255.66.61]) by fmsmga007.fm.intel.com with ESMTP; 20 Nov 2019 08:10:35 -0800 Subject: Re: [alsa-devel] [PATCH v8 2/6] ASoC: amd: Refactoring of DAI from DMA driver To: vishnu , Ravulapati Vishnu vardhan rao Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , "Gustavo A. R. Silva" , Liam Girdwood , YueHaibing , Takashi Iwai , open list , Mark Brown , djkurtz@google.com, Vijendar Mukunda , Alexander.Deucher@amd.com, Akshu.Agrawal@amd.com References: <1574155967-1315-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <1574155967-1315-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <0c3d3545-b0ee-4bb3-558a-045633a30e46@linux.intel.com> <991a1c7a-6f34-caab-132d-5687b1f1bfa0@amd.com> From: Pierre-Louis Bossart Message-ID: <9005946f-69b6-1cc6-5a1a-b894d826b960@linux.intel.com> Date: Wed, 20 Nov 2019 08:48:57 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <991a1c7a-6f34-caab-132d-5687b1f1bfa0@amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> +    pm_runtime_set_autosuspend_delay(&pdev->dev, 5000); >>> +    pm_runtime_use_autosuspend(&pdev->dev); >>> +    pm_runtime_enable(&pdev->dev); >> >> question: here you want to use pm_runtime for this platform device... >> >>> +    return 0; >>> +} >>> + >>> +static int acp3x_dai_remove(struct platform_device *pdev) >>> +{ >>> +    pm_runtime_disable(&pdev->dev); >>> +    return 0; >>> +} >>> +static struct platform_driver acp3x_dai_driver = { >>> +    .probe = acp3x_dai_probe, >>> +    .remove = acp3x_dai_remove, >>> +    .driver = { >>> +        .name = "acp3x_i2s_playcap", >> >> ... but here there is no .pm structure and I don't see any >> suspend/resume routines for this driver... >> >>> +    }, >>> +}; >> >>> @@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = { >>>       .probe = acp3x_audio_probe, >>>       .remove = acp3x_audio_remove, >>>       .driver = { >>> -        .name = "acp3x_rv_i2s", >>> +        .name = "acp3x_rv_i2s_dma", >>>           .pm = &acp3x_pm_ops, >>>       }, >> >> ... but for this other platform_driver you do have a .pm structure and >> suspend-resume implementations. >> >> Wondering if this is a miss or a feature? >> > > As per our design, ACP IP specific changes like ACP power on/off will be > handled in ACP pci driver(parent device for DMA device and I2S > controller(nothing but CPU DAI)) > > Where as In DMA driver during runtime suspend/resume interrupts will be > disabled and enabled. > > But in DAI driver there is nothing to be done in suspend and resume just > returning zero so we have not added PM suspend/resume here in DAI. > > So is it expected to add the suspend resumes with returning zero.Or if > pm runtime is not needed in CPU DAI shall we remove the existing PM > related calls in DAI. > > Please suggest us. I am far from a pm_runtime expert but I'd remove the calls to + pm_runtime_set_autosuspend_delay(&pdev->dev, 5000); + pm_runtime_use_autosuspend(&pdev->dev); + pm_runtime_enable(&pdev->dev); if you platform device does not provide any suspend/resume functions and the parent takes care of everything? IIRC the status for the platform device would be 'unsupported' but that shouldn't prevent the parent from suspending/resuming. A second opinion would be desirable here...