snd_afm_open()

Create a handle and open a connection to a specified AMP Functional Module (AFM)

Synopsis:

#include <sys/asoundlib.h>

int snd_afm_open( snd_afm_t **handle, 
                  int card, 
                  int device );

Arguments:

handle
A pointer to a location where snd_afm_open() stores a handle for the AFM
card
The card number.
device
The audio device number.

Library:

libasound.so

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_open() function creates a handle and opens a connection to the Acoustics Management Platform (AMP) Functional Module (AFM) for sound card number card and audio device number device. AFMs are installed in /dev/snd and their names are in the form afmCxDy, where x is the card number, and y is the device number. The card number depends on the order in which the cards are specified in the io-audio .conf file. Each AFM also has a symbolic name associated with (e.g., icc, voice, anc, and ese).

There are no defaults; your application must specify all the arguments to this function.

Using names for audio devices (snd_afm_open_name()) is preferred to using numbers (snd_afm_open()).

Returns:

Zero on success, or a negative error code.

Errors:

-EINVAL
The card number or the device number is invalid.
-ENOMEM
There wasn't enough memory to allocate control structures.
-SND_ERROR_INCOMPATIBLE_VERSION
The audio driver version is incompatible with the client library that the application is using.

This function can also return the negative of the values that open() can assign to errno.

Classification:

QNX Neutrino

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