diff options
author | Simon Wilson <ksattic@gmail.com> | 2011-06-05 18:23:05 -0700 |
---|---|---|
committer | Simon Wilson <ksattic@gmail.com> | 2011-06-05 18:23:05 -0700 |
commit | 066c9f6753dff5e2b8556eeaec986651bf835e08 (patch) | |
tree | 5311166b437c5cc30501e925b859230e1f3c7ba7 /include | |
parent | d2cb5030091760256fcc8e755e686aab746b7697 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/tinyalsa/asoundlib.h | 11 |
1 files changed, 5 insertions, 6 deletions
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 |