Set the audio mode used to tune acoustic processing parameters


#include <sys/asoundlib.h>

int snd_afm_set_audio_mode( snd_afm_t *handle,
                            const char *mode );


The handle for the AFM device, which you must have opened by calling snd_afm_open_name() or snd_afm_open().
A string containing the mode.



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


Tip: This function is available for use if you have QNX Acoustic Management Platform 2.0 and Audio component BuildID 594—January 17, 2018 (7.0.594.S201801171044) or a later update installed.

The snd_afm_set_audio_mode() function sets the audio mode that's used to tune acoustic processing parameters.

The mode string is appended to ap_qcf_ to create a .conf key used to look up the acoustic tuning file path. Passing an empty string sets the mode back to default. An error is returned and the mode remains unchanged if the key can't be found in the .conf or if the associated path can't be found in the filesystem.

Note: This function changes the path to the qcf file that's loaded when the AFM is started, or when either PCM capture or playback is started on /dev/snd/voice.

You should call snd_afm_set_audio_mode() only when the AFM is stopped or idle.


EOK on success, or a negative errno value upon failure.


The value of handle or mode is NULL.
The ap_qcf_* key doesn't exist in the configuration file.
The AFM doesn't support setting the audio mode.


QNX Neutrino

Cancellation point No
Interrupt handler No
Signal handler No
Thread No