1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>ALSA project - the C library reference: /home/alsa/tmp/cvs/alsa-lib/include/pcm_extplug.h Source File</title>
5
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<link href="tabs.css" rel="stylesheet" type="text/css"></head><body>
7
<!-- Generated by Doxygen 1.5.0 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li><a href="modules.html"><span>Modules</span></a></li>
12
<li><a href="annotated.html"><span>Data Structures</span></a></li>
13
<li id="current"><a href="files.html"><span>Files</span></a></li>
14
<li><a href="pages.html"><span>Related Pages</span></a></li>
15
<li><a href="examples.html"><span>Examples</span></a></li>
19
<li><a href="files.html"><span>File List</span></a></li>
20
<li><a href="globals.html"><span>Globals</span></a></li>
22
<h1>/home/alsa/tmp/cvs/alsa-lib/include/pcm_extplug.h</h1><a href="pcm__extplug_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <br><a name="l00010"></a>00010 <span class="comment">/*</span>
23
<a name="l00011"></a>00011 <span class="comment"> * ALSA external PCM plugin SDK (draft version)</span>
24
<a name="l00012"></a>00012 <span class="comment"> *</span>
25
<a name="l00013"></a>00013 <span class="comment"> * Copyright (c) 2005 Takashi Iwai <tiwai@suse.de></span>
26
<a name="l00014"></a>00014 <span class="comment"> *</span>
27
<a name="l00015"></a>00015 <span class="comment"> * This library is free software; you can redistribute it and/or modify</span>
28
<a name="l00016"></a>00016 <span class="comment"> * it under the terms of the GNU Lesser General Public License as</span>
29
<a name="l00017"></a>00017 <span class="comment"> * published by the Free Software Foundation; either version 2.1 of</span>
30
<a name="l00018"></a>00018 <span class="comment"> * the License, or (at your option) any later version.</span>
31
<a name="l00019"></a>00019 <span class="comment"> *</span>
32
<a name="l00020"></a>00020 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
33
<a name="l00021"></a>00021 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
34
<a name="l00022"></a>00022 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
35
<a name="l00023"></a>00023 <span class="comment"> * GNU Lesser General Public License for more details.</span>
36
<a name="l00024"></a>00024 <span class="comment"> *</span>
37
<a name="l00025"></a>00025 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
38
<a name="l00026"></a>00026 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
39
<a name="l00027"></a>00027 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
40
<a name="l00028"></a>00028 <span class="comment"> *</span>
41
<a name="l00029"></a>00029 <span class="comment"> */</span>
42
<a name="l00030"></a>00030 <br><a name="l00031"></a>00031 <span class="preprocessor">#ifndef __ALSA_PCM_EXTPLUG_H</span>
43
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define __ALSA_PCM_EXTPLUG_H</span>
44
<a name="l00033"></a>00033 <span class="preprocessor"></span>
45
<a name="l00042"></a>00042 <span class="keyword">enum</span> {<br><a name="l00043"></a>00043 <a class="code" href="group___p_c_m___ext_plug.html#gg1af138ee919beeb88a50aa27b42124b71d5379b0579703933f070b7c3cb845f5">SND_PCM_EXTPLUG_HW_FORMAT</a>, <br><a name="l00044"></a>00044 <a class="code" href="group___p_c_m___ext_plug.html#gg1af138ee919beeb88a50aa27b42124b711867774d63675bb1fe3ecd1933ebed0">SND_PCM_EXTPLUG_HW_CHANNELS</a>, <br><a name="l00045"></a><a class="code" href="group___p_c_m___ext_plug.html#gg1af138ee919beeb88a50aa27b42124b79c1195746498d1a75a6476950d147213">00045</a> <a class="code" href="group___p_c_m___ext_plug.html#gg1af138ee919beeb88a50aa27b42124b79c1195746498d1a75a6476950d147213">SND_PCM_EXTPLUG_HW_PARAMS</a> <br><a name="l00046"></a>00046 };<br><a name="l00047"></a>00047 <br><a name="l00049"></a><a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">00049</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug.html">snd_pcm_extplug</a> <a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a>;<br><a name="l00051"></a><a class="code" href="group___p_c_m___ext_plug.html#g9d8340212da6e371e00be36403bf6071">00051</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug__callback.html">snd_pcm_extplug_callback</a> <a class="code" href="group___p_c_m___ext_plug.html#g9d8340212da6e371e00be36403bf6071">snd_pcm_extplug_callback_t</a>;<br><a name="l00052"></a>00052 <br><a name="l00053"></a>00053 <span class="comment">/*</span>
46
<a name="l00054"></a>00054 <span class="comment"> * Protocol version</span>
47
<a name="l00055"></a>00055 <span class="comment"> */</span>
48
<a name="l00056"></a><a class="code" href="group___p_c_m___ext_plug.html#g4854f28f6805a788cd2a117e82224946">00056</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION_MAJOR 1 </span>
49
<a name="l00057"></a><a class="code" href="group___p_c_m___ext_plug.html#g5030132784eea83ffe1a58b21efc5934">00057</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION_MINOR 0 </span>
50
<a name="l00058"></a><a class="code" href="group___p_c_m___ext_plug.html#gd003584c8ec5dd20e79cd1c565c1d117">00058</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION_TINY 1 </span>
51
<a name="l00062"></a><a class="code" href="group___p_c_m___ext_plug.html#gde3e571a17c909eac1e58a1bdb4603a3">00062</a> <span class="preprocessor">#define SND_PCM_EXTPLUG_VERSION ((SND_PCM_EXTPLUG_VERSION_MAJOR<<16) |\</span>
52
<a name="l00063"></a>00063 <span class="preprocessor"> (SND_PCM_EXTPLUG_VERSION_MINOR<<8) |\</span>
53
<a name="l00064"></a>00064 <span class="preprocessor"> (SND_PCM_EXTPLUG_VERSION_TINY))</span>
54
<a name="l00065"></a>00065 <span class="preprocessor"></span>
55
<a name="l00067"></a><a class="code" href="structsnd__pcm__extplug.html">00067</a> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug.html">snd_pcm_extplug</a> {<br><a name="l00072"></a><a class="code" href="structsnd__pcm__extplug.html#f7f8c10af85aeab61bba5ba4171bbd9d">00072</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#f7f8c10af85aeab61bba5ba4171bbd9d">version</a>;<br><a name="l00076"></a><a class="code" href="structsnd__pcm__extplug.html#abe10ed06f6a8d37512c10a962078838">00076</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structsnd__pcm__extplug.html#abe10ed06f6a8d37512c10a962078838">name</a>;<br><a name="l00080"></a><a class="code" href="structsnd__pcm__extplug.html#1357d4af6bf0aa006ad972a7a23106e5">00080</a> <span class="keyword">const</span> <a class="code" href="group___p_c_m___ext_plug.html#g9d8340212da6e371e00be36403bf6071">snd_pcm_extplug_callback_t</a> *<a class="code" href="structsnd__pcm__extplug.html#1357d4af6bf0aa006ad972a7a23106e5">callback</a>;<br><a name="l00084"></a><a class="code" href="structsnd__pcm__extplug.html#e66ae9f64839e8ea09833396e83aab8f">00084</a> <span class="keywordtype">void</span> *<a class="code" href="structsnd__pcm__extplug.html#e66ae9f64839e8ea09833396e83aab8f">private_data</a>;<br><a name="l00088"></a><a class="code" href="structsnd__pcm__extplug.html#a515826f04f381ba896b38b05806ba47">00088</a> <a class="code" href="group___p_c_m.html#gb5676348e7618b444e28907607660cef">snd_pcm_t</a> *<a class="code" href="structsnd__pcm__extplug.html#a515826f04f381ba896b38b05806ba47">pcm</a>;<br><a name="l00092"></a><a class="code" href="structsnd__pcm__extplug.html#4b18696591ad7df18551ad0ed2f95589">00092</a> <a class="code" href="group___p_c_m.html#g854f0966bd0d7248ed3d9e5c293136ed">snd_pcm_stream_t</a> <a class="code" href="structsnd__pcm__extplug.html#4b18696591ad7df18551ad0ed2f95589">stream</a>;<br><a name="l00096"></a><a class="code" href="structsnd__pcm__extplug.html#a130a5b1d68e48f7c13254f829db3051">00096</a> <a class="code" href="group___p_c_m.html#g5ae31ebbea7972ce97a498040df1839e">snd_pcm_format_t</a> <a class="code" href="structsnd__pcm__extplug.html#a130a5b1d68e48f7c13254f829db3051">format</a>;<br><a name="l00100"></a><a class="code" href="structsnd__pcm__extplug.html#bf0900c814e898bb1304d464f8a25bde">00100</a> <a class="code" href="group___p_c_m.html#gc7def2cfb418b1c4ced3ccd7106969a7">snd_pcm_subformat_t</a> <a class="code" href="structsnd__pcm__extplug.html#bf0900c814e898bb1304d464f8a25bde">subformat</a>;<br><a name="l00104"></a><a class="code" href="structsnd__pcm__extplug.html#14d7873cc93d4085b1127dfa64071533">00104</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#14d7873cc93d4085b1127dfa64071533">channels</a>;<br><a name="l00108"></a><a class="code" href="structsnd__pcm__extplug.html#58ab26c4625bed4e623b85fc9b3a834c">00108</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#58ab26c4625bed4e623b85fc9b3a834c">rate</a>;<br><a name="l00112"></a><a class="code" href="structsnd__pcm__extplug.html#6cd3a465c740a374952e3bc43160648c">00112</a> <a class="code" href="group___p_c_m.html#g5ae31ebbea7972ce97a498040df1839e">snd_pcm_format_t</a> <a class="code" href="structsnd__pcm__extplug.html#6cd3a465c740a374952e3bc43160648c">slave_format</a>;<br><a name="l00116"></a><a class="code" href="structsnd__pcm__extplug.html#943c6e244edd9e790a934406db06cffb">00116</a> <a class="code" href="group___p_c_m.html#gc7def2cfb418b1c4ced3ccd7106969a7">snd_pcm_subformat_t</a> <a class="code" href="structsnd__pcm__extplug.html#943c6e244edd9e790a934406db06cffb">slave_subformat</a>;<br><a name="l00120"></a><a class="code" href="structsnd__pcm__extplug.html#f533c750929ffdeb7b071bf51cc0d172">00120</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structsnd__pcm__extplug.html#f533c750929ffdeb7b071bf51cc0d172">slave_channels</a>;<br><a name="l00121"></a>00121 };<br><a name="l00122"></a>00122 <br><a name="l00124"></a><a class="code" href="structsnd__pcm__extplug__callback.html">00124</a> <span class="keyword">struct </span><a class="code" href="structsnd__pcm__extplug__callback.html">snd_pcm_extplug_callback</a> {<br><a name="l00128"></a>00128 <a class="code" href="group___p_c_m.html#g842d603aa3a4bc5b4596b42490104da3">snd_pcm_sframes_t</a> (*<a class="code" href="structsnd__pcm__extplug__callback.html#d5dfcb0803420d056d08124b57a38822">transfer</a>)(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext,<br><a name="l00129"></a>00129 <span class="keyword">const</span> <a class="code" href="struct__snd__pcm__channel__area.html">snd_pcm_channel_area_t</a> *dst_areas,<br><a name="l00130"></a>00130 <a class="code" href="group___p_c_m.html#g2c6283616ba424092089264ae7e193e6">snd_pcm_uframes_t</a> dst_offset,<br><a name="l00131"></a>00131 <span class="keyword">const</span> <a class="code" href="struct__snd__pcm__channel__area.html">snd_pcm_channel_area_t</a> *src_areas,<br><a name="l00132"></a>00132 <a class="code" href="group___p_c_m.html#g2c6283616ba424092089264ae7e193e6">snd_pcm_uframes_t</a> src_offset,<br><a name="l00133"></a>00133 <a class="code" href="group___p_c_m.html#g2c6283616ba424092089264ae7e193e6">snd_pcm_uframes_t</a> size);<br><a name="l00137"></a>00137 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#ec5493555886926e4f579d341c3dc5dd">close</a>)(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext);<br><a name="l00141"></a>00141 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#97d0bfcf60ed0e1b14593166f9a34d9d">hw_params</a>)(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext, <a class="code" href="group___p_c_m.html#g232a2e2b6bb7bb2dca2885eec2e095b3">snd_pcm_hw_params_t</a> *params);<br><a name="l00145"></a>00145 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#6071524a7ad6af297cc6c097faf1420f">hw_free</a>)(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext);<br><a name="l00149"></a>00149 void (*<a class="code" href="structsnd__pcm__extplug__callback.html#2443752fbce22a69b0d0b5a67f2b6f9c">dump</a>)(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext, <a class="code" href="group___output.html#gfcb4f6ed600e8daf18d5d5d8623dda50">snd_output_t</a> *out);<br><a name="l00153"></a>00153 int (*<a class="code" href="structsnd__pcm__extplug__callback.html#8e2728cda8ea1f5c7401fb50c62883d8">init</a>)(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext);<br><a name="l00154"></a>00154 };<br><a name="l00155"></a>00155 <br><a name="l00156"></a>00156 <br><a name="l00157"></a>00157 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#g57892d908bc602543ad645fcf278d4bc">snd_pcm_extplug_create</a>(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext, <span class="keyword">const</span> <span class="keywordtype">char</span> *name,<br><a name="l00158"></a>00158 <a class="code" href="group___config.html#gb7dc173feea5bedcd999bba678eb53a7">snd_config_t</a> *root, <a class="code" href="group___config.html#gb7dc173feea5bedcd999bba678eb53a7">snd_config_t</a> *slave_conf,<br><a name="l00159"></a>00159 <a class="code" href="group___p_c_m.html#g854f0966bd0d7248ed3d9e5c293136ed">snd_pcm_stream_t</a> stream, <span class="keywordtype">int</span> mode);<br><a name="l00160"></a>00160 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#g73cde6bb5aafcbdc89a79897c9d9535c">snd_pcm_extplug_delete</a>(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext);<br><a name="l00161"></a>00161 <br><a name="l00162"></a>00162 <span class="comment">/* clear hw_parameter setting */</span>
56
<a name="l00163"></a>00163 <span class="keywordtype">void</span> <a class="code" href="group___p_c_m___ext_plug.html#ga658989357015fadc3776038f9186afc">snd_pcm_extplug_params_reset</a>(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *ext);<br><a name="l00164"></a>00164 <br><a name="l00165"></a>00165 <span class="comment">/* hw_parameter setting */</span>
57
<a name="l00166"></a>00166 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#gcb52f3c06dc627450d69c7aa05f8508e">snd_pcm_extplug_set_param_list</a>(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_list, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *list);<br><a name="l00167"></a>00167 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#g687a2749106b0be206e9b4ec62df009d">snd_pcm_extplug_set_param_minmax</a>(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> min, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max);<br><a name="l00168"></a>00168 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#g84a3f300cf1193988f416fafb7c88258">snd_pcm_extplug_set_slave_param_list</a>(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_list, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *list);<br><a name="l00169"></a>00169 <span class="keywordtype">int</span> <a class="code" href="group___p_c_m___ext_plug.html#g92adb0c7061c59fb1034ba57a2cb08f9">snd_pcm_extplug_set_slave_param_minmax</a>(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> min, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max);<br><a name="l00170"></a>00170 <br><a name="l00174"></a>00174 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> snd_pcm_extplug_set_param(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val)<br><a name="l00175"></a>00175 {<br><a name="l00176"></a>00176 <span class="keywordflow">return</span> <a class="code" href="group___p_c_m___ext_plug.html#gcb52f3c06dc627450d69c7aa05f8508e">snd_pcm_extplug_set_param_list</a>(extplug, type, 1, &val);<br><a name="l00177"></a>00177 }<br><a name="l00178"></a>00178 <br><a name="l00182"></a>00182 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> snd_pcm_extplug_set_slave_param(<a class="code" href="group___p_c_m___ext_plug.html#g1aefaedf9d1cba412f1ebfb884f05b45">snd_pcm_extplug_t</a> *extplug, <span class="keywordtype">int</span> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val)<br><a name="l00183"></a>00183 {<br><a name="l00184"></a>00184 <span class="keywordflow">return</span> <a class="code" href="group___p_c_m___ext_plug.html#g84a3f300cf1193988f416fafb7c88258">snd_pcm_extplug_set_slave_param_list</a>(extplug, type, 1, &val);<br><a name="l00185"></a>00185 }<br><a name="l00186"></a>00186 <br><a name="l00189"></a>00189 <span class="preprocessor">#endif </span><span class="comment">/* __ALSA_PCM_EXTPLUG_H */</span>
58
</pre></div><hr size="1"><address style=""><small>Generated on Wed Sep 9 14:37:08 2009 for ALSA project - the C library reference by
59
<a href="http://www.doxygen.org/index.html">
60
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>
b'\\ No newline at end of file'