ALSA project - the C library reference
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mixer.c File Reference

Mixer Interface. More...


int snd_mixer_open (snd_mixer_t **mixerp, int mode)
 Opens an empty mixer.
int snd_mixer_elem_attach (snd_mixer_elem_t *melem, snd_hctl_elem_t *helem)
 Attach an HCTL element to a mixer element.
int snd_mixer_elem_detach (snd_mixer_elem_t *melem, snd_hctl_elem_t *helem)
 Detach an HCTL element from a mixer element.
int snd_mixer_elem_empty (snd_mixer_elem_t *melem)
 Return true if a mixer element does not contain any HCTL elements.
int snd_mixer_attach (snd_mixer_t *mixer, const char *name)
 Attach an HCTL specified with the CTL device name to an opened mixer.
int snd_mixer_attach_hctl (snd_mixer_t *mixer, snd_hctl_t *hctl)
 Attach an HCTL to an opened mixer.
int snd_mixer_detach (snd_mixer_t *mixer, const char *name)
 Detach a previously attached HCTL to an opened mixer freeing all related resources.
int snd_mixer_detach_hctl (snd_mixer_t *mixer, snd_hctl_t *hctl)
 Detach a previously attached HCTL to an opened mixer freeing all related resources.
int snd_mixer_get_hctl (snd_mixer_t *mixer, const char *name, snd_hctl_t **hctl)
 Obtain a HCTL pointer associated to given name.
void * snd_mixer_elem_get_private (const snd_mixer_elem_t *elem)
 Get private data associated to give mixer element.
int snd_mixer_elem_new (snd_mixer_elem_t **elem, snd_mixer_elem_type_t type, int compare_weight, void *private_data, void(*private_free)(snd_mixer_elem_t *elem))
 Allocate a new mixer element.
int snd_mixer_elem_add (snd_mixer_elem_t *elem, snd_mixer_class_t *class)
 Add an element for a registered mixer element class.
int snd_mixer_elem_remove (snd_mixer_elem_t *elem)
 Remove a mixer element.
void snd_mixer_elem_free (snd_mixer_elem_t *elem)
 Free a mixer element.
int snd_mixer_elem_info (snd_mixer_elem_t *elem)
 Mixer element informations are changed.
int snd_mixer_elem_value (snd_mixer_elem_t *elem)
 Mixer element values is changed.
int snd_mixer_class_register (snd_mixer_class_t *class, snd_mixer_t *mixer)
 Register mixer element class.
int snd_mixer_class_unregister (snd_mixer_class_t *class)
 Unregister mixer element class and remove all its elements.
int snd_mixer_load (snd_mixer_t *mixer)
 Load a mixer elements.
void snd_mixer_free (snd_mixer_t *mixer)
 Unload all mixer elements and free all related resources.
int snd_mixer_close (snd_mixer_t *mixer)
 Close a mixer and free all related resources.
int snd_mixer_set_compare (snd_mixer_t *mixer, snd_mixer_compare_t compare)
 Change mixer compare function and reorder elements.
int snd_mixer_poll_descriptors_count (snd_mixer_t *mixer)
 get count of poll descriptors for mixer handle
int snd_mixer_poll_descriptors (snd_mixer_t *mixer, struct pollfd *pfds, unsigned int space)
 get poll descriptors
int snd_mixer_poll_descriptors_revents (snd_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
 get returned events from poll descriptors
int snd_mixer_wait (snd_mixer_t *mixer, int timeout)
 Wait for a mixer to become ready (i.e. at least one event pending)
snd_mixer_elem_tsnd_mixer_first_elem (snd_mixer_t *mixer)
 get first element for a mixer
snd_mixer_elem_tsnd_mixer_last_elem (snd_mixer_t *mixer)
 get last element for a mixer
snd_mixer_elem_tsnd_mixer_elem_next (snd_mixer_elem_t *elem)
 get next mixer element
snd_mixer_elem_tsnd_mixer_elem_prev (snd_mixer_elem_t *elem)
 get previous mixer element
int snd_mixer_handle_events (snd_mixer_t *mixer)
 Handle pending mixer events invoking callbacks.
void snd_mixer_set_callback (snd_mixer_t *obj, snd_mixer_callback_t val)
 Set callback function for a mixer.
void snd_mixer_set_callback_private (snd_mixer_t *mixer, void *val)
 Set callback private value for a mixer.
void * snd_mixer_get_callback_private (const snd_mixer_t *mixer)
 Get callback private value for a mixer.
unsigned int snd_mixer_get_count (const snd_mixer_t *mixer)
 Get elements count for a mixer.
void snd_mixer_elem_set_callback (snd_mixer_elem_t *mixer, snd_mixer_elem_callback_t val)
 Set callback function for a mixer element.
void snd_mixer_elem_set_callback_private (snd_mixer_elem_t *mixer, void *val)
 Set callback private value for a mixer element.
void * snd_mixer_elem_get_callback_private (const snd_mixer_elem_t *mixer)
 Get callback private value for a mixer element.
snd_mixer_elem_type_t snd_mixer_elem_get_type (const snd_mixer_elem_t *mixer)
 Get type for a mixer element.
size_t snd_mixer_class_sizeof ()
 get size of snd_mixer_class_t
int snd_mixer_class_malloc (snd_mixer_class_t **ptr)
 allocate an invalid snd_mixer_class_t using standard malloc
void snd_mixer_class_free (snd_mixer_class_t *obj)
 frees a previously allocated snd_mixer_class_t
void snd_mixer_class_copy (snd_mixer_class_t *dst, const snd_mixer_class_t *src)
 copy one snd_mixer_class_t to another
snd_mixer_tsnd_mixer_class_get_mixer (const snd_mixer_class_t *obj)
 Get a mixer associated to given mixer class.
snd_mixer_event_t snd_mixer_class_get_event (const snd_mixer_class_t *obj)
 Get mixer event callback associated to given mixer class.
void * snd_mixer_class_get_private (const snd_mixer_class_t *obj)
 Get mixer private data associated to given mixer class.
snd_mixer_compare_t snd_mixer_class_get_compare (const snd_mixer_class_t *obj)
 Get mixer compare callback associated to given mixer class.
int snd_mixer_class_set_event (snd_mixer_class_t *obj, snd_mixer_event_t event)
 Set mixer event callback to given mixer class.
int snd_mixer_class_set_private (snd_mixer_class_t *obj, void *private_data)
 Set mixer private data to given mixer class.
int snd_mixer_class_set_private_free (snd_mixer_class_t *obj, void(*private_free)(snd_mixer_class_t *))
 Set mixer private data free callback to given mixer class.
int snd_mixer_class_set_compare (snd_mixer_class_t *obj, snd_mixer_compare_t compare)
 Set mixer compare callback to given mixer class.

Detailed Description

Mixer Interface.

Jaroslav Kysela
Abramo Bagnara

Mixer interface is designed to access mixer elements. Callbacks may be used for event handling.