Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7108908pxb; Thu, 18 Feb 2021 01:23:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzRLEZVoNJGXNrj1B0EgHwihAdIPYnyPCXEUijjDt4BojcSCRSG///UPh+VZcQ626KGY6u X-Received: by 2002:a17:907:11ce:: with SMTP id va14mr3315281ejb.10.1613640214579; Thu, 18 Feb 2021 01:23:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613640214; cv=none; d=google.com; s=arc-20160816; b=hdhDa5D0w3IXbe7UCwh5RICtZO7tdvCXKdDRK78UqdySta0YQs9ODXGln7tT+U5u/o EIIBknzcndMyGhqXAbImQ5tZ/VVcowG9jN1F6CMkUZlc8QcOa3LHwB18a07sFOxQq75f XLSJCGSe9XwCb7e0IRBKiPPMr8nzxWwblT2Fj1ltsxKdqKcjnIER/INNIJjxaIo1OcNU mRgJchOrdAMaBKJDCxymgc6GYY0pRbCweOIm0pf0yEkwxesVQcrVwJkmMLc0BVd4p+HZ O97rVHR8PuQ+IauPT5Dx5Yh7mPOiVQLg2tkEt/EToTBTp9rAWTKIRzKhRizPVjoXgMrH n1Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Bg6ZSnruXgfVD4jOeLrAxIfhO0SIr3QdWxHbt31ZHm0=; b=oCnnFEV2y5h9+VIdXt7Y3Jt75csnjdSr5mcwbHzpZyqDSItsjP8U22kKg03F9JSVzS 1p2azg1jBQTD6890/1cAc0E8IArYXKEdBvG7+FYIDcWjGZ+x0TeKnuylRfgabksPYwCM MmqwpdWTIgYOkyzpw+ZSsIrkJ9XAehh8Rlik0EInP5rTDpXjAlfvsDUMAHyUFRcbIaVx 3MQJa67XTcnJQanLCG8SDLkBms98PcFWs8lEMIqrZu0hHNowe4y6T0fPAyszyvZ8y4W3 1k7nlPUjdDNbhePC7eTb4AkaiPnryPYJM72jj+OB956Ud2MpKKNsOhek2dSz3eajmDAC WeyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TKJDEV3Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si3111868ejd.151.2021.02.18.01.23.10; Thu, 18 Feb 2021 01:23:34 -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=@gmail.com header.s=20161025 header.b=TKJDEV3Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231527AbhBRJIF (ORCPT + 99 others); Thu, 18 Feb 2021 04:08:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231185AbhBRH6N (ORCPT ); Thu, 18 Feb 2021 02:58:13 -0500 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD7CC061756; Wed, 17 Feb 2021 23:57:23 -0800 (PST) Received: by mail-qt1-x836.google.com with SMTP id g24so801718qts.2; Wed, 17 Feb 2021 23:57:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Bg6ZSnruXgfVD4jOeLrAxIfhO0SIr3QdWxHbt31ZHm0=; b=TKJDEV3ZCzXyQLPo4690LhuK/JxxBLbOYIkTDeL9v/WmrZ48dcpJnUb1Ovx1uQE0hy LPtmgBNuzWw9zeoKLHom34zDiNUYZKD0RVU4j3HYBlkCv3gLyhSlLwfvEKT1P8uoOwcy ig25aPPybc0vdT1XjIiLbIxPrSC+43ktVqvC9ZzUJoRSCQ7cqUJ/RolVrhAJ+bkg3R9R 6koZyw9QHe/TPDGAZzI+tUgkwylUpm2MJNW0oAoWnrLitCxvwFx0S1H0nfXE8lmI80ti 0JhtKKrErv6pK1MZnit70/fgA8ULuIfSQamLqFHQ5Zx/lfn/GRQrc0xQdpcyGnTsHANh hDHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Bg6ZSnruXgfVD4jOeLrAxIfhO0SIr3QdWxHbt31ZHm0=; b=PSLOU/YIGMq6DzcWOvx8ywE32P/EV4oeVlWg5VwDyN5dPZBH2J+FlJqGM+OZW7FFDD tgQxt+nbXsE6fIE2TYMBFccRPviB4xPCfL27BPleXoq89Pxj7e4ebuJ54WTkK26li9yp k4mcA5VELSrhFlilaTbVd0FZWZth6dIs+PpTUjQsh1uDxAfye9eCz0Zp0UXHJ1zAdaIU 1NaHl8XCzSstczzPm2ernCGyE1FlXD3zXGtU4RnT2g4sZNJM8KT9B8ZTqeOJeBnE1RQt H9LajW2iEbKOgMEYQNYZ9n+UF6Dgm398NY3GoT5MoVtUueAAUbmmv1pv0yDDdk6ZuqAZ uHnQ== X-Gm-Message-State: AOAM530x+fdBMSLL2ecNaMjrtYqZduvaQ38lbXBWPxziXzBTS5mylFmf rhsrvUDAe7nPcjb5tp7tYdBOXLo6esfvVOr8kxI= X-Received: by 2002:ac8:7c98:: with SMTP id y24mr3007479qtv.292.1613635043036; Wed, 17 Feb 2021 23:57:23 -0800 (PST) MIME-Version: 1.0 References: <1612693435-31418-1-git-send-email-shengjiu.wang@nxp.com> <1612693435-31418-3-git-send-email-shengjiu.wang@nxp.com> <20210208115112.GD8645@sirena.org.uk> <20210209222953.GF4916@sirena.org.uk> <20210210153808.GB4748@sirena.org.uk> In-Reply-To: <20210210153808.GB4748@sirena.org.uk> From: Shengjiu Wang Date: Thu, 18 Feb 2021 15:57:11 +0800 Message-ID: Subject: Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg To: Mark Brown Cc: Shengjiu Wang , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , alsa-devel@alsa-project.org, Timur Tabi , Liam Girdwood , linuxppc-dev@lists.ozlabs.org, Xiubo Li , linux-kernel , Takashi Iwai , Nicolin Chen , Rob Herring , Fabio Estevam Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 11:39 PM Mark Brown wrote: > > On Wed, Feb 10, 2021 at 02:35:29PM +0800, Shengjiu Wang wrote: > > On Wed, Feb 10, 2021 at 6:30 AM Mark Brown wrote: > > > > Like I say I'd actually recommend moving this control to DAPM. > > > I may understand your point, you suggest to use the .set_bias_level > > interface. But in my case I need to enable the clock in earlier stage > > and keep the clock on when system go to suspend. > > The device can be kept alive over system suspend if that's needed, or > possibly it sounds like runtime PM is a better fit? There's callbacks > in the core to keep the device runtime PM enabled while it's open which > is probably about the time range you're looking for. Before enabling the clock, I need to reparent the clock according to the sample rate, Maybe the hw_params is the right place to do these things. Can I add a flag: "rpmsg->mclk_streams & BIT(substream->stream)" for avoiding multiple calls of hw_params function before enabling clock?