aboutsummaryrefslogtreecommitdiff
path: root/include/sound/memalloc.h
diff options
context:
space:
mode:
authorTakashi Iwai2021-06-09 18:25:50 +0200
committerTakashi Iwai2021-06-10 10:15:21 +0200
commita202bd1ad86d59c07f24f0a201c5ade320b51e30 (patch)
tree54a7ef6463fbc5e02033fd9c97d77b6a8c4df195 /include/sound/memalloc.h
parent37af81c5998f4b0f23fb452cffa4b8a1c00ce95b (diff)
ALSA: core: Move mmap handler into memalloc ops
This patch moves the mmap handling code into the common memalloc handler. It allows us to reduce the memory-type specific code in PCM code gracefully. Link: https://lore.kernel.org/r/20210609162551.7842-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/memalloc.h')
-rw-r--r--include/sound/memalloc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 6dc85a7f44ad..1918c60f1f35 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -11,6 +11,7 @@
struct device;
struct page;
+struct vm_area_struct;
/*
* buffer device info
@@ -69,6 +70,8 @@ int snd_dma_alloc_pages(int type, struct device *dev, size_t size,
int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size,
struct snd_dma_buffer *dmab);
void snd_dma_free_pages(struct snd_dma_buffer *dmab);
+int snd_dma_buffer_mmap(struct snd_dma_buffer *dmab,
+ struct vm_area_struct *area);
dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, size_t offset);
struct page *snd_sgbuf_get_page(struct snd_dma_buffer *dmab, size_t offset);