Set the current Vehicle Input (VIN) data for an AFM.


#include <sys/asoundlib.h>

int snd_afm_set_vin_stream( snd_afm_t *handle,
                            snd_afm_vin_pair_t *stream,
                            int num );


The handle for the AFM device, which you must have opened by calling snd_afm_open_name() or snd_afm_open().
An array of snd_afm_vin_pair_t entries to set; see below.
The number of entries in the array.



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_vin_stream function sets the current Vehicle Input data for an AFM. This function should be called when the VIN data changes while the AFM is running.

The stream should be an array of snd_afm_vin_pair_t structures corresponding to the VINS retrieved with snd_afm_get_vin_list(). The snd_afm_vin_pair_t structure is defined as follows:

typedef struct snd_afm_vin_pair
   int16_t key;
   int16_t value;
} snd_afm_vin_pair_t;

The members include:

A unique key that's used to identify this parameter.
The current value of this parameter to send to the AFM(s).

The snd_afm_set_vin_stream() function is used to send vehicle information (e.g., RPM, vehicle speed, etc.) to the ASD AFMs. This information is expected to change rapidly, and this API provides the means to pass data to the AFMs regularly while they're processing. The stream should contain one snd_afm_vin_pair_t for each afm_vin_list_item_t returned from snd_afm_get_vin_list(), with the keys set to match. The value should be between the minimum and maximum values returned in the afm_vin_list_item_t.


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


The stream array is too big.
The AFM isn't running.
The value of handle or stream is NULL.
The AFM doesn't support VIN lists.


QNX Neutrino

Cancellation point No
Interrupt handler No
Signal handler No
Thread No