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. 11 5月, 2010 1 次提交
    • M
      PM QOS update · ed77134b
      Mark Gross 提交于
      This patch changes the string based list management to a handle base
      implementation to help with the hot path use of pm-qos, it also renames
      much of the API to use "request" as opposed to "requirement" that was
      used in the initial implementation.  I did this because request more
      accurately represents what it actually does.
      
      Also, I added a string based ABI for users wanting to use a string
      interface.  So if the user writes 0xDDDDDDDD formatted hex it will be
      accepted by the interface.  (someone asked me for it and I don't think
      it hurts anything.)
      
      This patch updates some documentation input I got from Randy.
      Signed-off-by: Nmarkgross <mgross@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      ed77134b
  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. 18 1月, 2010 1 次提交
  6. 07 1月, 2010 3 次提交
  7. 18 12月, 2009 1 次提交
  8. 10 11月, 2009 1 次提交
  9. 08 9月, 2009 1 次提交
  10. 08 7月, 2009 1 次提交
    • T
      ALSA: Fix SG-buffer DMA with non-coherent architectures · cc6a8acd
      Takashi Iwai 提交于
      Using SG-buffers with dma_alloc_coherent() is often very inefficient
      on non-coherent architectures because a tracking record could be
      allocated in addition for each dma_alloc_coherent() call.
      Instead, simply disable SG-buffers but just allocate normal continuous
      buffers on non-supported (currently all but x86) architectures.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cc6a8acd
  11. 05 6月, 2009 1 次提交
  12. 29 5月, 2009 1 次提交
  13. 05 5月, 2009 1 次提交
  14. 10 4月, 2009 1 次提交
  15. 09 3月, 2009 1 次提交
  16. 05 2月, 2009 1 次提交
  17. 25 8月, 2008 2 次提交
    • T
      ALSA: Allocate larger pages in sgbuf · 51e9f2e6
      Takashi Iwai 提交于
      Most hardwares have limited buffer-descriptor table length.  This
      also restricts the max buffer size of the sound driver.
      For example, snd-hda-intel has 1MB buffer size limit, and this is
      because it can have at most 256 BDL entries.  For supporting larger
      buffers, we need to allocate larger pages even for sg-buffers.
      
      This patch changes the sgbuf allocation code to try to allocate
      larger pages first.  At each head of the allocated pages, the
      number of allocated pages is stored in the lowest bits of the
      corresponding entry of the table addr field.  This change isn't
      visible as long as the driver uses snd_sgbuf_get_addr() helper.
      
      Also, the patch adds a new function, snd_pcm_sgbuf_get_chunk_size().
      This returns the size of the chunk on continuous pages starting at
      the given position offset.  If the chunk reaches to a non-continuous
      page, it returns the size to the boundary.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      51e9f2e6
    • T
      ALSA: Clean up SG-buffer helper functions and macros · 77a23f26
      Takashi Iwai 提交于
      Clean up SG-buffer helper functions and macros.  Helpers take substream
      as arguments now.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      77a23f26
  18. 13 8月, 2008 1 次提交
  19. 01 8月, 2008 2 次提交
  20. 30 7月, 2008 1 次提交
    • P
      ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE · 94239690
      Pawel MOLL 提交于
      When compiled with CONFIG_SND_DYNAMIC_MINORS the ALSA core is fine
      to have more than 8 PCM devices per card, except one place - the
      SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE ioctl, which will not enumerate
      devices > 7. This patch fixes the issue, changing the devices list
      organisation.
      
      Instead of adding new device to the tail, the list is now kept always
      ordered (by card number, then device number). Thus, during enumeration,
      it is easy to discover the fact that there is no more given card's
      devices. The same limit was present in OSS emulation code. It has
      been fixed as well.
      
      Additionally the device field of struct snd_pcm is now int, instead of
      unsigned int, as there is no obvious reason for keeping it unsigned.
      This caused a lot of problems with comparing this value with other
      (almost always signed) variables. There is just one more place where
      device number is unsigned - in struct snd_pcm_info, which should be
      also sorted out in future.
      Signed-off-by: NPawel MOLL <pawel.moll@st.com>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      94239690
  21. 26 6月, 2008 1 次提交
    • J
      [ALSA] Revert "alsa: add annotations to bitwise type snd_pcm_hw_param_t" · eabe3228
      Jaroslav Kysela 提交于
      This reverts commit 36b34d2437104f323e09d7c6af6451d3c0b9c0cd.
      
      From: Al Viro <viro@ZenIV.linux.org.uk>
      
      WIW, *all* this stuff is not bitwise at all.  For crying out loud, half
      of these types are routinely used as array indices and loop variables...
      
      If anything, we want a different set of allowed operations - subtraction
      between elements of type (yielding integer), addition/subtraction of
      integer types not bigger than ours (yielding our type), comparisons,
      assignments (=, +=, -=, passing to function as argument, return from
      function, initializers) and second/third arguments in ?:.  With 0 *not*
      being allowed as a constant of such type.
      
      It's not bitwise; we may use the same infrastructure in sparse, but it
      should be a separate class of types (__attribute__((affine))).
      
      dma_addr_t is another candidate for the same treatment, but there we'll
      need helpers for conversions to hw-acceptable form (dma_to_le32(), etc.)
      and gradual conversion of drivers.
      
      ALSA ones and pm mess are absolutely straightforward cases, though.
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      eabe3228
  22. 19 6月, 2008 1 次提交
  23. 01 2月, 2008 3 次提交
  24. 16 10月, 2007 5 次提交
  25. 11 5月, 2007 1 次提交
  26. 13 2月, 2007 1 次提交
  27. 09 2月, 2007 3 次提交
  28. 04 12月, 2006 1 次提交