From 0cde7717dbebd1a557f21fb69db95a9b862154f1 Mon Sep 17 00:00:00 2001 From: wdc Date: Sat, 20 Oct 2012 17:12:38 +0800 Subject: [PATCH] =?utf8?q?audio:=E8=A7=A3=E5=86=B3=E5=BD=95=E9=9F=B3?= =?utf8?q?=E6=97=B6=E5=86=85=E5=AD=98mmap=E5=87=BA=E9=94=99=EF=BC=8C?= =?utf8?q?=E5=B0=86=E5=8E=9F=E6=9C=89=E7=9A=84DMA=E6=96=B9=E5=BC=8F?= =?utf8?q?=E4=BF=AE=E6=94=B9=E6=88=90SDRM=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit [modified-files] sound/soc/rk29/rk29_pcm.c --- sound/soc/rk29/rk29_pcm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/soc/rk29/rk29_pcm.c b/sound/soc/rk29/rk29_pcm.c index 602e53c757b2..072aeb713360 100755 --- a/sound/soc/rk29/rk29_pcm.c +++ b/sound/soc/rk29/rk29_pcm.c @@ -467,12 +467,19 @@ static int rockchip_pcm_mmap(struct snd_pcm_substream *substream, { struct snd_pcm_runtime *runtime = substream->runtime; - DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); + DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); +#ifdef CONFIG_RK_SRAM_DMA + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); + return remap_pfn_range(vma, vma->vm_start, + substream->dma_buffer.addr >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, vma->vm_page_prot); +#else return dma_mmap_writecombine(substream->pcm->card->dev, vma, runtime->dma_area, runtime->dma_addr, runtime->dma_bytes); +#endif } static struct snd_pcm_ops rockchip_pcm_ops = { -- 2.34.1