From: Takashi Sakamoto Date: Wed, 15 Jun 2016 14:57:37 +0000 (+0900) Subject: ctl: add an overview for design of ALSA control interface X-Git-Tag: v1.1.2~117 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f3c24de8c0df2cadb8bce86113f9b9f64dc3348e;p=alsa-lib.git ctl: add an overview for design of ALSA control interface This commit adds a description about the design of ALSA control interface for developers to understand a few components of low level. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/src/control/control.c b/src/control/control.c index ae788431..504da1f9 100644 --- a/src/control/control.c +++ b/src/control/control.c @@ -35,9 +35,29 @@ also interface notifying about control and structure changes. \section control_general_overview General overview -The primitive controls can be integer, inter64, boolean, enumerators, bytes -and IEC958 structure. - +In ALSA control feature, each sound card can have control elements. The elements +are managed according to below model. + + - element set + - A set of elements with the same attribute (i.e. name, get/put operations). + Some element sets can be added to a sound card by drivers in kernel and + userspace applications. + - element + - An element can be identified by userspace applications. Each element has + own identical information. + - member + - An element includes some members to have a value. The value of each member + can be changed by both of userspace applications and drivers in kernel. + +Each element can be identified by two ways; a combination of name and index, or +numerical number (numid). + +The type of element set is one of integer, integerr64, boolean, enumerators, +bytes and IEC958 structure. This indicates the type of value for each member in +elements included in the element set. + +When the value of member is changed, corresponding events are transferred to +userspace applications. The applications should subscribe any events in advance. */ #include