Current File : //proc/self/root/kunden/usr/share/doc/alsa-lib-devel/doxygen/html/control_plugins.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ALSA project - the C library reference: Primitive control plugins</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ALSA project - the C library reference
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="index.html">Index, Preamble and License</a></li>  </ul>
</div>
</div><!-- top -->
<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">Primitive control plugins </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Control plugins extends functionality and features of control devices. The plugins take care about various control mapping or so.</p>
<p>The child configuration (in one compound):</p>
<div class="fragment"><div class="line">ctl.test {</div>
<div class="line">    <a class="code" href="ump__msg_8h.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> remap</div>
<div class="line">    child <span class="stringliteral">&quot;hw:0&quot;</span></div>
<div class="line">    ... map/remap configuration ...</div>
<div class="line">}</div>
<div class="ttc" id="aump__msg_8h_html_ad44b615021ed3ccb734fcaf583ef4a03"><div class="ttname"><a href="ump__msg_8h.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a></div><div class="ttdeci">uint8_t type</div><div class="ttdef"><b>Definition:</b> ump_msg.h:13</div></div>
</div><!-- fragment --><p>The child may be defined as compound containing the full specification:</p>
<div class="fragment"><div class="line">ctl.test {</div>
<div class="line">    <a class="code" href="ump__msg_8h.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> remap</div>
<div class="line">    child {</div>
<div class="line">        <a class="code" href="ump__msg_8h.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> hw</div>
<div class="line">        card 0</div>
<div class="line">    }</div>
<div class="line">    ... map/remap configuration ...</div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="control_plugins_hw"></a>
Plugin: hw</h1>
<p>This plugin communicates directly with the ALSA kernel driver. It is a raw communication without any conversions.</p>
<div class="fragment"><div class="line">control.name {</div>
<div class="line">    <a class="code" href="ump__msg_8h.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> hw         # Kernel PCM</div>
<div class="line">    card INT/STR        # Card name (<span class="keywordtype">string</span>) or number (integer)</div>
<div class="line">}</div>
</div><!-- fragment --><h2><a class="anchor" id="control_plugins_hw_funcref"></a>
Function reference</h2>
<ul>
<li>
<a class="el" href="control__hw_8c.html#a3f4ae02866f22f00b1293a1d220aaf71" title="Creates a new hw control.">snd_ctl_hw_open()</a> </li>
<li>
<a class="el" href="control__hw_8c.html#a29d03fdf50ba279345fada433951bd46" title="Creates a new hw control handle.">_snd_ctl_hw_open()</a> </li>
</ul>
<h1><a class="anchor" id="control_plugins_remap"></a>
Plugin: Remap &amp; map</h1>
<p>This plugin can remap (rename) identifiers (except the numid part) for a child control to another. The plugin can also merge the multiple child controls to one or split one control to more.</p>
<div class="fragment"><div class="line">ctl.name {</div>
<div class="line">    <a class="code" href="ump__msg_8h.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> remap              # Remap controls</div>
<div class="line">    child STR               # Child name</div>
<div class="line"><span class="preprocessor">    # or</span></div>
<div class="line">    child {                 # Child definition</div>
<div class="line">        <a class="code" href="ump__msg_8h.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> STR</div>
<div class="line">        ...</div>
<div class="line">    }</div>
<div class="line">    remap {</div>
<div class="line"><span class="preprocessor">        # the ID strings are parsed in the amixer style like &#39;name=&quot;Headphone Playback Switch&quot;</span>,index=2&#39;</div>
<div class="line">        SRC_ID1_STR DST_ID1_STR</div>
<div class="line">        SRC_ID2_STR DST_ID2_STR</div>
<div class="line">        ...</div>
<div class="line">    }</div>
<div class="line">    map {</div>
<div class="line"><span class="preprocessor">        # join two stereo controls to one</span></div>
<div class="line">        CREATE_ID1_STR {</div>
<div class="line">            SRC_ID1_STR {</div>
<div class="line">                vindex.0 0  # source <a class="code" href="ump__msg_8h.html#a715f5cb061d11eb75981741eda4dafcd">channel</a> 0 to merged <a class="code" href="ump__msg_8h.html#a715f5cb061d11eb75981741eda4dafcd">channel</a> 0</div>
<div class="line">                vindex.1 1</div>
<div class="line">            }</div>
<div class="line">            SRC_ID2_STR {</div>
<div class="line">                vindex.2 0</div>
<div class="line">                vindex.3 1  # source <a class="code" href="ump__msg_8h.html#a715f5cb061d11eb75981741eda4dafcd">channel</a> 1 to merged <a class="code" href="ump__msg_8h.html#a715f5cb061d11eb75981741eda4dafcd">channel</a> 3</div>
<div class="line">            }</div>
<div class="line">        }</div>
<div class="line"><span class="preprocessor">        # split stereo to mono</span></div>
<div class="line">        CREATE_ID2_STR {</div>
<div class="line">            SRC_ID3_STR {</div>
<div class="line">                vindex.0 0  # stereo to mono (first <a class="code" href="ump__msg_8h.html#a715f5cb061d11eb75981741eda4dafcd">channel</a>)</div>
<div class="line">            }</div>
<div class="line">        }</div>
<div class="line">        CREATE_ID3_STR {</div>
<div class="line">            SRC_ID4_STR {</div>
<div class="line">                vindex.0 1  # stereo to mono (second <a class="code" href="ump__msg_8h.html#a715f5cb061d11eb75981741eda4dafcd">channel</a>)</div>
<div class="line">            }</div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line">}</div>
<div class="ttc" id="aump__msg_8h_html_a715f5cb061d11eb75981741eda4dafcd"><div class="ttname"><a href="ump__msg_8h.html#a715f5cb061d11eb75981741eda4dafcd">channel</a></div><div class="ttdeci">uint8_t channel</div><div class="ttdef"><b>Definition:</b> ump_msg.h:10</div></div>
</div><!-- fragment --><h2><a class="anchor" id="control_plugins_route_funcref"></a>
Function reference</h2>
<ul>
<li>
<a class="el" href="control__remap_8c.html#a14d6e496a606bc529b1df823bb79444d" title="Creates a new remap &amp; map control handle.">snd_ctl_remap_open()</a> </li>
<li>
<a class="el" href="control__remap_8c.html#a966d901e9146469d7325abf3282db206" title="Creates a new remap &amp; map control plugin.">_snd_ctl_remap_open()</a> </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>