Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > updates > by-pkgid > 18785641029f14f23cccc82925607ace > files > 100

libalsa2-docs-0.9.0-0.14rc7.1mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>pcm_hooks.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindex" href="examples.html">Examples</a> &nbsp; </center>
<hr><h1>pcm_hooks.c File Reference</h1>PCM Hook Interface. 
<a href="#_details">More...</a>
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a32">snd_pcm_hooks_open</a> (<a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> **pcmp, const char *name, <a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *slave, int close_slave)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creates a new hooks PCM.</em> <a href="#a32"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a34">_snd_pcm_hooks_open</a> (<a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> **pcmp, const char *name, <a class="el" href="group___config.html#a1">snd_config_t</a> *root, <a class="el" href="group___config.html#a1">snd_config_t</a> *conf, <a class="el" href="group___p_c_m.html#a9">snd_pcm_stream_t</a> stream, int mode)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creates a new hooks PCM.</em> <a href="#a34"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a35">snd_pcm_hook_get_pcm</a> (<a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *hook)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get PCM handle for a PCM hook.</em> <a href="#a35"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a36">snd_pcm_hook_get_private</a> (<a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *hook)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get callback function private data for a PCM hook.</em> <a href="#a36"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a37">snd_pcm_hook_set_private</a> (<a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *hook, void *private_data)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set callback function private data for a PCM hook.</em> <a href="#a37"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a38">snd_pcm_hook_add</a> (<a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> **hookp, <a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *pcm, <a class="el" href="group___p_c_m___hook.html#a0">snd_pcm_hook_type_t</a> type, <a class="el" href="group___p_c_m___hook.html#a2">snd_pcm_hook_func_t</a> func, void *private_data)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Add a PCM hook at end of hooks chain.</em> <a href="#a38"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a39">snd_pcm_hook_remove</a> (<a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *hook)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Remove a PCM hook.</em> <a href="#a39"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="pcm__hooks_8c.html#a43">_snd_pcm_hook_ctl_elems_install</a> (<a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *pcm, <a class="el" href="group___config.html#a1">snd_config_t</a> *conf)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Install CTL settings using hardware associated with PCM handle.</em> <a href="#a43"></a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
PCM Hook Interface.
<p>

<p>
<dl compact><dt><b>Author: </b></dt><dd>
Abramo Bagnara &lt;<a href="mailto:abramo@alsa-project.org">abramo@alsa-project.org</a>&gt; , Jaroslav Kysela &lt;<a href="mailto:perex@suse.cz">perex@suse.cz</a>&gt; </dl><dl compact><dt><b>Date: </b></dt><dd>
2000-2001</dl><hr><h2>Function Documentation</h2>
<a name="a43" doxytag="pcm_hooks.c::_snd_pcm_hook_ctl_elems_install"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int _snd_pcm_hook_ctl_elems_install </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>pcm</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___config.html#a1">snd_config_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>conf</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Install CTL settings using hardware associated with PCM handle.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>pcm</em>&nbsp;</td><td>
PCM handle </td></tr>
<tr><td valign=top><em>conf</em>&nbsp;</td><td>
Configuration node with CTL settings </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
zero on success otherwise a negative error code </dl>    </td>
  </tr>
</table>
<a name="a34" doxytag="pcm_hooks.c::_snd_pcm_hooks_open"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int _snd_pcm_hooks_open </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> **&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>pcmp</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>name</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___config.html#a1">snd_config_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>root</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___config.html#a1">snd_config_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>conf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___p_c_m.html#a9">snd_pcm_stream_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>stream</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>mode</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates a new hooks PCM.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>pcmp</em>&nbsp;</td><td>
Returns created PCM handle </td></tr>
<tr><td valign=top><em>name</em>&nbsp;</td><td>
Name of PCM </td></tr>
<tr><td valign=top><em>root</em>&nbsp;</td><td>
Root configuration node </td></tr>
<tr><td valign=top><em>conf</em>&nbsp;</td><td>
Configuration node with hooks PCM description </td></tr>
<tr><td valign=top><em>stream</em>&nbsp;</td><td>
PCM Stream </td></tr>
<tr><td valign=top><em>mode</em>&nbsp;</td><td>
PCM Mode </td></tr>
</table>
</dl><dl compact><dt><b>Return values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>zero</em>&nbsp;</td><td>
on success otherwise a negative error code </td></tr>
</table>
</dl><dl compact><dt><b>Warning: </b></dt><dd>
Using of this function might be dangerous in the sense of compatibility reasons. The prototype might be freely changed in future. </dl>    </td>
  </tr>
</table>
<a name="a38" doxytag="pcm_hooks.c::snd_pcm_hook_add"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int snd_pcm_hook_add </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> **&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>hookp</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>pcm</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___p_c_m___hook.html#a0">snd_pcm_hook_type_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___p_c_m___hook.html#a2">snd_pcm_hook_func_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>func</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>private_data</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add a PCM hook at end of hooks chain.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>hookp</em>&nbsp;</td><td>
Returned PCM hook handle </td></tr>
<tr><td valign=top><em>pcm</em>&nbsp;</td><td>
PCM handle </td></tr>
<tr><td valign=top><em>type</em>&nbsp;</td><td>
PCM hook type </td></tr>
<tr><td valign=top><em>func</em>&nbsp;</td><td>
PCM hook callback function </td></tr>
<tr><td valign=top><em>private_data</em>&nbsp;</td><td>
PCM hook private data </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
0 on success otherwise a negative error code</dl>Warning: an hook callback function cannot remove an hook of the same type different from itself     </td>
  </tr>
</table>
<a name="a35" doxytag="pcm_hooks.c::snd_pcm_hook_get_pcm"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a>* snd_pcm_hook_get_pcm </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>hook</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get PCM handle for a PCM hook.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>hook</em>&nbsp;</td><td>
PCM hook handle </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
PCM handle </dl>    </td>
  </tr>
</table>
<a name="a36" doxytag="pcm_hooks.c::snd_pcm_hook_get_private"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void* snd_pcm_hook_get_private </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>hook</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get callback function private data for a PCM hook.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>hook</em>&nbsp;</td><td>
PCM hook handle </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
callback function private data </dl>    </td>
  </tr>
</table>
<a name="a39" doxytag="pcm_hooks.c::snd_pcm_hook_remove"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int snd_pcm_hook_remove </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>hook</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Remove a PCM hook.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>hook</em>&nbsp;</td><td>
PCM hook handle </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
0 on success otherwise a negative error code</dl>Warning: an hook callback cannot remove an hook of the same type different from itself     </td>
  </tr>
</table>
<a name="a37" doxytag="pcm_hooks.c::snd_pcm_hook_set_private"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void snd_pcm_hook_set_private </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m___hook.html#a1">snd_pcm_hook_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>hook</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>private_data</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set callback function private data for a PCM hook.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>hook</em>&nbsp;</td><td>
PCM hook handle </td></tr>
<tr><td valign=top><em>private_data</em>&nbsp;</td><td>
The private data value </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a32" doxytag="pcm_hooks.c::snd_pcm_hooks_open"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int snd_pcm_hooks_open </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> **&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>pcmp</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>name</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>slave</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>close_slave</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates a new hooks PCM.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>pcmp</em>&nbsp;</td><td>
Returns created PCM handle </td></tr>
<tr><td valign=top><em>name</em>&nbsp;</td><td>
Name of PCM </td></tr>
<tr><td valign=top><em>slave</em>&nbsp;</td><td>
Slave PCM </td></tr>
<tr><td valign=top><em>close_slave</em>&nbsp;</td><td>
If set, slave PCM handle is closed when hooks PCM is closed </td></tr>
</table>
</dl><dl compact><dt><b>Return values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>zero</em>&nbsp;</td><td>
on success otherwise a negative error code </td></tr>
</table>
</dl><dl compact><dt><b>Warning: </b></dt><dd>
Using of this function might be dangerous in the sense of compatibility reasons. The prototype might be freely changed in future. </dl>    </td>
  </tr>
</table>
<hr><address style="align: right;"><small>Generated on Wed Apr 2 16:06:35 2003 for ALSA project - the C library reference by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.18 </small></address>
</body>
</html>