aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2012-05-28 13:40:33 +0100
committerDimitris Papastamos <dp@opensource.wolfsonmicro.com>2012-10-24 10:42:13 +0100
commitf51c05bfaa7b98be049bb9e08c98b94346802a10 (patch)
tree272b7bb317c92ecb36e595b79bf121b45ff5effe /include
parentfcf66ab156a236ba2bb31df7d4d4611b8b7be431 (diff)
mixer: Add mixer_ctl_{set,get}_bytes()
For binary controls we don't want to go through mixer_ctl_{set,get}_value() as that will trigger many calls to our get()/put() callback in the kernel. Set the entire payload at once and trigger the get()/put() callback once. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Diffstat (limited to 'include')
-rw-r--r--include/tinyalsa/asoundlib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h
index 5894257..bdb4b7a 100644
--- a/include/tinyalsa/asoundlib.h
+++ b/include/tinyalsa/asoundlib.h
@@ -30,6 +30,7 @@
#define ASOUNDLIB_H
#include <sys/time.h>
+#include <stddef.h>
#if defined(__cplusplus)
extern "C" {
@@ -193,7 +194,9 @@ 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_value(struct mixer_ctl *ctl, unsigned int id);
+int mixer_ctl_get_bytes(struct mixer_ctl *ctl, void *data, size_t len);
int mixer_ctl_set_value(struct mixer_ctl *ctl, unsigned int id, int value);
+int mixer_ctl_set_bytes(struct mixer_ctl *ctl, const void *data, size_t len);
int mixer_ctl_set_enum_by_string(struct mixer_ctl *ctl, const char *string);
/* Determe range of integer mixer controls */