aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-10-01 19:25:19 -0400
committerTaylor Holberton <taylorcholberton@gmail.com>2016-10-01 19:25:19 -0400
commit7c8b20a6fec65113df0e2874cfb55cde31c666aa (patch)
tree9b0b947f1e210a5feb9baa5bc4a599dac10a7b67 /src
parent6d58e01d30961c2c84f7f5943695c475370777a1 (diff)
added some documentation to mixer interface
Diffstat (limited to 'src')
-rw-r--r--src/mixer.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mixer.c b/src/mixer.c
index ac294ca..cb1d5cb 100644
--- a/src/mixer.c
+++ b/src/mixer.c
@@ -47,19 +47,34 @@
#include <tinyalsa/asoundlib.h>
+/** A mixer control.
+ * @ingroup tinyalsa-mixer
+ */
struct mixer_ctl {
+ /** The mixer that the mixer control belongs to */
struct mixer *mixer;
struct snd_ctl_elem_info info;
char **ename;
};
+/** A mixer handle.
+ * @ingroup tinyalsa-mixer
+ */
struct mixer {
+ /** File descriptor for the card */
int fd;
+ /** Card information */
struct snd_ctl_card_info card_info;
+ /** A continuous array of mixer controls */
struct mixer_ctl *ctl;
+ /** The number of mixer controls */
unsigned int count;
};
+/** Closes a mixer returned by @ref mixer_open.
+ * @param mixer A mixer handle.
+ * @ingroup tinyalsa-mixer
+ */
void mixer_close(struct mixer *mixer)
{
unsigned int n,m;
@@ -87,6 +102,10 @@ void mixer_close(struct mixer *mixer)
/* TODO: verify frees */
}
+/** Opens a mixer for a given card.
+ * @param card The card to open the mixer for.
+ * @ingroup tinyalsa-mixer
+ */
struct mixer *mixer_open(unsigned int card)
{
struct snd_ctl_elem_list elist;