From 066c9f6753dff5e2b8556eeaec986651bf835e08 Mon Sep 17 00:00:00 2001 From: Simon Wilson Date: Sun, 5 Jun 2011 18:23:05 -0700 Subject: Add enum support to mixer - simplify interface for setting/getting enum values - implement enum string get function - update tinymix to deal with enums - rename set/get_int functions because of supported types --- include/tinyalsa/asoundlib.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index 34e5f8c..2965c17 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -119,16 +119,15 @@ int mixer_ctl_get_name(struct mixer_ctl *ctl, char *name, unsigned int size); enum mixer_ctl_type mixer_ctl_get_type(struct mixer_ctl *ctl); const char *mixer_ctl_get_type_string(struct mixer_ctl *ctl); unsigned int mixer_ctl_get_num_values(struct mixer_ctl *ctl); +unsigned int mixer_ctl_get_num_enums(struct mixer_ctl *ctl); +int mixer_ctl_get_enum_string(struct mixer_ctl *ctl, unsigned int enum_id, + char *string, unsigned int size); /* Set and get mixer controls */ int mixer_ctl_get_percent(struct mixer_ctl *ctl, unsigned int id); int mixer_ctl_set_percent(struct mixer_ctl *ctl, unsigned int id, int percent); -int mixer_ctl_get_int(struct mixer_ctl *ctl, unsigned int id); -int mixer_ctl_set_int(struct mixer_ctl *ctl, unsigned int id, int value); - -int mixer_ctl_get_enum(struct mixer_ctl *ctl, const char *string, unsigned int size); -int mixer_ctl_set_enum(struct mixer_ctl *ctl, unsigned int value); -int mixer_ctl_set_enum_by_name(struct mixer_ctl *ctl, const char *string); +int mixer_ctl_get_value(struct mixer_ctl *ctl, unsigned int id); +int mixer_ctl_set_value(struct mixer_ctl *ctl, unsigned int id, int value); #endif -- cgit v1.2.3