1. 13 9月, 2015 1 次提交
    • T
      ALSA: pcm: remove structure member of 'struct snd_pcm_hwptr_log *' type... · 0052b7dc
      Takashi Sakamoto 提交于
      ALSA: pcm: remove structure member of 'struct snd_pcm_hwptr_log *' type because this structure had been removed
      
      This structure was added by 4d96eb25 ('ALSA: pcm_lib - add possibility
      to log last 10 DMA ring buffer positions') to store PCM pointers
      information of latest 10 pointer movements (=XRUN_LOG_CNT). When
      CONFIG_SND_PCM_XRUN_DEBUG is configured, 'struct snd_pcm_runtime' has
      'hwptr_log' member with a pointer to the structure. When calling
      xrun_log() in pcm_lib.c, the structure was allocated to the pointer.
      When calling snd_pcm_detach_substream() in pcm.c, the allocated pointer
      is released.
      
      In f5914908 ('ALSA: pcm: Replace PCM hwptr tracking with tracepoints'),
      the pointer logging is replaced with using Linux Kernel Tracepoints. The
      structure was also removed, while it's just declared. The member and kfree
      still remains.
      
      This commit removes the member and related codes. I think this was
      overlooked because it brings no errors/warnings to C compilers.
      
      Fixes: f5914908 ('ALSA: pcm: Replace PCM hwptr tracking with tracepoints')
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0052b7dc
  2. 27 4月, 2015 2 次提交
  3. 21 2月, 2015 3 次提交
  4. 09 2月, 2015 1 次提交
  5. 02 2月, 2015 1 次提交
    • T
      ALSA: pcm: Embed struct device · ef46c7af
      Takashi Iwai 提交于
      Like previous patches, at this time we embed the struct device into
      PCM object.  However, this needs a bit more caution: struct snd_pcm
      doesn't own one device but two, for both playback and capture!  Thus
      not struct snd_pcm but struct snd_pcm_str object contains the device.
      
      Along with this change, pcm->dev field is dropped for avoiding
      confusion.  It was meant to point to a non-standard parent.  But,
      since now we can touch each struct device directly, we can manipulate
      the parent field easily there, too.
      Reviewed-by: NJaroslav Kysela <perex@perex.cz>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ef46c7af
  6. 29 1月, 2015 1 次提交
  7. 04 1月, 2015 1 次提交
  8. 01 1月, 2015 1 次提交
  9. 30 12月, 2014 2 次提交
  10. 21 11月, 2014 1 次提交
  11. 10 11月, 2014 1 次提交
    • T
      ALSA: pcm: Add snd_pcm_stop_xrun() helper · 1fb8510c
      Takashi Iwai 提交于
      Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
      lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
      existing open codes with this helper.
      
      The function checks the PCM running state to prevent setting the wrong
      state, too, for more safety.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1fb8510c
  12. 04 11月, 2014 1 次提交
    • T
      ALSA: pcm: Add xrun_injection proc entry · 2b30d411
      Takashi Iwai 提交于
      This patch adds a new proc entry for PCM substreams to inject an
      XRUN.  When a PCM substream is running and any value is written to its
      xrun_injection proc file, the driver triggers XRUN.  This is a useful
      feature for debugging XRUN and error handling code paths.
      
      Note that this entry is enabled only when CONFIG_SND_PCM_XRUN_DEBUG is
      set.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2b30d411
  13. 30 10月, 2014 3 次提交
  14. 08 9月, 2014 1 次提交
  15. 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
  16. 10 7月, 2014 1 次提交
  17. 12 6月, 2014 1 次提交
  18. 14 2月, 2014 1 次提交
  19. 15 1月, 2014 1 次提交
  20. 09 1月, 2014 1 次提交
    • T
      ALSA: Remove memory reservation code from memalloc helper · 47d98c02
      Takashi Iwai 提交于
      Nowadays we have CMA for obtaining the contiguous memory pages
      efficiently.  Let's kill the old kludge for reserving the memory pages
      for large buffers.  It was rarely useful (only for preserving pages
      among module reloading or a little help by an early boot scripting),
      used only by a couple of drivers, and yet it gives too much ugliness
      than its benefit.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      47d98c02
  21. 24 5月, 2013 1 次提交
  22. 29 4月, 2013 1 次提交
  23. 24 4月, 2013 1 次提交
  24. 18 4月, 2013 1 次提交
    • D
      ALSA: add DSD formats · ef7a4f97
      Daniel Mack 提交于
      This patch adds two formats for Direct Stream Digital (DSD), a
      pulse-density encoding format which is described here:
      https://en.wikipedia.org/wiki/Direct_Stream_Digital
      
      DSD operates on 2.8, 5.6 or 11.2MHz sample rates and as a 1-bit
      stream.
      
      The two new types added by this patch describe streams that are capable
      of handling DSD samples in DOP format as 8-bit or in 16-bit (or at a x8
      or x16 data rate, respectively).
      
      DSD itself specifies samples in *bit*, while DOP and ALSA handle them
      as *bytes*. Hence, a factor of 8 or 16 has to be applied for the sample
      rare configuration, according to the following table:
      
                                                        configured hardware
              176.4KHz   352.8kHz   705.6KHz     <----       sample rate
      
      8-bit                2.8MHz     5.6MHz
      16-bit    2.8Mhz     5.6MHz    11.2MHz
      
               `-----------------------------'
                   actual DSD sample rates
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ef7a4f97
  25. 12 3月, 2013 1 次提交
  26. 23 10月, 2012 2 次提交
  27. 03 10月, 2012 1 次提交
  28. 23 9月, 2012 1 次提交
  29. 07 9月, 2012 1 次提交
    • T
      ALSA: PCM: channel mapping API implementation · 2d3391ec
      Takashi Iwai 提交于
      This patch implements the basic data types for the standard channel
      mapping API handling.
      
      - The definitions of the channel positions and the new TLV types are
        added in sound/asound.h and sound/tlv.h, so that they can be
        referred from user-space.
      
      - Introduced a new helper function snd_pcm_add_chmap_ctls() to create
        control elements representing the channel maps for each PCM
        (sub)stream.
      
      - Some standard pre-defined channel maps are provided for
        convenience.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2d3391ec
  30. 20 8月, 2012 1 次提交
  31. 05 7月, 2012 1 次提交
  32. 18 6月, 2012 1 次提交