1. 15 2月, 2011 1 次提交
  2. 22 11月, 2010 1 次提交
    • C
      ALSA: pcm: support for period wakeup disabling · ab69a490
      Clemens Ladisch 提交于
      This patch allows to disable period interrupts which are
      not needed when the application relies on a system timer
      to wake-up and refill the ring buffer. The behavior of
      the driver is left unchanged, and interrupts are only
      disabled if the application requests this configuration.
      The behavior in case of underruns is slightly different,
      instead of being detected during the period interrupts the
      underruns are detected when the application calls
      snd_pcm_update_avail, which in turns forces a refresh of the
      hw pointer and shows the buffer is empty.
      
      More specifically this patch makes a lot of sense when
      PulseAudio relies on timer-based scheduling to access audio
      devices such as HDAudio or Intel SST. Disabling interrupts
      removes two unwanted wake-ups due to period elapsed events
      in low-power playback modes. It also simplifies PulseAudio
      voice modules used for speech calls.
      
      To quote Lennart "This patch looks very interesting and
      desirable. This is something have long been waiting for."
      
      Support for this in hardware drivers is optional.
      Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@intel.com>
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ab69a490
  3. 18 11月, 2010 1 次提交
  4. 02 11月, 2010 1 次提交
  5. 17 9月, 2010 1 次提交
  6. 14 9月, 2010 1 次提交
  7. 19 8月, 2010 1 次提交
  8. 18 8月, 2010 2 次提交
  9. 19 7月, 2010 1 次提交
  10. 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
  11. 12 5月, 2010 1 次提交
  12. 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
  13. 13 4月, 2010 1 次提交
    • T
      ALSA: core - Define llseek fops · 02f4865f
      Takashi Iwai 提交于
      Set no_llseek to llseek file ops of each sound component (but for hwdep).
      This avoids the implicit BKL invocation via generic_file_llseek() used
      as default when fops.llseek is NULL.
      
      Also call nonseekable_open() at each open ops to ensure the file flags
      have no seek bit.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      02f4865f
  14. 08 4月, 2010 1 次提交
  15. 10 3月, 2010 1 次提交
  16. 16 2月, 2010 1 次提交
  17. 28 1月, 2010 1 次提交
    • J
      ALSA: pcm_native - fix runtime->boundary calculation · 7910b4a1
      Jaroslav Kysela 提交于
      The code in pcm_lib updating runtime->hw_ptr_interrupt expects
      that runtime->boundary is divisible with runtime->period_size.
      Thanks are going to Clemens Ladisch for the notice.
      
      Fix the runtime->boundary calculation using buffer_size * period_size
      as base and find a least common multiple for 32bit platforms when
      the expression might overflow.
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      7910b4a1
  18. 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
  19. 21 1月, 2010 1 次提交
  20. 18 1月, 2010 2 次提交
  21. 07 1月, 2010 2 次提交
  22. 25 12月, 2009 1 次提交
  23. 27 11月, 2009 2 次提交
    • T
      ALSA: pcm - fix page conversion on non-coherent PPC arch · 6985c887
      Takashi Iwai 提交于
      The non-cohernet PPC arch doesn't give the correct address by a simple
      virt_to_page() for pages allocated via dma_alloc_coherent().
      This patch adds a hack to fix the conversion similarly like MIPS.
      
      Note that this doesn't fix perfectly: the pages should be marked with
      proper pgprot value.  This will be done in a future implementation like
      the conversion to dma_mmap_coherent().
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6985c887
    • T
      ALSA: pcm - fix page conversion on non-coherent MIPS arch · 66b6cfac
      Takashi Iwai 提交于
      The non-coherent MIPS arch doesn't give the correct address by a simple
      virt_to_page() for pages allocated via dma_alloc_coherent().
      
      Original patch by Wu Zhangjin <wuzj@lemote.com>.
      [Ralf mentioned: "The origins of this patch go back far further.
       The oldest patch I could find which is a superset of this was written
       by Atsushi Nemoto and various incarnations of it have been sumitted
       to and reject by me a number of times through the years."]
      A proper check of the buffer allocation type was added to avoid the
      wrong conversion.
      
      Note that this doesn't fix perfectly: the pages should be marked with
      proper pgprot value.  This will be done in a future implementation like
      the conversion to dma_mmap_coherent().
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      66b6cfac
  24. 26 11月, 2009 2 次提交
  25. 28 9月, 2009 1 次提交
  26. 21 9月, 2009 1 次提交
  27. 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
  28. 03 8月, 2009 1 次提交
    • L
      ALSA: pcm - Tell user that stream to be rewound is suspended · 51840409
      Lubomir Rintel 提交于
      Return STRPIPE instead of EBADF when userspace attempts to rewind
      of forward a stream that was suspended in meanwhile, so that it
      can be recovered by snd_pcm_recover().
      
      This was causing Pulseaudio to unload the ALSA sink module under a race
      condition when it attempted to rewind the stream right after resume from
      suspend, before writing to the stream which would cause it to revive the
      stream otherwise. Tested to work with Pulseaudio patched to attempt to
      snd_pcm_recover() upon receiving an error from snd_pcm_rewind().
      Signed-off-by: NLubomir Rintel <lkundrak@v3.sk>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      51840409
  29. 22 6月, 2009 1 次提交
  30. 29 5月, 2009 1 次提交
  31. 27 5月, 2009 1 次提交
    • 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
  32. 05 5月, 2009 1 次提交
  33. 14 4月, 2009 1 次提交
  34. 16 3月, 2009 1 次提交
    • J
      Rationalize fasync return values · 60aa4924
      Jonathan Corbet 提交于
      Most fasync implementations do something like:
      
           return fasync_helper(...);
      
      But fasync_helper() will return a positive value at times - a feature used
      in at least one place.  Thus, a number of other drivers do:
      
           err = fasync_helper(...);
           if (err < 0)
                   return err;
           return 0;
      
      In the interests of consistency and more concise code, it makes sense to
      map positive return values onto zero where ->fasync() is called.
      
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      60aa4924
  35. 05 2月, 2009 1 次提交