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=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 5C757C3B188 for ; Mon, 10 Feb 2020 14:49:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36A00208C4 for ; Mon, 10 Feb 2020 14:49:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="Lw6tOnb+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728473AbgBJOtU (ORCPT ); Mon, 10 Feb 2020 09:49:20 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:10300 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728146AbgBJOtU (ORCPT ); Mon, 10 Feb 2020 09:49:20 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 10 Feb 2020 06:48:16 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 10 Feb 2020 06:49:19 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 10 Feb 2020 06:49:19 -0800 Received: from [10.25.75.202] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 10 Feb 2020 14:49:13 +0000 CC: , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 6/9] ASoC: tegra: add Tegra186 based DSPK driver To: Jon Hunter , Dmitry Osipenko References: <1580380422-3431-1-git-send-email-spujar@nvidia.com> <1580380422-3431-7-git-send-email-spujar@nvidia.com> <75a63cb3-7d79-7216-6791-3cec57464cd9@nvidia.com> <847f4512-7118-e087-1004-685e476e11d8@gmail.com> <3c19ef99-8051-76f7-a4d6-0d61182fe6e4@nvidia.com> <4c75fc51-fbfd-158f-a096-d4f178921ee3@nvidia.com> From: Sameer Pujar Message-ID: Date: Mon, 10 Feb 2020 20:19:09 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <4c75fc51-fbfd-158f-a096-d4f178921ee3@nvidia.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-GB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1581346097; bh=pGRqxh5K8EuRcbN7wmMZRcTfJvaodHRotMWQZiA3Ab0=; h=X-PGP-Universal:CC:Subject:To:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Transfer-Encoding: Content-Language; b=Lw6tOnb+ikPrnt3kc9xzVkN/YrTCIVw0uDOdwsjasTHyrKtfOX6ofYuT2/D5ijo0H 24A7Vi9tGozF/cwHOAFqb4JFMZbhjXlzWVcF89l4acEl7Es2sH4jZWulLDOz1GscQT fVoFkqHPMOweMnnqq4VPaiUmAeuCT/cstefwq9Cgd7wK7gK5SBeDdzAj5WZtlQ2aqr YyNOKb+CQS6/omYObvyJsLqcD90X/z3VS+G/3u4K9v1LwcBer45pNdYPBXCgCpoAjp PGS5JCijnKZjoCoXOrSSSSMLW1Iwm3TsTlTXsea/aEn6NECDO67mFI8zTe6BFXHymT j923KetnGthqg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/10/2020 5:52 PM, Jon Hunter wrote: > On 10/02/2020 11:15, Sameer Pujar wrote: >> >> On 2/7/2020 11:52 PM, Dmitry Osipenko wrote: >>> External email: Use caution opening links or attachments >>> >>> >>> 07.02.2020 14:26, Sameer Pujar =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>>> On 2/6/2020 10:45 PM, Dmitry Osipenko wrote: >>>>> External email: Use caution opening links or attachments >>>>> >>>>> >>>>> 30.01.2020 13:33, Sameer Pujar =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>>>>> +static const struct dev_pm_ops tegra186_dspk_pm_ops =3D { >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0 SET_RUNTIME_PM_OPS(tegra186_dspk_runtime_s= uspend, >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 te= gra186_dspk_runtime_resume, NULL) >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0 SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_fo= rce_suspend, >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pm_runtime_force_= resume) >>>>>> +}; >>>>> Could you please explain why drivers need the "late" system sleep? >>>> It was done to ensure core drivers are suspended first and defer the >>>> codec driver suspend >>> Suspend order is opposite to the drivers registration order. If there i= s >>> no real problem with that, then you should use the default suspend >>> level. Please don't try to fix a non-existent problems. >> No. This was done specifically to allow sound core to first stop any >> ongoing audio activity during normal suspend and ensure a safe suspend >> of AHUB devices by doing a LATE suspend. > What Dmitry is saying is that if the DSPK driver is registered after the > sound core then we will not need to suspend in the late phase. The DSPK > device should only be registered once the sound core is loaded, because > otherwise we should fail to register it with the sound core. So I don't > think we need this to be late afterall. I was originally thinking if DMA is the main reason for using LATE=20 suspend for audio drivers as well. I did a small sanity check and=20 appears normal suspend is fine. I will update the drivers with normal=20 suspend. If we come across any issue later, it can be addressed=20 separately. Thanks Dmitry and Jon. > > Jon >