From 8319e34599aed81543d39b37a25a68722e9b9bc2 Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Thu, 15 Oct 2009 17:50:52 +0800 Subject: [PATCH] fix the jz4740_pcm_mmap function now Ben can play online Radio --- .../xburst/files-2.6.31/sound/soc/jz4740/jz4740-pcm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/linux/xburst/files-2.6.31/sound/soc/jz4740/jz4740-pcm.c b/target/linux/xburst/files-2.6.31/sound/soc/jz4740/jz4740-pcm.c index de172ed6b..6ed4b291b 100644 --- a/target/linux/xburst/files-2.6.31/sound/soc/jz4740/jz4740-pcm.c +++ b/target/linux/xburst/files-2.6.31/sound/soc/jz4740/jz4740-pcm.c @@ -567,14 +567,13 @@ static int jz4740_pcm_close(struct snd_pcm_substream *substream) } static int jz4740_pcm_mmap(struct snd_pcm_substream *substream, - struct vm_area_struct *vma)//include/linux/mm.h + struct vm_area_struct *vma) { struct snd_pcm_runtime *runtime = substream->runtime; - unsigned long start; - unsigned long off; - u32 len; - printk("%s:%s[%d]\n", __FILE__, __func__, __LINE__); - return 0; + + return remap_pfn_range(vma, vma->vm_start, + substream->dma_buffer.addr >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, vma->vm_page_prot); } struct snd_pcm_ops jz4740_pcm_ops = {