External Control Plugin SDK

Overview

// typedefs

typedef unsigned long snd_ctl_ext_key_t;
typedef snd_ctl_ext snd_ctl_ext_t;
typedef snd_ctl_ext_callback snd_ctl_ext_callback_t;

typedef int() snd_ctl_ext_tlv_rw_t(
    snd_ctl_ext_t *ext,
    snd_ctl_ext_key_t key,
    int op_flag,
    unsigned int numid,
    unsigned int *tlv,
    unsigned int tlv_size
    );

// enums

enum snd_ctl_ext_access_t;

// structs

struct snd_ctl_ext;
struct snd_ctl_ext_callback;

// global functions

int
snd_ctl_ext_create(
    snd_ctl_ext_t* ext,
    const char* name,
    int mode
);

int
snd_ctl_ext_delete(snd_ctl_ext_t* ext);

// macros

#define SND_CTL_EXT_KEY_NOT_FOUND
#define SND_CTL_EXT_VERSION
#define SND_CTL_EXT_VERSION_MAJOR
#define SND_CTL_EXT_VERSION_MINOR
#define SND_CTL_EXT_VERSION_TINY
#define SND_CTL_PLUGIN_DEFINE_FUNC(plugin)
#define SND_CTL_PLUGIN_ENTRY(name)
#define SND_CTL_PLUGIN_SYMBOL(name)

Detailed Documentation

Typedefs

typedef unsigned long snd_ctl_ext_key_t

Key to access a control pointer

typedef snd_ctl_ext snd_ctl_ext_t

External control plugin handle

typedef snd_ctl_ext_callback snd_ctl_ext_callback_t

Callback table of control ext

typedef int() snd_ctl_ext_tlv_rw_t(
    snd_ctl_ext_t *ext,
    snd_ctl_ext_key_t key,
    int op_flag,
    unsigned int numid,
    unsigned int *tlv,
    unsigned int tlv_size
    )

Callback to handle TLV commands.

Global Functions

int
snd_ctl_ext_create(
    snd_ctl_ext_t* ext,
    const char* name,
    int mode
)

Create an external control plugin instance.

Creates the external control instance.

Parameters:

ext

the plugin handle

name

name of control

mode

control open mode

Returns:

0 if successful, or a negative error code

int
snd_ctl_ext_delete(snd_ctl_ext_t* ext)

Delete the external control plugin.

Parameters:

ext

the plugin handle

Returns:

0 if successful, or a negative error code

Macros

#define SND_CTL_EXT_KEY_NOT_FOUND

find_elem callback returns this if no matching control element is found

#define SND_CTL_EXT_VERSION

external plugin protocol version

#define SND_CTL_EXT_VERSION_MAJOR

Protocol major version

#define SND_CTL_EXT_VERSION_MINOR

Protocol minor version

#define SND_CTL_EXT_VERSION_TINY

Protocol tiny version

#define SND_CTL_PLUGIN_DEFINE_FUNC(plugin)

Define the control plugin

#define SND_CTL_PLUGIN_ENTRY(name)

Define the object entry for external control plugins

#define SND_CTL_PLUGIN_SYMBOL(name)

Define the symbols of the given control plugin with versions