From: Takashi Iwai Subject: Re: Latency and timestamps Date: Wed, 21 Nov 2007 11:50:24 +0100 Message-ID: References: <5f52f6d70711191646s6f23fce3seba229a77062e1a1@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 6C7CB24BF4 for ; Wed, 21 Nov 2007 12:25:02 +0100 (CET) In-Reply-To: <5f52f6d70711191646s6f23fce3seba229a77062e1a1@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Claudio Matsuoka Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 19 Nov 2007 22:46:31 -0200, Claudio Matsuoka wrote: > > Hi, > > I'm adding latency control to an application and didn't find much > documentation about the pcm status functions aside from a very brief > description and the latency.c example. What exactly are the "trigger > timestamp" and "now timestamp" returned by > snd_pcm_status_get_trigger_tstamp() and snd_pcm_status_get_tstamp()? The trigger_tstamp is the time-stamp at the last time the PCM status change occured. For example, when the PCM is really triggered to start, or stopped, or XRUN, etc. It won't be changed as long as the PCM status is kept. OTOH, the tstamp is the current timestamp (now). But, this value has a slightly different meaning when tstamp_mode is set to SND_PCM_TSTAMP_MMAP. Then it keeps the timestamp of the last period update time instead of the now. Takashi