#include <linux/pci.h>
#include <linux/gfp.h>
#include <linux/time.h>
#include <linux/mutex.h>
#include <linux/export.h>
#include <sound/core.h>
#include <sound/emu10k1.h>
#define __set_ptb_entry(emu,page,addr) …
#define __get_ptb_entry(emu, page) …
#define UNIT_PAGES …
#define MAX_ALIGN_PAGES0 …
#define MAX_ALIGN_PAGES1 …
#define get_aligned_page(offset) …
#define aligned_page_offset(page) …
#if PAGE_SIZE == EMUPAGESIZE && !IS_ENABLED(CONFIG_DYNAMIC_DEBUG)
#define set_ptb_entry …
#define set_silent_ptb …
#else
static inline void set_ptb_entry(struct snd_emu10k1 *emu, int page, dma_addr_t addr)
{ … }
static inline void set_silent_ptb(struct snd_emu10k1 *emu, int page)
{ … }
#endif
static int synth_alloc_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);
static int synth_free_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);
#define get_emu10k1_memblk(l,member) …
static void emu10k1_memblk_init(struct snd_emu10k1_memblk *blk)
{ … }
static int search_empty_map_area(struct snd_emu10k1 *emu, int npages, struct list_head **nextp)
{ … }
static int map_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{ … }
static int unmap_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{ … }
static struct snd_emu10k1_memblk *
search_empty(struct snd_emu10k1 *emu, int size)
{ … }
static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr)
{ … }
int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{ … }
EXPORT_SYMBOL(…);
struct snd_util_memblk *
snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream)
{ … }
int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk)
{ … }
int snd_emu10k1_alloc_pages_maybe_wider(struct snd_emu10k1 *emu, size_t size,
struct snd_dma_buffer *dmab)
{ … }
struct snd_util_memblk *
snd_emu10k1_synth_alloc(struct snd_emu10k1 *hw, unsigned int size)
{ … }
EXPORT_SYMBOL(…);
int
snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk)
{ … }
EXPORT_SYMBOL(…);
static void get_single_page_range(struct snd_util_memhdr *hdr,
struct snd_emu10k1_memblk *blk,
int *first_page_ret, int *last_page_ret)
{ … }
static void __synth_free_pages(struct snd_emu10k1 *emu, int first_page,
int last_page)
{ … }
static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{ … }
static int synth_free_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
{ … }
static inline void *offset_ptr(struct snd_emu10k1 *emu, int page, int offset)
{ … }
int snd_emu10k1_synth_memset(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
int offset, int size, u8 value)
{ … }
EXPORT_SYMBOL(…);
static void xor_range(void *ptr, int size, u32 value)
{ … }
int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
int offset, const char __user *data, int size, u32 xor)
{ … }
EXPORT_SYMBOL(…);