At Thu, 28 Jun 2012 18:34:02 +0530,
Laxman Dewangan wrote:
On Thursday 28 June 2012 06:27 PM, Takashi Iwai wrote:Which common place?At Thu, 28 Jun 2012 18:05:53 +0530,Lars wanted to move the buffer allocation also to common place.
Laxman Dewangan wrote:
On Thursday 28 June 2012 05:58 PM, Mark Brown wrote:I think it's fine to put it first in ALSA side with some ifdef.* PGP Signed by an unknown keySo can we put the function snd_pcm_lib_writecombine_mmap() in the
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. IsYes there is, and in fact in next/master there is generic
there any effort being made to make this generally available?
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.
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?
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.
Ooh no. :-( I had taken the idea from snd_dmaengine_pcm driver.Then how about this?Way too much hustles than necessary...
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.