xref: /openbmc/linux/sound/core/memalloc_local.h (revision 5a55b51a)
137af81c5STakashi Iwai // SPDX-License-Identifier: GPL-2.0-only
237af81c5STakashi Iwai #ifndef __MEMALLOC_LOCAL_H
337af81c5STakashi Iwai #define __MEMALLOC_LOCAL_H
437af81c5STakashi Iwai 
537af81c5STakashi Iwai struct snd_malloc_ops {
6723c1252STakashi Iwai 	void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
737af81c5STakashi Iwai 	void (*free)(struct snd_dma_buffer *dmab);
837af81c5STakashi Iwai 	dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset);
937af81c5STakashi Iwai 	struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
1037af81c5STakashi Iwai 	unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
1137af81c5STakashi Iwai 				       unsigned int ofs, unsigned int size);
12a202bd1aSTakashi Iwai 	int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
13*a25684a9STakashi Iwai 	void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode);
1437af81c5STakashi Iwai };
1537af81c5STakashi Iwai 
1637af81c5STakashi Iwai #endif /* __MEMALLOC_LOCAL_H */
17