From patchwork Wed Dec 17 17:29:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Cussins X-Patchwork-Id: 5508531 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9AAA4BEEA8 for ; Wed, 17 Dec 2014 17:30:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C479E20A22 for ; Wed, 17 Dec 2014 17:30:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 40DCD209DC for ; Wed, 17 Dec 2014 17:30:09 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D536326145A; Wed, 17 Dec 2014 18:30:06 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,NO_DNS_FOR_FROM,SUBJ_OBFU_PUNCT_MANY,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id E87262607E8; Wed, 17 Dec 2014 18:30:01 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 385C9260A5B; Wed, 17 Dec 2014 18:30:00 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by alsa0.perex.cz (Postfix) with ESMTP id EB516260699 for ; Wed, 17 Dec 2014 18:29:53 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1F50C21257 for ; Wed, 17 Dec 2014 12:29:53 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Wed, 17 Dec 2014 12:29:53 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=eml.cc; h= x-sasl-enc:from:to:cc:subject:date:message-id; s=mesmtp; bh=HlU2 7hL4mvEhoMPkSEI2q2+xOes=; b=DRAKUfCOGOmidQ24anDzdo1/U3XJV9myIDey uXeCWcOS7V9qfLzddO9RAJhFoc439UHbaNZpjVuV21XnTdAuyENILdVcdj4YDc+P KU/fT6AM/px7QUGLyjtEaOmlyKzpwRJQ0k68DBb0Jwir6u6Fg4Bg2bIgfmVjkD07 oeLpYXs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:cc:subject:date :message-id; s=smtpout; bh=HlU27hL4mvEhoMPkSEI2q2+xOes=; b=Ci1zP AbPOzvOVtDhMz2EbsVt5TmYq7GSaDIHhO2x/Y2he+ptIXqomy4Tk+enscnKeiY6f +e+JvXIbJCUs1axqrrQCyPCJvizO4nysVi8kE3JgC0zNs4RoulE0k1zVUnWyh+82 SbMcArrv/GztpNv1GSGxly/q1Qe4DbcFFmTIZ8= X-Sasl-enc: O9bwisrbIaBuTCmBB6BLl0TmWvpU7o9gJMCD+3WTeeQK 1418837392 Received: from fiercex.lan (unknown [217.169.4.223]) by mail.messagingengine.com (Postfix) with ESMTPA id 4A010C0027D; Wed, 17 Dec 2014 12:29:52 -0500 (EST) From: Tim Cussins To: alsa-devel@alsa-project.org Date: Wed, 17 Dec 2014 17:29:23 +0000 Message-Id: <1418837365-19398-1-git-send-email-timcussins@eml.cc> X-Mailer: git-send-email 2.1.0 Cc: tiwai@suse.de, nstoughton@aether.com, Tim Cussins , pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH v2 1/3] snd_pcm_start_at: Add enum for timestamp class, and helper struct for start_at ioctl. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP As per Pierre's suggestion, timestamp types are of two types: System, and Audio. Signed-off-by: Tim Cussins diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 1f23cd6..bd1e9be 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -466,12 +466,30 @@ struct snd_xfern { }; enum { + SNDRV_PCM_TSTAMP_CLASS_SYSTEM = 0, + SNDRV_PCM_TSTAMP_CLASS_AUDIO, + SNDRV_PCM_TSTAMP_CLASS_LAST = SNDRV_PCM_TSTAMP_CLASS_AUDIO, +}; + +enum { SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, }; +enum { + SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 0, + SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK, + SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK, +}; + +struct snd_start_at { + int tstamp_class; + int tstamp_type; + struct timespec start_time; +}; + /* channel positions */ enum { SNDRV_CHMAP_UNKNOWN = 0, @@ -550,6 +568,8 @@ enum { #define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern) #define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int) #define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) +#define SNDRV_PCM_IOCTL_START_AT _IOW('A', 0x62, struct snd_start_at) + /***************************************************************************** * *