Loading...
Searching...
No Matches
Simple Mixer Interface
Mixer Interface

## Data Structures

struct | snd_mixer_selem_regopt

## Macros

#define | snd_mixer_selem_id_alloca(ptr)
| allocate an invalid snd_mixer_selem_id_t using standard alloca

## Typedefs

typedef struct _snd_mixer_selem_id | snd_mixer_selem_id_t

## Enumerations

enum | snd_mixer_selem_channel_id_t { SND_MIXER_SCHN_UNKNOWN = -1 , SND_MIXER_SCHN_FRONT_LEFT = 0 , SND_MIXER_SCHN_FRONT_RIGHT , SND_MIXER_SCHN_REAR_LEFT , SND_MIXER_SCHN_REAR_RIGHT , SND_MIXER_SCHN_FRONT_CENTER , SND_MIXER_SCHN_WOOFER , SND_MIXER_SCHN_SIDE_LEFT , SND_MIXER_SCHN_SIDE_RIGHT , SND_MIXER_SCHN_REAR_CENTER , SND_MIXER_SCHN_LAST = 31 , SND_MIXER_SCHN_MONO = SND_MIXER_SCHN_FRONT_LEFT }
enum | snd_mixer_selem_regopt_abstract { SND_MIXER_SABSTRACT_NONE = 0 , SND_MIXER_SABSTRACT_BASIC }

## Functions

const char * | snd_mixer_selem_channel_name (snd_mixer_selem_channel_id_t channel)
| Return name of mixer simple element channel.
int | snd_mixer_selem_register (snd_mixer_t *mixer, struct snd_mixer_selem_regopt *options, snd_mixer_class_t **classp)
| Register mixer simple element class.
void | snd_mixer_selem_get_id (snd_mixer_elem_t *element, snd_mixer_selem_id_t *id)
| Get mixer simple element identifier.
const char * | snd_mixer_selem_get_name (snd_mixer_elem_t *elem)
| Get name part of mixer simple element identifier.
unsigned int | snd_mixer_selem_get_index (snd_mixer_elem_t *elem)
| Get index part of mixer simple element identifier.
snd_mixer_elem_t * | snd_mixer_find_selem (snd_mixer_t *mixer, const snd_mixer_selem_id_t *id)
| Find a mixer simple element.
int | snd_mixer_selem_is_active (snd_mixer_elem_t *elem)
| Get info about the active state of a mixer simple element.
int | snd_mixer_selem_is_playback_mono (snd_mixer_elem_t *elem)
| Get info about channels of playback stream of a mixer simple element.
int | snd_mixer_selem_has_playback_channel (snd_mixer_elem_t *obj, snd_mixer_selem_channel_id_t channel)
| Get info about channels of playback stream of a mixer simple element.
int | snd_mixer_selem_is_capture_mono (snd_mixer_elem_t *elem)
| Get info about channels of capture stream of a mixer simple element.
int | snd_mixer_selem_has_capture_channel (snd_mixer_elem_t *obj, snd_mixer_selem_channel_id_t channel)
| Get info about channels of capture stream of a mixer simple element.
int | snd_mixer_selem_get_capture_group (snd_mixer_elem_t *elem)
| Return info about capture switch control of a mixer simple element.
int | snd_mixer_selem_has_common_volume (snd_mixer_elem_t *elem)
| Return true if mixer simple element has only one volume control for both playback and capture.
int | snd_mixer_selem_has_playback_volume (snd_mixer_elem_t *elem)
| Return info about playback volume control of a mixer simple element.
int | snd_mixer_selem_has_playback_volume_joined (snd_mixer_elem_t *elem)
| Return info about playback volume control of a mixer simple element.
int | snd_mixer_selem_has_capture_volume (snd_mixer_elem_t *elem)
| Return info about capture volume control of a mixer simple element.
int | snd_mixer_selem_has_capture_volume_joined (snd_mixer_elem_t *elem)
| Return info about capture volume control of a mixer simple element.
int | snd_mixer_selem_has_common_switch (snd_mixer_elem_t *elem)
| Return true if mixer simple element has only one switch control for both playback and capture.
int | snd_mixer_selem_has_playback_switch (snd_mixer_elem_t *elem)
| Return info about playback switch control existence of a mixer simple element.
int | snd_mixer_selem_has_playback_switch_joined (snd_mixer_elem_t *elem)
| Return info about playback switch control of a mixer simple element.
int | snd_mixer_selem_has_capture_switch (snd_mixer_elem_t *elem)
| Return info about capture switch control existence of a mixer simple element.
int | snd_mixer_selem_has_capture_switch_joined (snd_mixer_elem_t *elem)
| Return info about capture switch control of a mixer simple element.
int | snd_mixer_selem_has_capture_switch_exclusive (snd_mixer_elem_t *elem)
| Return info about capture switch control of a mixer simple element.
int | snd_mixer_selem_ask_playback_vol_dB (snd_mixer_elem_t *elem, long value, long *dBvalue)
| Return corresponding dB value to an integer playback volume for a mixer simple element.
int | snd_mixer_selem_ask_capture_vol_dB (snd_mixer_elem_t *elem, long value, long *dBvalue)
| Return corresponding dB value to an integer capture volume for a mixer simple element.
int | snd_mixer_selem_ask_playback_dB_vol (snd_mixer_elem_t *elem, long dBvalue, int dir, long *value)
| Return corresponding integer playback volume for given dB value for a mixer simple element.
int | snd_mixer_selem_ask_capture_dB_vol (snd_mixer_elem_t *elem, long dBvalue, int dir, long *value)
| Return corresponding integer capture volume for given dB value for a mixer simple element.
int | snd_mixer_selem_get_playback_volume (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long *value)
| Return value of playback volume control of a mixer simple element.
int | snd_mixer_selem_get_capture_volume (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long *value)
| Return value of capture volume control of a mixer simple element.
int | snd_mixer_selem_get_playback_dB (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long *value)
| Return value of playback volume in dB control of a mixer simple element.
int | snd_mixer_selem_get_capture_dB (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long *value)
| Return value of capture volume in dB control of a mixer simple element.
int | snd_mixer_selem_get_playback_switch (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, int *value)
| Return value of playback switch control of a mixer simple element.
int | snd_mixer_selem_get_capture_switch (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, int *value)
| Return value of capture switch control of a mixer simple element.
int | snd_mixer_selem_set_playback_volume (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value)
| Set value of playback volume control of a mixer simple element.
int | snd_mixer_selem_set_capture_volume (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value)
| Set value of capture volume control of a mixer simple element.
int | snd_mixer_selem_set_playback_dB (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value, int dir)
| Set value in dB of playback volume control of a mixer simple element.
int | snd_mixer_selem_set_capture_dB (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value, int dir)
| Set value in dB of capture volume control of a mixer simple element.
int | snd_mixer_selem_set_playback_volume_all (snd_mixer_elem_t *elem, long value)
| Set value of playback volume control for all channels of a mixer simple element.
int | snd_mixer_selem_set_capture_volume_all (snd_mixer_elem_t *elem, long value)
| Set value of capture volume control for all channels of a mixer simple element.
int | snd_mixer_selem_set_playback_dB_all (snd_mixer_elem_t *elem, long value, int dir)
| Set value in dB of playback volume control for all channels of a mixer simple element.
int | snd_mixer_selem_set_capture_dB_all (snd_mixer_elem_t *elem, long value, int dir)
| Set value in dB of capture volume control for all channels of a mixer simple element.
int | snd_mixer_selem_set_playback_switch (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, int value)
| Set value of playback switch control of a mixer simple element.
int | snd_mixer_selem_set_capture_switch (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, int value)
| Set value of capture switch control of a mixer simple element.
int | snd_mixer_selem_set_playback_switch_all (snd_mixer_elem_t *elem, int value)
| Set value of playback switch control for all channels of a mixer simple element.
int | snd_mixer_selem_set_capture_switch_all (snd_mixer_elem_t *elem, int value)
| Set value of capture switch control for all channels of a mixer simple element.
int | snd_mixer_selem_get_playback_volume_range (snd_mixer_elem_t *elem, long *min, long *max)
| Get range for playback volume of a mixer simple element.
int | snd_mixer_selem_get_playback_dB_range (snd_mixer_elem_t *elem, long *min, long *max)
| Get range in dB for playback volume of a mixer simple element.
int | snd_mixer_selem_set_playback_volume_range (snd_mixer_elem_t *elem, long min, long max)
| Set range for playback volume of a mixer simple element.
int | snd_mixer_selem_get_capture_volume_range (snd_mixer_elem_t *elem, long *min, long *max)
| Get range for capture volume of a mixer simple element.
int | snd_mixer_selem_get_capture_dB_range (snd_mixer_elem_t *elem, long *min, long *max)
| Get range in dB for capture volume of a mixer simple element.
int | snd_mixer_selem_set_capture_volume_range (snd_mixer_elem_t *elem, long min, long max)
| Set range for capture volume of a mixer simple element.
int | snd_mixer_selem_is_enumerated (snd_mixer_elem_t *elem)
| Return true if mixer simple element is an enumerated control.
int | snd_mixer_selem_is_enum_playback (snd_mixer_elem_t *elem)
| Return true if mixer simple enumerated element belongs to the playback direction.
int | snd_mixer_selem_is_enum_capture (snd_mixer_elem_t *elem)
| Return true if mixer simple enumerated element belongs to the capture direction.
int | snd_mixer_selem_get_enum_items (snd_mixer_elem_t *elem)
| Return the number of enumerated items of the given mixer simple element.
int | snd_mixer_selem_get_enum_item_name (snd_mixer_elem_t *elem, unsigned int idx, size_t maxlen, char *str)
| get the enumerated item string for the given mixer simple element
int | snd_mixer_selem_get_enum_item (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, unsigned int *idxp)
| get the current selected enumerated item for the given mixer simple element
int | snd_mixer_selem_set_enum_item (snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, unsigned int idx)
| set the current selected enumerated item for the given mixer simple element
size_t | snd_mixer_selem_id_sizeof (void)
| get size of snd_mixer_selem_id_t
int | snd_mixer_selem_id_malloc (snd_mixer_selem_id_t **ptr)
| allocate an invalid snd_mixer_selem_id_t using standard malloc
void | snd_mixer_selem_id_free (snd_mixer_selem_id_t *obj)
| frees a previously allocated snd_mixer_selem_id_t
void | snd_mixer_selem_id_copy (snd_mixer_selem_id_t *dst, const snd_mixer_selem_id_t *src)
| copy one snd_mixer_selem_id_t to another
const char * | snd_mixer_selem_id_get_name (const snd_mixer_selem_id_t *obj)
| Get name part of a mixer simple element identifier.
unsigned int | snd_mixer_selem_id_get_index (const snd_mixer_selem_id_t *obj)
| Get index part of a mixer simple element identifier.
void | snd_mixer_selem_id_set_name (snd_mixer_selem_id_t *obj, const char *val)
| Set name part of a mixer simple element identifier.
void | snd_mixer_selem_id_set_index (snd_mixer_selem_id_t *obj, unsigned int val)
| Set index part of a mixer simple element identifier.
int | snd_mixer_selem_id_parse (snd_mixer_selem_id_t *dst, const char *str)
| Parse ASCII simple mixer element identifier.

## Detailed Description

The simple mixer interface.

## Macro Definition Documentation

## snd_mixer_selem_id_alloca

#define snd_mixer_selem_id_alloca | ( |  | ptr | ) |

allocate an invalid snd_mixer_selem_id_t using standard alloca

Parameters

  ptr | returned pointer

## Typedef Documentation

## snd_mixer_selem_id_t

typedef struct _snd_mixer_selem_id snd_mixer_selem_id_t

Mixer simple element identifier

## Enumeration Type Documentation

## snd_mixer_selem_channel_id_t

enum snd_mixer_selem_channel_id_t

Mixer simple element channel identifier

Enumerator
SND_MIXER_SCHN_UNKNOWN | Unknown
SND_MIXER_SCHN_FRONT_LEFT | Front left
SND_MIXER_SCHN_FRONT_RIGHT | Front right
SND_MIXER_SCHN_REAR_LEFT | Rear left
SND_MIXER_SCHN_REAR_RIGHT | Rear right
SND_MIXER_SCHN_FRONT_CENTER | Front center
SND_MIXER_SCHN_WOOFER | Woofer
SND_MIXER_SCHN_SIDE_LEFT | Side Left
SND_MIXER_SCHN_SIDE_RIGHT | Side Right
SND_MIXER_SCHN_REAR_CENTER | Rear Center
SND_MIXER_SCHN_MONO | Mono (Front left alias)

## snd_mixer_selem_regopt_abstract

enum snd_mixer_selem_regopt_abstract

Mixer simple element - register options - abstraction level

Enumerator
SND_MIXER_SABSTRACT_NONE | no abstraction - try use all universal controls from driver
SND_MIXER_SABSTRACT_BASIC | basic abstraction - Master,PCM,CD,Aux,Record-Gain etc.

## Function Documentation

## snd_mixer_find_selem()

snd_mixer_elem_t * snd_mixer_find_selem | ( | snd_mixer_t * | mixer,
|  | const snd_mixer_selem_id_t * | id )

Find a mixer simple element.

Parameters

  mixer | Mixer handle
  id | Mixer simple element identifier

Returns
  mixer simple element handle or NULL if not found

## snd_mixer_selem_ask_capture_dB_vol()

int snd_mixer_selem_ask_capture_dB_vol | ( | snd_mixer_elem_t * | elem,
|  | long | dBvalue,
|  | int | dir,
|  | long * | value )

Return corresponding integer capture volume for given dB value for a mixer simple element.

Parameters

  elem | Mixer simple element handle
  dBvalue | dB value to be converted to integer range
  value | pointer to returned integer value
  dir | rounding mode - rounds up if dir > 0, round to nearest if dir == 0, rounds down if dir < 0

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_ask_capture_vol_dB()

int snd_mixer_selem_ask_capture_vol_dB | ( | snd_mixer_elem_t * | elem,
|  | long | value,
|  | long * | dBvalue )

Return corresponding dB value to an integer capture volume for a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | value to be converted to dB range
  dBvalue | pointer to returned dB value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_ask_playback_dB_vol()

int snd_mixer_selem_ask_playback_dB_vol | ( | snd_mixer_elem_t * | elem,
|  | long | dBvalue,
|  | int | dir,
|  | long * | value )

Return corresponding integer playback volume for given dB value for a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | value to be converted to dB range
  dir | rounding mode - rounds up if dir > 0, round to nearest if dir == 0, rounds down if dir < 0
  dBvalue | pointer to returned dB value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_ask_playback_vol_dB()

int snd_mixer_selem_ask_playback_vol_dB | ( | snd_mixer_elem_t * | elem,
|  | long | value,
|  | long * | dBvalue )

Return corresponding dB value to an integer playback volume for a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | value to be converted to dB range
  dBvalue | pointer to returned dB value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_channel_name()

const char * snd_mixer_selem_channel_name | ( | snd_mixer_selem_channel_id_t | channel | ) |

Return name of mixer simple element channel.

Parameters

  channel | mixer simple element channel identifier

Returns
  channel name

## snd_mixer_selem_get_capture_dB()

int snd_mixer_selem_get_capture_dB | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long * | value )

Return value of capture volume in dB control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | pointer to returned value (dB * 100)

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_get_capture_dB_range()

int snd_mixer_selem_get_capture_dB_range | ( | snd_mixer_elem_t * | elem,
|  | long * | min,
|  | long * | max )

Get range in dB for capture volume of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  min | Pointer to returned minimum (dB * 100)
  max | Pointer to returned maximum (dB * 100)

## snd_mixer_selem_get_capture_group()

int snd_mixer_selem_get_capture_group | ( | snd_mixer_elem_t * | elem | ) |

Return info about capture switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  group for switch exclusivity (see snd_mixer_selem_has_capture_switch_exclusive)

## snd_mixer_selem_get_capture_switch()

int snd_mixer_selem_get_capture_switch | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | int * | value )

Return value of capture switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | pointer to returned value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_get_capture_volume()

int snd_mixer_selem_get_capture_volume | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long * | value )

Return value of capture volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | pointer to returned value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_get_capture_volume_range()

int snd_mixer_selem_get_capture_volume_range | ( | snd_mixer_elem_t * | elem,
|  | long * | min,
|  | long * | max )

Get range for capture volume of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  min | Pointer to returned minimum
  max | Pointer to returned maximum

## snd_mixer_selem_get_enum_item()

int snd_mixer_selem_get_enum_item | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | unsigned int * | itemp )

get the current selected enumerated item for the given mixer simple element

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  itemp | the pointer to store the index of the enumerated item

Returns
  0 if successful, otherwise a negative error code

## snd_mixer_selem_get_enum_item_name()

int snd_mixer_selem_get_enum_item_name | ( | snd_mixer_elem_t * | elem,
|  | unsigned int | item,
|  | size_t | maxlen,
|  | char * | buf )

get the enumerated item string for the given mixer simple element

Parameters

  elem | Mixer simple element handle
  item | the index of the enumerated item to query
  maxlen | the maximal length to be stored
  buf | the buffer to store the name string

Returns
  0 if successful, otherwise a negative error code

## snd_mixer_selem_get_enum_items()

int snd_mixer_selem_get_enum_items | ( | snd_mixer_elem_t * | elem | ) |

Return the number of enumerated items of the given mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  the number of enumerated items, otherwise a negative error code

## snd_mixer_selem_get_id()

void snd_mixer_selem_get_id | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_id_t * | id )

Get mixer simple element identifier.

Parameters

  elem | Mixer simple element handle
  id | returned mixer simple element identifier

## snd_mixer_selem_get_index()

unsigned int snd_mixer_selem_get_index | ( | snd_mixer_elem_t * | elem | ) |

Get index part of mixer simple element identifier.

Parameters

  elem | Mixer simple element handle

Returns
  index part of simple element identifier

## snd_mixer_selem_get_name()

const char * snd_mixer_selem_get_name | ( | snd_mixer_elem_t * | elem | ) |

Get name part of mixer simple element identifier.

Parameters

  elem | Mixer simple element handle

Returns
  name part of simple element identifier

## snd_mixer_selem_get_playback_dB()

int snd_mixer_selem_get_playback_dB | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long * | value )

Return value of playback volume in dB control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | pointer to returned value (dB * 100)

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_get_playback_dB_range()

int snd_mixer_selem_get_playback_dB_range | ( | snd_mixer_elem_t * | elem,
|  | long * | min,
|  | long * | max )

Get range in dB for playback volume of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  min | Pointer to returned minimum (dB * 100)
  max | Pointer to returned maximum (dB * 100)

## snd_mixer_selem_get_playback_switch()

int snd_mixer_selem_get_playback_switch | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | int * | value )

Return value of playback switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | pointer to returned value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_get_playback_volume()

int snd_mixer_selem_get_playback_volume | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long * | value )

Return value of playback volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | pointer to returned value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_get_playback_volume_range()

int snd_mixer_selem_get_playback_volume_range | ( | snd_mixer_elem_t * | elem,
|  | long * | min,
|  | long * | max )

Get range for playback volume of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  min | Pointer to returned minimum
  max | Pointer to returned maximum

## snd_mixer_selem_has_capture_channel()

int snd_mixer_selem_has_capture_channel | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel )

Get info about channels of capture stream of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | Mixer simple element channel identifier

Returns
  0 if channel is not present, 1 if present

## snd_mixer_selem_has_capture_switch()

int snd_mixer_selem_has_capture_switch | ( | snd_mixer_elem_t * | elem | ) |

Return info about capture switch control existence of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if no control is present, 1 if it's present

## snd_mixer_selem_has_capture_switch_exclusive()

int snd_mixer_selem_has_capture_switch_exclusive | ( | snd_mixer_elem_t * | elem | ) |

Return info about capture switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if control is separated per element, 1 if control acts on other elements too (i.e. only one active at a time inside a group)

## snd_mixer_selem_has_capture_switch_joined()

int snd_mixer_selem_has_capture_switch_joined | ( | snd_mixer_elem_t * | elem | ) |

Return info about capture switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if control is separated per channel, 1 if control acts on all channels together

## snd_mixer_selem_has_capture_volume()

int snd_mixer_selem_has_capture_volume | ( | snd_mixer_elem_t * | elem | ) |

Return info about capture volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if no control is present, 1 if it's present

## snd_mixer_selem_has_capture_volume_joined()

int snd_mixer_selem_has_capture_volume_joined | ( | snd_mixer_elem_t * | elem | ) |

Return info about capture volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if control is separated per channel, 1 if control acts on all channels together

## snd_mixer_selem_has_common_switch()

int snd_mixer_selem_has_common_switch | ( | snd_mixer_elem_t * | elem | ) |

Return true if mixer simple element has only one switch control for both playback and capture.

Parameters

  elem | Mixer simple element handle

Returns
  0 separated control, 1 common control

## snd_mixer_selem_has_common_volume()

int snd_mixer_selem_has_common_volume | ( | snd_mixer_elem_t * | elem | ) |

Return true if mixer simple element has only one volume control for both playback and capture.

Parameters

  elem | Mixer simple element handle

Returns
  0 separated control, 1 common control

## snd_mixer_selem_has_playback_channel()

int snd_mixer_selem_has_playback_channel | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel )

Get info about channels of playback stream of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | Mixer simple element channel identifier

Returns
  0 if channel is not present, 1 if present

## snd_mixer_selem_has_playback_switch()

int snd_mixer_selem_has_playback_switch | ( | snd_mixer_elem_t * | elem | ) |

Return info about playback switch control existence of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if no control is present, 1 if it's present

## snd_mixer_selem_has_playback_switch_joined()

int snd_mixer_selem_has_playback_switch_joined | ( | snd_mixer_elem_t * | elem | ) |

Return info about playback switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if control is separated per channel, 1 if control acts on all channels together

## snd_mixer_selem_has_playback_volume()

int snd_mixer_selem_has_playback_volume | ( | snd_mixer_elem_t * | elem | ) |

Return info about playback volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if no control is present, 1 if it's present

## snd_mixer_selem_has_playback_volume_joined()

int snd_mixer_selem_has_playback_volume_joined | ( | snd_mixer_elem_t * | elem | ) |

Return info about playback volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if control is separated per channel, 1 if control acts on all channels together

## snd_mixer_selem_id_copy()

void snd_mixer_selem_id_copy | ( | snd_mixer_selem_id_t * | dst,
|  | const snd_mixer_selem_id_t * | src )

copy one snd_mixer_selem_id_t to another

Parameters

  dst | pointer to destination
  src | pointer to source

## snd_mixer_selem_id_free()

void snd_mixer_selem_id_free | ( | snd_mixer_selem_id_t * | obj | ) |

frees a previously allocated snd_mixer_selem_id_t

Parameters

  obj | pointer to object to free

## snd_mixer_selem_id_get_index()

unsigned int snd_mixer_selem_id_get_index | ( | const snd_mixer_selem_id_t * | obj | ) |

Get index part of a mixer simple element identifier.

Parameters

  obj | Mixer simple element identifier

Returns
  index part

## snd_mixer_selem_id_get_name()

const char * snd_mixer_selem_id_get_name | ( | const snd_mixer_selem_id_t * | obj | ) |

Get name part of a mixer simple element identifier.

Parameters

  obj | Mixer simple element identifier

Returns
  name part

## snd_mixer_selem_id_malloc()

int snd_mixer_selem_id_malloc | ( | snd_mixer_selem_id_t ** | ptr | ) |

allocate an invalid snd_mixer_selem_id_t using standard malloc

Parameters

  ptr | returned pointer

Returns
  0 on success otherwise negative error code

## snd_mixer_selem_id_parse()

int snd_mixer_selem_id_parse | ( | snd_mixer_selem_id_t * | dst,
|  | const char * | str )

Parse ASCII simple mixer element identifier.

Parameters

  dst | Parsed simple mixer element identifier
  str | Mixer simple element ASCII representation

## snd_mixer_selem_id_set_index()

void snd_mixer_selem_id_set_index | ( | snd_mixer_selem_id_t * | obj,
|  | unsigned int | val )

Set index part of a mixer simple element identifier.

Parameters

  obj | Mixer simple element identifier
  val | index part

## snd_mixer_selem_id_set_name()

void snd_mixer_selem_id_set_name | ( | snd_mixer_selem_id_t * | obj,
|  | const char * | val )

Set name part of a mixer simple element identifier.

Parameters

  obj | Mixer simple element identifier
  val | name part

## snd_mixer_selem_id_sizeof()

size_t snd_mixer_selem_id_sizeof | ( | void |  | ) |

get size of snd_mixer_selem_id_t

Returns
  size in bytes

## snd_mixer_selem_is_active()

int snd_mixer_selem_is_active | ( | snd_mixer_elem_t * | elem | ) |

Get info about the active state of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if not active, 1 if active

## snd_mixer_selem_is_capture_mono()

int snd_mixer_selem_is_capture_mono | ( | snd_mixer_elem_t * | elem | ) |

Get info about channels of capture stream of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if not mono, 1 if mono

## snd_mixer_selem_is_enum_capture()

int snd_mixer_selem_is_enum_capture | ( | snd_mixer_elem_t * | elem | ) |

Return true if mixer simple enumerated element belongs to the capture direction.

Parameters

  elem | Mixer simple element handle

Returns
  0 no capture direction, 1 capture direction

## snd_mixer_selem_is_enum_playback()

int snd_mixer_selem_is_enum_playback | ( | snd_mixer_elem_t * | elem | ) |

Return true if mixer simple enumerated element belongs to the playback direction.

Parameters

  elem | Mixer simple element handle

Returns
  0 no playback direction, 1 playback direction

## snd_mixer_selem_is_enumerated()

int snd_mixer_selem_is_enumerated | ( | snd_mixer_elem_t * | elem | ) |

Return true if mixer simple element is an enumerated control.

Parameters

  elem | Mixer simple element handle

Returns
  0 normal volume/switch control, 1 enumerated control

## snd_mixer_selem_is_playback_mono()

int snd_mixer_selem_is_playback_mono | ( | snd_mixer_elem_t * | elem | ) |

Get info about channels of playback stream of a mixer simple element.

Parameters

  elem | Mixer simple element handle

Returns
  0 if not mono, 1 if mono

## snd_mixer_selem_register()

int snd_mixer_selem_register | ( | snd_mixer_t * | mixer,
|  | struct snd_mixer_selem_regopt * | options,
|  | snd_mixer_class_t ** | classp )

Register mixer simple element class.

Parameters

  mixer | Mixer handle
  options | Options container
  classp | Pointer to returned mixer simple element class handle (or NULL)

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_capture_dB()

int snd_mixer_selem_set_capture_dB | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long | value,
|  | int | dir )

Set value in dB of capture volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | control value in dB * 100
  dir | rounding mode - rounds up if dir > 0, round to nearest if dir == 0, rounds down if dir < 0

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_capture_dB_all()

int snd_mixer_selem_set_capture_dB_all | ( | snd_mixer_elem_t * | elem,
|  | long | value,
|  | int | dir )

Set value in dB of capture volume control for all channels of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | control value in dB * 100
  dir | rounding mode - rounds up if dir > 0, round to nearest if dir == 0, rounds down if dir < 0

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_capture_switch()

int snd_mixer_selem_set_capture_switch | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | int | value )

Set value of capture switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_capture_switch_all()

int snd_mixer_selem_set_capture_switch_all | ( | snd_mixer_elem_t * | elem,
|  | int | value )

Set value of capture switch control for all channels of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_capture_volume()

int snd_mixer_selem_set_capture_volume | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long | value )

Set value of capture volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_capture_volume_all()

int snd_mixer_selem_set_capture_volume_all | ( | snd_mixer_elem_t * | elem,
|  | long | value )

Set value of capture volume control for all channels of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_capture_volume_range()

int snd_mixer_selem_set_capture_volume_range | ( | snd_mixer_elem_t * | elem,
|  | long | min,
|  | long | max )

Set range for capture volume of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  min | minimum volume value
  max | maximum volume value

## snd_mixer_selem_set_enum_item()

int snd_mixer_selem_set_enum_item | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | unsigned int | item )

set the current selected enumerated item for the given mixer simple element

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  item | the enumerated item index

Returns
  0 if successful, otherwise a negative error code

## snd_mixer_selem_set_playback_dB()

int snd_mixer_selem_set_playback_dB | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long | value,
|  | int | dir )

Set value in dB of playback volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | control value in dB * 100
  dir | rounding mode - rounds up if dir > 0, round to nearest if dir == 0, rounds down if dir < 0

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_playback_dB_all()

int snd_mixer_selem_set_playback_dB_all | ( | snd_mixer_elem_t * | elem,
|  | long | value,
|  | int | dir )

Set value in dB of playback volume control for all channels of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | control value in dB * 100
  dir | rounding mode - rounds up if dir > 0, round to nearest if dir == 0, rounds down if dir < 0

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_playback_switch()

int snd_mixer_selem_set_playback_switch | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | int | value )

Set value of playback switch control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_playback_switch_all()

int snd_mixer_selem_set_playback_switch_all | ( | snd_mixer_elem_t * | elem,
|  | int | value )

Set value of playback switch control for all channels of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_playback_volume()

int snd_mixer_selem_set_playback_volume | ( | snd_mixer_elem_t * | elem,
|  | snd_mixer_selem_channel_id_t | channel,
|  | long | value )

Set value of playback volume control of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  channel | mixer simple element channel identifier
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_playback_volume_all()

int snd_mixer_selem_set_playback_volume_all | ( | snd_mixer_elem_t * | elem,
|  | long | value )

Set value of playback volume control for all channels of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  value | control value

Returns
  0 on success otherwise a negative error code

## snd_mixer_selem_set_playback_volume_range()

int snd_mixer_selem_set_playback_volume_range | ( | snd_mixer_elem_t * | elem,
|  | long | min,
|  | long | max )

Set range for playback volume of a mixer simple element.

Parameters

  elem | Mixer simple element handle
  min | minimum volume value
  max | maximum volume value