Data Structures |
struct | snd_pcm_ioplug_t |
struct | snd_pcm_ioplug_callback_t |
Defines |
#define | SND_PCM_IOPLUG_FLAG_LISTED (1<<0) |
#define | SND_PCM_IOPLUG_FLAG_MONOTONIC (1<<1) |
#define | SND_PCM_IOPLUG_VERSION_MAJOR 1 |
#define | SND_PCM_IOPLUG_VERSION_MINOR 0 |
#define | SND_PCM_IOPLUG_VERSION_TINY 1 |
#define | SND_PCM_IOPLUG_VERSION |
Enumerations |
enum | {
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
} |
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.
|
int | snd_pcm_ioplug_delete (snd_pcm_ioplug_t *io) |
| Delete the ioplug instance.
|
int | snd_pcm_ioplug_reinit_status (snd_pcm_ioplug_t *ioplug) |
| Reinitialize the poll and mmap status.
|
const snd_pcm_channel_area_t * | snd_pcm_ioplug_mmap_areas (snd_pcm_ioplug_t *ioplug) |
| Get mmap area of ioplug.
|
void | snd_pcm_ioplug_params_reset (snd_pcm_ioplug_t *io) |
| Reset ioplug parameters.
|
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.
|
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.
|
int | snd_pcm_ioplug_set_state (snd_pcm_ioplug_t *ioplug, snd_pcm_state_t state) |
| Change the ioplug PCM status.
|
Detailed Description
See the PCM (digital audio) interface page for more details.
Define Documentation
#define SND_PCM_IOPLUG_FLAG_LISTED (1<<0) |
#define SND_PCM_IOPLUG_FLAG_MONOTONIC (1<<1) |
#define SND_PCM_IOPLUG_VERSION |
Value:IO-plugin protocol version
#define SND_PCM_IOPLUG_VERSION_MAJOR 1 |
#define SND_PCM_IOPLUG_VERSION_MINOR 0 |
#define SND_PCM_IOPLUG_VERSION_TINY 1 |
Enumeration Type Documentation
hw constraints for ioplug
- Enumerator:
SND_PCM_IOPLUG_HW_ACCESS |
access type
|
SND_PCM_IOPLUG_HW_FORMAT |
format
|
SND_PCM_IOPLUG_HW_CHANNELS |
channels
|
SND_PCM_IOPLUG_HW_RATE |
rate
|
SND_PCM_IOPLUG_HW_PERIOD_BYTES |
period bytes
|
SND_PCM_IOPLUG_HW_BUFFER_BYTES |
buffer bytes
|
SND_PCM_IOPLUG_HW_PERIODS |
number of periods
|
SND_PCM_IOPLUG_HW_PARAMS |
max number of hw constraints
|
Function Documentation
int snd_pcm_ioplug_create |
( |
snd_pcm_ioplug_t * |
ioplug, |
|
|
const char * |
name, |
|
|
snd_pcm_stream_t |
stream, |
|
|
int |
mode | |
|
) |
| | |
Create an ioplug instance.
- Parameters:
-
| ioplug | the ioplug handle - Parameters:
-
| name | name of PCM - Parameters:
-
| stream | stream direction - Parameters:
-
| mode | PCM open mode - Returns:
- 0 if successful, or a negative error code
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.
- Parameters:
-
| ioplug | the ioplug handle - Returns:
- 0 if successful, or a negative error code
|
Get mmap area of ioplug.
- Parameters:
-
| ioplug | the ioplug handle - Returns:
- the mmap channel areas if available, or NULL
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.
- Parameters:
-
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.
- Parameters:
-
| ioplug | the ioplug handle - Returns:
- 0 if successful, or a negative error code
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.
- Parameters:
-
| ioplug | the ioplug handle - Parameters:
-
| type | parameter type - Parameters:
-
| num_list | number of available values - Parameters:
-
| list | the list of available values - Returns:
- 0 if successful, or a negative error code
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.
- Parameters:
-
| ioplug | the ioplug handle - Parameters:
-
| type | parameter type - Parameters:
-
| min | the minimum value - Parameters:
-
| max | the maximum value - Returns:
- 0 if successful, or a negative error code
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.
- Parameters:
-
| ioplug | the ioplug handle - Parameters:
-
| state | the PCM status - Returns:
- zero if successful or a negative error code
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. |
|