--- /dev/null
+/**
+ * Opaque structure which corresponds to an instance of a mixer.
+ *
+ * A pointer to a structure of this type is returned by ->open(). This pointer
+ * must be passed to most other methods of \ref struct mixer.
+ */
+struct mixer_handle;
+
+/**
+ * Operations provided by each mixer plugin.
+ */
+struct mixer {
+ /** Called on startup, must fill in all other members. */
+ void (*init)(struct mixer *self);
+ /** Return a handle that can be passed to other methods. */
+ int (*open)(const char *dev, struct mixer_handle **handle);
+ /** Returns a string of all valid mixer channels. */
+ char *(*get_channels)(struct mixer_handle *handle);
+ /** Select the channel for subsequent get/set operations. */
+ int (*set_channel)(struct mixer_handle *handle,
+ const char *mixer_channel);
+ /** Return the (normalized) current value of the selected channel. */
+ int (*get)(struct mixer_handle *handle);
+ /** Change the value of the selected channel. */
+ int (*set)(struct mixer_handle *handle, int val);
+ /** Free all ressources associated with the given handle. */
+ void (*close)(struct mixer_handle **handle);
+};