26 #ifndef __ALSA_CONTROL_EXTERNAL_H
27 #define __ALSA_CONTROL_EXTERNAL_H
43 #define SND_CTL_PLUGIN_ENTRY(name) _snd_ctl_##name##_open
48 #define SND_CTL_PLUGIN_SYMBOL(name) SND_DLSYM_BUILD_VERSION(SND_CTL_PLUGIN_ENTRY(name), SND_CONTROL_DLSYM_VERSION);
53 #define SND_CTL_PLUGIN_DEFINE_FUNC(plugin) \
54 int SND_CTL_PLUGIN_ENTRY(plugin) (snd_ctl_t **handlep, const char *name,\
55 snd_config_t *root, snd_config_t *conf, int mode)
64 typedef int (
snd_ctl_ext_tlv_rw_t)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key,
int op_flag,
unsigned int numid,
65 unsigned int *tlv,
unsigned int tlv_size);
70 #define SND_CTL_EXT_VERSION_MAJOR 1
71 #define SND_CTL_EXT_VERSION_MINOR 0
72 #define SND_CTL_EXT_VERSION_TINY 1
76 #define SND_CTL_EXT_VERSION ((SND_CTL_EXT_VERSION_MAJOR<<16) |\
77 (SND_CTL_EXT_VERSION_MINOR<<8) |\
78 (SND_CTL_EXT_VERSION_TINY))
137 const unsigned int *p;
162 void (*
free_key)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key);
167 int *type,
unsigned int *acc,
unsigned int *count);
172 long *imin,
long *imax,
long *istep);
177 int64_t *imin, int64_t *imax, int64_t *istep);
186 char *name,
size_t name_max_len);
190 int (*
read_integer)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key,
long *value);
194 int (*
read_integer64)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key, int64_t *value);
198 int (*
read_enumerated)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key,
unsigned int *items);
202 int (*
read_bytes)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key,
unsigned char *data,
211 int (*
write_integer)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key,
long *value);
223 int (*
write_bytes)(snd_ctl_ext_t *ext, snd_ctl_ext_key_t key,
unsigned char *data,
248 int (*
poll_revents)(snd_ctl_ext_t *ext,
struct pollfd *pfds,
unsigned int nfds,
unsigned short *revents);
254 typedef enum snd_ctl_ext_access {
255 SND_CTL_EXT_ACCESS_READ = (1<<0),
256 SND_CTL_EXT_ACCESS_WRITE = (1<<1),
257 SND_CTL_EXT_ACCESS_READWRITE = (3<<0),
258 SND_CTL_EXT_ACCESS_VOLATILE = (1<<2),
259 SND_CTL_EXT_ACCESS_TLV_READ = (1<<4),
260 SND_CTL_EXT_ACCESS_TLV_WRITE = (1<<5),
261 SND_CTL_EXT_ACCESS_TLV_READWRITE = (3<<4),
262 SND_CTL_EXT_ACCESS_TLV_COMMAND = (1<<6),
263 SND_CTL_EXT_ACCESS_INACTIVE = (1<<8),
264 SND_CTL_EXT_ACCESS_TLV_CALLBACK = (1<<28),
270 #define SND_CTL_EXT_KEY_NOT_FOUND (snd_ctl_ext_key_t)(-1)