summaryrefslogtreecommitdiff
path: root/sound/core/control_compat.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-10-07 22:38:59 +0200
committerTakashi Iwai <tiwai@suse.de>2011-10-09 09:09:11 +0200
commit8d448162bda5ae3b5ecb26fe50c8fbbeae99faa4 (patch)
tree5a325ffbc56a6260d933c1997b5f36ba1f3ab165 /sound/core/control_compat.c
parentf92766bc8948f978a838a5607bea95804c8dfdfe (diff)
downloadlwn-8d448162bda5ae3b5ecb26fe50c8fbbeae99faa4.tar.gz
lwn-8d448162bda5ae3b5ecb26fe50c8fbbeae99faa4.zip
ALSA: control: add support for ENUMERATED user space controls
Handling of user control elements was implemented for all types except ENUMERATED. This type will be needed for the device-specific mixers of upcoming FireWire drivers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control_compat.c')
-rw-r--r--sound/core/control_compat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c
index 426874429a5e..2bb95a7a8809 100644
--- a/sound/core/control_compat.c
+++ b/sound/core/control_compat.c
@@ -83,6 +83,8 @@ struct snd_ctl_elem_info32 {
u32 items;
u32 item;
char name[64];
+ u64 names_ptr;
+ u32 names_length;
} enumerated;
unsigned char reserved[128];
} value;
@@ -372,6 +374,8 @@ static int snd_ctl_elem_add_compat(struct snd_ctl_file *file,
&data32->value.enumerated,
sizeof(data->value.enumerated)))
goto error;
+ data->value.enumerated.names_ptr =
+ (uintptr_t)compat_ptr(data->value.enumerated.names_ptr);
break;
default:
break;