mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
Added argument handling for the slave PCMs.
The configuration root (snd_config) can be specified for the internal routines. The pcm_hooks code was recoded (independent code moved to control/setup.c). Improved the pcm_multi plugin (added master configuration).
This commit is contained in:
parent
61bf03ce70
commit
bf780a25a5
29 changed files with 1179 additions and 1070 deletions
|
|
@ -43,6 +43,7 @@ int snd_config_expand(snd_config_t *config, const char *args,
|
|||
|
||||
int snd_config_add(snd_config_t *config, snd_config_t *leaf);
|
||||
int snd_config_delete(snd_config_t *config);
|
||||
int snd_config_copy(snd_config_t **dst, snd_config_t *src);
|
||||
|
||||
int snd_config_make(snd_config_t **config, const char *key,
|
||||
snd_config_type_t type);
|
||||
|
|
@ -55,9 +56,11 @@ int snd_config_set_id(snd_config_t *config, const char *id);
|
|||
int snd_config_set_integer(snd_config_t *config, long value);
|
||||
int snd_config_set_real(snd_config_t *config, double value);
|
||||
int snd_config_set_string(snd_config_t *config, const char *value);
|
||||
int snd_config_set_ascii(snd_config_t *config, const char *ascii);
|
||||
int snd_config_get_integer(snd_config_t *config, long *value);
|
||||
int snd_config_get_real(snd_config_t *config, double *value);
|
||||
int snd_config_get_string(snd_config_t *config, const char **value);
|
||||
int snd_config_get_ascii(snd_config_t *config, char **value);
|
||||
|
||||
snd_config_iterator_t snd_config_iterator_first(snd_config_t *node);
|
||||
snd_config_iterator_t snd_config_iterator_next(snd_config_iterator_t iterator);
|
||||
|
|
@ -80,10 +83,24 @@ const char *snd_config_get_id(snd_config_t *config);
|
|||
extern snd_config_t *snd_config;
|
||||
int snd_config_update(void);
|
||||
|
||||
/* Misc functions */
|
||||
|
||||
int snd_config_get_bool_ascii(const char *ascii);
|
||||
int snd_config_get_bool(snd_config_t *conf);
|
||||
int snd_config_get_ctl_iface_ascii(const char *ascii);
|
||||
int snd_config_get_ctl_iface(snd_config_t *conf);
|
||||
|
||||
typedef int (snd_config_string_replace_callback_t)(const char *what, char **dst, void *private_data);
|
||||
|
||||
int snd_config_string_replace(const char *src, char idchr,
|
||||
snd_config_string_replace_callback_t *callback,
|
||||
void *private_data,
|
||||
char **dst);
|
||||
int snd_config_redirect_load(snd_config_t *root, snd_config_t *config,
|
||||
char **name, snd_config_t **dst_config,
|
||||
int *dst_dynamic);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -246,12 +246,8 @@ typedef enum _snd_ctl_type {
|
|||
/** CTL handle */
|
||||
typedef struct _snd_ctl snd_ctl_t;
|
||||
|
||||
/** SCTL replace type */
|
||||
typedef struct {
|
||||
const char *key;
|
||||
const char *old_value;
|
||||
const char *new_value;
|
||||
} snd_sctl_replace_t;
|
||||
/** Don't destroy the ctl handle when close */
|
||||
#define SND_SCTL_NOFREE 0x0001
|
||||
|
||||
/** SCTL type */
|
||||
typedef struct _snd_sctl snd_sctl_t;
|
||||
|
|
@ -269,8 +265,12 @@ int snd_card_get_longname(int card, char **name);
|
|||
int snd_card_type_string_to_enum(const char *strid, snd_card_type_t *enumid);
|
||||
int snd_card_type_enum_to_string(snd_card_type_t enumid, char **strid);
|
||||
|
||||
int snd_sctl_build(snd_ctl_t *ctl, snd_sctl_t **setup, snd_config_t *config, snd_sctl_replace_t *replace);
|
||||
int snd_sctl_free(snd_ctl_t *ctl, snd_sctl_t *setup);
|
||||
int snd_sctl_build(snd_sctl_t **ctl, snd_ctl_t *handle, snd_config_t *config,
|
||||
snd_config_string_replace_callback_t *callback,
|
||||
void *private_data, int mode);
|
||||
int snd_sctl_free(snd_sctl_t *handle);
|
||||
int snd_sctl_install(snd_sctl_t *handle);
|
||||
int snd_sctl_remove(snd_sctl_t *handle);
|
||||
|
||||
int snd_ctl_open(snd_ctl_t **ctl, const char *name, int mode);
|
||||
int snd_ctl_close(snd_ctl_t *ctl);
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ typedef enum _snd_set_mode {
|
|||
size_t page_align(size_t size);
|
||||
size_t page_size(void);
|
||||
|
||||
int safe_strtol(const char *str, long *val);
|
||||
|
||||
#define HAVE_GNU_LD
|
||||
#define HAVE_ELF
|
||||
#define HAVE_ASM_PREVIOUS_DIRECTIVE
|
||||
|
|
|
|||
|
|
@ -731,6 +731,7 @@ typedef struct _snd_pcm_hook snd_pcm_hook_t;
|
|||
typedef int (*snd_pcm_hook_func_t)(snd_pcm_hook_t *hook);
|
||||
snd_pcm_t *snd_pcm_hook_get_pcm(snd_pcm_hook_t *hook);
|
||||
void *snd_pcm_hook_get_private(snd_pcm_hook_t *hook);
|
||||
void snd_pcm_hook_set_private(snd_pcm_hook_t *hook, void *private_data);
|
||||
int snd_pcm_hook_add(snd_pcm_hook_t **hookp, snd_pcm_t *pcm,
|
||||
snd_pcm_hook_type_t type,
|
||||
snd_pcm_hook_func_t func, void *private_data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue