<!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>Runtime functions in configuration files</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> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindex" href="examples.html">Examples</a> </center> <hr><h1><a name="conffunc">Runtime functions in configuration files</a> </h1> <p> <p> The ALSA library can modify the configuration at runtime. Several built-in functions are available. <p> <p> A function is defined with the id <code>@func</code> and the function name. All other values in the current compound are used as configuration for the function. If the compound func.<function_name> is defined in the root node, then the library and function from this compound configuration are used, otherwise 'snd_func_' is prefixed to the string and code from the ALSA library is used. The definition of a function looks like: <p> <div class="fragment"><pre>func.remove_first_char { lib <span class="stringliteral">"/usr/lib/libasoundextend.so"</span> func <span class="stringliteral">"extend_remove_first_char"</span> } </pre></div> <p> <h2><a name="conffunc_ref">Function reference</a> </h2> <p> <ul> <li>The getenv function - <a class="el" href="confmisc_8c.html#a4">snd_func_getenv()</a> - obtains an environment value. The result is a string. <li>The igetenv function - <a class="el" href="confmisc_8c.html#a5">snd_func_igetenv()</a> - obtains an environment value. The result is an integer. <li>The concat function - <a class="el" href="confmisc_8c.html#a6">snd_func_concat()</a> - merges all specified strings. The result is a string. <li>The datadir function - <a class="el" href="confmisc_8c.html#a7">snd_func_datadir()</a> - returns the ALSA data directory. The result is a string. <li>The refer function - <a class="el" href="confmisc_8c.html#a15">snd_func_refer()</a> - copies the referred configuration. The result has the same type as the referred node. <li>The card_driver function - <a class="el" href="confmisc_8c.html#a11">snd_func_card_driver()</a> - returns a driver identification. The result is a string. <li>The card_id function - <a class="el" href="confmisc_8c.html#a12">snd_func_card_id()</a> - returns a card identification. The result is a string. <li>The pcm_id function - <a class="el" href="confmisc_8c.html#a13">snd_func_pcm_id()</a> - returns a pcm identification. The result is a string. <li>The private_string function - <a class="el" href="confmisc_8c.html#a9">snd_func_private_string()</a> - returns the string from the private_data node. <li>The private_card_driver function - <a class="el" href="confmisc_8c.html#a10">snd_func_private_card_driver()</a> - returns the driver identification from the private_data node. The result is a string. <li>The private_pcm_subdevice function - <a class="el" href="confmisc_8c.html#a14">snd_func_private_pcm_subdevice()</a> - returns the PCM subdevice number from the private_data node. The result is a string. </ul> <hr><address style="align: right;"><small>Generated on Wed Apr 2 16:06:36 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>