1. 21 5月, 2010 1 次提交
    • C
      ALSA: pcm: fix the fix of the runtime->boundary calculation · ead4046b
      Clemens Ladisch 提交于
      Commit 7910b4a1 in 2.6.34 changed the
      runtime->boundary calculation to make this value a multiple of both the
      buffer_size and the period_size, because the latter is assumed by the
      runtime->hw_ptr_interrupt calculation.
      
      However, due to the lack of a ioctl that could read the software
      parameters before they are set, the kernel requires that alsa-lib
      calculates the boundary value, too.  The changed algorithm leads to
      a different boundary value used by alsa-lib, which makes, e.g., mplayer
      fail to play a 44.1 kHz file because the silence_size parameter is now
      invalid; bug report:
      <https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5015>.
      
      This patch reverts the change to the boundary calculation, and instead
      fixes the hw_ptr_interrupt calculation to be period-aligned regardless
      of the boundary value.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Cc: <stable@kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ead4046b
  2. 26 3月, 2010 1 次提交
  3. 27 1月, 2010 1 次提交
    • J
      ALSA: pcm_lib - return back hw_ptr_interrupt · e7636925
      Jaroslav Kysela 提交于
      Clemens Ladisch noted for hw_ptr_removal in "cleanup & merge hw_ptr
      update functions" commit:
      
      "It is possible for the status/delay ioctls to be called when the sound
      card's pointer register alreay shows a position at the beginning of the
      new period, but immediately before the interrupt is actually executed.
      (This happens regularly on a SMP machine with mplayer.)  When that
      happens, the code thinks that the position must be at least one period
      ahead of the current position and drops an entire buffer of data."
      
      Return back the hw_ptr_interrupt variable. The last interrupt pointer
      is always computed from the latest hw_ptr instead of tracking it
      separately (in this case all hw_ptr checks and modifications might
      influence also hw_ptr_interrupt and it is difficult to keep it
      consistent).
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      e7636925
  4. 21 1月, 2010 1 次提交
  5. 13 1月, 2010 1 次提交
  6. 08 1月, 2010 1 次提交
  7. 07 1月, 2010 4 次提交
  8. 22 12月, 2009 1 次提交
  9. 21 12月, 2009 1 次提交
    • K
      ALSA: fix incorrect rounding direction in snd_interval_ratnum() · 40962d7c
      Krzysztof Helt 提交于
      The direction of rounding is incorrect in the snd_interval_ratnum()
      It was detected with following parameters (sb8 driver playing
      8kHz stereo file):
       - num is always 1000000
       - requested frequency rate is from 7999 to 7999 (single frequency)
      
      The first loop calculates div_down(num, freq->min) which is 125.
      Thus, a frequency range's minimum value is 1000000 / 125 = 8000 Hz.
      The second loop calculates div_up(num, freq->max) which is 126
      The frequency range's maximum value is 1000000 / 126 = 7936 Hz.
      The range maximum is lower than the range minimum so the function
      fails due to empty result range.
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      40962d7c
  10. 25 8月, 2009 1 次提交
  11. 20 8月, 2009 1 次提交
    • T
      ALSA: pcm - Fix drain behavior in non-blocking mode · 4cdc115f
      Takashi Iwai 提交于
      The current PCM core has the following problems regarding PCM draining
      in non-blocking mode:
      
      - the current f_flags isn't checked in snd_pcm_drain(), thus changing
        the mode dynamically via snd_pcm_nonblock() after open doesn't work.
      - calling drain in non-blocking mode just return -EAGAIN error, but
        doesn't provide any way to sync with draining.
      
      This patch fixes these issues.
      - check file->f_flags in snd_pcm_drain() properly
      - when O_NONBLOCK is set, PCM core sets the stream(s) to DRAIN state
        but quits ioctl immediately without waiting the whole drain; the
        caller can sync the drain manually via poll()
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4cdc115f
  12. 23 7月, 2009 3 次提交
  13. 22 7月, 2009 1 次提交
    • T
      ALSA: pcm - Fix regressions with VMware · 79452f0a
      Takashi Iwai 提交于
      VMware tends to report PCM positions and period updates at utterly
      wrong timing.  This screws up the recent PCM core code that tries
      to correct the position based on the irq timing.
      
      Now, when a backward irq position is detected, skip the update
      instead of rebasing.  (This is almost the old behavior before
      2.6.30.)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      79452f0a
  14. 08 6月, 2009 1 次提交
  15. 07 6月, 2009 2 次提交
  16. 05 6月, 2009 1 次提交
  17. 29 5月, 2009 4 次提交
  18. 27 5月, 2009 2 次提交
    • T
      ALSA: Enable PCM hw_ptr_jiffies check only in xrun_debug mode · c87d9732
      Takashi Iwai 提交于
      The PCM hw_ptr jiffies check results sometimes in problems when a
      hardware doesn't give smooth hw_ptr updates.  So far, au88x0 and some
      other drivers appear not working due to this strict check.
      However, this check is a nice debug tool, and the capability should be
      still kept.
      
      Hence, we disable this check now as default unless the user enables it
      by setting the xrun_debug mode to the specific stream via a proc file.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c87d9732
    • T
      ALSA: Fix invalid jiffies check after pause · 6af3fb72
      Takashi Iwai 提交于
      The hw_ptr_jiffies has to be reset properly to avoid the invalid
      check of jiffies delta in snd_pcm_update_hw_ptr*() functions.
      Especailly this patch fixes the bogus jiffies check after the puase
      and resume.
      
      This patch is a modified version of the original patch by Jaroslav.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6af3fb72
  19. 28 4月, 2009 1 次提交
    • T
      ALSA: pcm core - Avoid jiffies check for devices with BATCH flag · 3e5b5016
      Takashi Iwai 提交于
      The hardware devices with SNDRV_PCM_INFO_BATCH flag can't give the
      precise current position.  And such hardwares have often big FIFO
      in addition to the ring buffer, and it screws up the jiffies check
      in pcm_lib.c.
      
      This patch adds a simple check of info flag so that the driver skips
      the jiffies check in snd_pcm_period_elapsed() when BATCH flag is set.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3e5b5016
  20. 10 4月, 2009 1 次提交
  21. 20 3月, 2009 1 次提交
  22. 19 3月, 2009 4 次提交
  23. 09 3月, 2009 1 次提交
    • T
      ALSA: Rewrite hw_ptr updaters · ed3da3d9
      Takashi Iwai 提交于
      Clean up and improve snd_pcm_update_hw_ptr*() functions.
      
      snd_pcm_update_hw_ptr() tries to detect the unexpected hwptr jumps
      more strictly to avoid the position mess-up, which often results in
      the bad quality I/O with pulseaudio.
      
      The hw-ptr skip error messages are printed when xrun proc is set to
      non-zero.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ed3da3d9
  24. 16 10月, 2008 1 次提交
  25. 13 8月, 2008 1 次提交
  26. 01 2月, 2008 2 次提交