Find all PCM devices in the system that meet the given criteria
#include <sys/asoundlib.h> int snd_pcm_find( unsigned int format, int *number, int *cards, int *devices, int mode );
- Any combination of the SND_PCM_FMT_* constants.
Here are the most commonly used flags:
- SND_PCM_FMT_U8 — unsigned 8-bit PCM.
- SND_PCM_FMT_S8 — signed 8-bit PCM.
- SND_PCM_FMT_U16_LE — unsigned 16-bit PCM little endian.
- SND_PCM_FMT_U16_BE — unsigned 16-bit PCM big endian.
- SND_PCM_FMT_S16_LE — signed 16-bit PCM little endian.
- SND_PCM_FMT_S16_BE — signed 16-bit PCM big endian.
- SND_PCM_FMT_IEC958_SUBFRAME — S/PDIF data (AC3).
- The size of the card and device arrays that cards and devices point to. On return, number contains the total number of devices found.
- An array in which snd_pcm_find() stores the numbers of the cards it finds.
- An array in which snd_pcm_find() stores the numbers of the devices it finds.
- One of the following:
- SND_PCM_CHANNEL_PLAYBACK — the playback channel.
- SND_PCM_CHANNEL_CAPTURE — the capture channel.
Use the -l asound option to qcc to link against this library.
The snd_pcm_find() function finds all PCM devices in the system that support any combination of the given format parameters in the given mode.
The card and device arrays are to be considered paired: the following uniquely defines the first PCM device:
card + device
A positive integer representing the total number of devices found (same as number on return), or a negative value on error.
- Invalid mode or format.