1 // SPDX-License-Identifier: GPL-2.0-only
2 #ifndef __MEMALLOC_LOCAL_H
3 #define __MEMALLOC_LOCAL_H
5 struct snd_malloc_ops {
6 void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
7 void (*free)(struct snd_dma_buffer *dmab);
8 dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset);
9 struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
10 unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
11 unsigned int ofs, unsigned int size);
12 int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
15 #ifdef CONFIG_SND_DMA_SGBUF
16 extern const struct snd_malloc_ops snd_dma_sg_ops;
19 #endif /* __MEMALLOC_LOCAL_H */