control: add snd_ctl_elem_add_enumerated()

Handling of user control elements was implemented for all types except
BYTES and ENUMERATED.  Enumerated user controls will be needed for the
device-specific mixers of upcoming FireWire drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
Clemens Ladisch 2011-10-07 22:46:51 +02:00
parent 567cc19a88
commit 15c6f83296
4 changed files with 84 additions and 2 deletions

View file

@ -26,10 +26,10 @@
#if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
#include <linux/ioctl.h>
#include <linux/types.h>
#ifdef __KERNEL__
#include <linux/types.h>
#include <linux/time.h>
#include <asm/byteorder.h>
@ -734,7 +734,7 @@ struct sndrv_timer_tread {
* *
****************************************************************************/
#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)
#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
struct sndrv_ctl_card_info {
int card; /* card number */
@ -833,6 +833,8 @@ struct sndrv_ctl_elem_info {
unsigned int items; /* R: number of items */
unsigned int item; /* W: item number */
char name[64]; /* R: value name */
__u64 names_ptr; /* W: names list (ELEM_ADD only) */
unsigned int names_length;
} enumerated;
unsigned char reserved[128];
} value;