All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Sheng (Sean) Liu" <shengl@uci.edu>
Cc: alsa-devel@alsa-project.org
Subject: Re: When to start the capture device?
Date: Fri, 21 Sep 2007 18:24:43 +0200	[thread overview]
Message-ID: <s5hejgsouk4.wl%tiwai@suse.de> (raw)
In-Reply-To: <009c01c7fbd3$049085c0$aea4c380@dream.eng.uci.edu>

At Thu, 20 Sep 2007 15:10:12 -0700,
Sheng (Sean) Liu wrote:
> 
> Hi Mr. Iwai,
> 
> Thanks for your replies. I have another question for you.
> 
> After snd_pcm_start() is called, how long the first frame will be generated
> by the sound card? Does this duration vary in different nodes (support
> hardware+soundcard+OS are identical for all nodes)? If the duration is not a
> constant, do you have any idea what will be the largest jitter?
> 
> This jitter matters so much for my location detection application.  After
> the application starts, an user claps his/her hand. Then, the position of
> the user is calculated from the application. 
> 
> I have four VIA EPIA-M+Linux2.6 machines. A global time is setup among these
> four nodes. After the stream is started, the application detects a hand-clap
> sound and counts the number of frames from the stream start to the clap
> moment in each node. If I cannot have an accurate timestamp for the stream
> start, the application cannot caculate the clap sound timestamp accurately.

Then it's rather a question about RT-OS.  Once after entering the
ioctl syscall of kernel, and if the device is exclusive (no multiple
substreams), the latency is almost deterministic on preempt kernel.
Mostly the latency of the hardware is the issue.  But, the problem is
the latency before entring the kernel.  This can be (a kind of)
guaranteed only with RT-task running on RT-kernel.


Takashi

  reply	other threads:[~2007-09-21 16:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 23:17 When to start the capture device? Sheng (Sean) Liu
2007-09-20 14:11 ` J. Scott Merritt
2007-09-20 14:14 ` J. Scott Merritt
2007-09-20 14:23   ` Takashi Iwai
2007-09-20 15:46     ` J. Scott Merritt
2007-09-21 14:16       ` Takashi Iwai
2007-09-20 14:20 ` Takashi Iwai
2007-09-20 22:10   ` Sheng (Sean) Liu
2007-09-21 16:24     ` Takashi Iwai [this message]
2007-09-21 17:49       ` Sheng (Sean) Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hejgsouk4.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=shengl@uci.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.