Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 #ifndef __MEMALLOC_LOCAL_H
0003 #define __MEMALLOC_LOCAL_H
0004 
0005 struct snd_malloc_ops {
0006     void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
0007     void (*free)(struct snd_dma_buffer *dmab);
0008     dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset);
0009     struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
0010     unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
0011                        unsigned int ofs, unsigned int size);
0012     int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
0013     void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode);
0014 };
0015 
0016 #ifdef CONFIG_SND_DMA_SGBUF
0017 extern const struct snd_malloc_ops snd_dma_sg_ops;
0018 #endif
0019 
0020 #endif /* __MEMALLOC_LOCAL_H */