All of lore.kernel.org
 help / color / mirror / Atom feed
From: Angus Ainslie <angus@akkea.ca>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: alsa-devel@alsa-project.org, Timur Tabi <timur@kernel.org>,
	Xiubo Li <Xiubo.Lee@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	patchwork-lst@pengutronix.de,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	kernel@pengutronix.de, Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH 2/3] ASoC: fsl_sai: derive TX FIFO watermark from FIFO depth
Date: Wed, 17 Jul 2019 07:43:18 -0600	[thread overview]
Message-ID: <6cc95da1373307eb2bace8b4af3c884d@akkea.ca> (raw)
In-Reply-To: <20190717105635.18514-3-l.stach@pengutronix.de>

On 2019-07-17 04:56, Lucas Stach wrote:
> The DMA request schould be triggered as soon as the FIFO has space
> for another burst. As different versions of the SAI block have
> different FIFO sizes, the watrmark level needs to be derived from
> version specific data.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Tested-by: Angus Ainslie <angus@akkea.ca>
Reviewed-by: Angus Ainslie <angus@akkea.ca>

> ---
>  sound/soc/fsl/fsl_sai.c | 4 +++-
>  sound/soc/fsl/fsl_sai.h | 1 +
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 3a1ed8b857d6..b3cd055a61c7 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -649,7 +649,7 @@ static int fsl_sai_dai_probe(struct snd_soc_dai 
> *cpu_dai)
>  	regmap_write(sai->regmap, FSL_SAI_RCSR, 0);
> 
>  	regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK,
> -			   FSL_SAI_MAXBURST_TX * 2);
> +			   sai->soc_data->fifo_depth - FSL_SAI_MAXBURST_TX);
>  	regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK,
>  			   FSL_SAI_MAXBURST_RX - 1);
> 
> @@ -923,10 +923,12 @@ static int fsl_sai_remove(struct platform_device 
> *pdev)
> 
>  static const struct fsl_sai_soc_data fsl_sai_vf610_data = {
>  	.use_imx_pcm = false,
> +	.fifo_depth = 32,
>  };
> 
>  static const struct fsl_sai_soc_data fsl_sai_imx6sx_data = {
>  	.use_imx_pcm = true,
> +	.fifo_depth = 32,
>  };
> 
>  static const struct of_device_id fsl_sai_ids[] = {
> diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
> index 83e2bfe05b1b..7c1ef671da28 100644
> --- a/sound/soc/fsl/fsl_sai.h
> +++ b/sound/soc/fsl/fsl_sai.h
> @@ -128,6 +128,7 @@
> 
>  struct fsl_sai_soc_data {
>  	bool use_imx_pcm;
> +	unsigned int fifo_depth;
>  };
> 
>  struct fsl_sai {

  reply	other threads:[~2019-07-17 13:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 10:56 [PATCH 0/3] i.MX8M support for FSL SAI Lucas Stach
2019-07-17 10:56 ` [PATCH 1/3] ASoC: fsl_sai: add of_match data Lucas Stach
2019-07-17 13:42   ` Angus Ainslie
2019-07-17 14:17   ` Daniel Baluta
2019-07-22 12:22   ` Applied "ASoC: fsl_sai: add of_match data" to the asoc tree Mark Brown
2019-07-17 10:56 ` [PATCH 2/3] ASoC: fsl_sai: derive TX FIFO watermark from FIFO depth Lucas Stach
2019-07-17 13:43   ` Angus Ainslie [this message]
2019-07-22 12:22   ` Applied "ASoC: fsl_sai: derive TX FIFO watermark from FIFO depth" to the asoc tree Mark Brown
2019-07-17 10:56 ` [PATCH 3/3] ASoC: fsl_sai: add i.MX8M support Lucas Stach
2019-07-17 13:45   ` Angus Ainslie
2019-07-22 10:39     ` Daniel Baluta
2019-07-22 13:41       ` Angus Ainslie
2019-07-17 14:16   ` Daniel Baluta
2019-07-17 14:33     ` Lucas Stach
2019-07-17 15:06       ` Daniel Baluta
2019-07-17 15:15         ` Angus Ainslie
2019-07-18  8:35           ` Daniel Baluta
2019-07-18 19:11   ` Cezary Rojewski
2019-07-18 19:22     ` Daniel Baluta
2019-07-18 20:19       ` Cezary Rojewski

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=6cc95da1373307eb2bace8b4af3c884d@akkea.ca \
    --to=angus@akkea.ca \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=nicoleotsuka@gmail.com \
    --cc=patchwork-lst@pengutronix.de \
    --cc=timur@kernel.org \
    /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: link
Be 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.