mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Stephen Warren <swarren@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lrg@ti.com" <lrg@ti.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [alsa-devel] [PATCH] ASoC: snd_dmaengine: add common api for pcm_mmap
Date: Thu, 28 Jun 2012 15:28:45 +0200	[thread overview]
Message-ID: <s5hk3yrzhte.wl%tiwai@suse.de> (raw)
In-Reply-To: <4FEC5642.9080908@nvidia.com>

At Thu, 28 Jun 2012 18:34:02 +0530,
Laxman Dewangan wrote:
> 
> On Thursday 28 June 2012 06:27 PM, Takashi Iwai wrote:
> > At Thu, 28 Jun 2012 18:05:53 +0530,
> > Laxman Dewangan wrote:
> >> On Thursday 28 June 2012 05:58 PM, Mark Brown wrote:
> >>> * PGP Signed by an unknown key
> >>>
> >>> On Thu, Jun 28, 2012 at 02:30:26PM +0200, Lars-Peter Clausen wrote:
> >>>> On 06/28/2012 02:18 PM, Mark Brown wrote:
> >>>>> Oh, dear - this means we don't actually have a generic API at all.  Is
> >>>>> there any effort being made to make this generally available?
> >>>> Yes there is, and in fact in next/master there is generic
> >>>> dma_mmap_writecombine. I'm not quite sure how it behaves on non ARM archs
> >>>> though. But in theory it should fallback to a normal coherent mapping. Marek
> >>>> did a lot of work on this, I've put him on Cc.
> >> So can we put the function snd_pcm_lib_writecombine_mmap() in the
> >> pcm_native.c and only export this api for ARM i.e.  under macro  #ifdef
> >> CONFIG_ARM so that ARM based SOCs like Tegra/epa3xx/mxs/spear can
> >> directly use that one?
> >> Or, wait for this common API until all ARCH support it?
> > I think it's fine to put it first in ALSA side with some ifdef.
> > A similar trick is already found for snd_pcm_lib_mmap_iomem.
> > See include/sound/pcm.h.
> >
> > But, actually it's a still question what if an architecture doesn't
> > support the mmap of writecombine at all.  The proposed patch doesn't
> > allow you to know whether writecombine-mmap is possible or not on the
> > running architecture until you really try to call it and fail.
> > It's a missing piece, IMO.
> 
> Lars wanted to move the buffer allocation also to common place.

Which common place?

> Then how about this?
> create new file and header for snd-pcm-writecombine-buffer.c/.h and put 
> this in sound/core.
> Select this file compilation through config SND_PCM_WRITECOMBINE_BUFFER 
> which will be select this config through sound/soc/xxx/Kconfig if they 
> want to use.
> This will provide three apis: new, free and mmap.

Way too much hustles than necessary...


Takashi

  reply	other threads:[~2012-06-28 13:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28  7:01 Laxman Dewangan
2012-06-28 10:51 ` Mark Brown
2012-06-28 11:56   ` Laxman Dewangan
2012-06-28 12:02     ` Mark Brown
2012-06-28 12:07       ` Laxman Dewangan
2012-06-28 12:44     ` Lars-Peter Clausen
2012-06-28 14:03       ` [alsa-devel] " Takashi Iwai
2012-06-28 11:09 ` Lars-Peter Clausen
2012-06-28 12:15   ` Takashi Iwai
2012-06-28 12:18     ` [alsa-devel] " Mark Brown
2012-06-28 12:30       ` Lars-Peter Clausen
2012-06-28 12:28         ` Mark Brown
2012-06-28 12:35           ` Laxman Dewangan
2012-06-28 12:57             ` Takashi Iwai
2012-06-28 13:04               ` Laxman Dewangan
2012-06-28 13:28                 ` Takashi Iwai [this message]
2012-06-28 13:36                   ` Laxman Dewangan
2012-06-28 13:51                     ` Takashi Iwai
2012-06-28 14:00                       ` Laxman Dewangan
2012-06-28 14:10                         ` Takashi Iwai
2012-06-29 16:42                       ` Lars-Peter Clausen
2012-07-02 12:50         ` Marek Szyprowski
2012-06-28 12:32       ` Clemens Ladisch

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=s5hk3yrzhte.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=m.szyprowski@samsung.com \
    --cc=swarren@nvidia.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

all inboxes | Powered by JetHome®