From b29ac1ab6b1f4d78017d652e850a96893347fc29 Mon Sep 17 00:00:00 2001 From: Simon Wilson Date: Thu, 8 Mar 2012 10:15:08 -0800 Subject: mixer: simplify string get APIs Just like the pcm_get_error() API, simplify the mixer API functions to return pointers to constant strings instead of making copies of strings. --- include/tinyalsa/asoundlib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index cac2786..704354e 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -166,13 +166,13 @@ struct mixer_ctl *mixer_get_ctl(struct mixer *mixer, unsigned int id); struct mixer_ctl *mixer_get_ctl_by_name(struct mixer *mixer, const char *name); /* Get info about mixer controls */ -int mixer_ctl_get_name(struct mixer_ctl *ctl, char *name, unsigned int size); +const char *mixer_ctl_get_name(struct mixer_ctl *ctl); 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); +const char *mixer_ctl_get_enum_string(struct mixer_ctl *ctl, + unsigned int enum_id); /* Set and get mixer controls */ int mixer_ctl_get_percent(struct mixer_ctl *ctl, unsigned int id); -- cgit v1.2.3