Open a preferred PCM channel with a given audio type.
#include <audio/audio_manager_routing.h>
int audio_manager_snd_pcm_open_preferred(audio_manager_audio_type_t type, snd_pcm_t **handle, unsigned int *audioman_handle, int *rcard, int *rdevice, int mode)
The audio type of the PCM channel being allocated.
The handle of the PCM channel opened.
The audio manager handle allocated to the PCM channel.
The audio card used to open the PCM channel.
The audio device used to open the PCM channel.
The PCM channel mode defined in asoundlib.h.
The audio_manager_snd_pcm_open_preferred() function combines the snd_pcm_open_preferred() and audio_manager_get_handle() functions and allows the allocation of a specific audio type PCM channel in one step.
EOK upon success, negative errno upon failure.