Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2688906ybl; Mon, 20 Jan 2020 07:34:04 -0800 (PST) X-Google-Smtp-Source: APXvYqxKapo4I3MjHOrIfxmzyB0jAmMIeZOLj+Vh/Jos6y4Ot6s3naM1FJeEYNS7pyx167ZXRAYI X-Received: by 2002:a9d:7ada:: with SMTP id m26mr16859569otn.111.1579534444317; Mon, 20 Jan 2020 07:34:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579534444; cv=none; d=google.com; s=arc-20160816; b=gk5LcnkDUTdgmWLqX1+E64APe7PWfkqFocJTerJb2uBZ2ndJLIlQQqO7dystQrTnn7 7qVMuSEzQRGqlavBXevyi0pS5hBCUMj0NjqCpsad+2pUqRxX7/EKIPLDStQlWMN3njkr TPYiqI1DikOH2dRQvcXc8IiGguAghwzBrwZ1TQKMP+80SwEJSijiw+HLe83SlXp4l7lG 9ulnIU5D9/Vdl2PIfOkWFVk+EHgI/BKGDC6uIyG14uKiZwK65Dds0USECSRCrh0s3EfB FY+FeYderiCcEDaidT0bVqL9ZFgrpuwLb9aLE+LMRS+FCKNEjAUhMkIhbwrL1lPEctTh svtg== 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:dkim-signature; bh=OOCggNlyS9YgNLOjDZC4k2CQrj3lgyEzbj3H+eP3SQE=; b=UjFkiB4TrhdrIo5DNhL5oEyNzOqk4Cv+sawgMCCRRDM76+UqRacLdEvEbOiEdPsym6 rrYK7Bjz7b+raBl4Eca9z9rpBAV0jtB4MJDNRZhfPO+T/gGN6GdemiD8iHjHW+26GXUi jY8N7gIWOHgOvPANnRMrYiEDKiME1cYdZHEgu0JrXvXwrIxa5m+7DGLvljzzhOV3k4zr sUmqZCulOdmPvk+YAUgJ9w7I8JlUOfshH5YDur9l3lFLUohClH/EkQuufFeJcJR1ixkr xGeavu0Ek2zjiOxli+jlXHIoG+soAzyJHvzpLYMeCv8PpuhJ9F5HDsfBUK2BeYmNBFFx IbiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dfMihwdT; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si17677037oii.249.2020.01.20.07.33.51; Mon, 20 Jan 2020 07:34:04 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dfMihwdT; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728913AbgATPcx (ORCPT + 99 others); Mon, 20 Jan 2020 10:32:53 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45858 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgATPcw (ORCPT ); Mon, 20 Jan 2020 10:32:52 -0500 Received: by mail-ed1-f68.google.com with SMTP id v28so29818241edw.12; Mon, 20 Jan 2020 07:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OOCggNlyS9YgNLOjDZC4k2CQrj3lgyEzbj3H+eP3SQE=; b=dfMihwdTWj/I8wOKg2Rs9iY5ghrDiTIiktCY71UOSpkgssYifYXSdlBSd609/u9xjS Ds5XiFhFGB5p8GMBSwQ9bZKjmlihWm66nuZmyaaMpi/JL+tME+w0seGaOeRaOg9fGaqW 94iTMGe9++uLByUGQzUl2nIquM6MJ3tOFOHU9AlgX6/x2YRYSS2ZN+8HJc6IX1rzz/Iu FzdPETX1u4WE+J3M79HpiN/eryDdkm9hcvES6+9e4RNHGYM+kUdJv7BSLmmmTHJf9ANN VZUv8VfYfOyFBDcmIMWV7byCSHZ/pKFimZbXmL5h2ueObDPJ8/ZoVK+OC77fg6HNkbd0 E+7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OOCggNlyS9YgNLOjDZC4k2CQrj3lgyEzbj3H+eP3SQE=; b=qQ5b+yjmAR3V6I6tzHB1GXQWoTcGTsYYTjrPZ5Qx0ktr7+NQ56sPUB649MADnsVbTj l5uVfR58jX5WfynbYHUoWPp4NK2Tae3bLyAhH0zWhiqdYYFCX+WuprRg50R3bfJ6mASx 1rNmwKSH+sxx/4ugY7uxp8peXvOpmDHXmsqCDQ+Ot+5ucLvfGOAq4STuhHlaMt1P+qRT kLXfxHBPnyPjYLx+QH7S3Q0fu/ibi6RWur/PGpTFRMe3yOoYcOHfnDVVFj3mj6jJKB2G 8js3aVh/uGT4hYDI6PXhGd9VA4b9M+latJ1Y40N3i9EaR0Vxvm3Vo2WlmsfaYTs8VpuX DPdA== X-Gm-Message-State: APjAAAUss5OQji2wzM5yxyhbF5Xi9cuHCHRI8+nPNf1VX41dYATfIY+0 bRwVphJKEhtAFqVZQtUEeXWZo52M X-Received: by 2002:a17:906:948e:: with SMTP id t14mr20975740ejx.123.1579534370408; Mon, 20 Jan 2020 07:32:50 -0800 (PST) Received: from [192.168.2.145] (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.googlemail.com with ESMTPSA id z10sm1121714ejn.16.2020.01.20.07.32.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jan 2020 07:32:49 -0800 (PST) Subject: Re: [PATCH v8 19/22] ASoC: tegra: Enable audio mclk during tegra_asoc_utils_init To: Sameer Pujar , Sowjanya Komatineni , thierry.reding@gmail.com, jonathanh@nvidia.com, broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, mperttunen@nvidia.com, gregkh@linuxfoundation.org, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: pdeschrijver@nvidia.com, pgaikwad@nvidia.com, josephl@nvidia.com, daniel.lezcano@linaro.org, mmaddireddy@nvidia.com, markz@nvidia.com, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <1578986667-16041-1-git-send-email-skomatineni@nvidia.com> <1578986667-16041-20-git-send-email-skomatineni@nvidia.com> <3a8e609a-58aa-d2c1-c140-e1f0127dd53b@gmail.com> <64027c16-763b-350f-9975-4f9727450ae9@nvidia.com> From: Dmitry Osipenko Message-ID: <0b13d21c-1daf-4e9d-f2c2-e78a3b8935f2@gmail.com> Date: Mon, 20 Jan 2020 18:32:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <64027c16-763b-350f-9975-4f9727450ae9@nvidia.com> Content-Type: text/plain; charset=utf-8 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 20.01.2020 07:10, Sameer Pujar пишет: > > On 1/19/2020 8:44 PM, Dmitry Osipenko wrote: >> External email: Use caution opening links or attachments >> >> >> 14.01.2020 10:24, Sowjanya Komatineni пишет: >>> Tegra PMC clock clk_out_1 is dedicated for audio mclk from Tegra30 >>> through Tegra210 and currently Tegra clock driver keeps the audio >>> mclk enabled. >>> >>> With the move of PMC clocks from clock driver into pmc driver, >>> audio mclk enable from clock driver is removed and this should be >>> taken care by the audio driver. >>> >>> tegra_asoc_utils_init calls tegra_asoc_utils_set_rate and audio mclk >>> rate configuration is not needed during init and set_rate is actually >>> done during hw_params callback. >>> >>> So, this patch removes tegra_asoc_utils_set_rate call and just leaves >>> the audio mclk enabled. >>> >>> Signed-off-by: Sowjanya Komatineni >>> --- >>>   sound/soc/tegra/tegra_asoc_utils.c | 11 +++++++++-- >>>   1 file changed, 9 insertions(+), 2 deletions(-) >>> >>> diff --git a/sound/soc/tegra/tegra_asoc_utils.c >>> b/sound/soc/tegra/tegra_asoc_utils.c >>> index 1dce5ad6e665..99584970f5f4 100644 >>> --- a/sound/soc/tegra/tegra_asoc_utils.c >>> +++ b/sound/soc/tegra/tegra_asoc_utils.c >>> @@ -216,9 +216,16 @@ int tegra_asoc_utils_init(struct >>> tegra_asoc_utils_data *data, >>>                data->clk_cdev1 = clk_out_1; >>>        } >>> >>> -     ret = tegra_asoc_utils_set_rate(data, 44100, 256 * 44100); >>> -     if (ret) >>> +     /* >>> +      * FIXME: There is some unknown dependency between audio mclk >>> disable >>> +      * and suspend-resume functionality on Tegra30, although audio >>> mclk is >>> +      * only needed for audio. >>> +      */ >>> +     ret = clk_prepare_enable(data->clk_cdev1); >>> +     if (ret) { >>> +             dev_err(data->dev, "Can't enable cdev1: %d\n", ret); >>>                return ret; >>> +     } >>> >>>        return 0; >>>   } >>> >> Shouldn't the clock be disabled on driver's removal? > > I am not sure if we really need to do in this series as it does not > change the behavior from what was there earlier. Also there is already a > FIXME item here and we end up adding clock disable in remove() path of > multiple drivers, which is going to be removed once we address FIXME. > Well, perhaps this is indeed good enough for the time being. BTW, I didn't spot any suspend-resume problems using v8. Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko