Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp50919rdh; Wed, 22 Nov 2023 17:56:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwVS48Eq9Wm9BJtPacx4i5TllT1FBFYxr82yQrNbICx7kg5WC60KgVjQviK5wGBARXcnll X-Received: by 2002:a17:90b:4d8b:b0:27e:277:3015 with SMTP id oj11-20020a17090b4d8b00b0027e02773015mr4872345pjb.16.1700704582776; Wed, 22 Nov 2023 17:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700704582; cv=none; d=google.com; s=arc-20160816; b=L5Axs9r6dmeXV7+6hJijnBl4aEObxEQQRD1rUBoliBmxiz+ihUgGdhlUWkMAbYyMqY lNZQdREiaiJ+e81U57YqDhnCo5mwj2bPvpNgdTBymU9Pva9h5BR2w3n4y/FNn/0E6OBl DpbXSjd2uIXEbN/qKQunqNx92Fhf74jkI+RgKHNLYbPdYYqcO0Q3QdSrPRQ3XDjLGX4U 6GAEtJsizE2rHsY6vjS+7jJDnU0bOglWon7ZwstBZ05WPK88PCCw654DRanaTey8zQt2 P7cJolJVXbpmVscDAoVq2mBTaykzLun1GQC0/oW+iYWCWoVB5svsI8jqDHB0SN70NQUo 3Y5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=J+eHQ4Epg/47IewBPX6seSdU9kvBfklGDdAe4gfi8GM=; fh=+Q7DlRpQeXV1R41s6Vd2YbuTo7Ovc0ufww4vJ9cohhw=; b=sWATO1QS4Zp1wdWrZXamPgNPsFAiiNaOkizAg/yxvDOPZz+bd16IBXwd40y/mTy4oE cqijcjJwXm29W9hbebBPtu83dxBS2uEotnBFno7ckKD3PzCuWRFPaqN0h/yoE4+bneb4 EirYOiJj2pUEEJetDhhm4ev+y1VIaYDRAq7OMxNlmS6oy+7TcR8HolsVObtcdFEdMDCp qOhqXeoHpI3xgIvJQtIIpJWM9ET196+trG2ITF6eJ05aFvrJOGx1o+KSYNSEAQLulx5g l3uB9s5eX07tCumpBEAnOJHJyZfZ/qJ1vgMlTk3oz7SBdHtTYZHO7mcMogHoPDFz8NXB xRpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 11-20020a170902c14b00b001bf0b29d935si164911plj.34.2023.11.22.17.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 17:56:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5FBDD822F042; Wed, 22 Nov 2023 17:56:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343882AbjKWBzQ (ORCPT + 99 others); Wed, 22 Nov 2023 20:55:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344458AbjKWBzJ (ORCPT ); Wed, 22 Nov 2023 20:55:09 -0500 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F279F10F6 for ; Wed, 22 Nov 2023 17:55:08 -0800 (PST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9306D2001BE; Thu, 23 Nov 2023 02:55:07 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 65DCC200FF2; Thu, 23 Nov 2023 02:55:07 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 30C83181D0E5; Thu, 23 Nov 2023 09:55:06 +0800 (+08) From: Shengjiu Wang To: nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: fsl_xcvr: refine the requested phy clock frequency Date: Thu, 23 Nov 2023 09:14:53 +0800 Message-Id: <1700702093-8008-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 17:56:10 -0800 (PST) As the input phy clock frequency will divided by 2 by default on i.MX8MP with the implementation of clk-imx8mp-audiomix driver, So the requested frequency need to be updated. The relation of phy clock is: sai_pll_ref_sel sai_pll sai_pll_bypass sai_pll_out sai_pll_out_div2 earc_phy_cg Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_xcvr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 77f8e2394bf9..f0fb33d719c2 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -358,7 +358,7 @@ static int fsl_xcvr_en_aud_pll(struct fsl_xcvr *xcvr, u32 freq) struct device *dev = &xcvr->pdev->dev; int ret; - freq = xcvr->soc_data->spdif_only ? freq / 10 : freq; + freq = xcvr->soc_data->spdif_only ? freq / 5 : freq; clk_disable_unprepare(xcvr->phy_clk); ret = clk_set_rate(xcvr->phy_clk, freq); if (ret < 0) { @@ -409,7 +409,7 @@ static int fsl_xcvr_prepare(struct snd_pcm_substream *substream, bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; u32 m_ctl = 0, v_ctl = 0; u32 r = substream->runtime->rate, ch = substream->runtime->channels; - u32 fout = 32 * r * ch * 10 * 2; + u32 fout = 32 * r * ch * 10; int ret = 0; switch (xcvr->mode) { -- 2.34.1