From alsa-devel-owner@alsa.jcu.cz  Fri Nov 27 14:12:23 1998
Received: from entry.jcu.cz (IDENT:perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id OAA26241;
	Fri, 27 Nov 1998 14:11:57 +0100
Date: Fri, 27 Nov 1998 14:11:57 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: Thomas Sailer <sailer@ife.ee.ethz.ch>
cc: alsa-devel@jcu.cz
Subject: Re: Linux sound cards latency
In-Reply-To: <365E9F7D.88B71A27@ife.ee.ethz.ch>
Message-ID: <Pine.LNX.3.96.981127135700.4886B-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Fri, 27 Nov 1998, Thomas Sailer wrote:

> Two things to keep in mind about latency:
> 
> If there is IDE activity and you haven't
> set hdparm -u 1 /dev/hd*, you loose.
> (Int latency will be horrendously high).
> 
> Also, some cards have a very long audio path
> delay in hardware (usually depending on the
> sampling rate), so the time a signal
> arrives at its connectors may well be several
> ms longer. This is an OS invariant.
> 
> Some cards, such as ESS, also have rather deep
> FIFO's (128 samples or so).

Yes, all things are true. Maybe I forgot add notice that my test program
measures only OS latency, not hardware latency. I don't know how to
measure complete latency without some analog device which will be
connected to soundcard's line-in and line-out.

In most cases hardware have FIFO's up to 256 samples (in most hardware is 
FIFO around 16 bytes). This means that delay is by format 44100Hz, Signed
Endian 16-bit, stereo:

FIFO size		| Delay
------------------------+-------------------------------
256			| 0.0014512472sec
16			| 0.00009070294sec

						Jaroslav
-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic



