Skip to content
  • Clemens Ladisch's avatar
    ALSA: pcm: detect xruns in no-period-wakeup mode · 59ff878f
    Clemens Ladisch authored
    
    
    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: default avatarClemens Ladisch <clemens@ladisch.de>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    59ff878f