summaryrefslogtreecommitdiff
path: root/sound/core/memalloc_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-09 18:25:50 +0200
committerTakashi Iwai <tiwai@suse.de>2021-06-10 10:15:21 +0200
commita202bd1ad86d59c07f24f0a201c5ade320b51e30 (patch)
tree54a7ef6463fbc5e02033fd9c97d77b6a8c4df195 /sound/core/memalloc_local.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 'sound/core/memalloc_local.h')
-rw-r--r--sound/core/memalloc_local.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/memalloc_local.h b/sound/core/memalloc_local.h
index fe55416253bf..dbea7f2aed07 100644
--- a/sound/core/memalloc_local.h
+++ b/sound/core/memalloc_local.h
@@ -9,6 +9,7 @@ struct snd_malloc_ops {
struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
unsigned int ofs, unsigned int size);
+ int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
};
#ifdef CONFIG_SND_DMA_SGBUF