Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1340695ybi; Wed, 3 Jul 2019 13:57:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqza6p8q8fdsxMTUW8Njzi5v+UjhpVadIKnAXnUbZjdEpfMkU8PHY/2e0WSq6sgMsjQsLS8w X-Received: by 2002:a17:902:ba8e:: with SMTP id k14mr44628041pls.256.1562187425450; Wed, 03 Jul 2019 13:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562187425; cv=none; d=google.com; s=arc-20160816; b=qHOOGDvAGb69PvbWzYhI2bDJXvxsCrgc6sHbP4FSAXaBMRn0UvrojtDGsvRlssfQHq SECcHjmEBa4+/9E7dc9goOX3PWBSk30LPs7zcPLADecd+6Smk4SQdS8IjXhVsCfBNRF1 WwEhzJ8Paa0bU/CJYisHOT2Yikx8eGdYlpBfSpdAa9xA+Cx/GoaW98wFxlSinmmTUbiR xDi9y230/D8iN/77GvGEfKF8BVdZJnToQz2NxbNxycN6D1F5rrc1aMn7rjBSH+HKwktQ CV3G3FX1DhLgC8YETzgAc+C4jMhYTiHl1M8lXTCJJTU4JB4idCNuOnsc89Mm0Syk5e5d NhSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=qQOS+jIQa+5dO/JLGTGMksPixoLO/m9UBSHxIDdgZH4=; b=WH8A2gIN5rD3r3cdi/p+YIQ6hTDcaI9OXPbYhtUNoqnjBi5Sr+kV8UKF+oFSApIenD hltDsWXWVJ3c1sMriE6bEeX7cHBn6nNTi/BRgxMJcgGgaQRJ8mjB2ku/odywjqhWwwTo g/C2AK/NDu9rIog0IF8NvQVz0qkBF4+tRdr+ww0s50p3h0ROjTkZH7/XYgnRxJSQPel0 hMRgORZNvXQptQD7B2b50VARA88481MRFCdR6LANkJAbQnCO+PZRadG1HGb8wew1T0hd 8W863a1EVXQRurzsoYdTkFRzXnK3Bh3ufPq1Zn8A9xlK4beDEE5FGzKz1JKjQ5pzen3V /fKg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si3231004pff.28.2019.07.03.13.56.49; Wed, 03 Jul 2019 13:57:05 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbfGCU40 (ORCPT + 99 others); Wed, 3 Jul 2019 16:56:26 -0400 Received: from mga07.intel.com ([134.134.136.100]:43888 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfGCU4Z (ORCPT ); Wed, 3 Jul 2019 16:56:25 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 13:56:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,448,1557212400"; d="scan'208";a="166087884" Received: from crojewsk-mobl1.ger.corp.intel.com (HELO [10.252.1.56]) ([10.252.1.56]) by fmsmga007.fm.intel.com with ESMTP; 03 Jul 2019 13:56:20 -0700 Subject: Re: [PATCH V2 2/2] ASoC: fsl_esai: recover the channel swap after xrun To: shengjiu.wang@nxp.com Cc: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: From: Cezary Rojewski Message-ID: <3238f813-ac71-69e2-45bf-badb461dac82@intel.com> Date: Wed, 3 Jul 2019 22:56:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-07-03 08:42, shengjiu.wang@nxp.com wrote: > +static void fsl_esai_reset(unsigned long arg) > +{ > + struct fsl_esai *esai_priv = (struct fsl_esai *)arg; > + u32 saisr, tfcr, rfcr; > + > + /* save the registers */ > + regmap_read(esai_priv->regmap, REG_ESAI_TFCR, &tfcr); > + regmap_read(esai_priv->regmap, REG_ESAI_RFCR, &rfcr); > + > + /* stop the tx & rx */ > + fsl_esai_trigger_stop(esai_priv, 1); > + fsl_esai_trigger_stop(esai_priv, 0); > + > + /* reset the esai, and restore the registers */ > + fsl_esai_init(esai_priv); > + > + regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, > + ESAI_xCR_xPR_MASK, > + ESAI_xCR_xPR); > + regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR, > + ESAI_xCR_xPR_MASK, > + ESAI_xCR_xPR); > + > + /* restore registers by regcache_sync */ > + fsl_esai_register_restore(esai_priv); > + Both _init and _restore may fail given their declaration in 1/2 "ASoC: fsl_esai: Wrap some operations to be functions" yet here you simply ignore the return values. If failure of said functions is permissive, it might be a good place for a comment. Czarek