snd_mixer_element_read()

Updated: May 06, 2022

Get a mixer element's configurable parameters

Synopsis:

#include <sys/asoundlib.h>

int snd_mixer_element_read(
       snd_mixer_t *handle, 
       snd_mixer_element_t *element );

Arguments:

handle
The handle for the mixer device. This must have been created by snd_mixer_open().
element
A pointer to a snd_mixer_element_t in which snd_mixer_element_read() stores the element's configurable parameters.

Library:

libasound.so

Use the -l asound option with qcc to link against this library.

Description:

The snd_mixer_element_read() function fills the snd_mixer_element_t structure with information on the current settings of the element identified by the eid substructure.

Note: We recommend that you work with mixer groups instead of manipulating the elements directly.

Returns:

Zero on success, or a negative error value on error.

Errors:

-EINVAL
Invalid handle or element argument.
-ENXIO
The element wasn't found.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

Caveats:

The element struct must be initialized to a known state before making the call: use memset() to set the struct to zero, and then set the eid member to specify which element to read.