Support dl-object cache

Added the support of dl-object caches for PCM plugins.
This commit is contained in:
Takashi Iwai 2005-02-14 15:09:09 +00:00
parent 08fc630594
commit d8f7de1b16
5 changed files with 93 additions and 3 deletions

View file

@ -232,4 +232,9 @@ static inline int snd_open_device(const char *filename, int fmode)
#define snd_open_device(filename, fmode) open(filename, fmode);
#endif
/* dlobj cache */
void *snd_dlobj_cache_lookup(const char *name);
int snd_dlobj_cache_add(const char *name, void *dlobj, void *open_func);
void snd_dlobj_cache_cleanup(void);
#endif

View file

@ -37,10 +37,13 @@ enum {
typedef struct snd_pcm_ioplug snd_pcm_ioplug_t;
typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
#define SND_PCM_IOPLUG_FLAG_LISTED (1<<0)
/* exported pcm data */
struct snd_pcm_ioplug {
/* must be filled before calling snd_pcm_ioplug_create() */
const char *name;
unsigned int flags; /* SND_PCM_IOPLUG_FLAG_XXX */
int poll_fd;
unsigned int poll_events;
unsigned int mmap_rw; /* pseudo mmap */