Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1610880ybm; Thu, 23 May 2019 04:06:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIkNGIseoqhAvaSVDfGsI44HqzCstTvt9gJ4oo7gW4R8HsXezUJNinimubJ+K3lECWehmE X-Received: by 2002:a63:5c4c:: with SMTP id n12mr97473306pgm.111.1558609573720; Thu, 23 May 2019 04:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558609573; cv=none; d=google.com; s=arc-20160816; b=rzb+kcPiNVzfxylEA8iqIELIi4hNNNN6v4ZFswuqpmxjjCrwTTYW8Tm8ISkhTngZ8g 2DD0LW/H99qjBLlrrehmUtuhqMzlTeeYRNBMf2kprTonboS0ze+DCCWHEzEXTSJ3v2iZ S30j+uhStbMcIWapQd0Kw7pxOmTOjrdwfJcZ/UecDq2mXZ8diptRtHnaaEJCDbVU3/f7 9XOjcQlFaRwj5i0rFFh5x1GcPyxpZ5LWkZrDxtWrNqm/KTcG4kniOTZcWh0FE6sAmyHp +wkniUHvR34RWfiAFNzCPuJ0eJXjsRfX/spN3pILQjkH9uIqeZQhoZ0ktlR7eyE3H0K1 Ajzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=gWFXIUND1yhi6KvykPjcq7iJOBttnw+ZltAshOO+LFk=; b=yVtvmj4tTzVGiJoJNiUVy7jEjaBjrNbD1XujU8CnzyO/i7p7NUwxgVjw6YvApcb630 PKO1/V2kakfAdYug87PVPjapzEJ5SQPsfNbFGJD3KqafG2M+/Di+HH7zKFynx1BI3kwG QkGA69Nh+pKBixaRJ0PLbObl2ukslGK8dxB4J0xKUaql/ynsX72w4porA+/Evpk5SRxT tHaqI9OdYpNiX8VEh92LxhzEFcYC0zK7tyhlHmEhqIQi1zmsxIcc1SNG9mEukoQ07HzM 3gqvJOVh3STO0l/29LkpVLbmibWr4BMxli9biZ99q8MMERT5jKW8yhyhOc8slHzle6tC DkVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ipB3oOSm; 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=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d24si29606119pgm.405.2019.05.23.04.05.56; Thu, 23 May 2019 04:06:13 -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=@nxp.com header.s=selector2 header.b=ipB3oOSm; 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=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729962AbfEWLEI (ORCPT + 99 others); Thu, 23 May 2019 07:04:08 -0400 Received: from mail-eopbgr80072.outbound.protection.outlook.com ([40.107.8.72]:15118 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726429AbfEWLEI (ORCPT ); Thu, 23 May 2019 07:04:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gWFXIUND1yhi6KvykPjcq7iJOBttnw+ZltAshOO+LFk=; b=ipB3oOSmZOXUwY+wouOPYgARl8OvunfdGvSLFxlkorpvISiwOqmhZj5yRB6nl8XVpR0AhPKAiAfPoxq5S8mbodJ7LW+e93T7xQsxs/IOAQUAgzPmlEtFtuKGPdWHUuX5Mjq6lN7CNJJxmASwoQYBizvfDhrreEIVwdFzs1c7c2M= Received: from VE1PR04MB6479.eurprd04.prod.outlook.com (20.179.233.80) by VE1PR04MB6383.eurprd04.prod.outlook.com (20.179.232.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.16; Thu, 23 May 2019 11:04:03 +0000 Received: from VE1PR04MB6479.eurprd04.prod.outlook.com ([fe80::a5b5:13f5:f89c:9a30]) by VE1PR04MB6479.eurprd04.prod.outlook.com ([fe80::a5b5:13f5:f89c:9a30%7]) with mapi id 15.20.1922.016; Thu, 23 May 2019 11:04:03 +0000 From: "S.j. Wang" To: Nicolin Chen , "broonie@kernel.org" 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 Thread-Topic: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun Thread-Index: AdURVzqGXKVFB9wWT1W2rJfIdiMqrw== Date: Thu, 23 May 2019 11:04:03 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shengjiu.wang@nxp.com; x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 975836e6-1c92-43ec-e790-08d6df6e5e21 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VE1PR04MB6383; x-ms-traffictypediagnostic: VE1PR04MB6383: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 00462943DE x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(376002)(396003)(136003)(346002)(366004)(199004)(189003)(7736002)(14454004)(73956011)(66476007)(66556008)(476003)(9686003)(305945005)(33656002)(478600001)(229853002)(26005)(74316002)(55016002)(66946007)(52536014)(5660300002)(64756008)(8936002)(256004)(186003)(81156014)(81166006)(8676002)(71200400001)(71190400001)(66446008)(76116006)(68736007)(6436002)(486006)(86362001)(2906002)(53936002)(3846002)(6116002)(6246003)(4326008)(316002)(2501003)(25786009)(6506007)(99286004)(7696005)(54906003)(66066001)(102836004)(110136005);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6383;H:VE1PR04MB6479.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Z3UtjRWDhxyGSOeUEUjfz5HObGKR4du1nIVJx8IQ6wnvA1KMZCJG+CLT2mYV4Z3vTCRJNzxf9Yl6sX3zaSJPdrOIS+YtmIGcO98766jauftVLFYeR2AOWsQ2c5B5qID4e0OlgwUixoa5E05iR1r0dkirp338KmJBn+q3al9rDGEAmEOTh+RzJzzXyo0bqXjY31JyDRnLOrA2rQtJi1CCz7jUH8+rTKqLEMBt5rrjnbWjg11k2CogxyZZM44/nYkbkoVT4IveJJjxzbXxoSpiTlwb+EmN3jLUtOURXUx0wXPHSVmrp0AU5knKw/rklX4+j+4zQtll+N9yXsQ6EWE1UTNImxkV4focrVBALhmMiGF8fCaUPD2wuIvbAePKNy+eCYHENaYMCMOA22ufNeTeibfotxY/AyLaGdPZgKn4sFk= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 975836e6-1c92-43ec-e790-08d6df6e5e21 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2019 11:04:03.7101 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: shengjiu.wang@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6383 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi > 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. >=20 > 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." >=20 > 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. >=20 > Thank you ETDR is not volatile, if we mark it is volatile, is it correct? Bets regards Wang shengjiu