Load an acoustic processing dataset into a running APX module


#include <sys/asoundlib.h>

int snd_pcm_load_apx_dataset( snd_pcm_t *pcm,
                              uint32_t apx_id,
                              const char *dataset,
                              int *ap_status );


The handle for the PCM device, which you must have opened by calling snd_pcm_open_name(), snd_pcm_open(), or snd_pcm_open_preferred().
The ID of the APX module you want to access.
The name of the dataset to load.
A pointer to the location to store the acoustic library return code.


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


Note: This function can only be used if you have QNX Acoustic Management Platform 3.0 installed.

The snd_pcm_load_apx_dataset() function loads an acoustic processing data set into a running APX. A .conf key apx_dataset_qcf_dataset-name is created to look up the acoustic data set filepath, where apx is the type of APX module and dataset-name is the string specified by the dataset argument. For example, for SFO and a dataset name foo: sfo_dataset_qcf_foo.

An error is returned if the data set file can't be found; otherwise, the name of the data set is stored and one of the following actions is taken:
  • If the APX module is running, the data set is loaded immediately. The library return code is returned in the ap_status argument. An application should check both the return value of snd_pcm_load_apx_dataset() and the ap_status argument to determine if a call is successful.
  • If the APX module isn't running, the data set is loaded when the APX starts, after the library is initialized with the qcf configuration file for the specified mode, but before processing starts. If an error occurs when loading the data set, the APX continues to run.

After it is set, the data set is loaded each time the APX module is started until a new data set is applied.

Because this function is only used with acoustic (SFO, SPM) APX modules, it must be called on the playback PCM device.


EOK on success, or a negative errno value if an error occurred.

This function can also return the return values of devctl() (see devctl() in the QNX Neutrino C Library Reference).



One of the following causes:

  • The handle pcm is not opened.
  • The value of apx_id is not valid.
  • The value of pcm, dataset, or ap_status is NULL.
Not enough memory to copy the data set string was available.
The APX module specified by apx_id is not configured.


QNX Neutrino

Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes


This function is not thread safe if the handle (snd_pcm_t) is used across multiple threads.