aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall_types.h
diff options
context:
space:
mode:
authorFilip Bozuta <Filip.Bozuta@rt-rk.com>2020-01-15 20:36:44 +0100
committerLaurent Vivier <laurent@vivier.eu>2020-02-19 11:17:40 +0100
commitd22edf0adfbfb5e5d583b51d274e9fbcb285bb02 (patch)
treef3fc6f2c1017844d7e6199c06129326b54cfd17a /linux-user/syscall_types.h
parentaca7708eab01475099e3737aff29e12639a22da1 (diff)
downloadqemu-d22edf0adfbfb5e5d583b51d274e9fbcb285bb02.zip
qemu-d22edf0adfbfb5e5d583b51d274e9fbcb285bb02.tar.gz
qemu-d22edf0adfbfb5e5d583b51d274e9fbcb285bb02.tar.bz2
linux-user: Add support for selecting alsa timer using ioctl
This patch implements functionality of following ioctl: SNDRV_TIMER_IOCTL_SELECT - Selecting timer Selects the timer which id is specified. The timer id is specified in the following strcuture: struct snd_timer_select { struct snd_timer_id id; /* timer ID */ unsigned char reserved[32]; /* reserved */ }; A pointer to this structure should be passed as the third ioctl's argument. Before calling the ioctl, the field "tid" should be initialized with the id information for the timer which is to be selected. If there is no timer device with the specified id, the error ENODEV ("No such device") is returned. Implementation notes: Ioctl implemented in this patch has a pointer to a 'struct snd_timer_select' as its third argument. That is the reason why a corresponding definition was added in 'linux-user/syscall_types.h'. The rest of the implementation was straightforward. Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Message-Id: <1579117007-7565-11-git-send-email-Filip.Bozuta@rt-rk.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall_types.h')
-rw-r--r--linux-user/syscall_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index adcfa28..81bc719 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -116,6 +116,10 @@ STRUCT(snd_timer_gstatus,
TYPE_ULONG, /* resolution_den */
MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
+STRUCT(snd_timer_select,
+ MK_STRUCT(STRUCT_snd_timer_id), /* id */
+ MK_ARRAY(TYPE_CHAR, 32)) /* reserved */
+
/* loop device ioctls */
STRUCT(loop_info,
TYPE_INT, /* lo_number */