[alsa-devel] Query regarding ALSA control interface
pharaoh137 at gmail.com
Tue Jul 24 16:32:37 CEST 2007
On 7/24/07, Clemens Ladisch <cladisch at fastmail.net> wrote:
> Pharaoh . wrote:
> > Now, I have to implement a control which takes four different
> > 0,1.100 and 101. In this case what shoud be the type of control? It
> > 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".
Thanks Clemens, I had implemented it using ENUM type. It works.
More information about the Alsa-devel