1. 30 11月, 2015 1 次提交
  2. 16 10月, 2015 1 次提交
  3. 29 9月, 2015 1 次提交
  4. 24 9月, 2015 1 次提交
  5. 17 7月, 2015 1 次提交
    • T
      ALSA: pcm: Fix lockdep warning with nonatomic PCM ops · 67756e31
      Takashi Iwai 提交于
      With the nonatomic PCM ops, the system may spew lockdep warnings like:
      
       =============================================
       [ INFO: possible recursive locking detected ]
       4.2.0-rc1-jeejaval3 #12 Not tainted
       ---------------------------------------------
       aplay/4029 is trying to acquire lock:
        (snd_pcm_link_rwsem){.+.+.+}, at: [<ffffffff816fd473>] snd_pcm_stream_lock+0x43/0x60
      
       but task is already holding lock:
        (snd_pcm_link_rwsem){.+.+.+}, at: [<ffffffff816fcf29>] snd_pcm_action_nonatomic+0x29/0x80
      
       other info that might help us debug this:
        Possible unsafe locking scenario:
      
              CPU0
              ----
         lock(snd_pcm_link_rwsem);
         lock(snd_pcm_link_rwsem);
      
      Although this is false-positive as the rwsem is taken always as
      read-only for these code paths, it's certainly annoying to see this at
      any occasion.  A simple fix is to use down_read_nested() in
      snd_pcm_stream_lock() that can be called inside another lock.
      Reported-by: NVinod Koul <vinod.koul@intel.com>
      Reported-by: NJeeja Kp <jeeja.kp@intel.com>
      Tested-by: NJeeja Kp <jeeja.kp@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      67756e31
  6. 12 4月, 2015 1 次提交
    • A
      pcm: another weird API abuse · 1c65d986
      Al Viro 提交于
      readv() and writev() should _not_ ignore all but the first ->iov_len,
      among other things.  Really weird abuse of those syscalls - it
      expects a vector element per channel, with identical lengths (it
      actually assumes them to be identical - no checking is done).
      readv() and writev() are really bad match for that.  Unfortunately,
      userland API is userland API and we can't do anything about them.
      
      Converted to ->read_iter/->write_iter.  Please, _please_ don't do
      anything of that kind when designing new interfaces.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1c65d986
  7. 26 3月, 2015 1 次提交
  8. 23 2月, 2015 1 次提交
  9. 21 2月, 2015 2 次提交
  10. 09 2月, 2015 2 次提交
  11. 28 1月, 2015 1 次提交
  12. 01 1月, 2015 1 次提交
  13. 10 11月, 2014 2 次提交
  14. 06 11月, 2014 1 次提交
  15. 31 10月, 2014 2 次提交
    • T
      ALSA: pcm: Refactoring snd_pcm_action() · aa8edd8c
      Takashi Iwai 提交于
      Just a small code refactoring to reduce more lines.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      aa8edd8c
    • T
      ALSA: pcm: Simplify snd_pcm_action_lock_irq() · e3a4bd5e
      Takashi Iwai 提交于
      The function snd_pcm_action_lock_irq() can be much simplified by
      simply wrapping snd_pcm_action() with the stream lock.  This was
      rather the original idea, but later it was open coded for
      optimization.  However, looking at the optimization part closely, one
      notices that the probability of the optimized path is quite low; in
      normal situations, the linked stream action happens only for the
      triggered substream, thus the operation becomes identical.  So the
      code simplification has a clear win, especially because we have now
      doubly codes for both atomic and non-atomic locks.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e3a4bd5e
  16. 30 10月, 2014 1 次提交
  17. 24 10月, 2014 1 次提交
    • T
      ALSA: pcm: Avoid mmap warnings on x86 · 49d776ff
      Takashi Iwai 提交于
      On x86, using dma_mmap_coherent() for the pages allocated via
      dma_alloc_coherent() results in a warning like:
        aplay:32536 map pfn RAM range req uncached-minus for [mem 0x21d500000-0x21d51ffff], got write-back
      
      Until the issue is addressed in the core side, take back to the old
      good way in PCM code only for x86.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      49d776ff
  18. 22 10月, 2014 3 次提交
    • T
      ALSA: pcm: Disable mmap for known broken archs · 63825f3a
      Takashi Iwai 提交于
      Some architectures like PARISC is known not to support mmap properly
      with the DMA buffer, where dma_mmap_coherent() returns -EINVAL
      unconditionally.  From the API POV, we should rather drop the mmap
      support there and expose it before the user-space tries to call mmap.
      
      The patch contains again ugly ifdef's, unfortunately, as there is no
      global flag indicating this.  Once when such macro is defined, we can
      get rid of this instead.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      63825f3a
    • T
      ALSA: pcm: Remove arch-dependent mmap kludges · c37de55e
      Takashi Iwai 提交于
      Since we have consistently dma_mmap_coherent() for all architectures,
      the current ifdef and arch-specific codes in pcm core can be cleaned
      up gracefully.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c37de55e
    • T
      ALSA: pcm: Fix false lockdep warnings · dde1c652
      Takashi Iwai 提交于
      As PCM core handles the multiple linked streams in parallel, lockdep
      gets confused (partly because of weak annotations) and spews the
      false-positive warnings.  This hasn't been a problem for long time but
      the latest PCM lock path update seems to have woken up a sleeping
      dog.
      
      Here is an attempt to paper over this issue: pass the lock subclass
      just calculated from the depth in snd_pcm_action_group().  Also, a
      (possibly) wrong lock subclass set in snd_pcm_action_lock_mutex() is
      dropped, too.
      Reported-and-tested-by: NArthur Marsh <arthur.marsh@internode.on.net>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      dde1c652
  19. 18 10月, 2014 1 次提交
  20. 14 10月, 2014 1 次提交
  21. 03 9月, 2014 2 次提交
    • T
      ALSA: pcm: Uninline snd_pcm_stream_lock() and _unlock() · 7af142f7
      Takashi Iwai 提交于
      The previous commit for the non-atomic PCM ops added more codes to
      snd_pcm_stream_lock() and its variants.  Since they are inlined
      functions, it resulted in a significant code size bloat.  For reducing
      the size bloat, this patch changes the inline functions to the normal
      function calls.  The export of rwlock and rwsem are removed as well,
      since they are referred only in pcm_native.c now.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7af142f7
    • T
      ALSA: pcm: Allow nonatomic trigger operations · 257f8cce
      Takashi Iwai 提交于
      Currently, many PCM operations are performed in a critical section
      protected by spinlock, typically the trigger and pointer callbacks are
      assumed to be atomic.  This is basically because some trigger action
      (e.g. PCM stop after drain or xrun) is done in the interrupt handler.
      If a driver runs in a threaded irq, however, this doesn't have to be
      atomic.  And many devices want to handle trigger in a non-atomic
      context due to lengthy communications.
      
      This patch tries all PCM calls operational in non-atomic context.
      What it does is very simple: replaces the substream spinlock with the
      corresponding substream mutex when pcm->nonatomic flag is set.  The
      driver that wants to use the non-atomic PCM ops just needs to set the
      flag and keep the rest as is.  (Of course, it must not handle any PCM
      ops in irq context.)
      
      Note that the code doesn't check whether it's atomic-safe or not, but
      trust in 100% that the driver sets pcm->nonatomic correctly.
      
      One possible problem is the case where linked PCM substreams have
      inconsistent nonatomic states.  For avoiding this, snd_pcm_link()
      returns an error if one tries to link an inconsistent PCM substream.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      257f8cce
  22. 21 7月, 2014 1 次提交
    • T
      ALSA: pcm: Introduce protocol version field to sw_params · 58900810
      Takashi Iwai 提交于
      For controlling the new fields more strictly, add sw_params.proto
      field indicating the protocol version of the user-space.  User-space
      should fill the SNDRV_PCM_VERSION value it's built with, then kernel
      can know whether the new fields should be evaluated or not.
      
      And now tstamp_type field is evaluated only when the valid value is
      set there.  This avoids the wrong override of tstamp_type to zero,
      which is SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      58900810
  23. 10 7月, 2014 2 次提交
  24. 14 2月, 2014 1 次提交
  25. 10 2月, 2014 2 次提交
  26. 29 10月, 2013 1 次提交
  27. 24 10月, 2013 2 次提交
  28. 29 6月, 2013 1 次提交
  29. 15 6月, 2013 1 次提交
  30. 08 5月, 2013 1 次提交