From patchwork Tue Apr 24 03:04:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 10358585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 683B96038F for ; Tue, 24 Apr 2018 03:03:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55C9228BD3 for ; Tue, 24 Apr 2018 03:03:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4993628BF6; Tue, 24 Apr 2018 03:03:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BE2F28BD3 for ; Tue, 24 Apr 2018 03:03:14 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AB3D426766D; Tue, 24 Apr 2018 05:03:13 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7DDC026766E; Tue, 24 Apr 2018 05:03:11 +0200 (CEST) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0074.outbound.protection.outlook.com [104.47.42.74]) by alsa0.perex.cz (Postfix) with ESMTP id 134C7266E30 for ; Tue, 24 Apr 2018 05:03:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zdtT3iSpELcs0XZUbED3raoQhjG9PVVJtxnZ/eXJ+Pw=; b=wmOCYNyVFAf5iFD5lcQpFhuCvW2uH5HNRuybGNi0dACIG1o+86XHV4fY0hLkjvedJORg4v3XFrvhFQuCjadRDQnu+7lMCJ+Nb2qVxvlup7bEsADirQTas1ndYBebCKXL9sk/uzQ0YKh2EVq/mOp4NhZbLM/LtToUUnfBJKqHMB4= Received: from MWHPR12CA0032.namprd12.prod.outlook.com (2603:10b6:301:2::18) by CY1PR12MB0758.namprd12.prod.outlook.com (2a01:111:e400:59d1::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Tue, 24 Apr 2018 03:03:06 +0000 Received: from DM3NAM03FT048.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::205) by MWHPR12CA0032.outlook.office365.com (2603:10b6:301:2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.13 via Frontend Transport; Tue, 24 Apr 2018 03:03:06 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; renesas.com; dkim=none (message not signed) header.d=none; renesas.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT048.mail.protection.outlook.com (10.152.83.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.696.11 via Frontend Transport; Tue, 24 Apr 2018 03:03:05 +0000 Received: from LinuxHost.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.382.0; Mon, 23 Apr 2018 22:02:45 -0500 From: Vijendar Mukunda To: Date: Tue, 24 Apr 2018 08:34:37 +0530 Message-ID: <1524539088-9043-2-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524539088-9043-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1524539088-9043-1-git-send-email-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(396003)(39380400002)(376002)(346002)(2980300002)(428003)(199004)(189003)(9170700003)(2906002)(476003)(50466002)(336012)(36756003)(106466001)(1671002)(48376002)(8936002)(50226002)(47776003)(8676002)(81166006)(316002)(77096007)(356003)(446003)(11346002)(54906003)(5660300001)(16586007)(26005)(426003)(478600001)(53936002)(72206003)(39060400002)(109986005)(4326008)(86362001)(51416003)(76176011)(2616005)(53416004)(7696005)(104016004)(126002)(105586002)(186003)(6666003)(305945005)(486006)(266003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0758; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT048; 1:OlvhnwlE6n087DI507ivIJw15cvou7gLa0DEoiGqABxNqjevbNQNr7NuImuAlQc0p4wj2xCHFl4ZLgxcir3JJqRoI7n+x8MEODmvDT5VBTb56Mc1BX2ia+amxMshMsrI X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:CY1PR12MB0758; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0758; 3:vplTgVqULhtGY88LEBaJcG/djNO4HgSCPjIRZEipUNC+qaqCUPnZVZpKH2eReTd74a9fA9BCcISG/b1m9bbqGAkUUSv0/IPJvjdGvf7ul01lIv6xDw15Ps5hzcxSA/qKUXn8b7DaydFBukzXj5YEA3PvvyleFzRjZX6eBOqhOWz7y8Wbs7hohUASTLssQXJlgh+m7vebdeN1uynXbzlA/ZzI7moLJddSHsi+MtEryaD19sU/QZ2BTS52lIeG6tfjmqPyk+UsA5RwfuHkIe5vGsuzqRovkD/VGJrRFzcxGu6titxaq/zJDL3tPnmc7p51mPQc0CS5nqFyeRMZZXM3ZzW8K+IleRFZp4TQ2zbyb5A=; 25:zWV9QeDQuZWgTpnC7yR62Hp2f6VyZK11HtZbFqjpSHarPlcY9ttalPyTLdBUY768IbGd/v+8KXy98ewbivgiXdywVMtOV8otLgxtDrJVDcfE35hD1LLpCGtm4lcoKlvL5NsRZwbYNquOucM+48xsUEe1xxLUpIwMVo0cQstd7Mez4m3CN5E1ETwCY5mRv71Uk9EujXCE7a8L5+sTPSElzvyACm5LRFjYOuweCfLkEqDm+nWOq08tvO0ssdmAply0XXsarFUYMfmrEigEig4jkb64DU67nmTFM9Qwt9B49GsWEsI61nxoyDAYZ22ZzKLC5XI0+HNMJRODnpepCK96DQ== X-MS-TrafficTypeDiagnostic: CY1PR12MB0758: X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0758; 31:YM6etItJKW06MH02FWgtN82NnNaUo0khZzNF689f1G69W6s4xaizBNa00t0oRaPOjHGJisjLU5zrc8FNi1GbsiCw7aC3eitiPQWfmMDJWkTTRRfkfxhFbm3fj2lDAvVf0TAMi7etNreyzjHipVaOUQq8krIHnJJcxbRYfH88frHYm+ccmkj0bymfTIUcq66O2r4YcDxbtiINz4MbL3A43kgQeRsSTMzxYgwhjLAN9WU=; 20:XWYTLlt+zdgvvMwb/8IdA9AGXbZprsOlWxadc9ZN1TU0CZjp3vKa+xbhepABK1Kaj0dy7B74dKWGt+MSYNSZeH0shuKyZCPchH67eznNkaY1R6Kaqqh43iMLgqGDypGwoBdml2tl8cWB1BycFaYVg0VdGJiLrfHyXY3KlJy4MTBkBmeg79dMu4Hccr3wPDI/OcHZux8tCb8iJyb9MlCnnS880ZKEPtVMWPf9DC2T+JeinpXjBLwn+UCax9t4thkokF1orUNei4z/J7iJkG5UZvcxKzEqwrQ6CgL2FuWh1f5Vru5NMqUHo6gcL/6UW1Nz5xlsMsHutnzaG6/P7VADy/3gnWw5vosg17kv0W4maygzbLJn0fk/qenWAMqH0Z1PKW8wkq16sXlS3J1DpZeWa+bvfkN/+FKsMyt0/R9cKs5iYpbdHWriEo4O9sRv9LR7aRCsmvcoPZ5DV44ExeRm6W9DZBMiia3T4MKzYEXVR5lxWk+mXO5oL40NUvHhR0NQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93003095)(10201501046)(3231232)(944501410)(52105095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:CY1PR12MB0758; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0758; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0758; 4:gfE77lQcv1GoH6zEowRaiik8sNAos1/mbf4Hepvfpg9RiH0zHpnS6VdKE7beKKxhl4lW3qJdEpim0Fozi2mwjMB/G4JzPZAR/eSozmRmXw0OvCybfTmpR7PI3M3xsLhw8d3zNRP2eCVdeBaMn7WjUnskVTTLh+JjHtgjEQTHSzx99uNlvMrnwNd22dU5Dzpu3pZ7kOECmilR8d4jlYEO/NaFON2JIjxoSYHEX46l/aVjwh9tn+CZyx4ET+At60eFxLDYuBnpL9DZ1HXDZWhQN45kwlt9lm+vmhwqHPeQs0Cf3Am15UXPPAsJplWo91JV X-Forefront-PRVS: 0652EA5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ImYmFRDsiAQNmCGh8bMjFgpvZQheXX251MPmJJ+Izj7LXtxYcQjl7YD81AG1ujpJ2gY74yTfrysFlHy5TWo7RQfUguD63WM52vjAsMn++rSEErImxE1oUBEqsM3w==; 5:W/a7EBOm1Y+jx6KH+MXxs2EtkZMggoSEN561J8RzUOWPhNkefvEww6RGcBpl0b+Mbx0qrSI+IiU9S7+obOh/MvIj4y68zg3ms7UW9p3Ono6hGA1tsPKVMnQMXYlSFXxX2VjmhZWcqxd4S1bzx5trbsBFC8iyxcJXVdjLFHPw1xg=; 24:CWdrRc9Yxy6sEPe8rXkRwLKy/8P369m5hzIcbDsrkV84M5BCeE5cDPKlSLkmkVxf8MEe3h5+zTZXUqY/QovLU3seKqX2oSDqNjQMeQDbNWU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0758; 7:mUqQ96KCnfJxhAukOoPTgpq4Uq6LCblTYgp4LID1h+ftpu9keeYtx13sApseXJIIM+UbXxnQk/aOWG3IlF9Hp3u1yh4aZEn7J+9zNh7w3pVZLJJI1kP6iP8fMZ4TbIB7qZce6l/6P3XWLy0lWRXZS4LWknvp2DNrful8HdXDausqntdTl4qz2ogChSAWcEVteiOoFd4txqwERaWCO8n5binOhUC043at2I5idbLNBcrhOn8GdBSkCKW2+zWvEGDZ; 20:kdBGeqNXato6RL9oj4VVJAqTBBPPpYeOQPry2tHx5/7rSfXRiiy9hTqFSDE1NmyCSlEykchoGrfjN2XibayjvPC3ZCyNmO5nOD51NsXKRfSVoRN5H9SVgt86xCTmn/z1HcA0qklF8+Srjqkeel5aBM3HEYfNTtThQCJ0NKJw2r0Zy1NurXPqTWp0YVbEXNY3B2epv6XvVyGj4jnLtRfgbWxeRHv+e2+GtLuZy5Df+GJkRgrWDWDEl7TtedGv8H5Q X-MS-Office365-Filtering-Correlation-Id: e9c80dba-e6a5-41ed-8567-08d5a98fe6b2 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 03:03:05.4294 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9c80dba-e6a5-41ed-8567-08d5a98fe6b2 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0758 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , Liam Girdwood , open list , Takashi Iwai , Mark Brown , Vijendar Mukunda , Alex Deucher , Akshu Agrawal Subject: [alsa-devel] [PATCH 2/3] ASoC: AMD: Move clk enable from hw_params/free to startup/shutdown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Akshu Agrawal hw_param can be called multiple times and thus we can have more clk enable. The clk may not get diabled due to refcounting. startup/shutdown ensures single clk enable/disable call. Signed-off-by: Akshu Agrawal Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp-da7219-max98357a.c | 54 ++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index b205c78..0f16f6d 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -38,8 +38,7 @@ #include "../codecs/da7219.h" #include "../codecs/da7219-aad.h" -#define CZ_PLAT_CLK 24000000 -#define MCLK_RATE 24576000 +#define CZ_PLAT_CLK 25000000 #define DUAL_CHANNEL 2 static struct snd_soc_jack cz_jack; @@ -62,7 +61,7 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) } ret = snd_soc_dai_set_pll(codec_dai, 0, DA7219_SYSCLK_PLL, - CZ_PLAT_CLK, MCLK_RATE); + CZ_PLAT_CLK, DA7219_PLL_FREQ_OUT_98304); if (ret < 0) { dev_err(rtd->dev, "can't set codec pll: %d\n", ret); return ret; @@ -85,8 +84,7 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) return 0; } -static int cz_da7219_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) +static int da7219_clk_enable(struct snd_pcm_substream *substream) { int ret = 0; struct snd_soc_pcm_runtime *rtd = substream->private_data; @@ -100,11 +98,9 @@ static int cz_da7219_hw_params(struct snd_pcm_substream *substream, return ret; } -static int cz_da7219_hw_free(struct snd_pcm_substream *substream) +static void da7219_clk_disable(void) { clk_disable_unprepare(da7219_dai_clk); - - return 0; } static const unsigned int channels[] = { @@ -127,7 +123,7 @@ static const struct snd_pcm_hw_constraint_list constraints_channels = { .mask = 0, }; -static int cz_fe_startup(struct snd_pcm_substream *substream) +static int cz_da7219_startup(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; @@ -141,23 +137,47 @@ static int cz_fe_startup(struct snd_pcm_substream *substream) snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); - return 0; + return da7219_clk_enable(substream); +} + +static void cz_da7219_shutdown(struct snd_pcm_substream *substream) +{ + da7219_clk_disable(); +} + +static int cz_max_startup(struct snd_pcm_substream *substream) +{ + return da7219_clk_enable(substream); +} + +static void cz_max_shutdown(struct snd_pcm_substream *substream) +{ + da7219_clk_disable(); +} + +static int cz_dmic_startup(struct snd_pcm_substream *substream) +{ + return da7219_clk_enable(substream); +} + +static void cz_dmic_shutdown(struct snd_pcm_substream *substream) +{ + da7219_clk_disable(); } static struct snd_soc_ops cz_da7219_cap_ops = { - .hw_params = cz_da7219_hw_params, - .hw_free = cz_da7219_hw_free, - .startup = cz_fe_startup, + .startup = cz_da7219_startup, + .shutdown = cz_da7219_shutdown, }; static struct snd_soc_ops cz_max_play_ops = { - .hw_params = cz_da7219_hw_params, - .hw_free = cz_da7219_hw_free, + .startup = cz_max_startup, + .shutdown = cz_max_shutdown, }; static struct snd_soc_ops cz_dmic_cap_ops = { - .hw_params = cz_da7219_hw_params, - .hw_free = cz_da7219_hw_free, + .startup = cz_dmic_startup, + .shutdown = cz_dmic_shutdown, }; static struct snd_soc_dai_link cz_dai_7219_98357[] = {