28#ifndef __ALSA_GLOBAL_H_
29#define __ALSA_GLOBAL_H_
49#ifndef ATTRIBUTE_UNUSED
51#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
57#define __SND_DLSYM_VERSION(name, version) _ ## name ## version
62#define SND_DLSYM_BUILD_VERSION(name, version) char __SND_DLSYM_VERSION(name, version);
66struct snd_dlsym_link {
67 struct snd_dlsym_link *next;
68 const char *dlsym_name;
69 const void *dlsym_ptr;
72extern struct snd_dlsym_link *snd_dlsym_start;
75#define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
80#define SND_DLSYM_BUILD_VERSION(name, version) \
81 static struct snd_dlsym_link __SND_DLSYM_VERSION(snd_dlsym_, name, version); \
82 void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
83 void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
84 __SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
85 __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = # name; \
86 __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
87 snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
98#define SND_DLSYM_VERSION(version) __STRING(version)
100int snd_dlpath(
char *path,
size_t path_len,
const char *name);
101void *
snd_dlopen(
const char *file,
int mode,
char *errbuf,
size_t errbuflen);
102void *
snd_dlsym(
void *handle,
const char *name,
const char *version);
107#define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
131struct snd_shm_area *snd_shm_area_create(
int shmid,
void *
ptr);
132struct snd_shm_area *snd_shm_area_share(
struct snd_shm_area *area);
133int snd_shm_area_destroy(
struct snd_shm_area *area);
138#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
void * snd_dlsym(void *handle, const char *name, const char *version)
Resolves a symbol from a dynamic library - ALSA wrapper for dlsym.
Definition: dlmisc.c:244
int snd_async_del_handler(snd_async_handler_t *handler)
Deletes an async handler.
Definition: async.c:148
void * snd_dlopen(const char *file, int mode, char *errbuf, size_t errbuflen)
Opens a dynamic library - ALSA wrapper for dlopen.
Definition: dlmisc.c:122
struct timespec snd_htimestamp_t
Definition: global.h:154
int snd_dlclose(void *handle)
Closes a dynamic library - ALSA wrapper for dlclose.
Definition: dlmisc.c:184
struct _snd_async_handler snd_async_handler_t
Internal structure for an async notification client handler.
Definition: global.h:115
int snd_user_file(const char *file, char **result)
Get the full file name.
Definition: userfile.c:72
int snd_async_handler_get_signo(snd_async_handler_t *handler)
Returns the signal number assigned to an async handler.
Definition: async.c:195
const char * snd_asoundlib_version(void)
Returns the ALSA sound library version in ASCII format.
Definition: error.c:143
int snd_async_handler_get_fd(snd_async_handler_t *handler)
Returns the file descriptor assigned to an async handler.
Definition: async.c:206
struct timeval snd_timestamp_t
Definition: global.h:152
void * snd_async_handler_get_callback_private(snd_async_handler_t *handler)
Returns the private data assigned to an async handler.
Definition: async.c:217
int snd_dlpath(char *path, size_t path_len, const char *name)
Compose the dynamic path.
Definition: dlmisc.c:90
void(* snd_async_callback_t)(snd_async_handler_t *handler)
Async notification callback.
Definition: global.h:122
int snd_async_add_handler(snd_async_handler_t **handler, int fd, snd_async_callback_t callback, void *private_data)
Registers an async handler.
Definition: async.c:110
void * ptr
Definition: seq_event.h:1