Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7197475ybi; Mon, 22 Jul 2019 08:42:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaBqjVBmUNsLRjAZWLV1P3meTU2JNzW/pn3UpeLWQSDYilqIYMqV2cA/7An5DP27QD4Egr X-Received: by 2002:a63:ab08:: with SMTP id p8mr74323657pgf.340.1563810176572; Mon, 22 Jul 2019 08:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563810176; cv=none; d=google.com; s=arc-20160816; b=E9XsvE4XwIV5FRaAOKTwXiPFNKGoug87IauM5EBvW+edl9KFgLeHbKpOD++tByo3+K 0hwwumY7E3v4MuTPnE+cIxUa57H1kFiuZY11QrNMkow2kmEk1zcU6+OpkwJh8Dxdy/94 WlTGDnx0r4iPePiH6lrU11YkeduDXpZWaEA786WQdjAO+ZQIPKUwd0kG+YAXutNashR7 T76xXPj5eCuKfW/nsDS0LB4Rs2W6iNVZ3unSQX+AJX+fXq5Pt7t+qIHJQqnE4CrCnvml avO4J+ZBqmafAZD8AUIlLFOxrimNVxOUIfuX/o/QE4/xZKhKsBsWN/bfj2sKYrRIB5iJ plvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ey8eBapQkda5mpTEcj5q8XGQPe9/cWncqdQLclyMAmQ=; b=uHz5/jsJSOZJAmhHWmJ+lGU7Vz4bCb2isHH8G4GAWLQA04yrHIMTJbWY3bwYVv7MUy LKLdqiVyJ20QnsPHV3yJwrQygwkmx5IIU1Gt/HznrssNPZbrEu6Co70RcFGzQ1OQKts2 r9es5Y5NgLYcvLgTyVeQEU5u5olNBMlQItT8nf8OmDcpMHJGNmsv4CfpXEQiMJ7h6VHr DbK4oiMctK8IGqy4Gsy21fqL2WJS/M0IoNzlK3mpYB0PrC38oVXOsen4veFFYmAxoO6E /y6NmeCRDcAxkZTuotReojRJxZgM4MVlNob3ozy02p0zO5zgYLUZu6RTawRu35RyppgQ qfBg== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k192si12300736pge.222.2019.07.22.08.42.40; Mon, 22 Jul 2019 08:42:56 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728527AbfGVMt2 (ORCPT + 99 others); Mon, 22 Jul 2019 08:49:28 -0400 Received: from inva020.nxp.com ([92.121.34.13]:51198 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729869AbfGVMsx (ORCPT ); Mon, 22 Jul 2019 08:48:53 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6889D1A0174; Mon, 22 Jul 2019 14:48:51 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 59FF31A0108; Mon, 22 Jul 2019 14:48:51 +0200 (CEST) Received: from fsr-ub1864-103.ea.freescale.net (fsr-ub1864-103.ea.freescale.net [10.171.82.17]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id A1202205DB; Mon, 22 Jul 2019 14:48:50 +0200 (CEST) From: Daniel Baluta To: broonie@kernel.org Cc: festevam@gmail.com, perex@perex.cz, tiwai@suse.com, Xiubo.Lee@gmail.com, nicoleotsuka@gmail.com, timur@kernel.org, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, shengjiu.wang@nxp.com, angus@akkea.ca, kernel@pengutronix.de, l.stach@pengutronix.de, viorel.suman@nxp.com, Daniel Baluta Subject: [PATCH 04/10] ASoC: fsl_sai: Update Tx/Rx channel enable mask Date: Mon, 22 Jul 2019 15:48:27 +0300 Message-Id: <20190722124833.28757-5-daniel.baluta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190722124833.28757-1-daniel.baluta@nxp.com> References: <20190722124833.28757-1-daniel.baluta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tx channel enable (TCE) / Rx channel enable (RCE) bits enable corresponding data channel for Tx/Rx operation. Because SAI supports up the 8 channels TCE/RCE occupy up the 8 bits inside TCR3/RCR3 registers we need to extend the mask to reflect this. Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 6 ++++-- sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 7f8823fe4b90..768341608695 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -599,7 +599,8 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream, bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; int ret; - regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), FSL_SAI_CR3_TRCE, + regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), + FSL_SAI_CR3_TRCE_MASK, FSL_SAI_CR3_TRCE); ret = snd_pcm_hw_constraint_list(substream->runtime, 0, @@ -614,7 +615,8 @@ static void fsl_sai_shutdown(struct snd_pcm_substream *substream, struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; - regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), FSL_SAI_CR3_TRCE, 0); + regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), + FSL_SAI_CR3_TRCE_MASK, 0); } static const struct snd_soc_dai_ops fsl_sai_pcm_dai_ops = { diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h index 4bb478041d67..b1abeed2f78e 100644 --- a/sound/soc/fsl/fsl_sai.h +++ b/sound/soc/fsl/fsl_sai.h @@ -110,6 +110,7 @@ /* SAI Transmit and Receive Configuration 3 Register */ #define FSL_SAI_CR3_TRCE BIT(16) +#define FSL_SAI_CR3_TRCE_MASK GENMASK(16, 23) #define FSL_SAI_CR3_WDFL(x) (x) #define FSL_SAI_CR3_WDFL_MASK 0x1f -- 2.17.1