1 /******************************************************************************\r
2 * FILE PURPOSE: Adaptive Spectral Noise Reduction (ASNR) module\r
3 * \r
4 ******************************************************************************\r
5 * FILE NAME: asnr.h \r
6 *\r
7 * DESCRIPTION: Implements adaptive noise reduction in frequency domain. \r
8 *\r
9 * Copyright (c) 2007 – 2013 Texas Instruments Incorporated \r
10 * \r
11 * All rights reserved not granted herein. \r
12 * \r
13 * Limited License. \r
14 * \r
15 * Texas Instruments Incorporated grants a world-wide, royalty-free, \r
16 * non-exclusive license under copyrights and patents it now or hereafter owns \r
17 * or controls to make, have made, use, import, offer to sell and sell \r
18 * ("Utilize") this software subject to the terms herein. With respect to the \r
19 * foregoing patent license, such license is granted solely to the extent that \r
20 * any such patent is necessary to Utilize the software alone. The patent \r
21 * license shall not apply to any combinations which include this software, \r
22 * other than combinations with devices manufactured by or for TI (“TI \r
23 * Devices”). No hardware patent is licensed hereunder. \r
24 * \r
25 * Redistributions must preserve existing copyright notices and reproduce this \r
26 * license (including the above copyright notice and the disclaimer and (if \r
27 * applicable) source code license limitations below) in the documentation \r
28 * and/or other materials provided with the distribution \r
29 * \r
30 * Redistribution and use in binary form, without modification, are permitted \r
31 * provided that the following conditions are met: \r
32 * \r
33 * * No reverse engineering, decompilation, or disassembly of this software \r
34 * is permitted with respect to any software provided in binary form. \r
35 * \r
36 * * any redistribution and use are licensed by TI for use only with TI \r
37 * Devices. \r
38 * \r
39 * * Nothing shall obligate TI to provide you with source code for the \r
40 * software licensed and provided to you in object code. \r
41 * \r
42 * If software source code is provided to you, modification and redistribution \r
43 * of the source code are permitted provided that the following conditions are \r
44 * met: \r
45 * \r
46 * * any redistribution and use of the source code, including any resulting \r
47 * derivative works, are licensed by TI for use only with TI Devices. \r
48 * \r
49 * * any redistribution and use of any object code compiled from the source \r
50 * code and any resulting derivative works, are licensed by TI for use only \r
51 * with TI Devices. \r
52 * \r
53 * Neither the name of Texas Instruments Incorporated nor the names of its \r
54 * suppliers may be used to endorse or promote products derived from this \r
55 * software without specific prior written permission. \r
56 * \r
57 * DISCLAIMER. \r
58 * \r
59 * THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS \r
60 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
61 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \r
62 * DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY \r
63 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
64 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR \r
65 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER \r
66 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT \r
67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY \r
68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH \r
69 * DAMAGE. \r
70 *****************************************************************************/\r
71 #ifndef _ASNR_H\r
72 #define _ASNR_H\r
73 \r
74 /**\r
75 * @file asnr.h\r
76 * @brief Contains external API for the Adaptive Spectral Noise Reduction \r
77 * (ASNR) module.\r
78 *\r
79 */\r
80 \r
81 /* System include files and utilities' APIs */\r
82 #include <ti/mas/types/types.h> /* DSP types */\r
83 #include <ti/mas/util/ecomem.h> /* memory descriptor structure */\r
84 \r
85 /* Define ASNR Module as a master group in Doxygen format and add all ASNR API\r
86 definitions to this group. */\r
87 /** @defgroup asnr_module ASNR Module API\r
88 * @{\r
89 */\r
90 /** @} */\r
91 \r
92 /** @defgroup asnr_api_functions ASNR Functions\r
93 * @ingroup asnr_module\r
94 */\r
95 \r
96 /** @defgroup asnr_api_structures ASNR Data Structures\r
97 * @ingroup asnr_module\r
98 */\r
99 \r
100 /** @defgroup asnr_api_constants ASNR Constants (enum's and define's)\r
101 * @ingroup asnr_module\r
102 */\r
103 \r
104 /** @defgroup asnr_api_return_codes ASNR API Function Return Codes\r
105 * @ingroup asnr_api_constants\r
106 * @{\r
107 *\r
108 * Error codes returned by ASNR API functions.\r
109 */\r
110 /*@{*/\r
111 enum {\r
112 asnr_NOERR = 0, /**< success, no error */\r
113 asnr_ERR_NOMEMORY = 1, /**< supplied memory are not enough */\r
114 asnr_ERR_NOTOPENED = 2, /**< asnr instance has not been opened yet */\r
115 asnr_ERR_NOTCLOSED = 3, /**< asnr instance has not been closed yet */\r
116 asnr_ERR_INVALIDPAR = 4, /**< configuration parameter is invalid */\r
117 asnr_ERR_INVALIDNBUFS = 5 /**< incorrect number of memory buffers */\r
118 };\r
119 /*@}*/\r
120 /** @} */\r
121 \r
122 \r
123 /** @defgroup ASNR_samp_rate ASNR Sampling Rates Definitions\r
124 * @ingroup asnr_api_constants\r
125 * @{\r
126 *\r
127 * Sampling rates that are supported by ASNR. Used to define sampling_rate\r
128 * of \ref asnrOpenConfig_t, asnrSizeConfig_t, and asnrControl_t.\r
129 */\r
130 /*@{*/\r
131 enum {\r
132 asnr_SRATE_8K = 0, /**< 8kHz */\r
133 asnr_SRATE_16K = 1 /**< 16kHz */\r
134 };\r
135 \r
136 \r
137 typedef tint asnrSrate_t; /**< used by \ref asnrOpenConfig_t,\r
138 asnrSizeConfig_t, and asnrControl_t */\r
139 /*@}*/\r
140 /** @} */\r
141 \r
142 /**\r
143 * @ingroup asnr_api_structures\r
144 *\r
145 * @brief Configuration structure for asnrGetSizes()\r
146 * \brief This structure specifies the maximum sampling rate. It is also\r
147 * part of structure asnrNewConfig_s used by asnrNew().\r
148 */\r
149 typedef struct asnrSizeConfig_s {\r
150 \r
151 asnrSrate_t max_sampling_rate; /**< Maximum sampling rate of the system:\r
152 8kHz: set to asnr_SRATE_8K.\r
153 16kHz: set to asnr_SRATE_16K. */\r
154 } asnrSizeConfig_t;\r
155 \r
156 /**\r
157 * @ingroup asnr_api_structures\r
158 *\r
159 * @brief Configuration structure for asnrNew()\r
160 * \brief This structure is used for creating a new ASNR instance through\r
161 * function asnrNew().\r
162 */\r
163 typedef struct asnrNewConfig_s {\r
164 void *handle; /**< handle can be used by a user to identify the \r
165 ASNR that communicates to it, e.g. when a \r
166 debug call out function is called by a certain \r
167 ASNR instance. */\r
168 asnrSizeConfig_t sizeCfg; /**< size configration */\r
169 } asnrNewConfig_t;\r
170 \r
171 \r
172 /**\r
173 * @ingroup asnr_api_structures\r
174 *\r
175 * @brief Configuration structure for asnrOpen()\r
176 * \brief This structure contains ASNR parameters that must be configured \r
177 * through asnrOpen(). \r
178 */\r
179 typedef struct asnrOpenConfig_s {\r
180 \r
181 asnrSrate_t sampling_rate; /**< Sampling rate of the system:\r
182 8kHz: set to asnr_SRATE_8K.\r
183 16kHz: set to asnr_SRATE_16K. */\r
184 } asnrOpenConfig_t;\r
185 \r
186 \r
187 /**\r
188 * @ingroup asnr_api_structures\r
189 *\r
190 * @brief Configuration structure for asnrControl()\r
191 * \brief This structure contains ASNR parameters that can be configured \r
192 * through asnrControl(). \r
193 */\r
194 typedef struct asnrControl_s {\r
195 tuint valid_bitfield; /**< To indicate which parameters to be changed */\r
196 #define asnr_CTL_VALID_ENABLE 0x0001\r
197 #define asnr_CTL_VALID_SAMP_RATE 0x0002\r
198 #define asnr_CTL_VALID_DELAY 0x0004\r
199 #define asnr_CTL_VALID_BAND_BIN1 0x0008\r
200 #define asnr_CTL_VALID_BAND_BIN2 0x0010\r
201 #define asnr_CTL_VALID_BAND1_MAX_ATTEN 0x0020\r
202 #define asnr_CTL_VALID_BAND2_MAX_ATTEN 0x0040\r
203 #define asnr_CTL_VALID_BAND3_MAX_ATTEN 0x0080\r
204 #define asnr_CTL_VALID_SIG_UPD_RATE_MIN 0x0100\r
205 #define asnr_CTL_VALID_SIG_UPD_RATE_MAX 0x0200\r
206 #define asnr_CTL_VALID_NOISE_THRESH 0x0400\r
207 #define asnr_CTL_VALID_NOISE_HANGOVER 0x0800\r
208 \r
209 tint enable; /**< <B>Enable flag:</B> 0 - disable ASNR, 1 - enable ASNR.*/\r
210 #define asnr_DISABLE 0 \r
211 #define asnr_ENABLE 1\r
212 \r
213 tint samp_rate; /**< <B>Sampling rate:</B> asnr_SRATE_8K or asnr_SRATE_16K.*/\r
214 \r
215 tint delay; /**< <B>Signal delay:</B>\r
216 This parameter specifies signal delay in msecs, which determines the \r
217 shape of FFT windowing function. It may be 3, 4, 5, or 6 (ms). ASNR may \r
218 produce less unwanted noise and speech artifacts with a longer delay. \r
219 Default is 5. \r
220 *\r
221 \remark If this parameter is out of the valid range specified by\r
222 [\ref asnr_DELAY_LOWER_LIMIT \ref asnr_DELAY_UPPER_LIMIT], \r
223 asnrControl() will take no action and return an error. */\r
224 #define asnr_DELAY_LOWER_LIMIT 3\r
225 #define asnr_DELAY_UPPER_LIMIT 6\r
226 \r
227 tint band_bin1; /**< <B>Frequency bands boundary bin 1:</B>\r
228 This parameter defines the first boundary of frequency bands for which \r
229 different amount of noise attenuation is applied. The corresponding \r
230 frequency is (parameter value)*62.5Hz. Default is 10 (625Hz).\r
231 *\r
232 \remark If this parameter is out of the valid range specified by\r
233 [\ref asnr_BAND_BIN_LOWER_LIMIT \ref asnr_BAND_BIN_UPPER_LIMIT_8K] for 8kHz, \r
234 or [\ref asnr_BAND_BIN_LOWER_LIMIT \ref asnr_BAND_BIN_UPPER_LIMIT_16K] \r
235 for 16kHz, asnrControl() will take no action and return an error. */\r
236 #define asnr_BAND_BIN_LOWER_LIMIT 1\r
237 #define asnr_BAND_BIN_UPPER_LIMIT_8K 63\r
238 #define asnr_BAND_BIN_UPPER_LIMIT_16K 127\r
239 \r
240 tint band_bin2; /**< <B>Frequency bands boundary bin 2:</B> \r
241 This parameter defines the second boundary of frequency bands for which \r
242 different amount of noise attenuation is applied. It must be larger than\r
243 band_bin1. Default is 32 (2000Hz). \r
244 *\r
245 \remark If this parameter is out of the valid range specified by\r
246 [\ref asnr_BAND_BIN_LOWER_LIMIT \ref asnr_BAND_BIN_UPPER_LIMIT_8K] for 8kHz, \r
247 or [\ref asnr_BAND_BIN_LOWER_LIMIT \ref asnr_BAND_BIN_UPPER_LIMIT_16K], \r
248 or if it is smaller than band_bin1, asnrControl() will take no action and \r
249 return an error. */\r
250 \r
251 Fract band1_max_atten; /**< <B>Maximum attenuation in band 1:</B>\r
252 </B> This parameter specifies the maximum attenuation (dB) that ASNR may \r
253 apply for frequency band 1 - [0, band_bin1-1]*62.5 Hz. Default is 9(dB). \r
254 *\r
255 \remark If this parameter is out of the valid range specified by\r
256 [\ref asnr_MAX_ATTEN_LOWER_LIMIT \ref asnr_MAX_ATTEN_UPPER_LIMIT], \r
257 asnrControl() will take no action and return an error. */\r
258 #define asnr_MAX_ATTEN_LOWER_LIMIT 0\r
259 #define asnr_MAX_ATTEN_UPPER_LIMIT 90\r
260 \r
261 Fract band2_max_atten; /**< <B>Maximum attenuation in band 2:</B>\r
262 </B> This parameter specifies the maximum attenuation (dB) that ASNR may \r
263 apply for frequency band 2 - [band_bin1, band_bin2-1]*62.5 Hz. \r
264 Default is 9(dB). \r
265 *\r
266 \remark If this parameter is out of the valid range specified by\r
267 [\ref asnr_MAX_ATTEN_LOWER_LIMIT \ref asnr_MAX_ATTEN_UPPER_LIMIT], \r
268 asnrControl() will take no action and return an error. */\r
269 \r
270 Fract band3_max_atten; /**< <B>Maximum attenuation in band 3:</B>\r
271 </B> This parameter specifies the maximum attenuation (dB) that ASNR may \r
272 apply for frequency band 3 - [band_bin2*62.5Hz, Nyquist]. \r
273 Default is 9(dB). \r
274 *\r
275 \remark If this parameter is out of the valid range specified by\r
276 [\ref asnr_MAX_ATTEN_LOWER_LIMIT \ref asnr_MAX_ATTEN_UPPER_LIMIT], \r
277 asnrControl() will take no action and return an error. */\r
278 \r
279 Fract sig_upd_rate_max; /**< <B>Maximum signal update rate:</B>\r
280 ASNR adaptive speech signal estimate inverse update rate upper bound.\r
281 The actual inverse update rate is varied internally by ASNR between \r
282 the configured maximum (this parameter) and mimimum constraints. A higher \r
283 inverse update rate reduces frame to frame changes yielding greater \r
284 temporal smoothing and less time varying ASNR distortion artifacts during \r
285 speech or noise. A lower inverse update rate yields quicker speech onset \r
286 "breaking in" to remove ASNR attenuation. \r
287 *\r
288 This parameter is in Q.15 format. Default is 31129 (0.95). \r
289 *\r
290 \remark If this parameter is smaller than sig_upd_rate_min, asnrControl() \r
291 will take no action and return an error. */\r
292 \r
293 Fract sig_upd_rate_min; /**< <B>Minimum signal update rate:</B> \r
294 This is the minimum constraint on the ASNR adaptive speech signal estimate \r
295 inverse update rate.\r
296 *\r
297 This parameter is in Q.15 format. Default is 29818 (0.91). */\r
298 \r
299 tint noise_thresh; /**< <B>Noise threshold:</B>\r
300 ASNR will not reduce noise below this level, and when noise is already \r
301 lower than this level, ASNR will not apply any attenuation to the signal. \r
302 ASNR spectral noise estimate will continue to update even if Tx signal \r
303 is below this noise threshold.\r
304 *\r
305 This parameter is in dBm0. Default is -75dBm0. Valid range is specified \r
306 by [\ref asnr_NOISE_THR_LOWER_LIMIT, \ref asnr_NOISE_THR_UPPER_LIMIT]. If \r
307 it is outside of this range, asnrControl() will take no action and return \r
308 an error. */\r
309 #define asnr_NOISE_THR_LOWER_LIMIT (-80)\r
310 #define asnr_NOISE_THR_UPPER_LIMIT (-40)\r
311 \r
312 tint noise_hangover; /**< <B>Noise hangover:</B>\r
313 When noise is lower than parameter noise_thresh, ASNR will not apply any \r
314 attenuation to the signal. After noise goes above noise_thresh, ASNR \r
315 waits a period of time specified by this parameter before applying \r
316 attenuation again. \r
317 *\r
318 This parameter is in 10 msec units. Default is 150 (1.5 seconds). */ \r
319 \r
320 } asnrControl_t;\r
321 \r
322 \r
323 /**\r
324 * @ingroup asnr_api_functions\r
325 *\r
326 * @brief Function asnrGetSizes() obtains the memory requirements of an ASNR\r
327 * instance.\r
328 *\r
329 * @param[in] cfg Pointer to a size configuration structure.\r
330 * @param[out] nbufs Memory location to store the returned number of buffers\r
331 * required by the instance.\r
332 * @param[out] bufs Memory location to store the returned address of the\r
333 * vector of memory buffer descriptions required by the\r
334 * instance.\r
335 * @remark Type ecomemBuffer_t is defined in ecomem.h of util package.\r
336 *\r
337 * @retval ASNR error code. \r
338 * @verbatim\r
339 error code description\r
340 asnr_NOERR success\r
341 asnr_ERR_INVALIDPAR max_sampling_rate of asnrSizeConfig_t is neither \r
342 asnr_SRATE_8K nor asnr_SRATE_16K. \r
343 \endverbatim\r
344 *\r
345 */\r
346 \r
347 tint asnrGetSizes(tint *nbufs, const ecomemBuffer_t **bufs, asnrSizeConfig_t *cfg);\r
348 \r
349 /**\r
350 * @ingroup asnr_api_functions\r
351 *\r
352 * @brief Function asnrNew() creates a new ASNR instance.\r
353 * \remark Function asnrNew() must be called before asnrOpen()is called.\r
354 *\r
355 * @param[in,out] asnrInst Memory location that will receive a pointer to\r
356 * the created ASNR instance.\r
357 * @param[in] nbufs Number of memory buffers allocated by the user.\r
358 * @param[in] bufs Pointer to memory buffer descriptors defined by\r
359 * the user.\r
360 * \remark Buffer alignment property of each buffer passed to asnrNew() must be\r
361 * equal to or better than what is returned by asnrGetSizes(), and must\r
362 * be in consistency with the base address of the buffer.\r
363 *\r
364 * @param[in] cfg Pointer to new instance configuration structure.\r
365 * @retval ASNR error code. \r
366 * @verbatim\r
367 error code description\r
368 asnr_NOERR success\r
369 asnr_ERR_INVALIDPAR *asnrInst is not NULL or nbufs is not correct\r
370 asnr_ERR_NOMEMORY properties of one or more buffers are bad:\r
371 - size is less than what's requested\r
372 - size is not zero but base address is NULL,\r
373 - alignment and base address are not consistent,\r
374 - volatility does not meet requirement.\r
375 \endverbatim\r
376 *\r
377 * @pre The pointer at the location pointed to by asnrInst must be set to NULL\r
378 * before this function is called.\r
379 * @post A pointer to the created instance will be returned to the location\r
380 * pointed to by asnrInst. Instance state will be set to closed.\r
381 */\r
382 tint asnrNew(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs, asnrNewConfig_t *cfg);\r
383 \r
384 /**\r
385 * @ingroup asnr_api_functions\r
386 *\r
387 * @brief Function asnrDelete() deletes the ASNR instance identified by asnrInst\r
388 * and returns the addresses of those buffers used by this instance.\r
389 *\r
390 * @param[in] nbufs Number of buffers used by this instance.\r
391 * @param[in,out] asnrInst Memory location where the pointer to ASNR instance\r
392 * is stored.\r
393 * @param[in,out] bufs Pointer to buffer descriptors to store returned\r
394 * addresses of the buffers used by this instance.\r
395 * @retval ASNR error code. \r
396 * @verbatim\r
397 error code description\r
398 asnr_NOERR success\r
399 asnr_ERR_NOTCLOSED ASNR instance has not been closed.\r
400 asnr_ERR_INVALIDNBUFS incorrect number of memory buffers\r
401 \endverbatim\r
402 *\r
403 * @pre ASNR instance must be closed by asnrClose() before asnrDelete() is called.\r
404 * @post After asnrDelete() is called, ASNR instance pointer stored at asnrInst\r
405 will be set to NULL, and the addresses of the buffers used by this\r
406 instance will be returned to the location pointed to by bufs.\r
407 */\r
408 tint asnrDelete(void **asnrInst, tint nbufs, ecomemBuffer_t *bufs);\r
409 \r
410 /**\r
411 * @ingroup asnr_api_functions\r
412 *\r
413 * @brief Function asnrOpen() initializes and configures an ASNR instance.\r
414 *\r
415 * @remark This function may be called after asnrNew() to initialize a new ASNR\r
416 * instance. It may also be called to reconfigure an instance that\r
417 * has been closed by asnrClose() but not deleted by asnrDelete().\r
418 *\r
419 * @param[in] cfg Pointer to ASNR configuration parameter.\r
420 * @param[in] asnrInst Pointer to ASNR instance.\r
421 * @retval ASNR error code. \r
422 * @verbatim\r
423 error code description\r
424 asnr_NOERR success\r
425 asnr_ERR_INVALIDPAR sampling rate is larger than max_sampling_rate of \r
426 asnrSizeConfig_t.\r
427 \endverbatim\r
428 *\r
429 * @pre Function asnrNew() must be called before asnrOpen() is called the first\r
430 * time to open a new instance. For subsequent calls to open an existing\r
431 * instance, asnrClose() must be called before asnrOpen() to close the\r
432 * instance.\r
433 * @post After ASNR instance is opened, asnrControl() or asnrProcess() may be\r
434 * called for control or processing.\r
435 *\r
436 */\r
437 tint asnrOpen(void *inst, asnrOpenConfig_t *cfg);\r
438 \r
439 /**\r
440 * @ingroup asnr_api_functions\r
441 *\r
442 * @brief Function asnrClose() closes an ASNR instance.\r
443 * \remark Function asnrClose() must be called before asnrDelete() is called.\r
444 *\r
445 * @param[in] asnrInst pointer to the instance to be closed\r
446 * @retval ASNR error code. \r
447 * @verbatim\r
448 error code description\r
449 asnr_NOERR success\r
450 asnr_ERR_NOTOPENED ASNR instance is not in open state\r
451 \endverbatim\r
452 *\r
453 */\r
454 tint asnrClose(void *asnrInst);\r
455 \r
456 /**\r
457 * @ingroup asnr_api_functions\r
458 *\r
459 * @brief Function asnrControl() enables/disables ASNR or changes one or more\r
460 * parameters.\r
461 *\r
462 * @param[in] asnrInst Pointer to ASNR instance.\r
463 * @param[in] ctl Pointer to ASNR control structure. \r
464 *\r
465 * @retval ASNR error code. \r
466 * @verbatim\r
467 error code description\r
468 asnr_NOERR success\r
469 asnr_ERR_NOTOPENED ASNR instance has not been opened\r
470 asnr_ERR_INVALIDPAR Parameters are out of the allowed range.\r
471 \endverbatim\r
472 *\r
473 */\r
474 tint asnrControl(void *asnrInst, asnrControl_t *ctl);\r
475 \r
476 /**\r
477 * @ingroup asnr_api_functions\r
478 *\r
479 * @brief Function asnrProcess() performs noise reduction processing on one \r
480 * frame of data.\r
481 *\r
482 * @param[in] asnrInst Pointer to ASNR instance.\r
483 * @param[in] *input Input buffer. \r
484 * @param[out] *output Output buffer. \r
485 *\r
486 * \remark Input must be one frame of 16-bit linear samples. Frame length MUST\r
487 * be 10msec. Output are also one frame of 16-bit linear samples.\r
488 *\r
489 * \remark Input and output pointers can be the same (in place processing) or\r
490 * different (out of place processing). \r
491 * @retval ASNR error code. \r
492 * @verbatim\r
493 error code description\r
494 asnr_NOERR success\r
495 asnr_ERR_INVALIDPAR either input buffer or output buffer is NULL\r
496 \endverbatim\r
497 *\r
498 */\r
499 tint asnrProcess(void *asnrInst,void *input,void *output);\r
500 \r
501 /* -------------------------- ASNR Call Table -------------------------------- */\r
502 /**\r
503 * @ingroup asnr_api_structures\r
504 *\r
505 * @brief ASNR call table\r
506 *\r
507 */\r
508 typedef struct {\r
509 tint (*asnrGetSizes) (tint *nbufs, const ecomemBuffer_t **bufs, \r
510 asnrSizeConfig_t *cfg);\r
511 tint (*asnrNew) (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs, \r
512 asnrNewConfig_t *cfg);\r
513 tint (*asnrDelete) (void **asnrInst, tint nbufs, ecomemBuffer_t *bufs);\r
514 tint (*asnrOpen) (void *inst, asnrOpenConfig_t *cfg);\r
515 tint (*asnrClose) (void *asnrInst);\r
516 tint (*asnrControl) (void *asnrInst, asnrControl_t *ctl);\r
517 tint (*asnrProcess) (void *asnrInst,void *input,void *output);\r
518 } asnrCallTable_t;\r
519 \r
520 #endif\r
521 \r
522 /* nothing past this point */\r
523 \r