1. 28 6月, 2010 1 次提交
    • D
      ALSA: pcm_lib: avoid timing jitter in snd_pcm_read/write() · 5daeba34
      David Dillow 提交于
      When using poll() to wait for the next period -- or avail_min samples --
      one gets a consistent delay for each system call that is usually just a
      little short of the selected period time. However, When using
      snd_pcm_read/write(), one gets a jittery delay that alternates between
      less than a millisecond and approximately two period times. This is
      caused by snd_pcm_lib_{read,write}1() transferring any available samples
      to the user's buffer and adjusting the application pointer prior to
      sleeping to the end of the current period. When the next period
      interrupt occurs, there is then less than avail_min samples remaining to
      be transferred in the period, so we end up sleeping until a second
      period occurs.
      
      This is solved by using runtime->twake as the number of samples needed
      for a wakeup in addition to selecting the proper wait queue to wake in
      snd_pcm_update_state(). This requires twake to be non-zero when used
      by snd_pcm_lib_{read,write}1() even if avail_min is zero.
      Signed-off-by: NDave Dillow <dave@thedillows.org>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      5daeba34
  2. 02 6月, 2010 9 次提交
  3. 01 6月, 2010 15 次提交
  4. 31 5月, 2010 15 次提交