All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, lars@metafoo.de, nsekhar@ti.com,
	Jyri Sarha <jsarha@ti.com>,
	zonque@gmail.com
Subject: Re: [PATCH v3 1/3] ASoC: davinci-mcasp: Constraint on the period and buffer size based on FIFO usage
Date: Tue, 18 Mar 2014 15:23:33 +0200	[thread overview]
Message-ID: <532848D5.30806@ti.com> (raw)
In-Reply-To: <1395148837-20850-2-git-send-email-peter.ujfalusi@ti.com>

On 03/18/2014 03:20 PM, Peter Ujfalusi wrote:
> We need to place constraint on the period if the read or write AFIFO
> is enabled and it is configured for more than one word otherwise
> the DMA will fail in buffer configuration where the sizes are not
> aligned with the requested FIFO configuration.

Oh, I edited the commit message and removed the text related to buffer size
but I failed to do that for the commit title :(

Mark: Do you want me to resend with fixed commit title?

-- 
Péter

> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  sound/soc/davinci/davinci-mcasp.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
> index a01ae97c90aa..df067a836c4d 100644
> --- a/sound/soc/davinci/davinci-mcasp.c
> +++ b/sound/soc/davinci/davinci-mcasp.c
> @@ -720,6 +720,7 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
>  				 struct snd_soc_dai *dai)
>  {
>  	struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
> +	int afifo_numevt;
>  
>  	if (mcasp->version == MCASP_VERSION_4)
>  		snd_soc_dai_set_dma_data(dai, substream,
> @@ -727,6 +728,16 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
>  	else
>  		snd_soc_dai_set_dma_data(dai, substream, mcasp->dma_params);
>  
> +	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> +		afifo_numevt = mcasp->txnumevt;
> +	else
> +		afifo_numevt = mcasp->rxnumevt;
> +
> +	if (afifo_numevt > 1)
> +		snd_pcm_hw_constraint_step(substream->runtime, 0,
> +					   SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
> +					   afifo_numevt);
> +
>  	return 0;
>  }
>  
> 

  reply	other threads:[~2014-03-18 13:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 13:20 [PATCH v3 0/3] ASoC: davinci: perparation for eDMA dmaengine PCM Peter Ujfalusi
2014-03-18 13:20 ` [PATCH v3 1/3] ASoC: davinci-mcasp: Constraint on the period and buffer size based on FIFO usage Peter Ujfalusi
2014-03-18 13:23   ` Peter Ujfalusi [this message]
2014-03-18 14:28     ` Peter Ujfalusi
2014-03-18 18:07       ` Mark Brown
2014-03-19 11:13         ` Peter Ujfalusi
2014-03-19 13:14           ` Mark Brown
2014-03-20 13:47             ` Peter Ujfalusi
2014-03-20 14:15               ` Lars-Peter Clausen
2014-03-25 10:07                 ` Peter Ujfalusi
2014-03-18 13:20 ` [PATCH v3 2/3] ASoC: davinci-mcasp: Assign the dma_data earlier in dai_probe callback Peter Ujfalusi
2014-03-19 13:19   ` Mark Brown
2014-03-18 13:20 ` [PATCH v3 3/3] ASoC: davinci-pcm: Add empty functions for !CONFIG_SND_DAVINCI_SOC builds Peter Ujfalusi
2014-03-19 13:16   ` Mark Brown

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=532848D5.30806@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jsarha@ti.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=nsekhar@ti.com \
    --cc=zonque@gmail.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: 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.