ALSA project - the C library reference
|
Data Structures | |
struct | snd_pcm_ioplug_t |
struct | snd_pcm_ioplug_callback_t |
Macros | |
#define | SND_PCM_IOPLUG_FLAG_LISTED (1<<0) |
#define | SND_PCM_IOPLUG_FLAG_MONOTONIC (1<<1) |
#define | SND_PCM_IOPLUG_FLAG_BOUNDARY_WA (1<<2) |
#define | SND_PCM_IOPLUG_VERSION_MAJOR 1 |
#define | SND_PCM_IOPLUG_VERSION_MINOR 0 |
#define | SND_PCM_IOPLUG_VERSION_TINY 2 |
#define | SND_PCM_IOPLUG_VERSION |
Typedefs | |
typedef snd_pcm_ioplug | snd_pcm_ioplug_t |
typedef snd_pcm_ioplug_callback | snd_pcm_ioplug_callback_t |
Enumerations | |
enum | { SND_SEQ_EVFLG_RESULT, SND_SEQ_EVFLG_NOTE, SND_SEQ_EVFLG_CONTROL, SND_SEQ_EVFLG_QUEUE, SND_SEQ_EVFLG_SYSTEM, SND_SEQ_EVFLG_MESSAGE, SND_SEQ_EVFLG_CONNECTION, SND_SEQ_EVFLG_SAMPLE, SND_SEQ_EVFLG_USERS, SND_SEQ_EVFLG_INSTR, SND_SEQ_EVFLG_QUOTE, SND_SEQ_EVFLG_NONE, SND_SEQ_EVFLG_RAW, SND_SEQ_EVFLG_FIXED, SND_SEQ_EVFLG_VARIABLE, SND_SEQ_EVFLG_VARUSR, SND_PCM_EXTPLUG_HW_FORMAT, SND_PCM_EXTPLUG_HW_CHANNELS, SND_PCM_EXTPLUG_HW_PARAMS, SND_PCM_IOPLUG_HW_ACCESS = 0, SND_PCM_IOPLUG_HW_FORMAT, SND_PCM_IOPLUG_HW_CHANNELS, SND_PCM_IOPLUG_HW_RATE, SND_PCM_IOPLUG_HW_PERIOD_BYTES, SND_PCM_IOPLUG_HW_BUFFER_BYTES, SND_PCM_IOPLUG_HW_PERIODS, SND_PCM_IOPLUG_HW_PARAMS, CHMAP_CTL_QUERY, CHMAP_CTL_GET, CHMAP_CTL_SET, SNDRV_TIMER_IOCTL_START_OLD = _IO('T', 0x20), SNDRV_TIMER_IOCTL_STOP_OLD = _IO('T', 0x21), SNDRV_TIMER_IOCTL_CONTINUE_OLD = _IO('T', 0x22), SNDRV_TIMER_IOCTL_PAUSE_OLD = _IO('T', 0x23) } |
Functions | |
int | snd_pcm_ioplug_create (snd_pcm_ioplug_t *io, const char *name, snd_pcm_stream_t stream, int mode) |
Create an ioplug instance. More... | |
int | snd_pcm_ioplug_delete (snd_pcm_ioplug_t *io) |
Delete the ioplug instance. More... | |
int | snd_pcm_ioplug_reinit_status (snd_pcm_ioplug_t *ioplug) |
Reinitialize the poll and mmap status. More... | |
const snd_pcm_channel_area_t * | snd_pcm_ioplug_mmap_areas (snd_pcm_ioplug_t *ioplug) |
Get mmap area of ioplug. More... | |
void | snd_pcm_ioplug_params_reset (snd_pcm_ioplug_t *io) |
Reset ioplug parameters. More... | |
int | snd_pcm_ioplug_set_param_minmax (snd_pcm_ioplug_t *io, int type, unsigned int min, unsigned int max) |
Set parameter as the min/max values. More... | |
int | snd_pcm_ioplug_set_param_list (snd_pcm_ioplug_t *io, int type, unsigned int num_list, const unsigned int *list) |
Set parameter as the list. More... | |
int | snd_pcm_ioplug_set_state (snd_pcm_ioplug_t *ioplug, snd_pcm_state_t state) |
Change the ioplug PCM status. More... | |
snd_pcm_uframes_t | snd_pcm_ioplug_avail (const snd_pcm_ioplug_t *const ioplug, const snd_pcm_uframes_t hw_ptr, const snd_pcm_uframes_t appl_ptr) |
Get the available frames. This function can be used to calculate the the available frames before calling snd_pcm_avail_update() More... | |
snd_pcm_uframes_t | snd_pcm_ioplug_hw_avail (const snd_pcm_ioplug_t *const ioplug, const snd_pcm_uframes_t hw_ptr, const snd_pcm_uframes_t appl_ptr) |
Get the available frames. This function can be used to calculate the the available frames before calling snd_pcm_avail_update() More... | |
See the PCM (digital audio) interface page for more details.
#define SND_PCM_IOPLUG_FLAG_BOUNDARY_WA (1<<2) |
hw pointer wrap around at boundary instead of buffer_size
#define SND_PCM_IOPLUG_FLAG_LISTED (1<<0) |
list up this PCM
#define SND_PCM_IOPLUG_FLAG_MONOTONIC (1<<1) |
monotonic timestamps
#define SND_PCM_IOPLUG_VERSION |
IO-plugin protocol version
#define SND_PCM_IOPLUG_VERSION_MAJOR 1 |
Protocol major version
#define SND_PCM_IOPLUG_VERSION_MINOR 0 |
Protocol minor version
#define SND_PCM_IOPLUG_VERSION_TINY 2 |
Protocol tiny version
typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t |
Callback table of ioplug
typedef struct snd_pcm_ioplug snd_pcm_ioplug_t |
I/O plugin handle
anonymous enum |
hw constraints for ioplug
snd_pcm_uframes_t snd_pcm_ioplug_avail | ( | const snd_pcm_ioplug_t *const | ioplug, |
const snd_pcm_uframes_t | hw_ptr, | ||
const snd_pcm_uframes_t | appl_ptr | ||
) |
Get the available frames. This function can be used to calculate the the available frames before calling snd_pcm_avail_update()
ioplug | the ioplug handle |
hw_ptr | hardware pointer in frames |
appl_ptr | application pointer in frames |
int snd_pcm_ioplug_create | ( | snd_pcm_ioplug_t * | ioplug, |
const char * | name, | ||
snd_pcm_stream_t | stream, | ||
int | mode | ||
) |
Create an ioplug instance.
ioplug | the ioplug handle |
name | name of PCM |
stream | stream direction |
mode | PCM open mode |
Creates the ioplug instance.
The callback is the mandatory field of ioplug handle. At least, start, stop and pointer callbacks must be set before calling this function.
int snd_pcm_ioplug_delete | ( | snd_pcm_ioplug_t * | ioplug | ) |
Delete the ioplug instance.
ioplug | the ioplug handle |
snd_pcm_uframes_t snd_pcm_ioplug_hw_avail | ( | const snd_pcm_ioplug_t *const | ioplug, |
const snd_pcm_uframes_t | hw_ptr, | ||
const snd_pcm_uframes_t | appl_ptr | ||
) |
Get the available frames. This function can be used to calculate the the available frames before calling snd_pcm_avail_update()
ioplug | the ioplug handle |
hw_ptr | hardware pointer in frames |
appl_ptr | application pointer in frames |
const snd_pcm_channel_area_t* snd_pcm_ioplug_mmap_areas | ( | snd_pcm_ioplug_t * | ioplug | ) |
Get mmap area of ioplug.
ioplug | the ioplug handle |
Returns the mmap channel areas if available. When mmap_rw field is not set, this function always returns NULL.
void snd_pcm_ioplug_params_reset | ( | snd_pcm_ioplug_t * | ioplug | ) |
Reset ioplug parameters.
ioplug | the ioplug handle |
Resets the all parameters for the given ioplug handle.
int snd_pcm_ioplug_reinit_status | ( | snd_pcm_ioplug_t * | ioplug | ) |
Reinitialize the poll and mmap status.
ioplug | the ioplug handle |
Reinitializes the poll and the mmap status of the PCM. Call this function to propagate the status change in the ioplug instance to its PCM internals.
int snd_pcm_ioplug_set_param_list | ( | snd_pcm_ioplug_t * | ioplug, |
int | type, | ||
unsigned int | num_list, | ||
const unsigned int * | list | ||
) |
Set parameter as the list.
ioplug | the ioplug handle |
type | parameter type |
num_list | number of available values |
list | the list of available values |
Sets the parameter as the list. The available values of the given parameter type is restricted to the ones of the given list.
int snd_pcm_ioplug_set_param_minmax | ( | snd_pcm_ioplug_t * | ioplug, |
int | type, | ||
unsigned int | min, | ||
unsigned int | max | ||
) |
Set parameter as the min/max values.
ioplug | the ioplug handle |
type | parameter type |
min | the minimum value |
max | the maximum value |
Sets the parameter as the min/max values. The available values of the given parameter type is restricted between the given minimum and maximum values.
int snd_pcm_ioplug_set_state | ( | snd_pcm_ioplug_t * | ioplug, |
snd_pcm_state_t | state | ||
) |
Change the ioplug PCM status.
ioplug | the ioplug handle |
state | the PCM status |
Changes the PCM status of the ioplug to the given value. This function can be used for external plugins to notify the status change, e.g. XRUN.