From: Daniel Baluta <daniel.baluta@gmail.com> To: Lucas Stach <l.stach@pengutronix.de> Cc: Daniel Baluta <daniel.baluta@nxp.com>, Mark Brown <broonie@kernel.org>, Linux-ALSA <alsa-devel@alsa-project.org>, Viorel Suman <viorel.suman@nxp.com>, Timur Tabi <timur@kernel.org>, Xiubo Li <Xiubo.Lee@gmail.com>, linuxppc-dev@lists.ozlabs.org, "S.j. Wang" <shengjiu.wang@nxp.com>, "Angus Ainslie (Purism)" <angus@akkea.ca>, Takashi Iwai <tiwai@suse.com>, Nicolin Chen <nicoleotsuka@gmail.com>, dl-linux-imx <linux-imx@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [alsa-devel] [PATCH 05/10] ASoC: fsl_sai: Add support to enable multiple data lines Date: Wed, 24 Jul 2019 11:58:04 +0300 [thread overview] Message-ID: <CAEnQRZB+g0pmv_Kkf37Vj_Ln_gPSc6cq77yAZQQ+9yUzhhMT5A@mail.gmail.com> (raw) In-Reply-To: <1563800148.2311.9.camel@pengutronix.de> On Mon, Jul 22, 2019 at 3:58 PM Lucas Stach <l.stach@pengutronix.de> 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 <daniel.baluta@nxp.com> > > --- > > 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 :).
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Baluta <daniel.baluta@gmail.com> To: Lucas Stach <l.stach@pengutronix.de> Cc: Linux-ALSA <alsa-devel@alsa-project.org>, Fabio Estevam <festevam@gmail.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Timur Tabi <timur@kernel.org>, Xiubo Li <Xiubo.Lee@gmail.com>, linuxppc-dev@lists.ozlabs.org, "S.j. Wang" <shengjiu.wang@nxp.com>, "Angus Ainslie \(Purism\)" <angus@akkea.ca>, Takashi Iwai <tiwai@suse.com>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Nicolin Chen <nicoleotsuka@gmail.com>, Mark Brown <broonie@kernel.org>, dl-linux-imx <linux-imx@nxp.com>, Viorel Suman <viorel.suman@nxp.com>, Daniel Baluta <daniel.baluta@nxp.com> Subject: Re: [alsa-devel] [PATCH 05/10] ASoC: fsl_sai: Add support to enable multiple data lines Date: Wed, 24 Jul 2019 11:58:04 +0300 [thread overview] Message-ID: <CAEnQRZB+g0pmv_Kkf37Vj_Ln_gPSc6cq77yAZQQ+9yUzhhMT5A@mail.gmail.com> (raw) In-Reply-To: <1563800148.2311.9.camel@pengutronix.de> On Mon, Jul 22, 2019 at 3:58 PM Lucas Stach <l.stach@pengutronix.de> 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 <daniel.baluta@nxp.com> > > --- > > 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 :).
next prev parent reply other threads:[~2019-07-24 8:58 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-22 12:48 [PATCH 00/10] Add support for new SAI IP version Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 12:48 ` [PATCH 01/10] ASoC: fsl_sai: add of_match data Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-23 17:00 ` Mark Brown 2019-07-23 17:00 ` Mark Brown 2019-07-24 6:42 ` [alsa-devel] " Daniel Baluta 2019-07-24 6:42 ` Daniel Baluta 2019-07-24 22:34 ` Nicolin Chen 2019-07-24 22:34 ` Nicolin Chen 2019-07-25 6:00 ` [alsa-devel] " Daniel Baluta 2019-07-25 6:00 ` Daniel Baluta 2019-07-25 6:00 ` Daniel Baluta 2019-07-22 12:48 ` [PATCH 02/10] ASoC: fsl_sai: derive TX FIFO watermark from FIFO depth Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 12:48 ` [PATCH 03/10] ASoC: fsl_sai: Add registers definition for multiple datalines Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 12:48 ` [PATCH 04/10] ASoC: fsl_sai: Update Tx/Rx channel enable mask Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 12:48 ` [PATCH 05/10] ASoC: fsl_sai: Add support to enable multiple data lines Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 12:55 ` Lucas Stach 2019-07-22 12:55 ` Lucas Stach 2019-07-24 8:58 ` Daniel Baluta [this message] 2019-07-24 8:58 ` [alsa-devel] " Daniel Baluta 2019-07-22 12:48 ` [PATCH 06/10] ASoC: dt-bindings: Document dl_mask property Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 12:56 ` Lucas Stach 2019-07-22 12:56 ` Lucas Stach 2019-07-24 23:13 ` Nicolin Chen 2019-07-24 23:13 ` Nicolin Chen 2019-07-24 23:13 ` Nicolin Chen 2019-07-25 6:08 ` [alsa-devel] " Daniel Baluta 2019-07-25 6:08 ` Daniel Baluta 2019-07-25 6:08 ` Daniel Baluta 2019-07-22 12:48 ` [PATCH 07/10] ASoC: fsl_sai: Add support for FIFO combine mode Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 13:01 ` Lucas Stach 2019-07-22 13:01 ` Lucas Stach 2019-07-22 12:48 ` [PATCH 08/10] ASoC: dt-bindings: Document fcomb_mode property Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-24 23:22 ` Nicolin Chen 2019-07-24 23:22 ` Nicolin Chen 2019-07-25 6:02 ` [alsa-devel] " Daniel Baluta 2019-07-25 6:02 ` Daniel Baluta 2019-07-25 17:39 ` Nicolin Chen 2019-07-25 17:39 ` Nicolin Chen 2019-07-25 17:39 ` Nicolin Chen 2019-07-22 12:48 ` [PATCH 09/10] ASoC: fsl_sai: Add support for SAI new version Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-24 23:32 ` Nicolin Chen 2019-07-24 23:32 ` Nicolin Chen 2019-07-25 6:06 ` [alsa-devel] " Daniel Baluta 2019-07-25 6:06 ` Daniel Baluta 2019-07-22 12:48 ` [PATCH 10/10] ASoC: fsl_sai: Add support for imx7ulp/imx8mq Daniel Baluta 2019-07-22 12:48 ` Daniel Baluta 2019-07-22 13:04 ` Lucas Stach 2019-07-22 13:04 ` Lucas Stach
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAEnQRZB+g0pmv_Kkf37Vj_Ln_gPSc6cq77yAZQQ+9yUzhhMT5A@mail.gmail.com \ --to=daniel.baluta@gmail.com \ --cc=Xiubo.Lee@gmail.com \ --cc=alsa-devel@alsa-project.org \ --cc=angus@akkea.ca \ --cc=broonie@kernel.org \ --cc=daniel.baluta@nxp.com \ --cc=festevam@gmail.com \ --cc=kernel@pengutronix.de \ --cc=l.stach@pengutronix.de \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=nicoleotsuka@gmail.com \ --cc=shengjiu.wang@nxp.com \ --cc=timur@kernel.org \ --cc=tiwai@suse.com \ --cc=viorel.suman@nxp.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.