Load the specified standard mixer DLL


#include <audio_driver.h>

int32_t ado_mixer_dll( ado_card_t *card,
                       char *mixer_dll,
                       uint32_t version,
                       void *params,
                       void *callbacks,
                       ado_mixer_t **rmixer );


The card argument that io-audio passed to your Audio HW DLL's ctrl_init() function (see the Organization of a Driver chapter).
The name of the standard mixer DLL.

Note: This argument is only the unique part of the mixer DLL's file name. For example, if the mixer DLL's filename is, you should specify mixer_dll as ac97.

The version of the mixer DLL; currently not used.
A pointer to configuration information and control functions that the mixer DLL needs and that your Audio HW DLL must provide (for example, to read and write the codec registers). This structure is defined in the header file for the DLL e.g. <mixer/mixer_name_dll.h>

For example, if you're loading the Audio Codec 97 (AC97), set up a structure of type ado_mixer_dll_params_ac97_t and pass a pointer to it as the params argument to this function.

A location that ado_mixer_dll() fills in with a list of functions, provided by the mixer DLL, that your Audio HX DLL can use to control special mixer functions, such as sample rate conversion. Consult the documentation for the specific mixer DLL.

For example, if you're loading AC97, create a structure of type ado_mixer_dll_callbacks_ac97_t and pass a pointer to it as the callbacks argument to this function.

A location where ado_mixer_dll() can store a pointer to the new mixer structure. The ado_mixer_t structure is opaque to your Audio HW DLL, but you need to pass a pointer to it to the other mixer functions. You typically save this pointer in your Audio HW DLL's hardware context.


The ado_mixer_dll() function loads the specified standard mixer_dll and returns a pointer to a newly allocated mixer structure.


-1 if an error occurred (errno is set). Any other value indicates success.


Not enough free memory to create a new mixer.
The call to dlopen() failed for the mixer DLL specified.
The call to dlsym() failed for the mixer DLL specified.
The ADO_MAJOR_VERSION of the mixer DLL doesn't match with io-audio's.


QNX Neutrino

Cancellation point No
Interrupt handler No
Signal handler No
Thread No

See also:

ctrl_init() in the Organization of a Driver chapter, Writing an analog mixer in the Handling Analog Audio Data chapter, Supported Codecs appendix