Fix documentation of external PCM plugin SDK

Fix documentation of external PCM plugin SDK.
This commit is contained in:
Takashi Iwai 2005-05-24 09:42:01 +00:00
parent 8b76989e19
commit 7651690858
6 changed files with 312 additions and 31 deletions

View file

@ -37,9 +37,19 @@ extern "C" {
* \{
*/
/**
* Define the object entry for external PCM plugins
*/
#define SND_PCM_PLUGIN_ENTRY(name) _snd_pcm_##name##_open
/**
* Define the symbols of the given plugin with versions
*/
#define SND_PCM_PLUGIN_SYMBOL(name) SND_DLSYM_BUILD_VERSION(SND_PCM_PLUGIN_ENTRY(name), SND_PCM_DLSYM_VERSION);
/**
* Define the plugin
*/
#define SND_PCM_PLUGIN_DEFINE_FUNC(plugin) \
int SND_PCM_PLUGIN_ENTRY(plugin) (snd_pcm_t **pcmp, const char *name,\
snd_config_t *root, snd_config_t *conf, \

View file

@ -1,3 +1,12 @@
/**
* \file include/pcm_extplug.h
* \brief External Filter-Plugin SDK
* \author Takashi Iwai <tiwai@suse.de>
* \date 2005
*
* External Filter-Plugin SDK
*/
/*
* ALSA external PCM plugin SDK (draft version)
*
@ -22,6 +31,13 @@
#ifndef __ALSA_PCM_EXTPLUG_H
#define __ALSA_PCM_EXTPLUG_H
/**
* \defgroup PCM_ExtPlug External Filter plugin SDK
* \ingroup Plugin_SDK
* See the \ref pcm page for more details.
* \{
*/
/** hw constraints for extplug */
enum {
SND_PCM_EXTPLUG_HW_FORMAT, /**< format */
@ -29,23 +45,28 @@ enum {
SND_PCM_EXTPLUG_HW_PARAMS /**< max number of hw constraints */
};
/** Handle of external filter plugin */
typedef struct snd_pcm_extplug snd_pcm_extplug_t;
/** Callback table of extplug */
typedef struct snd_pcm_extplug_callback snd_pcm_extplug_callback_t;
/**
/*
* Protocol version
*/
#define SND_PCM_EXTPLUG_VERSION_MAJOR 1
#define SND_PCM_EXTPLUG_VERSION_MINOR 0
#define SND_PCM_EXTPLUG_VERSION_TINY 0
#define SND_PCM_EXTPLUG_VERSION_MAJOR 1 /**< Protocol major version */
#define SND_PCM_EXTPLUG_VERSION_MINOR 0 /**< Protocol minor version */
#define SND_PCM_EXTPLUG_VERSION_TINY 0 /**< Protocol tiny version */
/**
* Filter-plugin protocol version
*/
#define SND_PCM_EXTPLUG_VERSION ((SND_PCM_EXTPLUG_VERSION_MAJOR<<16) |\
(SND_PCM_EXTPLUG_VERSION_MINOR<<8) |\
(SND_PCM_EXTPLUG_VERSION_TINY))
/** handle of extplug */
/** Handle of extplug */
struct snd_pcm_extplug {
/**
* protocol version; SND_PCM_EXTPLUG_VERSION must be filled here
* protocol version; #SND_PCM_EXTPLUG_VERSION must be filled here
* before calling #snd_pcm_extplug_create()
*/
unsigned int version;
@ -99,7 +120,7 @@ struct snd_pcm_extplug {
unsigned int slave_channels;
};
/** callback table of extplug */
/** Callback table of extplug */
struct snd_pcm_extplug_callback {
/**
* transfer between source and destination; this is a required callback
@ -143,15 +164,22 @@ int snd_pcm_extplug_set_param_minmax(snd_pcm_extplug_t *extplug, int type, unsig
int snd_pcm_extplug_set_slave_param_list(snd_pcm_extplug_t *extplug, int type, unsigned int num_list, const unsigned int *list);
int snd_pcm_extplug_set_slave_param_minmax(snd_pcm_extplug_t *extplug, int type, unsigned int min, unsigned int max);
/**
* set the parameter constraint with a single value
*/
static inline int snd_pcm_extplug_set_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
{
return snd_pcm_extplug_set_param_list(extplug, type, 1, &val);
}
/**
* set the parameter constraint for slave PCM with a single value
*/
static inline int snd_pcm_extplug_set_slave_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
{
return snd_pcm_extplug_set_slave_param_list(extplug, type, 1, &val);
}
/** \} */
#endif /* __ALSA_PCM_EXTPLUG_H */

View file

@ -1,5 +1,14 @@
/**
* \file include/pcm_ioplug.h
* \brief External I/O-Plugin SDK
* \author Takashi Iwai <tiwai@suse.de>
* \date 2005
*
* External I/O-Plugin SDK
*/
/*
* ALSA external PCM plugin SDK (draft version)
* ALSA external PCM plugin SDK
*
* Copyright (c) 2005 Takashi Iwai <tiwai@suse.de>
*
@ -22,6 +31,13 @@
#ifndef __ALSA_PCM_IOPLUG_H
#define __ALSA_PCM_IOPLUG_H
/**
* \defgroup PCM_IOPlug External I/O plugin SDK
* \ingroup Plugin_SDK
* See the \ref pcm page for more details.
* \{
*/
/** hw constraints for ioplug */
enum {
SND_PCM_IOPLUG_HW_ACCESS = 0, /**< access type */
@ -34,7 +50,9 @@ enum {
SND_PCM_IOPLUG_HW_PARAMS /**< max number of hw constraints */
};
/** I/O plugin handle */
typedef struct snd_pcm_ioplug snd_pcm_ioplug_t;
/** Callback table of ioplug */
typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
/**
@ -42,20 +60,23 @@ typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
*/
#define SND_PCM_IOPLUG_FLAG_LISTED (1<<0) /* list up this PCM */
/**
/*
* Protocol version
*/
#define SND_PCM_IOPLUG_VERSION_MAJOR 1
#define SND_PCM_IOPLUG_VERSION_MINOR 0
#define SND_PCM_IOPLUG_VERSION_TINY 0
#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 0 /**< Protocol tiny version */
/**
* IO-plugin protocol version
*/
#define SND_PCM_IOPLUG_VERSION ((SND_PCM_IOPLUG_VERSION_MAJOR<<16) |\
(SND_PCM_IOPLUG_VERSION_MINOR<<8) |\
(SND_PCM_IOPLUG_VERSION_TINY))
/** handle of ioplug */
/** Handle of ioplug */
struct snd_pcm_ioplug {
/**
* protocol version; SND_PCM_IOPLUG_VERSION must be filled here
* protocol version; #SND_PCM_IOPLUG_VERSION must be filled here
* before calling #snd_pcm_ioplug_create()
*/
unsigned int version;
@ -80,21 +101,21 @@ struct snd_pcm_ioplug {
*/
snd_pcm_t *pcm;
snd_pcm_stream_t stream; /* stream direcion; read-only */
snd_pcm_state_t state; /* current PCM state; read-only */
volatile snd_pcm_uframes_t appl_ptr; /* application pointer; read-only */
volatile snd_pcm_uframes_t hw_ptr; /* hw pointer; read-only */
int nonblock; /* non-block mode; read-only */
snd_pcm_stream_t stream; /**< stream direcion; read-only */
snd_pcm_state_t state; /**< current PCM state; read-only */
volatile snd_pcm_uframes_t appl_ptr; /**< application pointer; read-only */
volatile snd_pcm_uframes_t hw_ptr; /**< hw pointer; read-only */
int nonblock; /**< non-block mode; read-only */
snd_pcm_access_t access; /* access type; filled after hw_params is called */
snd_pcm_format_t format; /* format; filled after hw_params is called */
unsigned int channels; /* channels; filled after hw_params is called */
unsigned int rate; /* rate; filled after hw_params is called */
snd_pcm_uframes_t period_size; /* period size; filled after hw_params is called */
snd_pcm_uframes_t buffer_size; /* buffer size; filled after hw_params is called */
snd_pcm_access_t access; /**< access type; filled after hw_params is called */
snd_pcm_format_t format; /**< PCM format; filled after hw_params is called */
unsigned int channels; /**< number of channels; filled after hw_params is called */
unsigned int rate; /**< rate; filled after hw_params is called */
snd_pcm_uframes_t period_size; /**< period size; filled after hw_params is called */
snd_pcm_uframes_t buffer_size; /**< buffer size; filled after hw_params is called */
};
/** callback table of ioplug */
/** Callback table of ioplug */
struct snd_pcm_ioplug_callback {
/**
* start the PCM; required
@ -183,4 +204,6 @@ void snd_pcm_ioplug_params_reset(snd_pcm_ioplug_t *io);
int snd_pcm_ioplug_set_param_minmax(snd_pcm_ioplug_t *io, int type, unsigned int min, unsigned int max);
int snd_pcm_ioplug_set_param_list(snd_pcm_ioplug_t *io, int type, unsigned int num_list, const unsigned int *list);
/** \} */
#endif /* __ALSA_PCM_IOPLUG_H */