From: Nicolin Chen <b42378@freescale.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, broonie@kernel.org,
lgirdwood@gmail.com
Subject: Re: [PATCH 2/2] ASoC: generic-dmaengine-pcm: Support on-chip internal memory for DMA buffer
Date: Wed, 16 Oct 2013 16:51:32 +0800 [thread overview]
Message-ID: <20131016085132.GB24805@MrMyself> (raw)
In-Reply-To: <525E54A6.80303@metafoo.de>
On Wed, Oct 16, 2013 at 10:56:06AM +0200, Lars-Peter Clausen wrote:
> On 10/16/2013 10:18 AM, Nicolin Chen wrote:
> [...]
> > * struct snd_dmaengine_pcm_config - Configuration data for dmaengine based PCM
> > diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
> > index e29ec3c..dd72964 100644
> > --- a/sound/soc/soc-generic-dmaengine-pcm.c
> > +++ b/sound/soc/soc-generic-dmaengine-pcm.c
> > @@ -142,7 +142,7 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd)
> > struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform);
> > const struct snd_dmaengine_pcm_config *config = pcm->config;
> > struct snd_pcm_substream *substream;
> > - unsigned int i;
> > + unsigned int i, type = SNDRV_DMA_TYPE_DEV;
> > int ret;
> >
> > for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
> > @@ -162,8 +162,10 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd)
> > goto err_free;
> > }
> >
> > - ret = snd_pcm_lib_preallocate_pages(substream,
> > - SNDRV_DMA_TYPE_DEV,
> > + if (pcm->flags & SND_DMAENGINE_PCM_FLAG_DMA_IRAM)
> > + type = SNDRV_DMA_TYPE_DEV_IRAM;
>
> Should we just make this the default, after all it will fallback to normal
> memory if no iram region has been specified.
If you said so, I would definitely like to do this. I was..eh..just not sure
others might have concerns about it because it changed the default solution.
Thank you,
Nicolin Chen
>
> > +
> > + ret = snd_pcm_lib_preallocate_pages(substream, type,
> > dmaengine_dma_dev(pcm, substream),
> > config->prealloc_buffer_size,
> > config->pcm_hardware->buffer_bytes_max);
> >
>
>
next prev parent reply other threads:[~2013-10-16 9:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 8:18 [PATCH 1/2] ALSA: Add SoC on-chip internal memory support for DMA buffer allocation Nicolin Chen
2013-10-16 8:18 ` [PATCH 2/2] ASoC: generic-dmaengine-pcm: Support on-chip internal memory for DMA buffer Nicolin Chen
2013-10-16 8:56 ` Lars-Peter Clausen
2013-10-16 8:51 ` Nicolin Chen [this message]
2013-10-16 8:55 ` [PATCH 1/2] ALSA: Add SoC on-chip internal memory support for DMA buffer allocation Lars-Peter Clausen
2013-10-16 8:48 ` Nicolin Chen
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=20131016085132.GB24805@MrMyself \
--to=b42378@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=tiwai@suse.de \
/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.