1. 07 1月, 2010 2 次提交
  2. 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
  3. 26 11月, 2009 2 次提交
  4. 28 9月, 2009 1 次提交
  5. 21 9月, 2009 1 次提交
  6. 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
  7. 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
  8. 22 6月, 2009 1 次提交
  9. 29 5月, 2009 1 次提交
  10. 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
  11. 05 5月, 2009 1 次提交
  12. 14 4月, 2009 1 次提交
  13. 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
  14. 05 2月, 2009 1 次提交
  15. 02 11月, 2008 1 次提交
    • A
      saner FASYNC handling on file close · 233e70f4
      Al Viro 提交于
      As it is, all instances of ->release() for files that have ->fasync()
      need to remember to evict file from fasync lists; forgetting that
      creates a hole and we actually have a bunch that *does* forget.
      
      So let's keep our lives simple - let __fput() check FASYNC in
      file->f_flags and call ->fasync() there if it's been set.  And lose that
      crap in ->release() instances - leaving it there is still valid, but we
      don't have to bother anymore.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      233e70f4
  16. 16 10月, 2008 1 次提交
  17. 25 9月, 2008 1 次提交
  18. 04 9月, 2008 1 次提交
  19. 13 8月, 2008 1 次提交
  20. 07 8月, 2008 2 次提交
    • L
      Revert "pcm_native.c: remove unused label" · 685d87f7
      Linus Torvalds 提交于
      This reverts commit 680db013.  The label
      is actually used, but hidden behind CONFIG_SND_DEBUG and the horrible
      snd_assert() macro.
      
      That macro could probably be improved to be along the lines of
      
      	#define snd_assert(expr, args...) do { if ((void)(expr),0) { args; } } while (0)
      
      or similar to make sure that we always both evaluate 'expr' and parse
      'args', but while gcc should optimize it all away, I'm too lazy to
      really verify that.  So I'll just admit defeat and will continue to live
      with the annoying warning.
      Noted-by: NRobert P. J. Day <rpjday@crashcourse.ca>
      Signed-off-by: Linus "Grr.." Torvalds
      685d87f7
    • L
      pcm_native.c: remove unused label · 680db013
      Linus Torvalds 提交于
      This fixes the warning
      
        sound/core/pcm_native.c: In function 'snd_pcm_fasync':
        sound/core/pcm_native.c:3262: warning: label 'out' defined but not used
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      680db013
  21. 03 7月, 2008 1 次提交
  22. 06 2月, 2008 1 次提交
  23. 01 2月, 2008 10 次提交
  24. 16 10月, 2007 2 次提交
  25. 20 7月, 2007 1 次提交
  26. 11 5月, 2007 1 次提交
    • F
      [ALSA] pcm_native: lockdep warning when launching jack · 208eee2a
      Frederik Deweerdt 提交于
      When launching 'jackd -d alsa', lockdep issues the following warning:
      [39701.405086] =============================================
      [39701.405093] [ INFO: possible recursive locking detected ]
      [39701.405107] 2.6.21-rc5-mm4 #2
      [39701.405109] ---------------------------------------------
      [39701.405112] jackd/17366 is trying to acquire lock:
      [39701.405114]  (&substream->self_group.lock){....}, at: [<c034d3c0>] snd_pcm_action_group+0x90/0x240
      [39701.405131]
      [39701.405131] but task is already holding lock:
      [39701.405134]  (&substream->self_group.lock){....}, at: [<c034d63f>] snd_pcm_action_lock_irq+0x3f/0xb0
      [39701.405141]
      [39701.405142] other info that might help us debug this:
      [39701.405145] 3 locks held by jackd/17366:
      [39701.405147]  #0:  (snd_pcm_link_rwlock){....}, at: [<c034d627>] snd_pcm_action_lock_irq+0x27/0xb0
      [39701.405155]  #1:  (&substream->group->lock){....}, at: [<c034d638>] snd_pcm_action_lock_irq+0x38/0xb0
      [39701.405163]  #2:  (&substream->self_group.lock){....}, at: [<c034d63f>] snd_pcm_action_lock_irq+0x3f/0xb0
      [39701.405171]
      [39701.405171] stack backtrace:
      [39701.405174]  [<c0103b8a>] show_trace_log_lvl+0x1a/0x30
      [39701.405179]  [<c0104912>] show_trace+0x12/0x20
      [39701.405183]  [<c01049c6>] dump_stack+0x16/0x20
      [39701.405187]  [<c013b980>] __lock_acquire+0xbd0/0x1040
      [39701.405193]  [<c013be60>] lock_acquire+0x70/0x90
      [39701.405197]  [<c0407846>] _spin_lock+0x36/0x50
      [39701.405203]  [<c034d3c0>] snd_pcm_action_group+0x90/0x240
      [39701.405207]  [<c034d653>] snd_pcm_action_lock_irq+0x53/0xb0
      [39701.405211]  [<c035046f>] snd_pcm_common_ioctl1+0x35f/0xfb0
      [39701.405215]  [<c0351544>] snd_pcm_playback_ioctl1+0x34/0x420
      [39701.405219]  [<c03519f3>] snd_pcm_playback_ioctl+0x43/0x50
      [39701.405223]  [<c017ecc8>] do_ioctl+0x28/0x80
      [39701.405229]  [<c017ed77>] vfs_ioctl+0x57/0x290
      [39701.405233]  [<c017efe9>] sys_ioctl+0x39/0x60
      [39701.405237]  [<c0102bf4>] sysenter_past_esp+0x5d/0x99
      [39701.405240]  =======================
      The attached lockdep annotation silences the warning.
      Signed-off-by: NFrederik Deweerdt <frederik.deweerdt@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@suse.cz>
      208eee2a