Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9315869ybi; Wed, 24 Jul 2019 01:59:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyN6WmuEhdDrHdPNveAqDtpDHTNbm69kIy37mIHrLr0D7f8S6GZ+hWvTF48DPBDZttJSsu X-Received: by 2002:a62:ac11:: with SMTP id v17mr10255188pfe.236.1563958757032; Wed, 24 Jul 2019 01:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563958757; cv=none; d=google.com; s=arc-20160816; b=PnRkuETy4FJtVBn84Hy1YwqcVs7NdWF/kAHKpkwHKZQh3dYW8gwgZkIFG+2J6FZ0x2 Z5lYNWjAkt0s/lksS7XnS5tRtsRpyc7D0UpQlY5UY9w/qUDD3HLQO5gR6/weKqMZck3S jj83sMee4h1NINRTT+jOVxj0waPkI5PmwrCjJLSDNNLOw6sTBHVZXPYDfNZgpyMkg8Hl wHmhVFtnkTV7HVcV+S20K5gsTPPqWC6XPW4TBxMbNi0FQdOsEQEt46yTT9mfH68HeYe3 Jp5SlaZRtgz2/SGZq2D7Rar8+6D6bq/pN3By77yjEqAvxssaNSRfHdwzYkm00MP0LW3h UmCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+RGbZm1eciu20PQ8K6tF6H+QNRIWNrVYIPAsS3IZOGw=; b=lyk8TqCMSPCCHPlPl5UMquHyziwYYnajyJm1Kofd9HyEvYCKPcj5PZfFI9qGlyw55f nFLah/9MPTVX3W3n5vzVMdy/z7U+9qytZzuOCbgPNsJ6epHyUiSqCzO14ZvAZjkUIDci kVNuWsMPMKbsaGrUGcpDn+99zxcb/jTvp+kLN9juByA8jNsBjS5RS+AKsEhiEcoLhYov 9lwwlJMJ7YZsI2grOQq++qe77ILtmrPR/Slti9iq4osLKpMGPBwo60jUhrR9HsXoTpbP uvhMZPw7U7QGtKxyKkcQxeBWunTpWQLkUi9gN56HmRQp0i821G0fG5KtBpk/pnTmJObf RxTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gKSuVhkA; 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 cl13si13062540plb.97.2019.07.24.01.59.02; Wed, 24 Jul 2019 01:59:17 -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=gKSuVhkA; 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 S1726671AbfGXI6S (ORCPT + 99 others); Wed, 24 Jul 2019 04:58:18 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42202 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbfGXI6R (ORCPT ); Wed, 24 Jul 2019 04:58:17 -0400 Received: by mail-wr1-f66.google.com with SMTP id x1so31054883wrr.9 for ; Wed, 24 Jul 2019 01:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+RGbZm1eciu20PQ8K6tF6H+QNRIWNrVYIPAsS3IZOGw=; b=gKSuVhkAPXEHjSfyv7hCFaAwcimAC12QQb//SoVNMVfDYgdlJh0/u6za13CaJi1KNK Yhe88wKGs1Fbw0gsRtEV6VwOjTePgaWP/LBYhE4HSiflOGU6ocw7DnSkFBw1tJ2s0VSx tEydSi1ZE1R1YiURro6utx0GyKHQRRMB0pLSWCLDMj9Qyx6eY+pyAW1J5EfnmGFYg3bF SrnWQ9tzbl4Kj2f79Yhig7nDPqX6Dnvre4xtHcPQyGLjuYeL78NLKifDFMaFaJUSHVOw RK/dqeONWggH88EXgWfSIM15ssSrMYL82V7or3/mdcA2sb8ZPv5NlG+UwtSmYOB0Mxhd bZMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+RGbZm1eciu20PQ8K6tF6H+QNRIWNrVYIPAsS3IZOGw=; b=IfnI6dnzm5hWJo4RPWYH2F33/mzgISqe23DPkPhiRTvl8lo7uf3pE6Ql9YYyurBSYl kHDKrWBqSO8gmRoEuS/99s8Nf2ogOJOuMfLvpnRdIWxNT8m4mdCbaxSN3l+yFlDb3Hy5 kd8ZG5zq3WBbYd2QYdhp9g/UEwzvv8+/6L6+4Bnbk3OA89/rS/7MF443Qkpif2sCtwX7 obgETlsC4k832RghNfMutLm1naefz+qQvPy7ZBYdlGFDQxVPruhGeAesIuMgNbdCxs9F IOiAGpPYZN02BRw0DjAmRPj+kbgcSpx93PC7GfJ9HU4i8qQYX2bUHL+qe9R3nEZcmNHm 6vOQ== X-Gm-Message-State: APjAAAVbeS1Ae+8gp0f3f3RByQ31I7skOwsK01IIgv9gZhg9Q4FBZY9t LLLgokraXGHFk8O56svZkEjBnI+oPt/k/UK3mUo= X-Received: by 2002:adf:db46:: with SMTP id f6mr35916182wrj.212.1563958695456; Wed, 24 Jul 2019 01:58:15 -0700 (PDT) MIME-Version: 1.0 References: <20190722124833.28757-1-daniel.baluta@nxp.com> <20190722124833.28757-6-daniel.baluta@nxp.com> <1563800148.2311.9.camel@pengutronix.de> In-Reply-To: <1563800148.2311.9.camel@pengutronix.de> From: Daniel Baluta Date: Wed, 24 Jul 2019 11:58:04 +0300 Message-ID: Subject: Re: [alsa-devel] [PATCH 05/10] ASoC: fsl_sai: Add support to enable multiple data lines To: Lucas Stach Cc: Daniel Baluta , Mark Brown , Linux-ALSA , Viorel Suman , Timur Tabi , Xiubo Li , linuxppc-dev@lists.ozlabs.org, "S.j. Wang" , "Angus Ainslie (Purism)" , Takashi Iwai , Nicolin Chen , dl-linux-imx , Pengutronix Kernel Team , Fabio Estevam , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 3:58 PM Lucas Stach wrote: > > Am Montag, den 22.07.2019, 15:48 +0300 schrieb Daniel Baluta: > > SAI supports up to 8 Rx/Tx data lines which can be enabled > > using TCE/RCE bits of TCR3/RCR3 registers. > > > > Data lines to be enabled are read from DT fsl,dl_mask property. > > By default (if no DT entry is provided) only data line 0 is enabled. > > > > Note: > > We can only enable consecutive data lines starting with data line #0. > > Why is the property a bitmask then? To me this sounds like we want to > have the number of lanes in the DT and convert to the bitmask inside > the driver. Actually my comment might be wrong. I have read the documentation again and it seems that: We can only enable consecutive data lines *ONLY* if combine mode is enabled. Thus, if combine mode is disabled we can independently enable any data line. I will clarify this with IP owner and correct the patch accordingly. > > > > Signed-off-by: Daniel Baluta > > --- > > sound/soc/fsl/fsl_sai.c | 10 +++++++++- > > sound/soc/fsl/fsl_sai.h | 6 ++++-- > > 2 files changed, 13 insertions(+), 3 deletions(-) > > > > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c > > index 768341608695..d0fa02188b7c 100644 > > --- a/sound/soc/fsl/fsl_sai.c > > +++ b/sound/soc/fsl/fsl_sai.c > > @@ -601,7 +601,7 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream, > > > > > regmap_update_bits(sai->regmap, FSL_SAI_xCR3(tx), > > > FSL_SAI_CR3_TRCE_MASK, > > > - FSL_SAI_CR3_TRCE); > > > + FSL_SAI_CR3_TRCE(sai->soc_data->dl_mask[tx]); > > > > > ret = snd_pcm_hw_constraint_list(substream->runtime, 0, > > > SNDRV_PCM_HW_PARAM_RATE, &fsl_sai_rate_constraints); > > @@ -887,6 +887,14 @@ static int fsl_sai_probe(struct platform_device *pdev) > > > } > > > } > > > > > + /* active data lines mask for TX/RX, defaults to 1 (only the first > > > + * data line is enabled > > + */ > > Comment style not in line with Linux coding style. Will fix. Thanks Lucas for review. Should be like this, right? /* * comment */ checkpatch.pl warned me only about the end of the comment :).