Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2362786ybm; Thu, 23 May 2019 15:54:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJ6JyLQuq4kSd5F02fOLL5cmZC4bvYME9FJ8TsM5hoEEgVO7pps3IJnYSgx9WkEQi6ZglF X-Received: by 2002:a17:90a:364b:: with SMTP id s69mr5148357pjb.15.1558652063919; Thu, 23 May 2019 15:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558652063; cv=none; d=google.com; s=arc-20160816; b=Xfv6gt/mzVG+8DKuagpY0wKF8uQQmV8mKRi9jLp3E+SxYBjEebxiAmG1RYTZncuLWd 1OgZA4V27SgYC4WaBhZMtb3dePmUYgYI50g4I7UAVDzz3LMOY4ge243zm+Rg1cjwCeRf pqmBbR+Hv+pn4CIqbF6tBvTUzFF4tklSAHt5umX8Zr/0jxIrCot1hTx0VBJmwytKUj5R 356952x5lWUJ7IQ4BC+UM/zDITPcT7ChQqQvc1ZSllbD5tvRFdUSJUoG4ahoF0Jn88vD +40sR9f13shIl1hzdNcDThcAwSqtCHJt3bKDjaGZRxOs4kUk9nMv4YH7eB6PlXux5LLf AZiQ== 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=6sNQBO0ShsOiyXm56ZAi0h5L7rJJmlpKkNelQHUJj+w=; b=dkLjWs2GWPwrKm9tpWx0+s+6kwNiqhRzrxb5CMgNeAO3ZuVD2S7q5cZ+Lm7i822xHy hjy5f2gbnmbQocqueqR8j9+hhOnMZxyi5Wq5apH+ACj5d1Y2clgBhXh4gNwvE8zzM4xt onaJ3IHE/Plw0lOWMMO2hCcXjY2OHTVxkCU2yxGtjHI6cIywteFAmtqebfPYupYdoq9l F7CIdAHrcn5ASQBZHEH6/0S3g0VU6/0QznSxjdxqEPl41ibPpkxE7Wbj3DIonHtJShPA qJfiqIE0jIbDCXiSVz0CctYd9jvY9QwQ/jg2F1Lm9Aw28jILQJS7cZ+1/8mhxSc0P4tR wm1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HAsZi7nZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 14si1261045pfi.212.2019.05.23.15.54.04; Thu, 23 May 2019 15:54:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HAsZi7nZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2387997AbfEWWwM (ORCPT + 99 others); Thu, 23 May 2019 18:52:12 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:47084 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387546AbfEWWwL (ORCPT ); Thu, 23 May 2019 18:52:11 -0400 Received: by mail-pf1-f195.google.com with SMTP id y11so4036367pfm.13 for ; Thu, 23 May 2019 15:52:10 -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=6sNQBO0ShsOiyXm56ZAi0h5L7rJJmlpKkNelQHUJj+w=; b=HAsZi7nZ8gveH237kWeKnke3dDxr+y2gwyQ7UKnpPqhx9d5PwmMZdVn7AXJnbNNKxS ePDFO1IpN8iZHALaZ59urWJKkwTEjRYeKIbeaa5XlK6YazplFpVh3yQoNM2SreXoytPY btxUuPLWLnazqWiEtgybRKS/JgvW7Ksg6tagpdJUc2j9vKOTSJ7wYNlwfPPVjGSV974J 8KoWA9zxDazLNvw1zkaTwiMaMQcUGxh/ANi8nkvxE5Fa1teN6vQn88J0xnGyo/nrpr4m imIzmRVIX8eS7v6OXmI02YsKDallHF64R30gSIuSWrHTWujRe7yWJmNXLOOIOAJsBNSa npYg== 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=6sNQBO0ShsOiyXm56ZAi0h5L7rJJmlpKkNelQHUJj+w=; b=Okf+sbBBZKUqxVOBEb9wEErApIrUoRy0rFtk4fBv7F+BCwgLt1zyAoqGvQgTp9du+/ RgQKs8P/VzqG3j51vUqB1GE0AMYYzIT7TIgiCap6xm8tR+KOLQS3Nc0CVLBKpyZZjbur C9DIL3NvtZ+QSdCeFJJOHyGJ4IrA3Ot0eSex/aU5j9VoQX3KKeSyj+7H7p7+yFtjccnp H+ozJGeYkadVpKUvifg1zfDyErZIHEGI2hZOAM8J4wjHsUUEwHIrkzZ0wwo/6URFn/KD iA7fb9HyDL8k8v9ejygKqH6Hl2SuEBVDeymf8GKsu5n3UbCIeaD7GNM5SrHruXr3CD71 QnuA== X-Gm-Message-State: APjAAAU3IhtK+ZHCdBeLVXXSZVgf3OdwKAtH5hH9eN4IrWRA2IecSOfX PvoWEv7EphtSWYyNq6egnZgpG+hNhpBT7g== X-Received: by 2002:a62:2506:: with SMTP id l6mr107019907pfl.250.1558651929550; Thu, 23 May 2019 15:52:09 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id x17sm341603pgh.47.2019.05.23.15.52.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2019 15:52:09 -0700 (PDT) Date: Thu, 23 May 2019 15:50:52 -0700 From: Nicolin Chen To: "broonie@kernel.org" , "S.j. Wang" Cc: "timur@kernel.org" , "Xiubo.Lee@gmail.com" , "festevam@gmail.com" , "alsa-devel@alsa-project.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun Message-ID: <20190523225052.GA29562@Asurada-Nvidia.nvidia.com> References: 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 Thu, May 23, 2019 at 11:04:03AM +0000, S.j. Wang wrote: > > On Thu, May 23, 2019 at 09:53:42AM +0000, S.j. Wang wrote: > > > > > + /* > > > > > + * Add fifo reset here, because the regcache_sync will > > > > > + * write one more data to ETDR. > > > > > + * Which will cause channel shift. > > > > > > > > Sounds like a bug to me...should fix it first by marking the data > > > > registers as volatile. > > > > > > > The ETDR is a writable register, it is not volatile. Even we change it > > > to Volatile, I don't think we can't avoid this issue. for the > > > regcache_sync Just to write this register, it is correct behavior. > > > > Is that so? Quoting the comments of regcache_sync(): > > "* regcache_sync - Sync the register cache with the hardware. > > * > > * @map: map to configure. > > * > > * Any registers that should not be synced should be marked as > > * volatile." > > > > If regcache_sync() does sync volatile registers too as you said, I don't mind > > having this FIFO reset WAR for now, though I think this mismatch between > > the comments and the actual behavior then should get people's attention. > > > > Thank you > > ETDR is not volatile, if we mark it is volatile, is it correct? Well, you have a point -- it might not be ideally true, but it sounds like a correct fix to me according to this comments. We can wait for Mark's comments or just send a patch to the mail list for review. Thanks you