aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-01-18 08:58:57 -0500
committerTakashi Iwai <tiwai@suse.de>2010-01-18 09:00:34 -0500
commitc32d977b8157bf67cdf47729ce7dd054a26eb534 (patch)
treefedbd1c0d4382e88362abf81f719e6f127e19fa7 /sound/core
parent3e879d7bac705be4813a0ec9560cbe31db4b269f (diff)
ALSA: pcm - Call pgprot_noncached() for vmalloc'ed buffers
pgprot_noncached() can be set for vmalloc'ed buffers safely, and we'd need non-cached behavior more or less, even for the intermediate ring- buffers. Now snd_pcm_lib_mmap_vmalloc() is added as the common PCM mmap callback that is coupled with snd_pcm_lib_alloc_vmalloc_buffer() & co. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_native.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 5df0d21f18b3..88fff44702a4 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3176,6 +3176,15 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream,
3176EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); 3176EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem);
3177#endif /* SNDRV_PCM_INFO_MMAP */ 3177#endif /* SNDRV_PCM_INFO_MMAP */
3178 3178
3179/* mmap callback with pgprot_noncached */
3180int snd_pcm_lib_mmap_noncached(struct snd_pcm_substream *substream,
3181 struct vm_area_struct *area)
3182{
3183 area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
3184 return snd_pcm_default_mmap(substream, area);
3185}
3186EXPORT_SYMBOL(snd_pcm_lib_mmap_noncached);
3187
3179/* 3188/*
3180 * mmap DMA buffer 3189 * mmap DMA buffer
3181 */ 3190 */