Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1502261iob; Thu, 19 May 2022 07:59:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/Wy8EDR22NWELVR2dQKptlQ0BOng75D18jBVHJKehR5shGTs3Qg+L+v2mXMkCGXDgctyn X-Received: by 2002:a17:90b:4643:b0:1df:6cdc:b5a7 with SMTP id jw3-20020a17090b464300b001df6cdcb5a7mr6251841pjb.37.1652972391751; Thu, 19 May 2022 07:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652972391; cv=none; d=google.com; s=arc-20160816; b=kAdZuyittHkge7wcdDV2w20XQJIyAK5mNf+2aDhIXvzhIApCxbyj/40xCU3LdR7KgB R0UXoGoKHvyGYfCzsKrA0OxzFipAuNsGLw8iTvp3qGJ5nEEYaQjcoydx0X8wDoq2x/36 XCwB7y4fUTRhUV3eQfoNYcd929IW0j7w2kMCSdZPg1OgHiqQi8d4AsaYwndTe4bbnTVF 9JsHirgS8NIstOxNjyrAlzVmBqXbIpV+J3AxbBTskqJVx5oZNNT3iTO5zDTFSqMvDKkV nWELS7r95pUkYf2YGvTbZTGiYzS+qgCIBp2ssroM6nD8iTHERGGMUgzi6B5WiqsdSRJR X+gA== 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=N2WahaGthLBrakTdDXmIO2L4jXMvf0aNaFrBqi5QzJU=; b=pi2Ley9Shy7IQtaYIZwpVNTAgk1oFuIpAwxYs4SBN6tPQWP0WDeMhlL7ZrGdVEeyP+ F9kj3Fdp+GokjHoL9wkyt5/GxYdbGdja61haf4PdiX99O30qjOlIOO03RaMVswnEbf13 JEWxvymieUMmJj5fvfCKEuB621wIloKBZRZdpj04hRD/hixxlFy6RoteuF0kBWppys3Q 16piKzSwfzUFJlwg4qllfiIycmbGNG+MdYHQ8d/6Dx3bMw4yLaGE+K+FhtFZKnJ0vYo1 Suos2gNZkdEEWhOXXSES0rEiCfPAPovgHjT9adPBxaWQ6Ub0c+87agJKzoGZgdWeypU4 G2mQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a056a00150100b0050de75d740asi8264802pfu.301.2022.05.19.07.59.39; Thu, 19 May 2022 07:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238070AbiESMt1 (ORCPT + 99 others); Thu, 19 May 2022 08:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238087AbiESMtZ (ORCPT ); Thu, 19 May 2022 08:49:25 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D420BA9A8 for ; Thu, 19 May 2022 05:49:24 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 01A6D1A0B77; Thu, 19 May 2022 14:49:23 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id AA4A71A0B82; Thu, 19 May 2022 14:49:22 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id DF5CC180031E; Thu, 19 May 2022 20:49:20 +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_sai: Enable MCTL_MCLK_EN bit for master mode Date: Thu, 19 May 2022 20:36:48 +0800 Message-Id: <1652963808-14515-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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On i.MX8MM, the MCTL_MCLK_EN bit it is not only the gate for MCLK output to PAD, but also the gate bit between root clock and SAI module, So it is need to be enabled for master mode, otherwise there is no bclk generated. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index fa950dde5310..dae16a14f177 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -437,6 +437,12 @@ static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) FSL_SAI_CR2_DIV_MASK | FSL_SAI_CR2_BYP, savediv / 2 - 1); + if (sai->soc_data->max_register >= FSL_SAI_MCTL) { + /* SAI is in master mode at this point, so enable MCLK */ + regmap_update_bits(sai->regmap, FSL_SAI_MCTL, + FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN); + } + return 0; } -- 2.17.1