From nobody Mon Feb 9 19:52:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1578575414; cv=none; d=zohomail.com; s=zohoarc; b=XAuvi2MnmvdwwR4OBAROpnKlv/aiaWlLMIP5ETevVBd5WzNDkLWmMYvT4UePjFG3YBJvW3iC/FfHGuBk42b36VRd7FTs6sI+vAhESDFkAxVy/4kj0yCde3pIDzYliu9RgTPQcRdj5d6RXW7z1dLsN+uiOmWHNTV5g/siFjbqB40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578575414; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=TJ6x7WsDj5B83tCNPh6YBWAMx6UCc6vjknD18zXHuXU=; b=K36sNMcqU2w2TAHKUvIUgI29FBNUTbH77kkPx1eAYo/bMfQGGNIx5hC6587WcJbp/JdyUwLnVIVPrkn0xH9bOlTRhhL90BMqLJO/E/Xm8Znm5J3SXTL3+lCoLkq6JdONLelPFn5TVmAT7jFtzOLGdAARETxps2ylvr7B6ynaXes= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1578575414968183.30473839571584; Thu, 9 Jan 2020 05:10:14 -0800 (PST) Received: from localhost ([::1]:60112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipXZk-0006s5-Qy for importer@patchew.org; Thu, 09 Jan 2020 08:10:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36503) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipXQc-0003JM-OQ for qemu-devel@nongnu.org; Thu, 09 Jan 2020 08:00:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipXQa-0003A6-TK for qemu-devel@nongnu.org; Thu, 09 Jan 2020 08:00:46 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:42110 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipXQY-00034v-Of for qemu-devel@nongnu.org; Thu, 09 Jan 2020 08:00:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 2B8201A20DC; Thu, 9 Jan 2020 13:59:34 +0100 (CET) Received: from rtrkw493-lin.domain.local (rtrkw493-lin.domain.local [10.10.14.93]) by mail.rt-rk.com (Postfix) with ESMTPSA id 0D9311A2136; Thu, 9 Jan 2020 13:59:34 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Filip Bozuta To: qemu-devel@nongnu.org Subject: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl Date: Thu, 9 Jan 2020 13:59:19 +0100 Message-Id: <1578574763-8327-9-git-send-email-Filip.Bozuta@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578574763-8327-1-git-send-email-Filip.Bozuta@rt-rk.com> References: <1578574763-8327-1-git-send-email-Filip.Bozuta@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: riku.voipio@iki.fi, laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This patch implements functionalities of following ioctl: SNDRV_TIMER_IOCTL_TREAD - Setting enhanced time read Sets enhanced time read which is used for reading time with timestamps and events. The third ioctl's argument is a pointer to an 'int'. Enhanc= ed reading is set if the third argument is different than 0, otherwise nor= mal time reading is set. Implementation notes: Because the implemented ioctl has 'int' as its third argument, the implementation was straightforward. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 1 + linux-user/syscall_defs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index ed1bd4c..9106773 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -452,6 +452,7 @@ IOCTL(SNDRV_TIMER_IOCTL_PVERSION, IOC_R, MK_PTR(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, MK_PTR(TYPE_INT)) =20 IOCTL(HDIO_GETGEO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_hd_geometry))) IOCTL(HDIO_GET_UNMASKINTR, IOC_R, MK_PTR(TYPE_INT)) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 7409021..8d505c1 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2429,6 +2429,7 @@ struct target_statfs64 { #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) =20 /* vfat ioctls */ #define TARGET_VFAT_IOCTL_READDIR_BOTH TARGET_IORU('r', 1) --=20 2.7.4