Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30343067rwd; Thu, 6 Jul 2023 04:42:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlFToFJ0LNm9HBFUhZ4qWJtxJ4x5BN3366tebYE54KZo34UrwEL8mWcxMPSK7oPr6M2LdfTF X-Received: by 2002:a17:902:b18f:b0:1b8:a12e:d655 with SMTP id s15-20020a170902b18f00b001b8a12ed655mr1529026plr.11.1688643773053; Thu, 06 Jul 2023 04:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688643773; cv=none; d=google.com; s=arc-20160816; b=WirGS7g1OD0GFT53Me4tPSNA//Y8e7O34e7sRwLjDKXpaEdKvR/GxRNyRpcnFS8kac /A0dyhakbtebwd2LZ+pMcBNzz2oeBkCOdxC04bm6pDNZMLJcM/QeP+qQ5tmWiZerx6cb UFXiXUs0RbyKdMEW/4YMn74XGk3EkRuGyy4C6ZgFYmHn+NkM92XGT4er+ph40bfnZBJB rJGTqD3+DKFZ/WdNuxRyTlAy7ZgxYApU5Um7/XPeec5XatmsJAjIpDA/XU5kqztVMLqm 0xIGu1GxMSh0qWpSdwLoTqCuyU1kuO9/alfobSK4AOvAPI64W+JFZBKPnhUeRCjhtN/W VP/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OBA///uk720bFWE3dLLyUaJz2IB5x6XkswygeQlz+4Q=; fh=Pw1DHiqkekcChO8ODyujpyaJjdXCnAik6S7kVkdt/6E=; b=MYZ803YpFQFi+c4VWQTwp0C0bNV14bEoRpIBNE/giNkVawE85iO9R+Nv8QFrFGbQst 6YTiX+8cY3cgI4CijjFPy4k/sE2CR4dwSCBHewn7IEsex/grafLiGrqz4IOZ9c8pgGb4 yJ0zWLJUUK4Nb/9p17TlIvjP9QC4S1s7bNFxSPqvxMpV2lSPw6l0D+OZUc4YR010WFZn kkB6KebwiPqQRzYPfnC6qbMjjEgmbkD/tPgxaJgBuHdZXBuhUnSV+DLq9pwOXV1sRhyP 8KzrM98xbf57utRyBgT8wImBSMWBgXIMzhEYpHGCEEqpvSO8a5Dmx9lR/L33DIwVCnCn D75A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=JxJO+d4u; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a1709026f0900b001ab1ba2572csi1038466plk.240.2023.07.06.04.42.36; Thu, 06 Jul 2023 04:42:53 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=JxJO+d4u; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231768AbjGFLdL (ORCPT + 99 others); Thu, 6 Jul 2023 07:33:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbjGFLdK (ORCPT ); Thu, 6 Jul 2023 07:33:10 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39AE81727 for ; Thu, 6 Jul 2023 04:33:09 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-676cc97ca74so127472b3a.1 for ; Thu, 06 Jul 2023 04:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688643188; x=1691235188; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OBA///uk720bFWE3dLLyUaJz2IB5x6XkswygeQlz+4Q=; b=JxJO+d4uzSTxJ2fF2toUC9woxojvsRwpyUY80xQLq8t2WNJGj/HNq8LIlhTp9+7bX2 BtIQlcsqjrjc8f1JkTTXTY1Gupt8OSQ2IZrxCzwQIIr1PGKbK0AqdgZUiHXq7iLP+Nss q4/SUhu1n1adAYLLficaE/KFjO19z1hQO0m7oCo5hoIz2/uQyxBF4MhSHtKV3kie0b5Q zJIG4yBT2SkdSceiEHpG7A4ZjmTIGZdPYQYYTU1/AT637rEh9dnURlnNZZgqRGlDw1mZ lRk/nv7Y4kjWhSGp1y7ssfGFYMmRvayjk9FhQg4TuNUIY5vv7wODHj2uadbXh26TLZok AQLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688643188; x=1691235188; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OBA///uk720bFWE3dLLyUaJz2IB5x6XkswygeQlz+4Q=; b=YvCgaktSEmr1ec0dSC694b3fKZhmuKO6m/M4mnrCidhZBPQwSBIZZvLhwA+G08HTjq oce9OzESP9ulnH6ISkYozEnTBbMqUzHxg0vpYDiMI7PMJ+djwZOcDtx0VV5MTwNMuYIh ifQOgZ9jmXdX49lKQPUQmyqamSTXpeCexvTfuaAijb93lXh9OHIZx7laRzgFINh3PW9+ sjcsAAsVIGJ0k8AFK6kTPLOYEhF4DDaACcBCgXC+IkoWVXoyljx63ny3pDxX0LR7PzTe aZcFFEXqlXTxjpdpbfZS9+vJk/4I7GuCWiI+qiwpGavVPQiqmxpaxORvl2DvlT9Ie82N eB4g== X-Gm-Message-State: ABy/qLYdUfPMU5uvgR53vrSgel8bMs76VxYUwAG2hgjqDKgrTquH1iiv XIc7IQFCn0HJXtCCoPObJT1Rls7b8oX+CzxZ1SWCwI3VE9si0g== X-Received: by 2002:a05:6a20:54a9:b0:12d:77e:ba3 with SMTP id i41-20020a056a2054a900b0012d077e0ba3mr2051265pzk.0.1688643188564; Thu, 06 Jul 2023 04:33:08 -0700 (PDT) MIME-Version: 1.0 References: <1652963808-14515-1-git-send-email-shengjiu.wang@nxp.com> <20230706084706.bzwsbi3zisx5m5rl@fatal.se> In-Reply-To: From: Fabio Estevam Date: Thu, 6 Jul 2023 08:32:57 -0300 Message-ID: Subject: Re: [PATCH] ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode To: Shengjiu Wang Cc: Andreas Henriksson , Shengjiu Wang , Nicolin Chen , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Linux-ALSA , linuxppc-dev , linux-kernel , =?UTF-8?Q?Hans_S=C3=B6derlund?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Thu, Jul 6, 2023 at 8:19=E2=80=AFAM Shengjiu Wang wrote: > No, this is the code in probe(). > The code with the issue is in fsl_sai_set_bclk(). Yes, I put it in the wrong place. > The clean way for fixing is to remove the code in fsl_sai_set_bclk() > and add "fsl,sai-mclk-direction-output;" property in dts for some > node. Yes, what about this? --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -507,7 +507,7 @@ static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) savediv / 2 - 1); } - if (sai->soc_data->max_register >=3D FSL_SAI_MCTL) { + if (sai->soc_data->max_register >=3D FSL_SAI_MCTL && sai->mclk_direction_output) { /* 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);