mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm: rate: Add capability to pass configuration node to plugins
If a rate plugin uses a node (compound) instead of a plain string for its "converter", and that compound is not a simple string array, then the compound will be passed as an additional parameter to the new plugin open() function (SND_PCM_RATE_PLUGIN_CONF_ENTRY(XXX)). The previous open() function (SND_PCM_RATE_PLUGIN_ENTRY(XXX)) will be called if the CONF version is not found. It is up to the plugin to determine whether the presence of the conf parameter is mandatory. Signed-off-by: Alan Young <consult.awy@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
fbb9571381
commit
97be19cf6f
2 changed files with 82 additions and 10 deletions
|
|
@ -120,11 +120,14 @@ typedef struct snd_pcm_rate_ops {
|
|||
typedef int (*snd_pcm_rate_open_func_t)(unsigned int version, void **objp,
|
||||
snd_pcm_rate_ops_t *opsp);
|
||||
|
||||
typedef int (*snd_pcm_rate_open_conf_func_t)(unsigned int version, void **objp,
|
||||
snd_pcm_rate_ops_t *opsp, const snd_config_t *conf);
|
||||
|
||||
/**
|
||||
* Define the object entry for external PCM rate-converter plugins
|
||||
*/
|
||||
#define SND_PCM_RATE_PLUGIN_ENTRY(name) _snd_pcm_rate_##name##_open
|
||||
|
||||
#define SND_PCM_RATE_PLUGIN_CONF_ENTRY(name) _snd_pcm_rate_##name##_open_conf
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
/* old rate_ops for protocol version 0x010001 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue