Difference between revisions of "XRUN Debug"

From AlsaProject
Jump to: navigation, search
 
(4 intermediate revisions by one user not shown)
Line 3: Line 3:
 
===/proc/asound/card#/pcm0p/xrun_debug===
 
===/proc/asound/card#/pcm0p/xrun_debug===
  
Replace '#' with your card number (usually 0). This proc file can enable various debugging tools. The CONFIG_SND_PCM_XRUN_DEBUG option must be enabled in your kernel (if xrun_debug proc file is present - this feature is enabled).
+
Replace '#' with your card number (usually 0). This proc file can enable various debugging tools. The CONFIG_SND_PCM_XRUN_DEBUG, CONFIG_SND_VERBOSE_PROCFS, CONFIG_SND_DEBUG options must be enabled in your kernel (if xrun_debug proc file is present - this feature is enabled).
  
 
   1  Basic debugging - show xruns in ksyslog interface
 
   1  Basic debugging - show xruns in ksyslog interface
 
   2  Dump stack - dump stack for basic debugging
 
   2  Dump stack - dump stack for basic debugging
   4  Jiffies check - compare the position with kernel jiffies (a sort of in-kernel monotonic clock), show what's changed when basic debugging is enabled
+
   4  Jiffies check - compare the position with kernel jiffies (a sort of in-kernel monotonic clock),
 +
      show what's changed when basic debugging is enabled
 
   8  Dump positions on each period update call
 
   8  Dump positions on each period update call
 
   16  Dump positions on each hardware pointer update call
 
   16  Dump positions on each hardware pointer update call
Line 20: Line 21:
 
   # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 
   # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 
   echo 3 > /proc/asound/card0/pcm0p/xrun_debug
 
   echo 3 > /proc/asound/card0/pcm0p/xrun_debug
 +
 +
  # Enable basic debugging and dump stack, check hardware pointer on the period update
 +
  # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 +
  # And to check the values from driver
 +
  echo 11 > /proc/asound/card0/pcm0p/xrun_debug
 +
 +
  # Enable basic debugging and dump stack, check hardware pointer on all updates
 +
  # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 +
  # And to do the exact check the values from driver
 +
  echo 27 > /proc/asound/card0/pcm0p/xrun_debug
  
 
   # Enable basic debugging, do jiffies check and enable one shot dump of last 10 ring buffer positions
 
   # Enable basic debugging, do jiffies check and enable one shot dump of last 10 ring buffer positions

Latest revision as of 15:06, 15 July 2010

This page describes the build-in ALSA driver tool to debug PCM ring buffer positions.

[edit] /proc/asound/card#/pcm0p/xrun_debug

Replace '#' with your card number (usually 0). This proc file can enable various debugging tools. The CONFIG_SND_PCM_XRUN_DEBUG, CONFIG_SND_VERBOSE_PROCFS, CONFIG_SND_DEBUG options must be enabled in your kernel (if xrun_debug proc file is present - this feature is enabled).

 1   Basic debugging - show xruns in ksyslog interface
 2   Dump stack - dump stack for basic debugging
 4   Jiffies check - compare the position with kernel jiffies (a sort of in-kernel monotonic clock),
     show what's changed when basic debugging is enabled
 8   Dump positions on each period update call
 16  Dump positions on each hardware pointer update call
 32  Enable logging of last 10 ring buffer positions
 64  Show the last 10 ring buffer position only once (when first error situation occured)

To enable more features just do sum values of above (for example 1+2=3).

Some good value combinations:

 # Enable basic debugging and dump stack
 # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 echo 3 > /proc/asound/card0/pcm0p/xrun_debug
 # Enable basic debugging and dump stack, check hardware pointer on the period update
 # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 # And to check the values from driver
 echo 11 > /proc/asound/card0/pcm0p/xrun_debug
 # Enable basic debugging and dump stack, check hardware pointer on all updates
 # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
 # And to do the exact check the values from driver
 echo 27 > /proc/asound/card0/pcm0p/xrun_debug
 # Enable basic debugging, do jiffies check and enable one shot dump of last 10 ring buffer positions
 # Usefull, when the position is broken only after some of time (to reduce ksyslog messages)
 echo 101 > /proc/asound/card0/pcm0p/xrun_debug
 # Enable basic debugging, do jiffies check and dump position on each period and hardware pointer update calls
 # Usefull when the lowlevel (specific) hardware driver is somehow broken
 echo 29 > /proc/asound/card0/pcm0p/xrun_debug
Custom Search
Personal tools
Namespaces

Variants
Actions
Navigation
wiki
Toolbox