1. 21 10月, 2015 1 次提交
    • L
      ALSA: Add helper function to add single value constraint · bc1043cd
      Lars-Peter Clausen 提交于
      The recommended and most efficient way to constraint a configuration
      parameter to a single value is to set the minimum and maximum allowed
      values to the same value, i.e. calling snd_pcm_hw_constraint_minmax() with
      the same value for min and max.
      
      It is not necessarily obvious though that this is the approach that should
      be taken and some drivers have come up with other ways of solving this
      problem, e.g. installing a list constraint with a single item. List
      constraints are dynamic constraints though and hence less efficient than
      the static min-max constraint.
      
      This patch introduces a new helper function called
      snd_pcm_hw_constraint_single() which only takes a single value has the same
      effect as calling snd_pcm_hw_constraint_minmax() with the same values for
      min and max. But it is hopefully semantically more expressive, making it
      clear that this is the preferred way of setting a single value constraint.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bc1043cd
  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 次提交