1. 09 6月, 2017 1 次提交
  2. 03 6月, 2017 9 次提交
  3. 26 5月, 2017 1 次提交
  4. 17 5月, 2017 2 次提交
  5. 02 3月, 2017 1 次提交
  6. 10 5月, 2016 1 次提交
    • T
      ALSA: pcm: Bail out when chmap is already present · 8d879be8
      Takashi Iwai 提交于
      When snd_pcm_add_chmap_ctls() is called to the PCM stream to which a
      chmap has been already assigned, it returns as an error due to the
      conflicting snd_ctl_add() result.  However, this also clears the
      already assigned chmap_kctl field via pcm_chmap_ctl_private_free(),
      and becomes inconsistent in the later operation.
      
      This patch adds the check of the conflicting chmap kctl before
      actually trying to allocate / assign.  The check failure is treated as
      a kernel warning, as the double call of snd_pcm_add_chmap_ctls() is
      basically a driver bug and having the stack trace would help
      developers to figure out the bad code path.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8d879be8
  7. 15 4月, 2016 1 次提交
    • T
      ALSA: pcm : Call kill_fasync() in stream lock · 3aa02cb6
      Takashi Iwai 提交于
      Currently kill_fasync() is called outside the stream lock in
      snd_pcm_period_elapsed().  This is potentially racy, since the stream
      may get released even during the irq handler is running.  Although
      snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
      guarantee that the irq handler finishes, thus the kill_fasync() call
      outside the stream spin lock may be invoked after the substream is
      detached, as recently reported by KASAN.
      
      As a quick workaround, move kill_fasync() call inside the stream
      lock.  The fasync is rarely used interface, so this shouldn't have a
      big impact from the performance POV.
      
      Ideally, we should implement some sync mechanism for the proper finish
      of stream and irq handler.  But this oneliner should suffice for most
      cases, so far.
      Reported-by: NBaozeng Ding <sploving1@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3aa02cb6
  8. 11 3月, 2016 1 次提交
    • T
      ALSA: pcm: Avoid "BUG:" string for warnings again · 0ab1ace8
      Takashi Iwai 提交于
      The commit [d507941b: ALSA: pcm: Correct PCM BUG error message]
      made the warning prefix back to "BUG:" due to its previous wrong
      prefix.  But a kernel message containing "BUG:" seems taken as an Oops
      message wrongly by some brain-dead daemons, and it annoys users in the
      end.  Instead of teaching daemons, change the string again to a more
      reasonable one.
      
      Fixes: 507941beb1e ('ALSA: pcm: Correct PCM BUG error message')
      Cc: <stable@vger.kernel.org> # v3.19+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0ab1ace8
  9. 28 10月, 2015 1 次提交
  10. 22 10月, 2015 1 次提交
  11. 16 10月, 2015 1 次提交
  12. 19 5月, 2015 1 次提交
    • K
      ALSA: pcm: Modify double acknowledged interrupts check condition · 13a98839
      Koro Chen 提交于
      Currently in snd_pcm_update_hw_ptr0 during interrupt,
      we consider there were double acknowledged interrupts when:
      1. HW reported pointer is smaller than expected, and
      2. Time from last update time (hdelta) is over half a buffer time.
      
      However, when HW reported pointer is only a few bytes smaller than
      expected, and when hdelta is just a little larger than half a buffer time
      (e.g. ping-pong buffer), it wrongly treats this IRQ as double acknowledged.
      
      The condition #2 uses jiffies, but jiffies is not high resolution
      since it is integer. We should consider jiffies inaccuracy.
      Signed-off-by: NKoro Chen <koro.chen@mediatek.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      13a98839
  13. 21 2月, 2015 1 次提交
  14. 29 1月, 2015 1 次提交
  15. 30 12月, 2014 2 次提交
    • L
      ALSA: Add support for wildcard msbits constraints · 8ef9df55
      Lars-Peter Clausen 提交于
      Currently the msbits constraints requires to specify a specific sample
      format width for which the constraint should be applied. But often the
      number of most significant bits is not sample format specific, but rather a
      absolute limit. E.g. the PCM interface might accept 32-bit and 24-bit
      samples, but the DAC has a 16-bit resolution and throws away the LSBs. In
      this case for both 32-bit and 24-bit format msbits should be set to 16. This
      patch extends snd_pcm_hw_constraint_msbits() so that a wildcard constraint
      can be setup that is applied for all formats with a sample width larger than
      the specified msbits. Choosing the wildcard constraint is done by setting
      the sample width parameter of the function to 0.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8ef9df55
    • L
      ALSA: Fix handling of multiple msbits constraints on the same runtime · 19f52fae
      Lars-Peter Clausen 提交于
      If the sound card is made up of discrete components, each with their own
      driver (e.g. like in the ASoC case), we might end up with multiple msbits
      constraint rules installed. Currently this will result in msbits being set
      to whatever the last rule set it to.
      
      This patch updates the behavior of the rule to choose the minimum (other
      than zero) of all the installed rules.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      19f52fae
  16. 04 11月, 2014 2 次提交
    • T
      ALSA: pcm: Replace PCM hwptr tracking with tracepoints · f5914908
      Takashi Iwai 提交于
      ALSA PCM core has a mechanism tracking the PCM hwptr updates for
      analyzing XRUNs.  But its log is limited (up to 10) and its log output
      is a kernel message, which is hard to handle.
      
      In this patch, the hwptr logging is moved to the tracing
      infrastructure instead of its own.  Not only the hwptr updates but
      also XRUN and hwptr errors are recorded on the trace log, so that user
      can see such events at the exact timing.
      
      The new "snd_pcm" entry will appear in the tracing events:
        # ls -F /sys/kernel/debug/tracing/events/snd_pcm
        enable  filter  hw_ptr_error/  hwptr/  xrun/
      
      The hwptr is for the regular hwptr update events.  An event trace
      looks like:
      
        aplay-26187 [004] d..3  4012.834761: hwptr: pcmC0D0p/sub0: POS: pos=488, old=0, base=0, period=1024, buf=16384
      
      "POS" shows the hwptr update by the explicit position update call and
      "IRQ" means the hwptr update by the interrupt,
      i.e. snd_pcm_period_elapsed() call.  The "pos" is the passed
      ring-buffer offset by the caller, "old" is the previous hwptr, "base"
      is the hwptr base position, "period" and "buf" are period- and
      buffer-size of the target PCM substream.
      (Note that the hwptr position displayed here isn't the ring-buffer
       offset.  It increments up to the PCM position boundary.)
      
      The XRUN event appears similarly, but without "pos" field.
      The hwptr error events appear with the PCM identifier and its reason
      string, such as "Lost interrupt?".
      
      The XRUN and hwptr error reports on kernel message are still left, can
      be turned on/off via xrun_debug proc like before.  But the bit 3, 4, 5
      and 6 bits of xrun_debug proc are dropped by this patch.  Also, along
      with the change, the message strings have been reformatted to be a bit
      more consistent.
      
      Last but not least, the hwptr reporting is enabled only when
      CONFIG_SND_PCM_XRUN_DEBUG is set.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f5914908
    • T
      ALSA: pcm: Correct PCM BUG error message · d507941b
      Takashi Iwai 提交于
      While converting to dev_*(), the message showing the invalid PCM
      position was wrongly tagged as if an XRUN although it's actually a
      BUG.  This patch corrects the message again.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d507941b
  17. 22 9月, 2014 1 次提交
  18. 08 9月, 2014 2 次提交
  19. 16 4月, 2014 1 次提交
  20. 20 2月, 2014 1 次提交
  21. 14 2月, 2014 1 次提交
  22. 17 12月, 2013 1 次提交
  23. 19 8月, 2013 1 次提交
    • T
      ALSA: pcm: Use snd_printd_ratelimit() · 74d779ab
      Tim Gardner 提交于
      The use of snd_printd_ratelimit() supresses superfluous output from
      printk_ratelimit() when CONFIG_SND_DEBUG is not defined. For example,
      
      [   43.753692] snd_pcm_update_hw_ptr0: 26 callbacks suppressed
      [   48.822131] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
      [   53.894953] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
      [   58.997761] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
      [   64.100952] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
      
      fills the log even when no debug output is actually produced.
      
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Yacine Belkadi <yacine.belkadi.1@gmail.com>
      Signed-off-by: NTim Gardner <tim.gardner@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      74d779ab
  24. 24 5月, 2013 1 次提交
  25. 12 3月, 2013 1 次提交
  26. 23 10月, 2012 2 次提交
  27. 13 9月, 2012 1 次提交