snd_afm_get_vin_list()

Get the current Vehicle Input (VIN) list from an AFM

Synopsis:

#include <sys/asoundlib.h>

int snd_afm_get_vin_list( snd_afm_t *handle,
                          snd_afm_vin_list_item_t *list,
                          int num );

Arguments:

handle
The handle for the AFM device, which you must have opened by calling snd_afm_open_name() or snd_afm_open().
list
An array of snd_afm_vin_list_item_t entries to populate; see below.
num
The number of entries in the array. Use snd_afm_get_vin_list_count() to determine the number of entries required.

Library:

libasound

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

Description:

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_get_vin_list_count() function gets the list of vehicle inputs that you should retrieve data for from the CAN bus or other vehicle interface and inputs it to the AFM using afm_set_win_stream(). The number and type of vehicle inputs depends on the AFM's current configuration and can only be retrieved after the AFM is running.

The afm_vin_list_item structure is defined as follows:

typedef struct snd_afm_vin_list_item
{
   int16_t key;
   int16_t min;
   int16_t max;
   int16_t is_rpm;
} snd_afm_vin_list_item_t;

The members include:

key
A unique key that's used to identify this parameter.
min
The minimum value that the parameter can take.
max
The maximum value that the parameter can take.
is_rpm
1 if the ASD AFM should treat this parameter as the RPM input; 0 otherwise.

Returns:

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

Errors:

-EAGAIN
The AFM hasn't been started.
-EINVAL
The value of handle or list is NULL.
-ENOMEM
The array needs more than num entries.
-ENOTSUP
The AFM doesn't support VIN lists.

Classification:

QNX Neutrino

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