]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] maximum latency tracking: ALSA support
authorTakashi Iwai <tiwai@suse.de>
Sun, 1 Oct 2006 06:27:19 +0000 (23:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 1 Oct 2006 07:39:19 +0000 (00:39 -0700)
commit1d156df08fb16ce08ca109c2f85fa7991e804d73
tree51314e5fcf6c023788df67a130cb6e692e5df496
parente73ff83c5a5b46025de4901a5e8c40a3c617e341
[PATCH] maximum latency tracking: ALSA support

Add maximum latency tracking to the ALSA subsystem for PCM playback.  In
ALSA, the playback application controls the buffer size and thus indirectly
the period of latency that it can deal with.  This patch uses 75% of the
total available latency as threshold to announce to the latency subsystem;
While 75% is a crude heuristic it's a quite reasonable one; the remaining
25% can be used for all driver processing for the next samples which is
also proportional to the size of the buffer.

With ogg123 a latency setting of about 4msec was seen (at 44Khz), while
with the "play" command a much longer maximum tolerable latency was seen.
Other, more multimedia oriented players as well as games, will have a lot
smaller buffers to allow better synchronization and those will actually get
into the latency domains where there is impact on the power management
rules.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/sound/pcm.h
sound/core/pcm.c
sound/core/pcm_native.c