Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 09/14] ASoC: atmel-pcm-dma: Do not use snd_dmaengine_pcm_{set, get}_data()
Date: Mon, 25 Mar 2013 16:39:04 +0800	[thread overview]
Message-ID: <51500D28.9080607@atmel.com> (raw)
In-Reply-To: <1363957934-20059-10-git-send-email-lars@metafoo.de>

Hi Lars,

On 3/22/2013 21:12, Lars-Peter Clausen wrote:
> We want to get rid of snd_dmaengine_pcm_{set,get}_data(). All instances of
> snd_dmaengine_pcm_get_data() in the atmel pcm driver can easily be replaced with
> snd_soc_dai_get_dma_data().
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Bo Shen <voice.shen@atmel.com>

Tested-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>

> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>   sound/soc/atmel/atmel-pcm-dma.c | 14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
> index 396bf78..b8570e3 100644
> --- a/sound/soc/atmel/atmel-pcm-dma.c
> +++ b/sound/soc/atmel/atmel-pcm-dma.c
> @@ -67,9 +67,10 @@ static const struct snd_pcm_hardware atmel_pcm_dma_hardware = {
>   static void atmel_pcm_dma_irq(u32 ssc_sr,
>   	struct snd_pcm_substream *substream)
>   {
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
>   	struct atmel_pcm_dma_params *prtd;
>
> -	prtd = snd_dmaengine_pcm_get_data(substream);
> +	prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
>
>   	if (ssc_sr & prtd->mask->ssc_error) {
>   		if (snd_pcm_running(substream))
> @@ -104,15 +105,13 @@ static bool filter(struct dma_chan *chan, void *slave)
>   }
>
>   static int atmel_pcm_configure_dma(struct snd_pcm_substream *substream,
> -	struct snd_pcm_hw_params *params)
> +	struct snd_pcm_hw_params *params, struct atmel_pcm_dma_params *prtd)
>   {
> -	struct atmel_pcm_dma_params *prtd;
>   	struct ssc_device *ssc;
>   	struct dma_chan *dma_chan;
>   	struct dma_slave_config slave_config;
>   	int ret;
>
> -	prtd = snd_dmaengine_pcm_get_data(substream);
>   	ssc = prtd->ssc;
>
>   	ret = snd_hwparams_to_dma_slave_config(substream, params,
> @@ -164,9 +163,7 @@ static int atmel_pcm_hw_params(struct snd_pcm_substream *substream,
>   		return -EINVAL;
>   	}
>
> -	snd_dmaengine_pcm_set_data(substream, prtd);
> -
> -	ret = atmel_pcm_configure_dma(substream, params);
> +	ret = atmel_pcm_configure_dma(substream, params, prtd);
>   	if (ret) {
>   		pr_err("atmel-pcm: failed to configure dmai\n");
>   		goto err;
> @@ -182,9 +179,10 @@ err:
>
>   static int atmel_pcm_dma_prepare(struct snd_pcm_substream *substream)
>   {
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
>   	struct atmel_pcm_dma_params *prtd;
>
> -	prtd = snd_dmaengine_pcm_get_data(substream);
> +	prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
>
>   	ssc_writex(prtd->ssc->regs, SSC_IER, prtd->mask->ssc_error);
>   	ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_enable);
>

  reply	other threads:[~2013-03-25  8:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 13:12 [PATCH 00/14] ASoC: Cleanup dmaengine PCM users Lars-Peter Clausen
2013-03-22 13:12 ` [PATCH 01/14] ASoC: ux500_pcm: Remove duplicated SNDRV_PCM_HW_PARAM_PERIODS constraint Lars-Peter Clausen
2013-03-22 14:35   ` Ola Lilja
2013-03-22 13:12 ` [PATCH 02/14] ASoC: spear_pcm: No need to wrap snd_dmaengine_pcm_close() Lars-Peter Clausen
2013-03-25  3:51   ` Rajeev kumar
2013-03-22 13:12 ` [PATCH 03/14] ASoC: omap-pcm: " Lars-Peter Clausen
2013-03-22 13:13   ` Peter Ujfalusi
2013-03-22 14:15     ` Jarkko Nikula
2013-03-22 13:12 ` [PATCH 04/14] ASoC: tegra_pcm: " Lars-Peter Clausen
2013-03-22 15:44   ` Stephen Warren
2013-03-22 13:12 ` [PATCH 05/14] ASoC: ux500_pcm: " Lars-Peter Clausen
2013-03-22 14:36   ` Ola Lilja
2013-03-22 13:12 ` [PATCH 06/14] ASoC: atmel-pcm-dma: " Lars-Peter Clausen
2013-03-25  8:37   ` Bo Shen
2013-03-22 13:12 ` [PATCH 07/14] ASoC: ux500_pcm: No need to use snd_dmaengine_pcm_set_data() Lars-Peter Clausen
2013-03-22 15:01   ` Ola Lilja
2013-03-26 14:16     ` Mark Brown
2013-03-22 13:12 ` [PATCH 08/14] ASoC: speaer_pcm: " Lars-Peter Clausen
2013-03-25  3:59   ` Rajeev kumar
2013-03-25  8:22     ` Lars-Peter Clausen
2013-03-25  8:36       ` Rajeev kumar
2013-03-22 13:12 ` [PATCH 09/14] ASoC: atmel-pcm-dma: Do not use snd_dmaengine_pcm_{set, get}_data() Lars-Peter Clausen
2013-03-25  8:39   ` Bo Shen [this message]
2013-03-22 13:12 ` [PATCH 10/14] ASoC: ep93xx: Use ep93xx_dma_params instead of ep93xx_pcm_dma_params Lars-Peter Clausen
2013-03-22 13:12 ` [PATCH 11/14] ASoC: mmp-pcm: Allocate dma filter parameters on the stack Lars-Peter Clausen
2013-03-22 13:12 ` [PATCH 12/14] ASoC: imx-pcm: Embed the imx_dma_data struct in the dma_params struct Lars-Peter Clausen
2013-03-25  2:33   ` Shawn Guo
2013-03-22 13:12 ` [PATCH 13/14] ASoC: mxs: Embed the mxs_dma_data struct in the mxs_pcm_dma_params struct Lars-Peter Clausen
2013-03-25  2:04   ` Shawn Guo
2013-03-22 13:12 ` [PATCH 14/14] ASoC: dmaengine-pcm: Remove snd_dmaengine_pcm_{set, get}_data Lars-Peter Clausen
2013-03-26 14:18 ` [PATCH 00/14] ASoC: Cleanup dmaengine PCM users 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=51500D28.9080607@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=nicolas.ferre@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox