ALSA project - the C library reference
Primitive control plugins

Control plugins extends functionality and features of control devices. The plugins take care about various control mapping or so.

The child configuration (in one compound):

ctl.test {
type remap
child "hw:0"
... map/remap configuration ...
}

The child may be defined as compound containing the full specification:

ctl.test {
type remap
child {
type hw
card 0
}
... map/remap configuration ...
}

Plugin: hw

This plugin communicates directly with the ALSA kernel driver. It is a raw communication without any conversions.

control.name {
type hw # Kernel PCM
card INT/STR # Card name (string) or number (integer)
}

Function reference

Plugin: Remap & map

This plugin can remap (rename) identifiers (except the numid part) for a child control to another. The plugin can also merge the multiple child controls to one or split one control to more.

ctl.name {
type remap # Route & Volume conversion PCM
child STR # Slave name
# or
child { # Slave definition
type STR
...
}
remap {
# the ID strings are parsed in the amixer style like 'name="Headphone Playback Switch",index=2'
SRC_ID1_STR DST_ID1_STR
SRC_ID2_STR DST_ID2_STR
...
}
map {
# join two stereo controls to one
CREATE_ID1_STR {
SRC_ID1_STR {
vindex.0 0 # source channel 0 to merged channel 0
vindex.1 1
}
SRC_ID2_STR {
vindex.2 0
vindex.3 1 # source channel 1 to merged channel 3
}
}
# split stereo to mono
CREATE_ID2_STR {
SRC_ID3_STR {
vindex.0 0 # stereo to mono (first channel)
}
}
CREATE_ID3_STR {
SRC_ID4_STR {
vindex.0 1 # stereo to mono (second channel)
}
}
}
}

Function reference