Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org,
	Rajeev Kumar <rajeev-dlh.kumar@st.com>,
	Ryan Mallon <rmallon@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Hartley Sweeten <hsweeten@visionengravers.com>,
	Shawn Guo <shawn.guo@linaro.org>
Subject: Re: [PATCH 5/8] ASoC: ep93xx: Setup dma data in DAI probe
Date: Mon, 13 May 2013 09:27:09 +0200	[thread overview]
Message-ID: <519095CD.3080606@metafoo.de> (raw)
In-Reply-To: <1366478947-9377-5-git-send-email-lars@metafoo.de>

On 04/20/2013 07:29 PM, Lars-Peter Clausen wrote:
> This allows us to access the DAI DMA data when we create the PCM. We'll use
> this when converting ep39xx to generic DMA engine PCM driver.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> 

Hi Mark,

it looks like this patch was lost. The next one in this series which has a
dependency on this one was applied though. Should I resend the patch?

- Lars


> ---
> Changes since v1:
> 	* Fix a mis-rebase which mixed up bits from this patch with the next one
> ---
>  sound/soc/cirrus/ep93xx-ac97.c | 14 ++++----------
>  sound/soc/cirrus/ep93xx-i2s.c  | 14 ++++----------
>  2 files changed, 8 insertions(+), 20 deletions(-)
> 
> diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c
> index 8d30886..38cf335 100644
> --- a/sound/soc/cirrus/ep93xx-ac97.c
> +++ b/sound/soc/cirrus/ep93xx-ac97.c
> @@ -314,22 +314,15 @@ static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream,
>  	return 0;
>  }
>  
> -static int ep93xx_ac97_startup(struct snd_pcm_substream *substream,
> -			       struct snd_soc_dai *dai)
> +static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai)
>  {
> -	struct ep93xx_dma_data *dma_data;
> +	dai->playback_dma_data = &ep93xx_ac97_pcm_out;
> +	dai->capture_dma_data = &ep93xx_ac97_pcm_in;
>  
> -	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> -		dma_data = &ep93xx_ac97_pcm_out;
> -	else
> -		dma_data = &ep93xx_ac97_pcm_in;
> -
> -	snd_soc_dai_set_dma_data(dai, substream, dma_data);
>  	return 0;
>  }
>  
>  static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = {
> -	.startup	= ep93xx_ac97_startup,
>  	.trigger	= ep93xx_ac97_trigger,
>  };
>  
> @@ -337,6 +330,7 @@ static struct snd_soc_dai_driver ep93xx_ac97_dai = {
>  	.name		= "ep93xx-ac97",
>  	.id		= 0,
>  	.ac97_control	= 1,
> +	.probe		= ep93xx_ac97_dai_probe,
>  	.playback	= {
>  		.stream_name	= "AC97 Playback",
>  		.channels_min	= 2,
> diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
> index 83075b3..e17b905 100644
> --- a/sound/soc/cirrus/ep93xx-i2s.c
> +++ b/sound/soc/cirrus/ep93xx-i2s.c
> @@ -60,7 +60,6 @@ struct ep93xx_i2s_info {
>  	struct clk			*mclk;
>  	struct clk			*sclk;
>  	struct clk			*lrclk;
> -	struct ep93xx_dma_data		*dma_data;
>  	void __iomem			*regs;
>  };
>  
> @@ -139,15 +138,11 @@ static void ep93xx_i2s_disable(struct ep93xx_i2s_info *info, int stream)
>  	}
>  }
>  
> -static int ep93xx_i2s_startup(struct snd_pcm_substream *substream,
> -			      struct snd_soc_dai *dai)
> +static int ep93xx_i2s_dai_probe(struct snd_soc_dai *dai)
>  {
> -	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> -	struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai);
> -	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
> +	dai->playback_dma_data = &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_PLAYBACK];
> +	dai->capture_dma_data = &ep93xx_i2s_dma_data[SNDRV_PCM_STREAM_CAPTURE];
>  
> -	snd_soc_dai_set_dma_data(cpu_dai, substream,
> -				 &info->dma_data[substream->stream]);
>  	return 0;
>  }
>  
> @@ -338,7 +333,6 @@ static int ep93xx_i2s_resume(struct snd_soc_dai *dai)
>  #endif
>  
>  static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
> -	.startup	= ep93xx_i2s_startup,
>  	.shutdown	= ep93xx_i2s_shutdown,
>  	.hw_params	= ep93xx_i2s_hw_params,
>  	.set_sysclk	= ep93xx_i2s_set_sysclk,
> @@ -349,6 +343,7 @@ static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
>  
>  static struct snd_soc_dai_driver ep93xx_i2s_dai = {
>  	.symmetric_rates= 1,
> +	.probe		= ep93xx_i2s_dai_probe,
>  	.suspend	= ep93xx_i2s_suspend,
>  	.resume		= ep93xx_i2s_resume,
>  	.playback	= {
> @@ -403,7 +398,6 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
>  	}
>  
>  	dev_set_drvdata(&pdev->dev, info);
> -	info->dma_data = ep93xx_i2s_dma_data;
>  
>  	err = snd_soc_register_dai(&pdev->dev, &ep93xx_i2s_dai);
>  	if (err)

  reply	other threads:[~2013-05-13  7:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20 17:29 [PATCH 1/8] ASoC: generic-dmaengine-pcm: Add support for half-duplex Lars-Peter Clausen
2013-04-20 17:29 ` [PATCH 2/8] ASoC: mxs-pcm: Set SNDRV_PCM_INFO_HALF_DUPLEX Lars-Peter Clausen
2013-04-22 10:28   ` Mark Brown
2013-04-20 17:29 ` [PATCH 3/8] ASoC: mxs: Setup dma data in DAI probe Lars-Peter Clausen
2013-04-22 10:28   ` Mark Brown
2013-04-20 17:29 ` [PATCH 4/8] ASoC: mxs: Use generic dmaengine PCM Lars-Peter Clausen
2013-04-22 10:29   ` Mark Brown
2013-04-20 17:29 ` [PATCH 5/8] ASoC: ep93xx: Setup dma data in DAI probe Lars-Peter Clausen
2013-05-13  7:27   ` Lars-Peter Clausen [this message]
2013-05-13 13:33     ` Mark Brown
2013-05-13 14:21   ` Mark Brown
2013-05-13 18:47     ` Lars-Peter Clausen
2013-04-20 17:29 ` [PATCH 6/8] ASoC: ep93xx: Use generic dmaengine PCM Lars-Peter Clausen
2013-05-06 19:41   ` Mark Brown
2013-04-20 17:29 ` [PATCH 7/8] ASoC: spear: Setup dma data in DAI probe Lars-Peter Clausen
2013-05-06 19:41   ` Mark Brown
2013-04-20 17:29 ` [PATCH 8/8] ASoC: spear: Use generic dmaengine PCM Lars-Peter Clausen
2013-05-06 19:41   ` Mark Brown
2013-04-21  7:14 ` [PATCH 1/8] ASoC: generic-dmaengine-pcm: Add support for half-duplex Shawn Guo
2013-04-22 10:28 ` 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=519095CD.3080606@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hsweeten@visionengravers.com \
    --cc=lgirdwood@gmail.com \
    --cc=rajeev-dlh.kumar@st.com \
    --cc=rmallon@gmail.com \
    --cc=shawn.guo@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox