Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2523679pxa; Mon, 3 Aug 2020 19:14:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysK3IYOfb+nyNZ56Mfmyv/yuuDwKDCBuBmWq2WsAxQO83bvWO1XPcz7t9DX2lUpmN7ITSK X-Received: by 2002:a17:906:348a:: with SMTP id g10mr6157114ejb.551.1596507261255; Mon, 03 Aug 2020 19:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596507261; cv=none; d=google.com; s=arc-20160816; b=BJdsP9n56QJC0T+sKhmfR2oEC+9KYW9sR7cYNm5uE4qs8Xb5Dj48/ceOTX+t88eZDr UYaXm91Z7fsm80g8Z6Lfw4D6r1TF/U1ldf/6SSoubsJWxIWD8k/yoov7KfOBsr12dlB9 zoBI1Dc+O/yjI5w2lmglNRmWli/hj7stYDQKynZ4ckBAlY0xEeGMKaxBUUl4S3tO+4Xx BGinvAtC3K5FA+nzAcxQqU21Fqr4aAaoejp7jlF7ex3zXHsVBthHpVnmkKh/bu1eWom+ 1TGM0jBibePH3uLP/3Wdp7EcY99hM7B4tqaJ+seTglPgSn4Fko5qfKrb7CI4LPPc/oCN 8N+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lbNLUcgcp61dwL2pAmmG5QRL/i/NBysb7/NHuyoqPLA=; b=sihh6SPhHJb8KLoiqKS5PFK3jkxXCkc61jofg7ZLMSz8AWfZhirMXT+s0PPUaBHeYP 6HzhCireUxdkpuMTRH8vYuWzxf3wn9CDRNnccf8wjRIJmZzrmbpuyypE5dtG4V4J1bgv Qzf5zq9a+iqD9yW30VfWHXAABMtZvdaIBj8z5TJL8oKFjXkqrh6vl+2R9LMpJozBRq0C IAxPORIz+8iIzTojbEUZZkM79eCXuiKxa6+4FsG48glYC0mTb/wCUme6QPIA9Gr4G1JK JnuSd5E3AdX1Jy5CKH601RgdiLIgDjt0sqeN0SW9XkdNY0Lfr/EgJ4aGzB2K89Mc6kWH CtBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nsaApM3N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce15si12540099edb.201.2020.08.03.19.13.57; Mon, 03 Aug 2020 19:14:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nsaApM3N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727947AbgHDCL3 (ORCPT + 99 others); Mon, 3 Aug 2020 22:11:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbgHDCL2 (ORCPT ); Mon, 3 Aug 2020 22:11:28 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A46EEC06174A for ; Mon, 3 Aug 2020 19:11:28 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id d4so1159162pjx.5 for ; Mon, 03 Aug 2020 19:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lbNLUcgcp61dwL2pAmmG5QRL/i/NBysb7/NHuyoqPLA=; b=nsaApM3NTHR6R2T7nNwk1CPtmRQNw6viH5XfJjq+O/bdtm2Q65KlN7iX7rf0eDE2qg 5OLREwXWLFEHVv+VPMreRV8/KN++G49x7xksnDd35LSOkcVgys8ZxB77H0fAJj/3vZ/V yIiGurTTSdPHHAeQKYX4VU0LXG0Uka8AQiqD4fW5iPAxg06Oh8EH1XBGIPIhjZtHXcmb xdH6v3suapQPOEpFVl1imcrWg4X0iyxtm3wU9LHtRDST7W6+uMcVWuCBJbivdT34z0kd OAMK6zph824b2NMgpfzKgT1pRY/9HfGNHMgt4WrjYrfbsLt8Adr7dHzIcmOypE8599y+ WfXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lbNLUcgcp61dwL2pAmmG5QRL/i/NBysb7/NHuyoqPLA=; b=GdeYrplabhig3Q3jhvyNLjJ3P1MEufTGqflaHGsQd+UlaUGXYSwyjOcwJ9WTfjurd2 iqg2XYhgW4fRFRHs5S3xukmB1MVkrKHKAlzdKOs2U7CsAXtFcYuEwwYVic/IproOcRXV oTyOp+yKQfQr5plyylBMaK/6JSC4IcVgKIJA6ayP7XrI0eP0o8ZpuGrxx9kffGi9M1CA mXaLL5j7x1HaVs6aq7cmjKOxjYwbkxAqWPdrTxFIkkIepYl79Fv4SM16kYssKjk/K/1g Ta7yxTH8+eHR0nMEdKW2a2PhBDkAKx274Em1yV46tYSIuWlb2Z2NSHbPVF1j0SAY4Dfg caQg== X-Gm-Message-State: AOAM531adDL71VHkppUGn28qBfaPPipytFvcCRa3aDuRH6QvRyTFL9t6 9miUW174jWJbTIfLHM7T21OPXZ/0AVg= X-Received: by 2002:a17:90a:bc41:: with SMTP id t1mr2042798pjv.181.1596507088135; Mon, 03 Aug 2020 19:11:28 -0700 (PDT) Received: from Asurada-Nvidia (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id j142sm20970462pfd.100.2020.08.03.19.11.27 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Aug 2020 19:11:27 -0700 (PDT) Date: Mon, 3 Aug 2020 19:11:15 -0700 From: Nicolin Chen To: Shengjiu Wang Cc: Shengjiu Wang , Linux-ALSA , Timur Tabi , Xiubo Li , linuxppc-dev@lists.ozlabs.org, Takashi Iwai , Liam Girdwood , Mark Brown , Fabio Estevam , linux-kernel Subject: Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode Message-ID: <20200804021114.GA15390@Asurada-Nvidia> References: <1596424674-32127-1-git-send-email-shengjiu.wang@nxp.com> <20200803054037.GA1056@Asurada-Nvidia> <20200803215735.GA5461@Asurada-Nvidia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 04, 2020 at 09:39:44AM +0800, Shengjiu Wang wrote: > On Tue, Aug 4, 2020 at 5:57 AM Nicolin Chen wrote: > > > > On Mon, Aug 03, 2020 at 04:04:23PM +0800, Shengjiu Wang wrote: > > > > > > > clock generation. The TCSR.TE is no need to enabled when only RX > > > > > is enabled. > > > > > > > > You are correct if there's only RX running without TX joining. > > > > However, that's something we can't guarantee. Then we'd enable > > > > TE after RE is enabled, which is against what RM recommends: > > > > > > > > # From 54.3.3.1 Synchronous mode in IMX6SXRM > > > > # If the receiver bit clock and frame sync are to be used by > > > > # both the transmitter and receiver, it is recommended that > > > > # the receiver is the last enabled and the first disabled. > > > > > > > > I remember I did this "ugly" design by strictly following what > > > > RM says. If hardware team has updated the RM or removed this > > > > limitation, please quote in the commit logs. > > > > > > There is no change in RM and same recommandation. > > > > > > My change does not violate the RM. The direction which generates > > > the clock is still last enabled. > > > > Using Tx syncing with Rx clock for example, > > T1: arecord (non-stop) => set RE > > T2: aplay => set TE then RE (but RE is already set at T1) > > > > Anything that I am missing? > > This is a good example. > We have used this change locally for a long time, so I think it is > safe to do this change, a little different with the recommandation. Any reason for we have to go against the recommendation?