Loading...
Searching...
No Matches
External Control Plugin SDK

## Files

file | control_ext.c
| External Control Plugin SDK.

## Data Structures

struct | snd_ctl_ext_t
struct | snd_ctl_ext_callback_t

## Macros

#define | SND_CTL_PLUGIN_ENTRY(name)
#define | SND_CTL_PLUGIN_SYMBOL(name)
#define | SND_CTL_PLUGIN_DEFINE_FUNC(plugin)
#define | SND_CTL_EXT_VERSION_MAJOR 1
#define | SND_CTL_EXT_VERSION_MINOR 0
#define | SND_CTL_EXT_VERSION_TINY 1
#define | SND_CTL_EXT_VERSION
#define | SND_CTL_EXT_KEY_NOT_FOUND (snd_ctl_ext_key_t)(-1)

## 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)

## Enumerations

enum

snd_ctl_ext_access_t {
SND_CTL_EXT_ACCESS_READ = (1<<0) , SND_CTL_EXT_ACCESS_WRITE = (1<<1) , SND_CTL_EXT_ACCESS_READWRITE = (3<<0) , SND_CTL_EXT_ACCESS_VOLATILE = (1<<2) ,
SND_CTL_EXT_ACCESS_TLV_READ = (1<<4) , SND_CTL_EXT_ACCESS_TLV_WRITE = (1<<5) , SND_CTL_EXT_ACCESS_TLV_READWRITE = (3<<4) , SND_CTL_EXT_ACCESS_TLV_COMMAND = (1<<6) ,
SND_CTL_EXT_ACCESS_INACTIVE = (1<<8) , SND_CTL_EXT_ACCESS_TLV_CALLBACK = (1<<28)
}

## Functions

int | snd_ctl_ext_create (snd_ctl_ext_t *ext, const char *name, int mode)
| Create an external control plugin instance.
int | snd_ctl_ext_delete (snd_ctl_ext_t *ext)
| Delete the external control plugin.

## Detailed Description

## Macro Definition Documentation

## SND_CTL_EXT_KEY_NOT_FOUND

#define SND_CTL_EXT_KEY_NOT_FOUND (snd_ctl_ext_key_t)(-1)

find_elem callback returns this if no matching control element is found

## SND_CTL_EXT_VERSION

#define SND_CTL_EXT_VERSION

Value:
((SND_CTL_EXT_VERSION_MAJOR<<16) |\
(SND_CTL_EXT_VERSION_MINOR<<8) |\
(SND_CTL_EXT_VERSION_TINY))
SND_CTL_EXT_VERSION_MAJOR
#define SND_CTL_EXT_VERSION_MAJOR
Definition control_external.h:78
SND_CTL_EXT_VERSION_MINOR
#define SND_CTL_EXT_VERSION_MINOR
Definition control_external.h:79
SND_CTL_EXT_VERSION_TINY
#define SND_CTL_EXT_VERSION_TINY
Definition control_external.h:80

external plugin protocol version

## SND_CTL_EXT_VERSION_MAJOR

#define SND_CTL_EXT_VERSION_MAJOR 1

Protocol major version

## SND_CTL_EXT_VERSION_MINOR

#define SND_CTL_EXT_VERSION_MINOR 0

Protocol minor version

## SND_CTL_EXT_VERSION_TINY

#define SND_CTL_EXT_VERSION_TINY 1

Protocol tiny version

## SND_CTL_PLUGIN_DEFINE_FUNC

#define SND_CTL_PLUGIN_DEFINE_FUNC | ( |  | plugin | ) |

Value:
int SND_CTL_PLUGIN_ENTRY(plugin) (snd_ctl_t **handlep, const char *name,\
snd_config_t *root, snd_config_t *conf, int mode)
snd_config_t
struct _snd_config snd_config_t
Internal structure for a configuration node object.
Definition conf.h:74
snd_ctl_t
struct _snd_ctl snd_ctl_t
Definition control.h:369
SND_CTL_PLUGIN_ENTRY
#define SND_CTL_PLUGIN_ENTRY(name)
Definition control_external.h:46

Define the control plugin

## SND_CTL_PLUGIN_ENTRY

#define SND_CTL_PLUGIN_ENTRY | ( |  | name | ) |

Value:
_snd_ctl_##name##_open

Define the object entry for external control plugins

## SND_CTL_PLUGIN_SYMBOL

#define SND_CTL_PLUGIN_SYMBOL | ( |  | name | ) |

Value:
SND_DLSYM_BUILD_VERSION(SND_CTL_PLUGIN_ENTRY(name), SND_CONTROL_DLSYM_VERSION);
SND_CONTROL_DLSYM_VERSION
#define SND_CONTROL_DLSYM_VERSION
Definition control.h:49
SND_DLSYM_BUILD_VERSION
#define SND_DLSYM_BUILD_VERSION(name, version)
Appends the build version to the name of a versioned dynamic symbol.
Definition global.h:70

Define the symbols of the given control plugin with versions

## Typedef Documentation

## snd_ctl_ext_callback_t

typedef struct snd_ctl_ext_callback snd_ctl_ext_callback_t

Callback table of control ext

## snd_ctl_ext_key_t

typedef unsigned long snd_ctl_ext_key_t

Key to access a control pointer

## snd_ctl_ext_t

typedef struct snd_ctl_ext snd_ctl_ext_t

External control plugin handle

## snd_ctl_ext_tlv_rw_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)

Callback to handle TLV commands.

## Enumeration Type Documentation

## snd_ctl_ext_access_t

enum snd_ctl_ext_access_t

The access type bits stored in get_attribute callback

## Function Documentation

## snd_ctl_ext_create()

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

Create an external control plugin instance.

Parameters

  ext | the plugin handle
  name | name of control
  mode | control open mode

Returns
  0 if successful, or a negative error code

Creates the external control instance.

## snd_ctl_ext_delete()

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