Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30193099rwd; Thu, 6 Jul 2023 02:11:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlGpCJFJ3tfd4fMKgy6sFGxitcpHnnY/mlvmBjigcwOUfMJ7m60Z7YXDgkxwM6dQeD4eErhh X-Received: by 2002:a17:902:7405:b0:1b5:2fdf:5bd8 with SMTP id g5-20020a170902740500b001b52fdf5bd8mr1372250pll.8.1688634717454; Thu, 06 Jul 2023 02:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688634717; cv=none; d=google.com; s=arc-20160816; b=JqKEmlF2+XAFSij3gDd2Nj2oae5Up4keUIgQm51kftX+rz4KmUw95GRlHVkejAOb7u q026v3Qq994FiErCOhyIKGm2ubWbIQHV3zCeIOO/8NZaGBxo2yKy3EO48aARH4p5ahsv yNbLCRF0n0jhEUIpQm9EjNqYuGatvfr//6GLs3rlnxByXyuOrcxZy3nfY1aAaRmzUNqM wBeib5qSqCMnxw+n53JlkAnrhKEfGaAbwFZm1SuL1hIVygCQGHgBR7ZU+m3JotUWfoJx gfzb1QMBJ16l5WKJou7ApZIAChLkwqXbUxwGYU3SqXPBZZ8rTGj4l1APDb26r/x9zUBJ cENw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=A/TZmn4USjAe+Xd/P4aYWyP8VwnL3Olbjxe+XFy0lxE=; fh=vlggLc0dqFGIui6XJxHMH63I4pDfRqxwiFJOG6yHfwY=; b=TXZUCWdvVu07uoDCqHmXoRs0WI/4mVZuYBikcTLmA+S00jXzfysaASWUD/ojYIWBtP 1GGm68zQvOcQA49fjZyjIV+mCttCJ7seH6K9KNPUU/t9EYQTECMLwQhd8x47uTiaCUEs Zvz6xHvoiQC3C6xd1sSc82uspu2h4OUa78/4JtH3F/nf3a+dc071ygb9RKJFtRg1TEIq fGCRQIQDmjEenpqkYUe7gbcMDr63fqptRvopPYMKqVRPWzi/imZxprA/rdnwwTo4Wf/D wapQrikW90Ac50GTHluzwwO55KVN8tFty0Y37+eX4BpY/2IsGHA3Or56MIlBNtoT14aM kGiw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a170902dac300b001b8b3f8ed8bsi970042plx.424.2023.07.06.02.11.40; Thu, 06 Jul 2023 02:11:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbjGFI4y (ORCPT + 99 others); Thu, 6 Jul 2023 04:56:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbjGFI4x (ORCPT ); Thu, 6 Jul 2023 04:56:53 -0400 X-Greylist: delayed 583 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 06 Jul 2023 01:56:50 PDT Received: from pi.fatal.se (andreasfatal-1-pt.tunnel.tserv3.fmt2.ipv6.he.net [IPv6:2001:470:1f04:f16::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E6FF1990 for ; Thu, 6 Jul 2023 01:56:50 -0700 (PDT) Received: by pi.fatal.se (Postfix, from userid 1000) id 49B302A8D9; Thu, 6 Jul 2023 10:47:06 +0200 (CEST) Date: Thu, 6 Jul 2023 10:47:06 +0200 From: Andreas Henriksson To: Fabio Estevam Cc: Shengjiu Wang , Nicolin Chen , Xiubo Li , Shengjiu Wang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Linux-ALSA , linuxppc-dev , linux-kernel , Hans =?iso-8859-1?Q?S=F6derlund?= Subject: Re: [PATCH] ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode Message-ID: <20230706084706.bzwsbi3zisx5m5rl@fatal.se> References: <1652963808-14515-1-git-send-email-shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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 Hello Shengjiu, Fabio, On Thu, May 19, 2022 at 10:23:06AM -0300, Fabio Estevam wrote: > Hi Shengjiu, > > On Thu, May 19, 2022 at 9:49 AM Shengjiu Wang wrote: > > > 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) { > > Isn't it a bit fragile to take this decision based on the number of > SAI registers in the SoC? > > What about adding a specific field in soc_data for such a purpose? We've been working on an i.MX8MP where MCLK needs to be input and found that this enables the MCLK as output despite not having set the `fsl,sai-mclk-direction-output;` devicetree property in our DT. Reverting the patch fixes the issues for us. I have to say that the code comment made me a bit confused, but once I found the commit message I understood why this code existed. If this is really i.MX8MM specific maybe mention that in the code comment and please make the code actually only trigger on i.MX8MM. It seems to me like these all fulfill the current criteria: imx7ulp, imx8mq, imx8mm, imx8mp, imx8ulp, imx93 Should I report this in bugzilla.kernel.org ? Regards, Andreas Henriksson