Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 4165

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter&#160;16.&#160;Useful Functions</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Writing an ALSA Driver" /><link rel="up" href="index.html" title="Writing an ALSA Driver" /><link rel="prev" href="ch15s03.html" title="Drivers with Several Source Files" /><link rel="next" href="ch16s02.html" title="snd_BUG()" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;16.&#160;Useful Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch15s03.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch16s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter&#160;16.&#160;Useful Functions"><div class="titlepage"><div><div><h2 class="title"><a id="useful-functions"></a>Chapter&#160;16.&#160;Useful Functions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch16.html#useful-functions-snd-printk"><code class="function">snd_printk()</code> and friends</a></span></dt><dt><span class="section"><a href="ch16s02.html"><code class="function">snd_BUG()</code></a></span></dt><dt><span class="section"><a href="ch16s03.html"><code class="function">snd_BUG_ON()</code></a></span></dt></dl></div><div class="section" title="snd_printk() and friends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="useful-functions-snd-printk"></a><code class="function">snd_printk()</code> and friends</h2></div></div></div><p>
        ALSA provides a verbose version of the
      <code class="function">printk()</code> function. If a kernel config
      <code class="constant">CONFIG_SND_VERBOSE_PRINTK</code> is set, this
      function prints the given message together with the file name
      and the line of the caller. The <code class="constant">KERN_XXX</code>
      prefix is processed as 
      well as the original <code class="function">printk()</code> does, so it's
      recommended to add this prefix, e.g. 

        </p><div class="informalexample"><pre class="programlisting">

  snd_printk(KERN_ERR "Oh my, sorry, it's extremely bad!\n");

          </pre></div><p>
      </p><p>
        There are also <code class="function">printk()</code>'s for
      debugging. <code class="function">snd_printd()</code> can be used for
      general debugging purposes. If
      <code class="constant">CONFIG_SND_DEBUG</code> is set, this function is
      compiled, and works just like
      <code class="function">snd_printk()</code>. If the ALSA is compiled
      without the debugging flag, it's ignored. 
      </p><p>
        <code class="function">snd_printdd()</code> is compiled in only when
      <code class="constant">CONFIG_SND_DEBUG_VERBOSE</code> is set. Please note
      that <code class="constant">CONFIG_SND_DEBUG_VERBOSE</code> is not set as default
      even if you configure the alsa-driver with
      <code class="option">--with-debug=full</code> option. You need to give
      explicitly <code class="option">--with-debug=detect</code> option instead. 
      </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch15s03.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="ch16s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Drivers with Several Source Files&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<code class="function">snd_BUG()</code></td></tr></table></div></body></html>