From: Clemens Ladisch Date: Thu, 18 Nov 2010 08:43:52 +0000 (+0100) Subject: ALSA: pcm: detect xruns in no-period-wakeup mode X-Git-Tag: v2.6.38-rc1~236^2~2^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59ff878ffb26bc0be812ca8295799164f413ae88;p=pandora-kernel.git ALSA: pcm: detect xruns in no-period-wakeup mode When period wakeups are disabled, successive calls to the pointer update function do not have a maximum allowed distance, so xruns cannot be detected with the pointer value only. To detect xruns, compare the actually elapsed time with the time that should have theoretically elapsed since the last update. When the hardware pointer has wrapped around due to an xrun, the actually elapsed time will be too big by about hw_ptr_buffer_jiffies. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed