[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <02c301cd5851$572fd440$058f7cc0$%szyprowski@samsung.com>
Date: Mon, 02 Jul 2012 14:50:58 +0200
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: 'Lars-Peter Clausen' <lars@...afoo.de>,
'Mark Brown' <broonie@...nsource.wolfsonmicro.com>
Cc: 'Takashi Iwai' <tiwai@...e.de>, alsa-devel@...a-project.org,
swarren@...dia.com, linux-kernel@...r.kernel.org,
'Laxman Dewangan' <ldewangan@...dia.com>, lrg@...com
Subject: RE: [alsa-devel] [PATCH] ASoC: snd_dmaengine: add common api for
pcm_mmap
Hello,
On Thursday, June 28, 2012 2:30 PM Lars-Peter Clausen wrote:
> On 06/28/2012 02:18 PM, Mark Brown wrote:
> > On Thu, Jun 28, 2012 at 02:15:38PM +0200, Takashi Iwai wrote:
> >> Lars-Peter Clausen wrote:
> >
> >>> to the ALSA core. Now that there is a generic dma_mmap_writecombine it may
> >>> make sense to integrate this with snd_pcm_lib_default_mmap.
> >
> >> Agreed.
> >
> >> Also, it must be portable. So far, only ARM has
> >> dma_mmap_writecombine(), thus the build on other arch would fail as
> >> is.
> >
> > 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.
On architectures which don't support DMA_ATTR_WRITECOMBINE attribute it falls
back to standard 'coherent' implementation, so it is equivalent to
dma_mmap_coherent(). If architecture doesn't provide mmap callback, my patch
provides a so called 'generic' implementation based on virt_to_phys() macro.
Once this patch gets merged, I hope that each architecture will be reviewed
if such implementation is correct. If not, some architectures might need to
provide their own implementations, but at least we can get the buffer-mmap
related hacks from the device drivers.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists