From patchwork Sun Jun 19 00:11:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Pearson X-Patchwork-Id: 9185923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CAC0F6075F for ; Sun, 19 Jun 2016 00:24:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1A511FFCA for ; Sun, 19 Jun 2016 00:24:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 924E227AC2; Sun, 19 Jun 2016 00:24:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UPPERCASE_50_75 autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3309D269B2 for ; Sun, 19 Jun 2016 00:24:26 +0000 (UTC) Received: from localhost ([::1]:36933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEQXI-0001sP-K2 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 18 Jun 2016 20:24:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEQL7-0005ia-Hk for qemu-devel@nongnu.org; Sat, 18 Jun 2016 20:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEQL3-0003oW-LD for qemu-devel@nongnu.org; Sat, 18 Jun 2016 20:11:48 -0400 Received: from pearsoncomputing.net ([192.119.205.242]:47247 helo=mail.pearsoncomputing.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEQL3-0003oS-8X for qemu-devel@nongnu.org; Sat, 18 Jun 2016 20:11:45 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.pearsoncomputing.net (Postfix) with ESMTP id 01D88640DFB for ; Sat, 18 Jun 2016 19:11:45 -0500 (CDT) Received: from mail.pearsoncomputing.net ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id kWwvyFKLQ_hM for ; Sat, 18 Jun 2016 19:11:43 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.pearsoncomputing.net (Postfix) with ESMTP id 5B1AA640E6F for ; Sat, 18 Jun 2016 19:11:43 -0500 (CDT) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.pearsoncomputing.net 5B1AA640E6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1466295103; bh=YOyB3R5zlkZBdI6GZneIywbRnKiyO4/ZmYcV7RatSp0=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=t4p6OJFMPTRPH9CJ7RVxYAV4EsseVj09bgN6sncAGmqd9oluWChyTzhzFNtbWs2mX 3lXMESjl6D5fXa1kFPXU7ubfBNDz7xdN8hSlYs3MdIFQuSs33hMRjvvPPYL8/uwVc3 ZS8GKiuHuSS2IV2zCW0qZ4OIji5H/edj7Zyct4jo= X-Virus-Scanned: amavisd-new at pearsoncomputing.net Received: from mail.pearsoncomputing.net ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ypZMIk75HtG1 for ; Sat, 18 Jun 2016 19:11:43 -0500 (CDT) Received: from [192.168.3.54] (apollo.starlink.edu [192.168.3.54]) by mail.pearsoncomputing.net (Postfix) with ESMTP id 22B9A640DFB for ; Sat, 18 Jun 2016 19:11:43 -0500 (CDT) Message-ID: <5765E33F.1080603@raptorengineeringinc.com> Date: Sat, 18 Jun 2016 19:11:43 -0500 From: Timothy Pearson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4 MIME-Version: 1.0 To: qemu-devel@nongnu.org X-Enigmail-Version: 1.1.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.119.205.242 Subject: [Qemu-devel] [PATCH 7/7] Add ALSA ioctls X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Tested with ExtremeTuxRacer in guest with HDMI audio sink on host Signed-off-by: Timothy Pearson --- linux-user/ioctls.h | 72 ++++++++++++ linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 73 ++++++++++++ linux-user/syscall_types.h | 273 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 419 insertions(+) TYPE_INT, /* version_minor */ diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index a06e263..29734f0 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -387,6 +387,78 @@ IOCTL_SPECIAL(SIOCDELRT, IOC_W, do_ioctl_rt, MK_PTR(MK_STRUCT(STRUCT_rtentry))) + IOCTL(SNDRV_CTL_IOCTL_PVERSION, IOC_R, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_CARD_INFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_card_info))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_LIST, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_list))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_INFO, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_info))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_READ, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_value))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_WRITE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_value))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_LOCK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_id))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_UNLOCK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_id))) + IOCTL(SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS, IOC_RW, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_ELEM_ADD, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_info))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_REPLACE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_info))) + IOCTL(SNDRV_CTL_IOCTL_ELEM_REMOVE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_elem_id))) + IOCTL(SNDRV_CTL_IOCTL_TLV_READ, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_tlv))) + IOCTL(SNDRV_CTL_IOCTL_TLV_WRITE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_tlv))) + IOCTL(SNDRV_CTL_IOCTL_TLV_COMMAND, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_ctl_tlv))) + IOCTL(SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE, IOC_RW, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_HWDEP_INFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_hwdep_info))) + IOCTL(SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE, IOC_R, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_PCM_INFO, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_info))) + IOCTL(SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, IOC_W, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE, IOC_RW, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_RAWMIDI_INFO, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_rawmidi_info))) + IOCTL(SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE, IOC_W, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_POWER, IOC_RW, TYPE_INT) + IOCTL(SNDRV_CTL_IOCTL_POWER_STATE, IOC_R, TYPE_INT) + + IOCTL(SNDRV_PCM_IOCTL_PVERSION , IOC_R, TYPE_INT) + IOCTL(SNDRV_PCM_IOCTL_INFO , IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_info))) + IOCTL(SNDRV_PCM_IOCTL_TSTAMP , IOC_W, TYPE_INT) + IOCTL(SNDRV_PCM_IOCTL_TTSTAMP , IOC_W, TYPE_INT) + IOCTL(SNDRV_PCM_IOCTL_HW_REFINE , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_hw_params))) + IOCTL(SNDRV_PCM_IOCTL_HW_PARAMS , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_hw_params))) + IOCTL(SNDRV_PCM_IOCTL_HW_FREE , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_SW_PARAMS , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_sw_params))) + IOCTL(SNDRV_PCM_IOCTL_STATUS , IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_status))) + IOCTL(SNDRV_PCM_IOCTL_DELAY , IOC_R, TYPE_ULONG) + IOCTL(SNDRV_PCM_IOCTL_HWSYNC , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_SYNC_PTR , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_sync_ptr))) + IOCTL(SNDRV_PCM_IOCTL_STATUS_EXT , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_status))) + IOCTL(SNDRV_PCM_IOCTL_CHANNEL_INFO , IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_pcm_channel_info))) + IOCTL(SNDRV_PCM_IOCTL_PREPARE , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_RESET , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_START , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_DROP , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_DRAIN , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_PAUSE , IOC_W, TYPE_INT) + IOCTL(SNDRV_PCM_IOCTL_REWIND , IOC_W, TYPE_ULONG) + IOCTL(SNDRV_PCM_IOCTL_RESUME , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_XRUN , 0, TYPE_NULL) + IOCTL(SNDRV_PCM_IOCTL_FORWARD , IOC_W, TYPE_ULONG) + IOCTL(SNDRV_PCM_IOCTL_WRITEI_FRAMES , IOC_W, MK_PTR(MK_STRUCT(STRUCT_snd_xferi))) + IOCTL(SNDRV_PCM_IOCTL_READI_FRAMES , IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_xferi))) + IOCTL(SNDRV_PCM_IOCTL_WRITEN_FRAMES , IOC_W, MK_PTR(MK_STRUCT(STRUCT_snd_xfern))) + IOCTL(SNDRV_PCM_IOCTL_READN_FRAMES , IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_xfern))) + IOCTL(SNDRV_PCM_IOCTL_LINK , IOC_W, TYPE_INT) + IOCTL(SNDRV_PCM_IOCTL_UNLINK , 0, TYPE_NULL) + + IOCTL(SNDRV_TIMER_IOCTL_PVERSION , IOC_R, TYPE_INT) + IOCTL(SNDRV_TIMER_IOCTL_NEXT_DEVICE , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_timer_id))) + IOCTL(SNDRV_TIMER_IOCTL_TREAD , IOC_W, TYPE_INT) + IOCTL(SNDRV_TIMER_IOCTL_GINFO , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_timer_ginfo))) + IOCTL(SNDRV_TIMER_IOCTL_GPARAMS , IOC_W, MK_PTR(MK_STRUCT(STRUCT_snd_timer_gparams))) + IOCTL(SNDRV_TIMER_IOCTL_GSTATUS , IOC_RW, MK_PTR(MK_STRUCT(STRUCT_snd_timer_gstatus))) + IOCTL(SNDRV_TIMER_IOCTL_SELECT , IOC_W, MK_PTR(MK_STRUCT(STRUCT_snd_timer_select))) + IOCTL(SNDRV_TIMER_IOCTL_INFO , IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_timer_info))) + IOCTL(SNDRV_TIMER_IOCTL_PARAMS , IOC_W, MK_PTR(MK_STRUCT(STRUCT_snd_timer_params))) + IOCTL(SNDRV_TIMER_IOCTL_STATUS , IOC_R, MK_PTR(MK_STRUCT(STRUCT_snd_timer_status))) + IOCTL(SNDRV_TIMER_IOCTL_START , 0, TYPE_NULL) + IOCTL(SNDRV_TIMER_IOCTL_STOP , 0, TYPE_NULL) + IOCTL(SNDRV_TIMER_IOCTL_CONTINUE , 0, TYPE_NULL) + IOCTL(SNDRV_TIMER_IOCTL_PAUSE , 0, TYPE_NULL) + IOCTL(DRM_IOCTL_VERSION, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_drm_version))) IOCTL(DRM_IOCTL_GET_UNIQUE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_drm_unique))) IOCTL(DRM_IOCTL_GET_MAGIC, IOC_R, MK_PTR(MK_STRUCT(STRUCT_drm_auth))) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 602e445..35d0f04 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -82,6 +82,7 @@ int __clone2(int (*fn)(void *), void *child_stack_base, #define tchars host_tchars /* same as target */ #define ltchars host_ltchars /* same as target */ +#include #include #include #include diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 23baa15..0301962 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2605,6 +2605,79 @@ struct target_user_cap_data { uint32_t inheritable; }; +/* asound defines */ +#define TARGET_SNDRV_CTL_IOCTL_PVERSION TARGET_IOR('U', 0x00, int) +#define TARGET_SNDRV_CTL_IOCTL_CARD_INFO TARGET_IOR('U', 0x01, struct snd_ctl_card_info) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_LIST TARGET_IOWR('U', 0x10, struct snd_ctl_elem_list) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_INFO TARGET_IOWR('U', 0x11, struct snd_ctl_elem_info) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_READ TARGET_IOWR('U', 0x12, struct snd_ctl_elem_value) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_WRITE TARGET_IOWR('U', 0x13, struct snd_ctl_elem_value) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_LOCK TARGET_IOW('U', 0x14, struct snd_ctl_elem_id) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_UNLOCK TARGET_IOW('U', 0x15, struct snd_ctl_elem_id) +#define TARGET_SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS TARGET_IOWR('U', 0x16, int) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_ADD TARGET_IOWR('U', 0x17, struct snd_ctl_elem_info) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_REPLACE TARGET_IOWR('U', 0x18, struct snd_ctl_elem_info) +#define TARGET_SNDRV_CTL_IOCTL_ELEM_REMOVE TARGET_IOWR('U', 0x19, struct snd_ctl_elem_id) +#define TARGET_SNDRV_CTL_IOCTL_TLV_READ TARGET_IOWR('U', 0x1a, struct snd_ctl_tlv) +#define TARGET_SNDRV_CTL_IOCTL_TLV_WRITE TARGET_IOWR('U', 0x1b, struct snd_ctl_tlv) +#define TARGET_SNDRV_CTL_IOCTL_TLV_COMMAND TARGET_IOWR('U', 0x1c, struct snd_ctl_tlv) +#define TARGET_SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE TARGET_IOWR('U', 0x20, int) +#define TARGET_SNDRV_CTL_IOCTL_HWDEP_INFO TARGET_IOR('U', 0x21, struct snd_hwdep_info) +#define TARGET_SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE TARGET_IOR('U', 0x30, int) +#define TARGET_SNDRV_CTL_IOCTL_PCM_INFO TARGET_IOWR('U', 0x31, struct snd_pcm_info) +#define TARGET_SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE TARGET_IOW('U', 0x32, int) +#define TARGET_SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE TARGET_IOWR('U', 0x40, int) +#define TARGET_SNDRV_CTL_IOCTL_RAWMIDI_INFO TARGET_IOWR('U', 0x41, struct snd_rawmidi_info) +#define TARGET_SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE TARGET_IOW('U', 0x42, int) +#define TARGET_SNDRV_CTL_IOCTL_POWER TARGET_IOWR('U', 0xd0, int) +#define TARGET_SNDRV_CTL_IOCTL_POWER_STATE TARGET_IOR('U', 0xd1, int) + +#define TARGET_SNDRV_PCM_IOCTL_PVERSION TARGET_IOR('A', 0x00, int) +#define TARGET_SNDRV_PCM_IOCTL_INFO TARGET_IOR('A', 0x01, struct snd_pcm_info) +#define TARGET_SNDRV_PCM_IOCTL_TSTAMP TARGET_IOW('A', 0x02, int) +#define TARGET_SNDRV_PCM_IOCTL_TTSTAMP TARGET_IOW('A', 0x03, int) +#define TARGET_SNDRV_PCM_IOCTL_HW_REFINE TARGET_IOWR('A', 0x10, struct snd_pcm_hw_params) +#define TARGET_SNDRV_PCM_IOCTL_HW_PARAMS TARGET_IOWR('A', 0x11, struct snd_pcm_hw_params) +#define TARGET_SNDRV_PCM_IOCTL_HW_FREE TARGET_IO('A', 0x12) +#define TARGET_SNDRV_PCM_IOCTL_SW_PARAMS TARGET_IOWR('A', 0x13, struct snd_pcm_sw_params) +#define TARGET_SNDRV_PCM_IOCTL_STATUS TARGET_IOR('A', 0x20, struct snd_pcm_status) +#define TARGET_SNDRV_PCM_IOCTL_DELAY TARGET_IOR('A', 0x21, long) +#define TARGET_SNDRV_PCM_IOCTL_HWSYNC TARGET_IO('A', 0x22) +#define TARGET_SNDRV_PCM_IOCTL_SYNC_PTR TARGET_IOWR('A', 0x23, struct snd_pcm_sync_ptr) +#define TARGET_SNDRV_PCM_IOCTL_STATUS_EXT TARGET_IOWR('A', 0x24, struct snd_pcm_status) +#define TARGET_SNDRV_PCM_IOCTL_CHANNEL_INFO TARGET_IOR('A', 0x32, struct snd_pcm_channel_info) +#define TARGET_SNDRV_PCM_IOCTL_PREPARE TARGET_IO('A', 0x40) +#define TARGET_SNDRV_PCM_IOCTL_RESET TARGET_IO('A', 0x41) +#define TARGET_SNDRV_PCM_IOCTL_START TARGET_IO('A', 0x42) +#define TARGET_SNDRV_PCM_IOCTL_DROP TARGET_IO('A', 0x43) +#define TARGET_SNDRV_PCM_IOCTL_DRAIN TARGET_IO('A', 0x44) +#define TARGET_SNDRV_PCM_IOCTL_PAUSE TARGET_IOW('A', 0x45, int) +#define TARGET_SNDRV_PCM_IOCTL_REWIND TARGET_IOW('A', 0x46, unsigned long) +#define TARGET_SNDRV_PCM_IOCTL_RESUME TARGET_IO('A', 0x47) +#define TARGET_SNDRV_PCM_IOCTL_XRUN TARGET_IO('A', 0x48) +#define TARGET_SNDRV_PCM_IOCTL_FORWARD TARGET_IOW('A', 0x49, unsigned long) +#define TARGET_SNDRV_PCM_IOCTL_WRITEI_FRAMES TARGET_IOW('A', 0x50, struct snd_xferi) +#define TARGET_SNDRV_PCM_IOCTL_READI_FRAMES TARGET_IOR('A', 0x51, struct snd_xferi) +#define TARGET_SNDRV_PCM_IOCTL_WRITEN_FRAMES TARGET_IOW('A', 0x52, struct snd_xfern) +#define TARGET_SNDRV_PCM_IOCTL_READN_FRAMES TARGET_IOR('A', 0x53, struct snd_xfern) +#define TARGET_SNDRV_PCM_IOCTL_LINK TARGET_IOW('A', 0x60, int) +#define TARGET_SNDRV_PCM_IOCTL_UNLINK TARGET_IO('A', 0x61) + +#define TARGET_SNDRV_TIMER_IOCTL_PVERSION TARGET_IOR('T', 0x00, int) +#define TARGET_SNDRV_TIMER_IOCTL_NEXT_DEVICE TARGET_IOWR('T', 0x01, struct snd_timer_id) +#define TARGET_SNDRV_TIMER_IOCTL_TREAD TARGET_IOW('T', 0x02, int) +#define TARGET_SNDRV_TIMER_IOCTL_GINFO TARGET_IOWR('T', 0x03, struct snd_timer_ginfo) +#define TARGET_SNDRV_TIMER_IOCTL_GPARAMS TARGET_IOW('T', 0x04, struct snd_timer_gparams) +#define TARGET_SNDRV_TIMER_IOCTL_GSTATUS TARGET_IOWR('T', 0x05, struct snd_timer_gstatus) +#define TARGET_SNDRV_TIMER_IOCTL_SELECT TARGET_IOW('T', 0x10, struct snd_timer_select) +#define TARGET_SNDRV_TIMER_IOCTL_INFO TARGET_IOR('T', 0x11, struct snd_timer_info) +#define TARGET_SNDRV_TIMER_IOCTL_PARAMS TARGET_IOW('T', 0x12, struct snd_timer_params) +#define TARGET_SNDRV_TIMER_IOCTL_STATUS TARGET_IOR('T', 0x14, struct snd_timer_status) +#define TARGET_SNDRV_TIMER_IOCTL_START TARGET_IO('T', 0xa0) +#define TARGET_SNDRV_TIMER_IOCTL_STOP TARGET_IO('T', 0xa1) +#define TARGET_SNDRV_TIMER_IOCTL_CONTINUE TARGET_IO('T', 0xa2) +#define TARGET_SNDRV_TIMER_IOCTL_PAUSE TARGET_IO('T', 0xa3) + /* drm defines */ #define TARGET_DRM_IOCTL_VERSION TARGET_IOWR('d', 0x00, struct drm_version) #define TARGET_DRM_IOCTL_GET_UNIQUE TARGET_IOWR('d', 0x01, struct drm_unique) diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index c5c9ada..26fccb5 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -254,6 +254,279 @@ STRUCT(blkpg_ioctl_arg, TYPE_INT, /* datalen */ TYPE_PTRVOID) /* data */ +STRUCT(snd_ctl_card_info, + TYPE_INT, /* card */ + TYPE_INT, /* pad */ + MK_ARRAY(TYPE_CHAR, 16), /* id */ + MK_ARRAY(TYPE_CHAR, 16), /* driver */ + MK_ARRAY(TYPE_CHAR, 32), /* name */ + MK_ARRAY(TYPE_CHAR, 80), /* longname */ + MK_ARRAY(TYPE_CHAR, 16), /* reserved_ */ + MK_ARRAY(TYPE_CHAR, 80), /* mixername */ + MK_ARRAY(TYPE_CHAR, 128)) /* components */ + +STRUCT(snd_ctl_elem_list, + TYPE_INT, /* offset */ + TYPE_INT, /* space */ + TYPE_INT, /* used */ + TYPE_INT, /* count */ + TYPE_PTRVOID, /* pids */ + MK_ARRAY(TYPE_CHAR, 50)) /* reserved */ + +STRUCT(snd_ctl_elem_info, + /* id struct */ + TYPE_INT, /* numid */ + TYPE_INT, /* iface */ + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + MK_ARRAY(TYPE_CHAR, SNDRV_CTL_ELEM_ID_NAME_MAXLEN), /* name */ + TYPE_INT, /* index */ + + TYPE_INT, /*type */ + TYPE_INT, /* access */ + TYPE_INT, /* count */ + TYPE_INT, /* owner */ + MK_ARRAY(TYPE_CHAR, 128), /* value */ + MK_ARRAY(TYPE_CHAR, 8), /* dimen */ + MK_ARRAY(TYPE_CHAR, 56)) /* reserved */ + +STRUCT(snd_ctl_elem_value, + /* id struct */ + TYPE_INT, /* numid */ + TYPE_INT, /* iface */ + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + MK_ARRAY(TYPE_CHAR, SNDRV_CTL_ELEM_ID_NAME_MAXLEN), /* name */ + TYPE_INT, /* index */ + + TYPE_INT, /* indirect */ + MK_ARRAY(TYPE_CHAR, 512), /* value */ + + /* timespec struct */ + TYPE_LONG, /* tv_sec */ + TYPE_LONG, /* tv_nsec */ + MK_ARRAY(TYPE_CHAR, 112)) /* reserved */ + +STRUCT(snd_ctl_elem_id, + TYPE_INT, /* numid */ + TYPE_INT, /* iface */ + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + MK_ARRAY(TYPE_CHAR, SNDRV_CTL_ELEM_ID_NAME_MAXLEN), /* name */ + TYPE_INT) /* index */ + +STRUCT(snd_ctl_tlv, + TYPE_INT, /* numid */ + TYPE_INT, /* length */ + TYPE_INT) /* tlv */ + +STRUCT(snd_hwdep_info, + TYPE_INT, /* device */ + TYPE_INT, /* card */ + MK_ARRAY(TYPE_CHAR, 64), /* id */ + MK_ARRAY(TYPE_CHAR, 80), /* name */ + TYPE_INT, /* iface */ + MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ + +STRUCT(snd_pcm_info, + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + TYPE_INT, /* stream */ + TYPE_INT, /* card */ + MK_ARRAY(TYPE_CHAR, 64), /* id */ + MK_ARRAY(TYPE_CHAR, 80), /* name */ + MK_ARRAY(TYPE_CHAR, 32), /* subname */ + TYPE_INT, /* dev_class */ + TYPE_INT, /* dev_subclass */ + TYPE_INT, /* subdevices_count */ + TYPE_INT, /* subdevices_avail */ + MK_ARRAY(TYPE_CHAR, 16), /* sync */ + MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ + +STRUCT(snd_rawmidi_info, + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + TYPE_INT, /* stream */ + TYPE_INT, /* card */ + TYPE_INT, /* flags */ + MK_ARRAY(TYPE_CHAR, 64), /* id */ + MK_ARRAY(TYPE_CHAR, 80), /* name */ + MK_ARRAY(TYPE_CHAR, 32), /* subname */ + TYPE_INT, /* subdevices_count */ + TYPE_INT, /* subdevices_avail */ + MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ + +STRUCT(snd_pcm_hw_params, + TYPE_INT, /* flags */ + MK_ARRAY(TYPE_INT, SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1), /* masks */ + MK_ARRAY(TYPE_INT, ((SNDRV_MASK_MAX+31)/32) * 5), /* mres */ + MK_ARRAY(TYPE_INT, 6 * (SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1)), /* snd_interval */ + MK_ARRAY(TYPE_INT, 6 * 9), /* ires */ + TYPE_INT, /* rmask */ + TYPE_INT, /* cmask */ + TYPE_INT, /* info */ + TYPE_INT, /* msbits */ + TYPE_INT, /* rate_num */ + TYPE_INT, /* rate_den */ + TYPE_LONG, /* fifo_size */ + MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ + +STRUCT(snd_pcm_sw_params, + TYPE_INT, /* tstamp_mode */ + TYPE_INT, /* period_step */ + TYPE_INT, /* sleep_min */ + TYPE_LONG, /* avail_min */ + TYPE_LONG, /* xfer_align */ + TYPE_LONG, /* start_threshold */ + TYPE_LONG, /* stop_threshold */ + TYPE_LONG, /* silence_threshold */ + TYPE_LONG, /* silence_size */ + TYPE_LONG, /* boundary */ + TYPE_INT, /* proto */ + TYPE_INT, /* tstamp_type */ + MK_ARRAY(TYPE_CHAR, 56)) /* reserved */ + +STRUCT(snd_pcm_status, + TYPE_INT, /* state */ + + /* timespec struct */ + TYPE_LONG, /* tv_sec */ + TYPE_LONG, /* tv_nsec */ + + /* timespec struct */ + TYPE_LONG, /* tv_sec */ + TYPE_LONG, /* tv_nsec */ + + TYPE_LONG, /* appl_ptr */ + TYPE_LONG, /* hw_ptr */ + TYPE_LONG, /* delay */ + TYPE_LONG, /* avail */ + TYPE_LONG, /* avail_max */ + TYPE_LONG, /* overrange */ + TYPE_INT, /* suspended_state */ + TYPE_INT, /* audio_tstamp_data */ + + /* timespec struct */ + TYPE_LONG, /* tv_sec */ + TYPE_LONG, /* tv_nsec */ + + /* timespec struct */ + TYPE_LONG, /* tv_sec */ + TYPE_LONG, /* tv_nsec */ + + TYPE_INT, /* audio_tstamp_accuracy */ + MK_ARRAY(TYPE_CHAR, 36)) /* reserved */ + +STRUCT(snd_pcm_sync_ptr, + TYPE_INT, /* flags */ + MK_ARRAY(TYPE_CHAR, 64), /* reserved */ + MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ + +STRUCT(snd_pcm_channel_info, + TYPE_INT, /* channel */ + TYPE_ULONGLONG, /* offset */ + TYPE_INT, /* first */ + TYPE_INT) /* step */ + +STRUCT(snd_xferi, + TYPE_LONG, /* result */ + TYPE_PTRVOID, /* buf */ + TYPE_LONG) /* frames */ + +STRUCT(snd_xfern, + TYPE_LONG, /* result */ + TYPE_PTRVOID, /* bufs */ + TYPE_LONG) /* frames */ + +STRUCT(snd_timer_id, + TYPE_INT, /* dev_class */ + TYPE_INT, /* dev_sclass */ + TYPE_INT, /* card */ + TYPE_INT, /* device */ + TYPE_INT) /* subdevice */ + +STRUCT(snd_timer_ginfo, + /* struct snd_timer_id */ + TYPE_INT, /* dev_class */ + TYPE_INT, /* dev_sclass */ + TYPE_INT, /* card */ + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + + TYPE_INT, /* flags */ + TYPE_INT, /* card */ + MK_ARRAY(TYPE_CHAR, 64), /* id */ + MK_ARRAY(TYPE_CHAR, 80), /* name */ + TYPE_LONG, /* reserved0 */ + TYPE_LONG, /* resolution */ + TYPE_LONG, /* resolution_min */ + TYPE_LONG, /* resolution_max */ + TYPE_INT, /* clients */ + MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ + +STRUCT(snd_timer_gparams, + /* struct snd_timer_id */ + TYPE_INT, /* dev_class */ + TYPE_INT, /* dev_sclass */ + TYPE_INT, /* card */ + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + + TYPE_LONG, /* period_num */ + TYPE_LONG, /* period_den */ + MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ + +STRUCT(snd_timer_gstatus, + /* struct snd_timer_id */ + TYPE_INT, /* dev_class */ + TYPE_INT, /* dev_sclass */ + TYPE_INT, /* card */ + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + + TYPE_LONG, /* resolution */ + TYPE_LONG, /* resolution_num */ + TYPE_LONG, /* resolution_den */ + MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ + +STRUCT(snd_timer_select, + /* struct snd_timer_id */ + TYPE_INT, /* dev_class */ + TYPE_INT, /* dev_sclass */ + TYPE_INT, /* card */ + TYPE_INT, /* device */ + TYPE_INT, /* subdevice */ + + MK_ARRAY(TYPE_CHAR, 32)) /* reserved */ + +STRUCT(snd_timer_info, + TYPE_INT, /* flags */ + TYPE_INT, /* card */ + MK_ARRAY(TYPE_CHAR, 64), /* id */ + MK_ARRAY(TYPE_CHAR, 80), /* name */ + TYPE_LONG, /* reserved0 */ + TYPE_LONG, /* resolution */ + MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ + +STRUCT(snd_timer_params, + TYPE_INT, /* flags */ + TYPE_INT, /* ticks */ + TYPE_INT, /* queue_size */ + TYPE_INT, /* reserved0 */ + TYPE_INT, /* filter */ + MK_ARRAY(TYPE_CHAR, 60)) /* reserved */ + +STRUCT(snd_timer_status, + /* timespec struct */ + TYPE_LONG, /* tv_sec */ + TYPE_LONG, /* tv_nsec */ + + TYPE_INT, /* resolution */ + TYPE_INT, /* lost */ + TYPE_INT, /* overrun */ + TYPE_INT, /* queue */ + MK_ARRAY(TYPE_CHAR, 64)) /* reserved */ + STRUCT(drm_version, TYPE_INT, /* version_major */