[alsa-devel] Query regarding ALSA control interface

Clemens Ladisch cladisch at fastmail.net
Tue Jul 24 08:57:30 CEST 2007

Pharaoh . wrote:
> Now, I have to implement a control which takes four different values..namely
> 0,1.100 and 101. In this case what shoud be the type of control? It should
> be ENUMERATED or INTEGER? I am confused here since the values are not
> exactly in a range.

An INTEGER control takes numeric values in a specific range, while an
ENUMERATED control takes values that are not numerically related (but
that are _internally_ represented as integers in a specific range).

In your case, you'd probably want to use an enumerated control with the
range 0..3, which maps to the four names "0", "1", "100" and "101".


More information about the Alsa-devel mailing list