AER: AER Bundle User's Manual

  • Main Page
  • Files
  • Related Pages

AER Bundle User's Manual

Release 17.0.0.0

Page Contents

  1. What Is AER Bundle
  2. AER Bundle Contents and Terms
  3. AER Component Documentation

What Is AER Bundle

AER bundle is the Acoustic Echo Removal (AER) software component delivered in a bundle format with all dependent components which are either needed by AER header files or AER object code.

AER Bundle Contents and Terms

This section describes the content of AER bundle after installation and explains the terms.

Components

Folder components under root directory contains all packaged components of AER bundle, which include AER component and supporting utility components. All components are packaged in zip files that follow a common naming convention that defines the contents of the component:

        ti_mas_<COMP>_<FMT>_<TARG>_<VER>.zip

Where:

  • <COMP> represents the component name
  • <FMT> represents the delivery format
    • obj for object code delivery
    • src for source code delivery
  • <TARG> represents the target processor as specified in Target Processor String Reference
  • <VER> represents the version as specified in Package Version String Reference

In addition to the zip files of all individual components, folder components also contains AER simulation and test code, delivered in a separate zip file, ti_mas_aer_src_<TARG>_<VER>_test.zip.

Packages

Folder packages under root directory contains all extracted components. After being extracted, each component will expand to a similar directory under folder packages. The path will be:

          <ROOT>/packages/ti/mas/<COMP>/

Where:

  • <COMP> represents the component name in lowercase (e.g., aer)
  • <ROOT> represents the root directory to which AER bundle was installed.

Each component, after being extracted, will have, at the very least, the following directories and files:

  1. A docs sub-directory for all documentation
  2. A <TARG_DIR> sub-directory for the component libraries as specified in Target Processor Library/Directory Reference
  3. Release notes in HTML format
  4. A makefile for building the code using GNU make if it is source release
  5. One or more API header files for the component modules

Docs

Folder docs under root directory contains all documentation for AER listed in AER Component Documentation.

Package

Folder package under root directory contains all necessary information for AER bundle packaging.

Tools

Folder tools under root directory contains necessary tools that can be used for AER tuning as described in AER Tuning Tools.

Component Modules

In this context, a component in general is a collection of modules that are algorithmically related. In many cases a component contains a single module that performs a specific algorithmic task. On the other hand, some components contain more than one module. For example, the AER component contains three modules - AER, AGC, and DRC.

The modules that comprise a particular component have their own header files in the root directory of the extracted component. The header file of a module defines the module API and all #defines, structures and enumerations required to interact with the API.

For example, the root directory for AER is:

          <ROOT>/packages/ti/mas/aer/

Since AER has three modules, each module has its own header file:

          <ROOT>/packages/ti/mas/aer/aer.h
          <ROOT>/packages/ti/mas/aer/agc.h
          <ROOT>/packages/ti/mas/aer/drc.h

Component Object Code Libraries

Each component in AER has been pre-compiled for a particular processing core. The compilation produces, in most cases, three libraries:

  1. <COMP>_c.<TARG_EXT>: C code routines library
  2. <COMP>_a.<TARG_EXT>: Assembly code routines library
  3. <COMP>_cm.<TARG_EXT>: C-model of assembly routines library

Notes:
  1. <COMP> represents the component name in lowercase (e.g., aer)
  2. <TARG_EXT> represents the target processor for which the code was compiled as specified in Target Processor Library/Directory Reference
  3. Note that only two libraries are required to link: The C library and the assembly library. The C-model library is available for debugging and development purposes only.
  4. A component may have no need for assembly routines and, as such, will provide a single C library.

Component Documentation

Each component contains at least the release notes in HTML format sitting in the component root directory. Most components also have API documentation sitting in docs/doxygen folder in compressed HTML format. AER has more documents as described below.

AER Component Documentation

  • AER API Documentation
Contains AER external API documentation.
  • AER Simulation Documentation
Contains AER simulation documentation.
  • AER Software Installation and Verification
Describes how to install and verify AER software.
  • AER Integration Guide
AER integration guidelines and resource requirements (MIPS and memory).
  • AER Quick Tuning Guide
Guidelines for basic AER tuning and configuration.
  • AER Developer's Guide
Detailed acoustic design requirements for phones or devices containing AER (e.g. IP Phone). Detailed procedures for AER parameter tuning.

AER Tuning Tools

Tools facilitating AER tuning are provided with the software. Detailed information is available in tools readme file.
Copyright 2013, Texas Instruments Incorporated


AER: Target Processor String Reference

AER Bundle User's Manual

Target Processor String Reference

Processor String Reference
Processor | Endian | String
C55x DSP | N/A | c55l
C64x+ DSP | Little and big | c64Px
C674x DSP | Little | c674le
ARM Cortex-A8 | N/A | gcarmv7a


AER: Package Version String Reference

AER Bundle User's Manual

Package Version String Reference

The version string used in package naming is composed of 4 underscore-delimited numbers followed by a release qualifier. Accordingly, the version string - represented by the letters M, m, p, b and qualifier Q have the format M_m_p_b[Q] (where [Q] indicates that this field is optional). The tables below provides a descriptive reference regarding the meaning of each package version string.

Package Version String Reference
Value | Meaning | Description
M | Major revision | Incremented when the new version is substantially different from the previous For example, a new module added or an existing module's algorithm significantly altered.
m | Minor revision | Incremented when the new version has changed but not in a major way. For example, some minor changes in the API or feature set.
p | Patch number | Incremented for all other source code changes. This include any packaging support code.
b | Build number | Incremented for each release delivery to CM. Reset for any change to M, m or p
Q | Release Qualifier | alpha: Substantial features included, but not fully tested beta: All features included, but not fully tested (empty): When the qualifier string is empty (not provided), the release has been fully tested and is an official release.


AER: Target Processor Library/Directory Reference

AER Bundle User's Manual

Target Processor Library/Directory Reference

Processor Library/Directory Reference
Processor | Endian | Object Format | Library Folder (TARG_DIR) | Library Extension (TARG_EXT)
C55x DSP | N/A | COFF | c55L | a55L
C64x+/C674x DSP | Little | COFF | c64P | a64P
C64x+ DSP | Big | COFF | c64Pe | a64Pe
C64x+/C674x DSP | Little | ELF | ce64P | ae64P
C64x+ DSP | Big | ELF | ce64Pe | ae64Pe
ARM Cortex-A8 | N/A | COFF | gcarmv7a | av7A


AER: File Index

AER File List

Here is a list of all files with brief descriptions:
doxygen.h [code]


AER: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


AER: Page Index

AER Related Pages

Here is a list of all related documentation pages:
  • Disclaimer


AER:

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265

Copyright © 2010 Texas Instruments Incorporated. All rights reserved.

Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this document is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.


AER: doxygen.h Source File

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is the header file which doxygen parses to generate the main
00003  * documentation page
00004  *
00005  */
00006


AER: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


This folder contains in subfolders the tools, signals, and utilities that can be
used for AER tuning:
   - drc_tool: DRC design tool
   - eq_tool: Equalizer design tool
   - nl_tool: Nonlinearity measurement and analysis tool
   - optdl_tool: Optimum delay estimation tool
   - bf_tool: Beamformer filter coefficients design tool
   - signals: Signals for calibrating gains and verify convergence
   - utils: Windows utilities for sending and receiving signals over packet network

The AER Quick Tuning Guide document describes how to tune AER with the provided
tools and signals.

The tools were developed in Matlab and converted to executables using Matlab compiler.
To run these tools, the MATLAB Compiler Runtime (MCR) 2007b is needed, which is
installed during the AER installation.


AER: External API usage examples

  • Modules
  • Data Structures
  • Files
  • Related Pages

External API usage examples

AER instantiation

For examplary code of calling AER external APIs to create and open AER instances, refer to siuaer.c of aersim.chm.

AER processing

For examplary code of calling AER external APIs to process the signal, refer to siutx.c and siurx.c of aersim.chm.


AER: Version.h File Reference

  • File List
  • Globals

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_aer_Version__top__
#define | __extern extern
#define | ti_mas_aer_Version___VERS 150
#define | ti_mas_aer_Version_MAJOR (17)
#define | ti_mas_aer_Version_MINOR (0)
#define | ti_mas_aer_Version_XVERTICAL (0)
#define | ti_mas_aer_Version_PATCH (0)
#define | ti_mas_aer_Version_BUILD (0)
#define | ti_mas_aer_Version_QUALITY (3)
#define | ti_mas_aer_Version_BTYPE (0)
#define | ti_mas_aer_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_aer_Version_MAJOR
#define | Version_MINOR ti_mas_aer_Version_MINOR
#define | Version_XVERTICAL ti_mas_aer_Version_XVERTICAL
#define | Version_PATCH ti_mas_aer_Version_PATCH
#define | Version_BUILD ti_mas_aer_Version_BUILD
#define | Version_QUALITY ti_mas_aer_Version_QUALITY
#define | Version_BTYPE ti_mas_aer_Version_BTYPE
#define | Version_WIDTH ti_mas_aer_Version_WIDTH

Define Documentation

#define ti_mas_aer_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_aer_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_aer_Version_MAJOR (17)

Definition at line 50 of file Version.h.

#define ti_mas_aer_Version_MINOR (0)

Definition at line 53 of file Version.h.

#define ti_mas_aer_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_aer_Version_PATCH (0)

Definition at line 59 of file Version.h.

#define ti_mas_aer_Version_BUILD (0)

Definition at line 62 of file Version.h.

#define ti_mas_aer_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_aer_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_aer_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_aer_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_aer_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_aer_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_aer_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_aer_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_aer_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_aer_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_aer_Version_WIDTH

Definition at line 97 of file Version.h.


AER: Version.h Source File

  • File List
  • Globals

Version.h

Go to the documentation of this file.
00001 /*
00002  *  Do not modify this file; it is automatically
00003  *  generated and any modifications will be overwritten.
00004  *
00005  * @(#) xdc-t35
00006  */
00007
00008 /*
00009  * ======== GENERATED SECTIONS ========
00010  *
00011  *     PROLOGUE
00012  *     INCLUDES
00013  *     EPILOGUE
00014  *     PREFIX ALIASES
00015  */
00016
00017
00018 /*
00019  * ======== PROLOGUE ========
00020  */
00021
00022 #ifndef ti_mas_aer_Version__include
00023 #define ti_mas_aer_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_aer_Version__top__
00028 #endif
00029
00030 #ifdef __cplusplus
00031 #define __extern extern "C"
00032 #else
00033 #define __extern extern
00034 #endif
00035
00036 #define ti_mas_aer_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_aer_Version_MAJOR (17)
00051
00052 /* MINOR */
00053 #define ti_mas_aer_Version_MINOR (0)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_aer_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_aer_Version_PATCH (0)
00060
00061 /* BUILD */
00062 #define ti_mas_aer_Version_BUILD (0)
00063
00064 /* QUALITY */
00065 #define ti_mas_aer_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_aer_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_aer_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_aer_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_aer_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_aer_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_aer_Version_MAJOR
00091 #define Version_MINOR      ti_mas_aer_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_aer_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_aer_Version_PATCH
00094 #define Version_BUILD      ti_mas_aer_Version_BUILD
00095 #define Version_QUALITY    ti_mas_aer_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_aer_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_aer_Version_WIDTH
00098 #endif


AER: aer.h File Reference

  • File List
  • Globals

aer.h File Reference

Detailed Description

Contains external API for the AER component.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated ALL RIGHTS RESERVED

Definition in file aer.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/debug.h>

Include dependency graph for aer.h:

Go to the source code of this file.

Data Structures

struct | aerInfo_s
AER information reporting structure This strucutre contains the parameters that AER needs to report to an outside ECO through eventOut() function provided by aerCreateConfig_s. More...
struct | aerCreateConfig_s
Configuration structure for aerCreate() This structure contains information to be shared by different AER instances. This structure is used by function aerCreate(). More...
struct | aerSizeConfig_s
Configuration structure for aerGetSizes() This structure specifies the maximum filter length and maximum y to x delay. It also has a bitfield, which currently has only one bit to indicate whether FDNLP is requested. It is used by function aerGetSizes(). It is also part of structure aerNewConfig_s used by aerNew(). More...
struct | aerNewConfig_s
Configuration structure for aerNew() This structure is used for creating a new AER instance through function aerNew(). More...
struct | aerConfig_s
Configuration structure for aerOpen() This structure contains system parameters to configure an AER instance through aerOpen(). AER doesn't have default value for these parameters, and they must be set explicitly when aerOpen() is called the first time after aerNew(). After that, these prameters may also be changed through aerControl(). More...
struct | aerEQConfig_s
AER Bi-quad EQ configuration structure.This structure contains Bi-quad EQ configurations. It includes:
  • Total number of sections
  • Sections types.
    There are 4 different types of sections used in an EQ. Each type is encoded using 2 bits(aer_EQBQ_SECTION_TYPE_xx). A 16-bit bitmap is used to represent the types for all the sections in the EQ. The least significant 2 bits are used for the 1st section, the next 2 bits are used for the 2nd section and so on till bit 12&13 which are used for the last section. Bit 14 is used to indicate LP filter order. If 1, 2nd order LP filter is used. Otherwise, 1st order LP is used. Bit 15 is used to indicate HP filter order. If 1, 2nd order HP filter is used. Otherwise, 1st order HP is used.
  • Section parameters.
    Parameters are set in the order of sections. A LP or HP section has one parameter - alpha. A BP or BS section has three parameters and they are in the order of alpha, gamma and G. Implementation of LP/HP and BP/BS filters and the corresponding parameters are shown in the figure below. All section parameters are in Q15 format.
More...
struct | aerModeControl_s
AER mode control structure. This structure is used to change AER operational modes through function aerControl() using control code aer_CTL_MODES_0 or aer_CTL_MODES_1. For example, to enable AER, enable update, and disable NLP would need to set the mask and value to:. More...
struct | aerTraceConfig_s
AER tracing configuration structure. This structure is used to configure AER tracing options and obtain from AER the size of traced data based on the configuration. The control valid bit for configuring trace is aer_CTL_VALID2_TRACE_CONFIG. More...
struct | aerControl_s
AER control structure This structure is used to change AER configurable parameters and mode of operation through aerControl(). It has two elements, a control code to tell what to change, and a union of parameters to tell the value of the new parameter. More...
struct | aerEventStats_s
AER Statistics Structure. This structure contains statistical counters to monitor the occurrance of particular events in AER. More...
struct | aerPiquaStats_s
AER PIQUA Statistics Structure. This structure contains measurements necessary for PIQUA performance monitoring. More...
struct | aerTailModel_s
AER tail model save/load structure. This structure is used for saving or loading AER adaptive tail model, which are defined by:
  • the adaptive filter coefficients, mantissas and exponents,
  • number of active tail model segments (or H vectors),
  • length of tail model in units of sampling period, e.g. 125us for 8kHz and 62.5us for 16kHz.
  • the speaker and microphone analog gains.
More...
struct | aerDebugStat_s
AER debug information data structure. This structure contains debug information regarding AER operation. It is one of the arguments of function aerGetPerformance().
Remarks:
In the comments, elements of this structure are numbered in units of the size of type tint.
More...
struct | aerVersion_s
AER version structure This structure contains the version information of the AER software. More...
struct | aerCallTable_t
AER call table. More...

AER sampling rates

Sampling rates that are supported by AER. Used to define max_sampling_rate of aerCreateConfig_t.

enum | { aer_SRATE_8K = 0, aer_SRATE_16K = 1 }
typedef tint | aerSrate_t

Defines

#define | aer_EQBQ_MAX_NUM_SECTIONS 7
#define | aer_EQBQ_SECTION_TYPE_LP 0x0000
#define | aer_EQBQ_SECTION_TYPE_HP 0x0001
#define | aer_EQBQ_SECTION_TYPE_BP 0x0002
#define | aer_EQBQ_SECTION_TYPE_BS 0x0003
#define | aer_EQBQ_SECTION_TYPE_2NDORDER_LPBIT 14
#define | aer_EQBQ_SECTION_TYPE_2NDORDER_HPBIT 15
#define | aer_CTL_VALID0_MODES_CTL0 0x0001
#define | aer_CTL_VALID0_MODES_CTL1 0x0002
#define | aer_CTL_VALID0_MODES_CTL2 0x0004
#define | aer_CTL_VALID0_Y2X_DELAY 0x0008
#define | aer_CTL_VALID0_SAMPLING_RATES 0x0010
#define | aer_CTL_VALID0_TAIL_LENGTH 0x0020
#define | aer_CTL_VALID0_TX_AG_CHG_DELAY 0x0040
#define | aer_CTL_VALID0_RX_AG_CHG_DELAY 0x0080
#define | aer_CTL_VALID0_TX_AG_CHG_INTERP 0x0100
#define | aer_CTL_VALID0_PHONE_MODE 0x0200
#define | aer_CTL_VALID0_RX_ANALOG 0x0400
#define | aer_CTL_VALID0_TX_ANALOG 0x0800
#define | aer_CTL_VALID0_RX_DIGITAL 0x1000
#define | aer_CTL_VALID0_TX_DIGITAL 0x2000
#define | aer_CTL_VALID0_RX_EQ_PARAMS 0x4000
#define | aer_CTL_VALID0_TX_EQ_PARAMS 0x8000
#define | aer_CTL_VALID1_NLP_CLOSS_TARGET 0x0001
#define | aer_CTL_VALID1_NLP_TX_CLIPAGG 0x0002
#define | aer_CTL_VALID1_NLP_LINATTN_MAX_ERLE 0x0004
#define | aer_CTL_VALID1_NLP_CLIPPER_MAX_ERLE 0x0008
#define | aer_CTL_VALID1_NLP_TOTAL_LINATTN_MIN 0x0010
#define | aer_CTL_VALID1_NLP_RX_LINATTN_MIN 0x0020
#define | aer_CTL_VALID1_NLP_RX_LINATTN_MAX 0x0040
#define | aer_CTL_VALID1_NLP_TX_LINATTN_MIN 0x0080
#define | aer_CTL_VALID1_NLP_TX_LINATTN_MAX 0x0100
#define | aer_CTL_VALID1_NLP_TX_IN_TC 0x0200
#define | aer_CTL_VALID1_NLP_TX_OUT_TC 0x0400
#define | aer_CTL_VALID1_NLP_RX_IN_TC 0x0800
#define | aer_CTL_VALID1_NLP_RX_OUT_TC 0x1000
#define | aer_CTL_VALID1_GAIN_SPLIT_TC 0x2000
#define | aer_CTL_VALID1_CNG_RX_LEVEL 0x4000
#define | aer_CTL_VALID1_CNG_TX_LEVEL 0x8000
#define | aer_CTL_VALID2_TX_FDNLP_MSEC_DELAY 0x0001
#define | aer_CTL_VALID2_TX_FDNLP_BIN_LO1 0x0002
#define | aer_CTL_VALID2_TX_FDNLP_BIN_LO2 0x0004
#define | aer_CTL_VALID2_TX_FDNLP_BIN_HI1 0x0008
#define | aer_CTL_VALID2_TX_FDNLP_BIN_HI2 0x0010
#define | aer_CTL_VALID2_TX_FDNLP_CNG_MAX 0x0020
#define | aer_CTL_VALID2_NR_FBIN1_LIM 0x0040
#define | aer_CTL_VALID2_NR_FBIN2_LIM 0x0080
#define | aer_CTL_VALID2_NR_FBAND1_MAX_ATTEN 0x0100
#define | aer_CTL_VALID2_NR_FBAND2_MAX_ATTEN 0x0200
#define | aer_CTL_VALID2_NR_FBAND3_MAX_ATTEN 0x0400
#define | aer_CTL_VALID2_NR_SIG_UPD_RATE_MAX 0x0800
#define | aer_CTL_VALID2_NR_SIG_UPD_RATE_MIN 0x1000
#define | aer_CTL_VALID2_NR_NOISE_THRESH 0x2000
#define | aer_CTL_VALID2_NR_NOISE_HANGOVER 0x4000
#define | aer_CTL_VALID2_TRACE_CONFIG 0x8000
#define | aer_CTL_VALID3_COH_HANGOVER 0x0001
#define | aer_CTL_VALID3_COH_RATIO_THRESH 0x0002
#define | aer_CTL_VALID3_COH_CNT_THRESH 0x0004
#define | aer_CTL_VALID3_HLC_THRESHOLD 0x0008
#define | aer_CTL_VALID3_HLC_RAMP_OUT_TC 0x0010
#define | aer_CTL_VALID3_HLC_POWER_TC 0x0020
#define | aer_CTL_VALID3_THRESH_RX_NLD 0x0040
#define | aer_CTL_VALID3_THRESH_NOISE_RX 0x0080
#define | aer_CTL_VALID3_THRESH_NOISE_TX 0x0100
#define | aer_CTL_VALID3_HANGOVER_RXTOTX 0x0200
#define | aer_CTL_VALID3_HANGOVER_TXTORX 0x0400
#define | aer_CTL_VALID3_TX_SLIM_MODE 0x0800
#define | aer_CTL_VALID3_RX_SLIM_MODE 0x1000
#define | aer_CTL_VALID3_NG_HANGOVER 0x2000
#define | aer_CTL_VALID3_NG_RAMPIN_PERIOD 0x4000
#define | aer_CTL_VALID3_NG_NOISE_LEVEL 0x8000
#define | aer_CTL_VALID4_DT_THRESH 0x0001
#define | aer_CTL_VALID4_CLIP_SCALE 0x0002
#define | aer_CTL_VALID4_DT_HANGOVER 0x0004
AER sampling rate bitfield masks
Masks that are used to construct the sampling rate bitfield of aerConfig_s and aerControl_s.

#define | aer_SRATE_RXIN_16K (aer_SRATE_16K<<aer_SRATE_BIT_RXIN)
#define | aer_SRATE_RXIN_8K (aer_SRATE_8K<<aer_SRATE_BIT_RXIN)
#define | aer_SRATE_TXOUT_16K (aer_SRATE_16K<<aer_SRATE_BIT_TXOUT)
#define | aer_SRATE_TXOUT_8K (aer_SRATE_8K<<aer_SRATE_BIT_TXOUT)
#define | aer_SRATE_RXOUT_TXIN_16K (aer_SRATE_16K<<aer_SRATE_BIT_RXOUT_TXIN)
#define | aer_SRATE_RXOUT_TXIN_8K (aer_SRATE_8K<<aer_SRATE_BIT_RXOUT_TXIN)
AER create bitfield masks
Bitfield mask to construct config_bitfield of aerCreateConfig_s.

    Create bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       request support of multiple HF microphones
                   0       don't request support of multiple HF microphones
        0 - 15             RESERVED

#define | aer_CRT_MULT_MIC_MODE 0x0001
AER getSize configuration bitfield masks
Bitfield mask to construct config_bitfield of aerSizeConfig_s.

    Size config bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       request memory for FDNLP
                   0       don't request memory for FDNLP
        1          1       use bandsplit to save memory
                   0       don't use bandsplit
        2 - 15             RESERVED

#define | aer_SIZE_FDNLP_REQ 0x0001
#define | aer_SIZE_USE_BANDSPLIT 0x0002
AER phone modes
Parameter phone_mode of aerConfig_s or aerControl_s should be set to one of these phone modes.

#define | aer_PHM_HS 0x8000
#define | aer_PHM_HES 0x4000
#define | aer_PHM_HF 0x2000
#define | aer_PHM_HSGL 0x1000
#define | aer_PHM_HESGL 0x0800
AER control bitfield masks
Bitfield masks aer_CTL0_XYZ and aer_CTL1_XYZ may be used to change AER operation modes through aerControl(), by constructing mask and value of aerModeControl_s.

The control codes to change operation modes are aer_CTL_MODES_0 for control bitfield 0 and aer_CTL_MODES_1 for control bitfield 1. The corresponding parameter of aerControl_s is ctl_modes.

    Control bitfield 0:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       Enable AER or turn on AER.
                   0       Disable AER or turn off AER.
                           Note: when AER disabled, aerSendIn and aerReceiveIn
                                 will still process data by applying equalizer
                                 and digital gains. Upsampling and downsampling
                                 will also be applied if necessary (in and out
                                 sampling rates are different).
        1          1       Enable update (tail model and NLP state machine).
                   0       Disable update.
        2          1       Enable NLP.
                   0       Disable NLP.
        3          1       Continue updating AER when phone is in mute.
                   0       Stop updating AER when phone is in mute.
                           Note: If mute is achieved by cutting off Tx path PGA
                                 output, this bit should not be set. If mute is
                                 achieved by providing a zero signal to vocoder,
                                 and PGA output is still sent to AER to process,
                                 this bit should be set. It is recommended that
                                 mute be implemented the second way and this bit
                                 bet set. Otherwise, when phone goes out of mute,
                                 some brief clik or echo leakage may be heard.
        4          1       Clear tail model filter coefficients.
                   0       Do nothing.
                           Note: coefficients are not cleared in aerContro(), but
                                 in aerSendIn() of next frame processing.
                           Note: this bit will be automatically cleared once the
                                 the coefficients are cleared by AER.
        5          1       Clear all AER states and delay lines and reset tail
                           model, but will not reset configurable parameters
                           (including gains and equalizer).
                   0       Do nothing.
                           Note: reset is not performed in aerContro(), but
                                 in aerSendIn() of next frame processing.
                           Note: this bit will be automatically cleared once the
                                 clear all reset is finished by AER.
        6          1       Put AER in half duplex mode.
                   0       Put AER in full duplex mode.
        7          1       Relax Tx NLP during Tx/Rx mutual silence.
                   0       Don't relax Tx NLP in mutual silence.
        8          1       Disable Rx NLP.
                   0       Enable Rx NLP.
        9          1       Disable Tx NLP.
                   0       Enable Tx NLP.
        10         1       Disable Tx NLP clipper.
                   0       Enable Tx NLP clipper.
        11         1       Enable normal Rx comfort noise generation (CNG).
                   0       Disable normal Rx CNG.
        12         1       Enable normal Tx comfort noise generation (CNG).
                   0       Disable normal Tx CNG.
        13         1       Enable forced Rx CNG - full configured CNG overwrites
                           Rx path signal.
                   0       Disable forced Rx CNG.
        14         1       Enable forced Tx CNG - full configured CNG overwrites
                           Tx path signal.
                   0       Disable forced Tx CNG.
                           Note: Forced Tx CNG is available when TDNLP is used,
                                 but not available when FDNLP is used.
        15         1       High band attenuation follows low band for
                           subdominant path.
                   0       Infinite high band attenuation for subdominant path.

    Control bitfield 1:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       Enable noise guard.
                   0       Disable noise guard.
        1          1       Enable Tx equalizer.
                   0       Disable Tx equalizer.
        2          1       Enable Rx equalizer.
                   0       Disable Rx equalizer.
        3          1       Enable HLC.
                   0       Disable HLC.
        4          1       AER is informed that phone is on mute.
                   0       AER is informed that phone is not on mute.
        5          1       Enable scaling of NLP gain ramp. All four NLP linear
                           attenuation ramping in/out time constants will be
                           decreased by 1 for every 6 dB that the linear
                           attenuation goes above 6dB, until they reach a
                           minimum of 1.
                   0       Disable scaling of NLP gain ramp.
        6          1       Use frequency domain NLP (FDNLP)
                   0       Use time domain NLP (TDNLP)
                           Note: in order to use FDNLP, memory for FDNLP must
                                 first be requested throught aerGetSizes()
                                 by setting bit 0 of config_bitfield in
                                 aerSizeConfig_t. Otherwise, the setting of
                                 this bit has no effect.
        7          1       Enable adaptive spectral noise reduction (ASNR) in
                           send path.
                   0       Disable ASNR in send path.
                           Note: bit 6 must be set to 1 (use FDNLP) in order to
                                 enable ASNR. Otherwise, setting of this bit has
                                 no effect.
        8          1       Generate adaptive comfort noise (adaptive CNG) in
                           send path.
                   0       Generate fixed comfort noise (fixed CNG) in send path.
                           Note: bit 6 must be set to 1 (use FDNLP) in order to
                                 generate adaptive comfort noise. Otherwise,
                                 setting of this bit has no effect.
        9          1       Freeze tail model coefficients update, which may be
                           used for MIPS control.
                           (will not disable state machine update)
                   0       Do nothing.
        10         1       Perform a partial reset to clear delay lines and
                           state information, which may be used when switching
                           phone mode on the same instance.
                           Note: AER will NOT automatically perform a partial
                                 reset when being informed of phone mode change
                                 through aerControl() with control code
                                 aer_CTL_PHONE_MODE.
                           Note: this bit will be automatically cleared once the
                                 partial reset is finished by AER.
                   0       Do nothing.
        11         1       Keep clipper during double talk
                   0       Remove clipper completely during double talk
        12                 RESERVED
        13         1       Set minimum tail length, which convergence starts
                           with, to total tail length, for non-handsfree phone
                           mode.
                   0       Don't increase minimum tail length.
        14         1       Drop Tx high band signal at send path output.
                   0       Keep Tx high band signal at send path output.
        15         1       Drop Rx high band signal at receive path output.
                   0       Keep Rx high band signal at receive path output.

#define | aer_CTL0_ENABLE_ECHO_CANCELLER 0x0001
#define | aer_CTL0_ENABLE_UPDATE 0x0002
#define | aer_CTL0_ENABLE_NLP 0x0004
#define | aer_CTL0_ADAPT_IN_MUTE 0x0008
#define | aer_CTL0_CLEAR_FILTER 0x0010
#define | aer_CTL0_CLEAR_ALL 0x0020
#define | aer_CTL0_HALF_DUPLEX 0x0040
#define | aer_CTL0_RELAX_TXNLP_IDLE 0x0080
#define | aer_CTL0_DISABLE_RX_NLP 0x0100
#define | aer_CTL0_DISABLE_TX_NLP 0x0200
#define | aer_CTL0_DISABLE_TX_CLIPPER 0x0400
#define | aer_CTL0_ENABLE_NORMAL_RX_CNG 0x0800
#define | aer_CTL0_ENABLE_NORMAL_TX_CNG 0x1000
#define | aer_CTL0_ENABLE_FORCED_RX_CNG 0x2000
#define | aer_CTL0_ENABLE_FORCED_TX_CNG 0x4000
#define | aer_CTL0_BS_HIGH_BAND_LOCK 0x8000
#define | aer_CTL1_ENABLE_NGUARD 0x0001
#define | aer_CTL1_ENABLE_TX_EQ 0x0002
#define | aer_CTL1_ENABLE_RX_EQ 0x0004
#define | aer_CTL1_ENABLE_HLC 0x0008
#define | aer_CTL1_MUTE_ON 0x0010
#define | aer_CTL1_NLP_RAMP_SCALE_ON 0x0020
#define | aer_CTL1_USE_FDNLP 0x0040
#define | aer_CTL1_ENABLE_NR 0x0080
#define | aer_CTL1_CNG_ADAPT 0x0100
#define | aer_CTL1_FREEZE_TAIL_UPDATE 0x0200
#define | aer_CTL1_PARTIAL_RESET 0x0400
#define | aer_CTL1_BIT_11_RESERVED 0x0800
#define | aer_CTL1_RESET_PARAMS 0x1000
#define | aer_CTL1_INCREASE_MIN_HVEC 0x2000
#define | aer_CTL1_DROP_TX_HIGH_BAND 0x4000
#define | aer_CTL1_DROP_RX_HIGH_BAND 0x8000
#define | aer_CTL2_MICSAT 0x0001
#define | aer_CTL2_ENABLE_TRACE 0x0002
#define | aer_CTL2_SKIP_COHERENCE 0x0004
#define | aer_CTL2_FREEZE_NOISE_EST 0x0008
#define | aer_CTL2_BIT_4_RESERVED 0x0010
#define | aer_CTL2_BIT_5_RESERVED 0x0020
#define | aer_CTL2_BIT_6_RESERVED 0x0040
#define | aer_CTL2_BIT_7_RESERVED 0x0080
#define | aer_CTL2_BIT_8_RESERVED 0x0100
#define | aer_CTL2_BIT_9_RESERVED 0x0200
#define | aer_CTL2_BIT_10_RESERVED 0x0400
#define | aer_CTL2_BIT_11_RESERVED 0x0800
#define | aer_CTL2_BIT_12_RESERVED 0x1000
#define | aer_CTL2_BIT_13_RESERVED 0x2000
#define | aer_CTL2_BIT_14_RESERVED 0x4000
#define | aer_CTL2_BIT_15_RESERVED 0x8000
AER reset bitfield mask
Bitfield mask aer_RESET_XYZ to reset AER information through aerOpen(). Used to construct reset_bitfield of aerConfig_s.

    Reset bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       perform full reset (see remark below about full reset)
                   0       don't perform full reset
                           Note: if the bit is 1, all other bits in this bitfield
                                 will be ignored.
        1          1       reset adaptive tail model
                   0       keep adaptive tail model
        2          1       reset Tx/Rx analog and digital gains to default
                   0       keep Tx/Rx analog and digital gains
        3          1       reset Tx/Rx equalizer filter coefficients to all 0's
                   0       keep Tx/Rx equalizer filter coefficients
        4          1       reset all non-system parameters (those configurable
                           only through aerControl, not aerOpen) except Tx/Rx
                           gains and equalizer coefficients.
                   0       keep all other parameters
        5 - 15             RESERVED

Remarks:
The full reset does the following:
  • reset all parameters to their default values
  • clear all AER states and delay lines including gains
  • reset equalizer filter coefficients
  • reset tail model filter coefficients
  • control bitfield 0 and 1 (AER Control Bitfield Masks) to their default values

#define | aer_RESET_FULL 0x0001
#define | aer_RESET_TAIL_MODEL 0x0002
#define | aer_RESET_TXRX_GAINS 0x0004
#define | aer_RESET_TXRX_EQ_FILT 0x0008
#define | aer_RESET_OTHER_PARAMS 0x0010
AER configuration valid bitfield masks
Bitfield mask aer_CFG_VALID_XYZ to configure AER system parameters through aerOpen(). Used to construct valid_bitfield of aerConfig_s.

    Config valid bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       configure y to x delay
                   0       don't configure y to x delay
        1          1       configure sampling rates
                   0       don't configure sampling rates
        2          1       configure tail length
                   0       don't configure tail length
        3          1       configure delay of setting Tx analog gain
                   0       don't configure delay of setting Tx analog gain
        4          1       configure delay of setting Rx analog gain
                   0       don't configure delay of setting Rx analog gain
        5          1       configure number of interpolation samples for Tx path
                           gain change
                   0       don't configure number of interpolation samples for
                           Tx path gain change
        6          1       configure phone mode
                   0       don't configure phone mode
        7 - 15             RESERVED

#define | aer_CFG_VALID_Y2X_DELAY 0x0001
#define | aer_CFG_VALID_SAMP_RATES 0x0002
#define | aer_CFG_VALID_TAIL_LENGTH 0x0004
#define | aer_CFG_VALID_DELAY_TXAG 0x0008
#define | aer_CFG_VALID_DELAY_RXAG 0x0010
#define | aer_CFG_VALID_INTER_SAMP 0x0020
#define | aer_CFG_VALID_PHONE_MODE 0x0040
#define | aer_CFG_VALID_BITS_ALL_1 0x007F
AER Equalizer control codes
Constants for loading Tx/Rx equalizer parameters. Used to set tx_or_rx and num_params of aerEqConfig_s.

#define | aer_EQBQ_MAX_NUM_SECTION_PARAMS 17
AER trace maximum sizes for Tx and Rx
#define | aer_TRACE_MAX_SIZE_TX (3630 * sizeof(Fract))
#define | aer_TRACE_MAX_SIZE_RX (400 * sizeof(Fract))
AER trace config bitfield masks
These bit masks may be used to contruct aerTraceConfig_s::trace_bitfield.

    Bits and explanations of trace_bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       adaptive filter coefficients will be traced
                   0       adaptive filter coefficients will not be traced
        1          1       coherence data will be traced
                   0       coherence data will not be traced
        2          1       FDNLP data will be traced
                   0       FDNLP data will not be traced
        3          1       ASNR data will be traced
                   0       ASNR data will not be traced
        4 - 15             RESERVED

#define | aer_TRACE_FILTER_COEF 0x0001
#define | aer_TRACE_COH_DATA 0x0002
#define | aer_TRACE_FDNLP_DATA 0x0004
#define | aer_TRACE_ASNR_DATA 0x0008
#define | aer_TRACE_RESERVED_BITS 0xFFF0
AER parameter configuration ranges
Upper and lower limit for AER configurable parameters.

#define | aer_CNG_LEVEL_UPPER_LIMIT 0
#define | aer_CNG_LEVEL_LOWER_LIMIT (-80)
#define | aer_FDNLP_DELAY_UPPER_LIMIT 6
#define | aer_FDNLP_DELAY_LOWER_LIMIT 3
#define | aer_FDNLP_BIN_LOWER_LIMIT 0
#define | aer_FDNLP_BIN_UPPER_LIMIT_8K 64
#define | aer_FDNLP_BIN_UPPER_LIMIT_16K 128
#define | aer_NR_NOISE_THR_LOWER_LIMIT (-80)
#define | aer_NR_NOISE_THR_UPPER_LIMIT (-40)
#define | aer_SLIM_MODE_UPPER_LIMIT 5
#define | aer_SLIM_MODE_LOWER_LIMIT 0
AER H vector size
#define | aer_NUM_WORDS_PER_H_VEC_8K 258
#define | aer_NUM_WORDS_PER_H_VEC_16K 514

Typedefs

typedef aerInfo_s | aerInfo_t
AER information reporting structure This strucutre contains the parameters that AER needs to report to an outside ECO through eventOut() function provided by aerCreateConfig_s.
typedef aerCreateConfig_s | aerCreateConfig_t
Configuration structure for aerCreate() This structure contains information to be shared by different AER instances. This structure is used by function aerCreate().
typedef aerSizeConfig_s | aerSizeConfig_t
Configuration structure for aerGetSizes() This structure specifies the maximum filter length and maximum y to x delay. It also has a bitfield, which currently has only one bit to indicate whether FDNLP is requested. It is used by function aerGetSizes(). It is also part of structure aerNewConfig_s used by aerNew().
typedef aerNewConfig_s | aerNewConfig_t
Configuration structure for aerNew() This structure is used for creating a new AER instance through function aerNew().
typedef aerConfig_s | aerConfig_t
Configuration structure for aerOpen() This structure contains system parameters to configure an AER instance through aerOpen(). AER doesn't have default value for these parameters, and they must be set explicitly when aerOpen() is called the first time after aerNew(). After that, these prameters may also be changed through aerControl().
typedef aerEQConfig_s | aerEqConfig_t
AER Bi-quad EQ configuration structure.This structure contains Bi-quad EQ configurations. It includes:
  • Total number of sections
  • Sections types.
    There are 4 different types of sections used in an EQ. Each type is encoded using 2 bits(aer_EQBQ_SECTION_TYPE_xx). A 16-bit bitmap is used to represent the types for all the sections in the EQ. The least significant 2 bits are used for the 1st section, the next 2 bits are used for the 2nd section and so on till bit 12&13 which are used for the last section. Bit 14 is used to indicate LP filter order. If 1, 2nd order LP filter is used. Otherwise, 1st order LP is used. Bit 15 is used to indicate HP filter order. If 1, 2nd order HP filter is used. Otherwise, 1st order HP is used.
  • Section parameters.
    Parameters are set in the order of sections. A LP or HP section has one parameter - alpha. A BP or BS section has three parameters and they are in the order of alpha, gamma and G. Implementation of LP/HP and BP/BS filters and the corresponding parameters are shown in the figure below. All section parameters are in Q15 format.

typedef aerModeControl_s | aerModeControl_t
AER mode control structure. This structure is used to change AER operational modes through function aerControl() using control code aer_CTL_MODES_0 or aer_CTL_MODES_1. For example, to enable AER, enable update, and disable NLP would need to set the mask and value to:.
typedef aerTraceConfig_s | aerTraceConfig_t
AER tracing configuration structure. This structure is used to configure AER tracing options and obtain from AER the size of traced data based on the configuration. The control valid bit for configuring trace is aer_CTL_VALID2_TRACE_CONFIG.
typedef aerControl_s | aerControl_t
AER control structure This structure is used to change AER configurable parameters and mode of operation through aerControl(). It has two elements, a control code to tell what to change, and a union of parameters to tell the value of the new parameter.
typedef aerEventStats_s | aerEventStats_t
AER Statistics Structure. This structure contains statistical counters to monitor the occurrance of particular events in AER.
typedef aerPiquaStats_s | aerPiquaStats_t
AER PIQUA Statistics Structure. This structure contains measurements necessary for PIQUA performance monitoring.
typedef aerTailModel_s | aerTailModel_t
AER tail model save/load structure. This structure is used for saving or loading AER adaptive tail model, which are defined by:
  • the adaptive filter coefficients, mantissas and exponents,
  • number of active tail model segments (or H vectors),
  • length of tail model in units of sampling period, e.g. 125us for 8kHz and 62.5us for 16kHz.
  • the speaker and microphone analog gains.

typedef aerDebugStat_s | aerDebugStat_t
AER debug information data structure. This structure contains debug information regarding AER operation. It is one of the arguments of function aerGetPerformance().
Remarks:
In the comments, elements of this structure are numbered in units of the size of type tint.

typedef aerVersion_s | aerVersion_t
AER version structure This structure contains the version information of the AER software.

Enumerations

AER error codes
Error codes returned by AER API functions.

enum {
aer_NOERR = 0, aer_ERR_NOTCREATED = 1, aer_ERR_NOMEMORY = 2, aer_ERR_NOTOPENED = 3,
aer_ERR_NOTCLOSED = 4, aer_ERR_INVALIDPAR = 5, aer_ERR_MEMBUFVECOVF = 6, aer_ERR_NOINITGAIN = 7,
aer_ERR_LOAD_INPROCESS = 8
}
AER sampling rate bitfield
AER sampling rate bitfield that specifies the sampling rates at four interfaces: Rx in, Tx out, Rx out and Tx in. It is required that Rx out and Tx in have the same sampling rate.

    Four interfaces of AER:
             Tx in          Tx out
     |------|  ->  |-------| ->  |---------|
     | TDM  |      |  AER  |     | Network |
     |------|  <-  |-------| <-  |---------|
             Rx out         Rx in

    Sampling rate bitfield:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

    bits (from LSB)    values   meaning
     0                   0       Rx in at 8kHz
                         1       Rx in at 16kHz
     1                   0       Tx out at 8kHz
                         1       Tx out at 16kHz
     2                   0       Rx out and Tx in at 8kHz
                         1       Rx out and Tx in at 16kHz
     3 - 15                      RESERVED

enum | { aer_SRATE_BIT_RXIN = 0, aer_SRATE_BIT_TXOUT = 1, aer_SRATE_BIT_RXOUT_TXIN = 2 }
AER Warning Messages
Used by debugInfo provided by aerCreateConfig_s to pass warning code.

enum | { aer_WARN_PATH_SELECT = 1, aer_WARN_RX_NLP = 2, aer_WARN_TX_NLP = 3, aer_WARN_COMPUTE_CLIP = 4 }

Functions

tint | aerCreate (aerCreateConfig_t *create_cfg)
Function aerCreate() provides AER with the system information that is shared among multiple instances.
Remarks:
Function aerCreate() must be called before any other AER API function is called. For examle, aerGetSizes() needs the max_sampling_rate of aerCreateConfig_t.

tint | aerGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, aerSizeConfig_t *cfg)
Function aerGetSizes() obtains from AER the memory requirements of an instance, which depend on provided configuration parameters.
tint | aerNew (void **aerInst, tint nbufs, ecomemBuffer_t *bufs, aerNewConfig_t *cfg)
Function aerNew() creates a new instance of AER.
Remarks:
Function aerNew() must be called before aerOpen()is called.

tint | aerClose (void *aerInst)
Function aerClose() closes an AER instance.
Remarks:
Function aerClose() must be called before aerDelete() is called.

tint | aerControl (void *aerInst, aerControl_t *ctl)
Function aerControl() enables or disables a type of AER function or changes the value of a certain parameter.
tint | aerDelete (void **aerInst, tint nbufs, ecomemBuffer_t *bufs)
Function aerDelete() deletes the AER instance identified by aerInst and returns the addresses of those buffers used by this instance.
tint | aerGetFilter (void *aerInst, aerTailModel_t *tail_model, Fract *coeff_mant, tint *coeff_exp, tint start, tint length)
Function aerGetFilter() gets elements from the current adaptive impulse response 'tail' model coefficients(H) and saves into a block of memory specified by the user. Moreover, it returns other tail model related parameters to facilitate loading of H coefficients at a later time, or displaying the impulse reponse model in time domain.
tint | aerPutFilter (void *aerInst, aerTailModel_t *tail_model, Fract *coeff_mant, tint *coeff_exp, tint start, tint length, tbool flag_last_seg)
Function aerPutFilter() does the reverse of aerGetFilter: it loads the previously saved tail model to AER instance.
tint | aerGetGains (void *aerInst, tint *tx_dg_gain, tint *rx_dg_gain)
Function aerGetGains reports the AER Tx and Rx digital gains in S11.4 dB (or 1/16 of dB) units.
tint | aerGetPerformance (void *aerInst, aerDebugStat_t *dbgstat, aerVersion_t *version, tbool reset)
Function aerGetPerformance() reports the AER performance debug statistics and the version information.
tint | aerOpen (void *aerInst, aerConfig_t *cfg)
Function aerOpen() initializes and configures an AER instance.
tint | aerReceiveIn (void *aerInst, void *recv_in, void *recv_out, void *trace_buf)
Function aerReceiveIn() performs receive path processing.
tint | aerSendIn (void *aerInst, void *send_in, void *send_out, void *sout_8kHz, void *recv_out_sync, void *sout_pnlp_8kHz, void *trace_buf)
Function aerSendIn() performs send path processing.
tint | aerActivate (void *newActiveInst, void *oldActiveInst)
Function aerActivate() performs activation and/or deactivation of handsfree micropone instances. This function is used in a system with multiple handsfree microphones.
Remarks:
The active instance MUST be the first one among all instances to be processed by aerSendIn().

Instance is set to be inactive by default in aerOpen(). Therefore, this function must be called after aerOpen() to set one of the multiple instances to be active.

Define Documentation

#define aer_EQBQ_MAX_NUM_SECTIONS 7

Maximum number of sections.

Definition at line 749 of file aer.h.

#define aer_EQBQ_SECTION_TYPE_LP 0x0000

Low Pass Filter

Definition at line 761 of file aer.h.

#define aer_EQBQ_SECTION_TYPE_HP 0x0001

High Pass Filter

Definition at line 762 of file aer.h.

#define aer_EQBQ_SECTION_TYPE_BP 0x0002

Band Pass Filter

Definition at line 763 of file aer.h.

#define aer_EQBQ_SECTION_TYPE_BS 0x0003

Band stop Filter

Definition at line 764 of file aer.h.

#define aer_EQBQ_SECTION_TYPE_2NDORDER_LPBIT 14

2nd order LP

Definition at line 765 of file aer.h.

#define aer_EQBQ_SECTION_TYPE_2NDORDER_HPBIT 15

2nd order HP

Definition at line 766 of file aer.h.

#define aer_CTL_VALID0_MODES_CTL0 0x0001

Definition at line 890 of file aer.h.

#define aer_CTL_VALID0_MODES_CTL1 0x0002

Definition at line 891 of file aer.h.

#define aer_CTL_VALID0_MODES_CTL2 0x0004

Definition at line 892 of file aer.h.

#define aer_CTL_VALID0_Y2X_DELAY 0x0008

Definition at line 893 of file aer.h.

#define aer_CTL_VALID0_SAMPLING_RATES 0x0010

Definition at line 894 of file aer.h.

#define aer_CTL_VALID0_TAIL_LENGTH 0x0020

Definition at line 895 of file aer.h.

#define aer_CTL_VALID0_TX_AG_CHG_DELAY 0x0040

Definition at line 896 of file aer.h.

#define aer_CTL_VALID0_RX_AG_CHG_DELAY 0x0080

Definition at line 897 of file aer.h.

#define aer_CTL_VALID0_TX_AG_CHG_INTERP 0x0100

Definition at line 898 of file aer.h.

#define aer_CTL_VALID0_PHONE_MODE 0x0200

Definition at line 899 of file aer.h.

#define aer_CTL_VALID0_RX_ANALOG 0x0400

Definition at line 900 of file aer.h.

#define aer_CTL_VALID0_TX_ANALOG 0x0800

Definition at line 901 of file aer.h.

#define aer_CTL_VALID0_RX_DIGITAL 0x1000

Definition at line 902 of file aer.h.

#define aer_CTL_VALID0_TX_DIGITAL 0x2000

Definition at line 903 of file aer.h.

#define aer_CTL_VALID0_RX_EQ_PARAMS 0x4000

Definition at line 904 of file aer.h.

#define aer_CTL_VALID0_TX_EQ_PARAMS 0x8000

Definition at line 905 of file aer.h.

#define aer_CTL_VALID1_NLP_CLOSS_TARGET 0x0001

Definition at line 1082 of file aer.h.

#define aer_CTL_VALID1_NLP_TX_CLIPAGG 0x0002

Definition at line 1083 of file aer.h.

#define aer_CTL_VALID1_NLP_LINATTN_MAX_ERLE 0x0004

Definition at line 1084 of file aer.h.

#define aer_CTL_VALID1_NLP_CLIPPER_MAX_ERLE 0x0008

Definition at line 1085 of file aer.h.

#define aer_CTL_VALID1_NLP_TOTAL_LINATTN_MIN 0x0010

Definition at line 1086 of file aer.h.

#define aer_CTL_VALID1_NLP_RX_LINATTN_MIN 0x0020

Definition at line 1087 of file aer.h.

#define aer_CTL_VALID1_NLP_RX_LINATTN_MAX 0x0040

Definition at line 1088 of file aer.h.

#define aer_CTL_VALID1_NLP_TX_LINATTN_MIN 0x0080

Definition at line 1089 of file aer.h.

#define aer_CTL_VALID1_NLP_TX_LINATTN_MAX 0x0100

Definition at line 1090 of file aer.h.

#define aer_CTL_VALID1_NLP_TX_IN_TC 0x0200

Definition at line 1091 of file aer.h.

#define aer_CTL_VALID1_NLP_TX_OUT_TC 0x0400

Definition at line 1092 of file aer.h.

#define aer_CTL_VALID1_NLP_RX_IN_TC 0x0800

Definition at line 1093 of file aer.h.

#define aer_CTL_VALID1_NLP_RX_OUT_TC 0x1000

Definition at line 1094 of file aer.h.

#define aer_CTL_VALID1_GAIN_SPLIT_TC 0x2000

Definition at line 1095 of file aer.h.

#define aer_CTL_VALID1_CNG_RX_LEVEL 0x4000

Definition at line 1096 of file aer.h.

#define aer_CTL_VALID1_CNG_TX_LEVEL 0x8000

Definition at line 1097 of file aer.h.

#define aer_CTL_VALID2_TX_FDNLP_MSEC_DELAY 0x0001

Definition at line 1205 of file aer.h.

#define aer_CTL_VALID2_TX_FDNLP_BIN_LO1 0x0002

Definition at line 1206 of file aer.h.

#define aer_CTL_VALID2_TX_FDNLP_BIN_LO2 0x0004

Definition at line 1207 of file aer.h.

#define aer_CTL_VALID2_TX_FDNLP_BIN_HI1 0x0008

Definition at line 1208 of file aer.h.

#define aer_CTL_VALID2_TX_FDNLP_BIN_HI2 0x0010

Definition at line 1209 of file aer.h.

#define aer_CTL_VALID2_TX_FDNLP_CNG_MAX 0x0020

Definition at line 1210 of file aer.h.

#define aer_CTL_VALID2_NR_FBIN1_LIM 0x0040

Definition at line 1211 of file aer.h.

#define aer_CTL_VALID2_NR_FBIN2_LIM 0x0080

Definition at line 1212 of file aer.h.

#define aer_CTL_VALID2_NR_FBAND1_MAX_ATTEN 0x0100

Definition at line 1213 of file aer.h.

#define aer_CTL_VALID2_NR_FBAND2_MAX_ATTEN 0x0200

Definition at line 1214 of file aer.h.

#define aer_CTL_VALID2_NR_FBAND3_MAX_ATTEN 0x0400

Definition at line 1215 of file aer.h.

#define aer_CTL_VALID2_NR_SIG_UPD_RATE_MAX 0x0800

Definition at line 1216 of file aer.h.

#define aer_CTL_VALID2_NR_SIG_UPD_RATE_MIN 0x1000

Definition at line 1217 of file aer.h.

#define aer_CTL_VALID2_NR_NOISE_THRESH 0x2000

Definition at line 1218 of file aer.h.

#define aer_CTL_VALID2_NR_NOISE_HANGOVER 0x4000

Definition at line 1219 of file aer.h.

#define aer_CTL_VALID2_TRACE_CONFIG 0x8000

Definition at line 1220 of file aer.h.

#define aer_CTL_VALID3_COH_HANGOVER 0x0001

Definition at line 1356 of file aer.h.

#define aer_CTL_VALID3_COH_RATIO_THRESH 0x0002

Definition at line 1357 of file aer.h.

#define aer_CTL_VALID3_COH_CNT_THRESH 0x0004

Definition at line 1358 of file aer.h.

#define aer_CTL_VALID3_HLC_THRESHOLD 0x0008

Definition at line 1359 of file aer.h.

#define aer_CTL_VALID3_HLC_RAMP_OUT_TC 0x0010

Definition at line 1360 of file aer.h.

#define aer_CTL_VALID3_HLC_POWER_TC 0x0020

Definition at line 1361 of file aer.h.

#define aer_CTL_VALID3_THRESH_RX_NLD 0x0040

Definition at line 1362 of file aer.h.

#define aer_CTL_VALID3_THRESH_NOISE_RX 0x0080

Definition at line 1363 of file aer.h.

#define aer_CTL_VALID3_THRESH_NOISE_TX 0x0100

Definition at line 1364 of file aer.h.

#define aer_CTL_VALID3_HANGOVER_RXTOTX 0x0200

Definition at line 1365 of file aer.h.

#define aer_CTL_VALID3_HANGOVER_TXTORX 0x0400

Definition at line 1366 of file aer.h.

#define aer_CTL_VALID3_TX_SLIM_MODE 0x0800

Definition at line 1367 of file aer.h.

#define aer_CTL_VALID3_RX_SLIM_MODE 0x1000

Definition at line 1368 of file aer.h.

#define aer_CTL_VALID3_NG_HANGOVER 0x2000

Definition at line 1369 of file aer.h.

#define aer_CTL_VALID3_NG_RAMPIN_PERIOD 0x4000

Definition at line 1370 of file aer.h.

#define aer_CTL_VALID3_NG_NOISE_LEVEL 0x8000

Definition at line 1371 of file aer.h.

#define aer_CTL_VALID4_DT_THRESH 0x0001

Definition at line 1496 of file aer.h.

#define aer_CTL_VALID4_CLIP_SCALE 0x0002

Definition at line 1497 of file aer.h.

#define aer_CTL_VALID4_DT_HANGOVER 0x0004

Definition at line 1498 of file aer.h.

#define aer_NUM_WORDS_PER_H_VEC_8K 258

258 words per H vector for 8kHz

Definition at line 1637 of file aer.h.

#define aer_NUM_WORDS_PER_H_VEC_16K 514

514 words per H vector for 16kHz

Definition at line 1638 of file aer.h.


AER: aer.h Source File

  • File List
  • Globals

aer.h

Go to the documentation of this file.
00001 #ifndef _AER_H
00002 #define _AER_H
00003
00012 /* System include files and utilities' APIs */
00013 #include <ti/mas/types/types.h>               /* DSP types                   */
00014 #include <ti/mas/util/ecomem.h>               /* memory descriptor structure */
00015 #include <ti/mas/util/debug.h>                /* debuging utility            */
00016
00017 /* Define AER Module as a master group in Doxygen format and add all AER API
00018    definitions to this group. */
00035
00045 enum {
00046   aer_NOERR              = 0,
00047   aer_ERR_NOTCREATED     = 1,
00048   aer_ERR_NOMEMORY       = 2,
00049   aer_ERR_NOTOPENED      = 3,
00050   aer_ERR_NOTCLOSED      = 4,
00051   aer_ERR_INVALIDPAR     = 5,
00052   aer_ERR_MEMBUFVECOVF   = 6,
00053   aer_ERR_NOINITGAIN     = 7,
00054   aer_ERR_LOAD_INPROCESS = 8
00055 };
00059
00070 enum {
00071   aer_SRATE_8K  = 0,
00072   aer_SRATE_16K = 1
00073 };
00074
00075 typedef tint aerSrate_t;
00114 enum {
00115   aer_SRATE_BIT_RXIN       = 0,
00117   aer_SRATE_BIT_TXOUT      = 1,
00119   aer_SRATE_BIT_RXOUT_TXIN = 2
00121 };
00136 #define aer_SRATE_RXIN_16K  (aer_SRATE_16K<<aer_SRATE_BIT_RXIN)
00137 #define aer_SRATE_RXIN_8K  (aer_SRATE_8K<<aer_SRATE_BIT_RXIN)
00138 #define aer_SRATE_TXOUT_16K (aer_SRATE_16K<<aer_SRATE_BIT_TXOUT)
00139 #define aer_SRATE_TXOUT_8K (aer_SRATE_8K<<aer_SRATE_BIT_TXOUT)
00140 #define aer_SRATE_RXOUT_TXIN_16K (aer_SRATE_16K<<aer_SRATE_BIT_RXOUT_TXIN)
00141 #define aer_SRATE_RXOUT_TXIN_8K (aer_SRATE_8K<<aer_SRATE_BIT_RXOUT_TXIN)
00142
00145
00169 #define aer_CRT_MULT_MIC_MODE  0x0001
00198 #define aer_SIZE_FDNLP_REQ     0x0001
00199 #define aer_SIZE_USE_BANDSPLIT 0x0002
00203
00204
00215 #define aer_PHM_HS                     0x8000
00216 #define aer_PHM_HES                    0x4000
00217 #define aer_PHM_HF                     0x2000
00218 #define aer_PHM_HSGL                   0x1000
00219 #define aer_PHM_HESGL                  0x0800
00223
00224
00380
00382 #define aer_CTL0_ENABLE_ECHO_CANCELLER 0x0001
00383 #define aer_CTL0_ENABLE_UPDATE         0x0002
00384 #define aer_CTL0_ENABLE_NLP            0x0004
00385 #define aer_CTL0_ADAPT_IN_MUTE         0x0008
00386 #define aer_CTL0_CLEAR_FILTER          0x0010
00387 #define aer_CTL0_CLEAR_ALL             0x0020
00388 #define aer_CTL0_HALF_DUPLEX           0x0040
00389 #define aer_CTL0_RELAX_TXNLP_IDLE      0x0080
00391 #define aer_CTL0_DISABLE_RX_NLP        0x0100
00392 #define aer_CTL0_DISABLE_TX_NLP        0x0200
00393 #define aer_CTL0_DISABLE_TX_CLIPPER    0x0400
00394 #define aer_CTL0_ENABLE_NORMAL_RX_CNG  0x0800
00395 #define aer_CTL0_ENABLE_NORMAL_TX_CNG  0x1000
00396 #define aer_CTL0_ENABLE_FORCED_RX_CNG  0x2000
00397 #define aer_CTL0_ENABLE_FORCED_TX_CNG  0x4000
00398 #define aer_CTL0_BS_HIGH_BAND_LOCK     0x8000
00401 #define aer_CTL1_ENABLE_NGUARD        0x0001
00402 #define aer_CTL1_ENABLE_TX_EQ         0x0002
00403 #define aer_CTL1_ENABLE_RX_EQ         0x0004
00404 #define aer_CTL1_ENABLE_HLC           0x0008
00405 #define aer_CTL1_MUTE_ON              0x0010
00406 #define aer_CTL1_NLP_RAMP_SCALE_ON    0x0020
00408 #define aer_CTL1_USE_FDNLP            0x0040
00409 #define aer_CTL1_ENABLE_NR            0x0080
00410 #define aer_CTL1_CNG_ADAPT            0x0100
00411 #define aer_CTL1_FREEZE_TAIL_UPDATE   0x0200
00412 #define aer_CTL1_PARTIAL_RESET        0x0400
00413 #define aer_CTL1_BIT_11_RESERVED      0x0800
00414 #define aer_CTL1_RESET_PARAMS         0x1000
00415 #define aer_CTL1_INCREASE_MIN_HVEC    0x2000
00417 #define aer_CTL1_DROP_TX_HIGH_BAND    0x4000
00418 #define aer_CTL1_DROP_RX_HIGH_BAND    0x8000
00420 #define aer_CTL2_MICSAT               0x0001
00421 #define aer_CTL2_ENABLE_TRACE         0x0002
00422 #define aer_CTL2_SKIP_COHERENCE       0x0004
00423 #define aer_CTL2_FREEZE_NOISE_EST     0x0008
00424 #define aer_CTL2_BIT_4_RESERVED       0x0010
00425 #define aer_CTL2_BIT_5_RESERVED       0x0020
00426 #define aer_CTL2_BIT_6_RESERVED       0x0040
00427 #define aer_CTL2_BIT_7_RESERVED       0x0080
00428 #define aer_CTL2_BIT_8_RESERVED       0x0100
00429 #define aer_CTL2_BIT_9_RESERVED       0x0200
00430 #define aer_CTL2_BIT_10_RESERVED      0x0400
00431 #define aer_CTL2_BIT_11_RESERVED      0x0800
00432 #define aer_CTL2_BIT_12_RESERVED      0x1000
00433 #define aer_CTL2_BIT_13_RESERVED      0x2000
00434 #define aer_CTL2_BIT_14_RESERVED      0x4000
00435 #define aer_CTL2_BIT_15_RESERVED      0x8000
00439
00440
00484 #define aer_RESET_FULL             0x0001
00485 #define aer_RESET_TAIL_MODEL       0x0002
00486 #define aer_RESET_TXRX_GAINS       0x0004
00487 #define aer_RESET_TXRX_EQ_FILT     0x0008
00488 #define aer_RESET_OTHER_PARAMS     0x0010
00492
00493
00531 #define aer_CFG_VALID_Y2X_DELAY    0x0001
00532 #define aer_CFG_VALID_SAMP_RATES   0x0002
00533 #define aer_CFG_VALID_TAIL_LENGTH  0x0004
00534 #define aer_CFG_VALID_DELAY_TXAG   0x0008
00536 #define aer_CFG_VALID_DELAY_RXAG   0x0010
00538 #define aer_CFG_VALID_INTER_SAMP   0x0020
00540 #define aer_CFG_VALID_PHONE_MODE   0x0040
00541 #define aer_CFG_VALID_BITS_ALL_1   0x007F
00547
00548
00557 enum {
00558   aer_WARN_PATH_SELECT  = 1,
00559   aer_WARN_RX_NLP       = 2,
00560   aer_WARN_TX_NLP       = 3,
00561   aer_WARN_COMPUTE_CLIP = 4
00562 };
00566
00574 typedef struct aerInfo_s {
00575   tbool  active_path;
00576   tbool  nlp_on;
00577   tint   max_canc_l2;
00578   tint   rx_to_tx_hangover;
00580   tint   tx_to_rx_hangover;
00582   tint   switch2tx_period;
00583   tint   switch2rx_period;
00584   Fract  maxabs_pred_echo;
00585   LFract pred_echo_pwr;
00586   LFract tx_mic_pwr;
00587   LFract tx_mic_pwr_minus_echo;
00588 } aerInfo_t;
00589
00598 typedef struct aerCreateConfig_s {
00599   dbgInfo_t   debugInfo;
00614   void        (*eventOut)(void *handle, aerInfo_t *aer_info);
00617   aerSrate_t  max_sampling_rate;
00620   tuint       config_bitfield;
00622 } aerCreateConfig_t;
00623
00634 typedef struct aerSizeConfig_s {
00635   tint      max_tail_length;
00638   tint      max_y2x_delay;
00640   tuint     config_bitfield;
00642 } aerSizeConfig_t;
00643
00651 typedef struct aerNewConfig_s {
00652   void  *handle;
00653   aerSizeConfig_t  sizeCfg;
00654 } aerNewConfig_t;
00655
00656
00667 typedef struct aerConfig_s {
00668   tuint   reset_bitfield;
00674   tuint   valid_bitfield;
00681   tint    y2x_delay;
00683   tuint   srate_bitfield;
00685   tint    tail_length;
00687   tint    delay_tx_ag_chg;
00689   tint    delay_rx_ag_chg;
00691   tint    num_samp_interp;
00693   tint    phone_mode;
00695 } aerConfig_t;
00696
00697
00708 #define aer_EQBQ_MAX_NUM_SECTION_PARAMS 17
00747 typedef struct aerEQConfig_s {
00748   tint      num_sections;
00749     #define aer_EQBQ_MAX_NUM_SECTIONS  7
00751   tuint section_types;
00761     #define aer_EQBQ_SECTION_TYPE_LP             0x0000
00762     #define aer_EQBQ_SECTION_TYPE_HP             0x0001
00763     #define aer_EQBQ_SECTION_TYPE_BP             0x0002
00764     #define aer_EQBQ_SECTION_TYPE_BS             0x0003
00765     #define aer_EQBQ_SECTION_TYPE_2NDORDER_LPBIT     14
00766     #define aer_EQBQ_SECTION_TYPE_2NDORDER_HPBIT     15
00768   Fract section_params[aer_EQBQ_MAX_NUM_SECTION_PARAMS];
00770 } aerEqConfig_t;
00771
00787 typedef struct aerModeControl_s{
00788   tuint mask;
00789   tuint value;
00792 } aerModeControl_t;
00793
00794
00814 typedef struct aerTraceConfig_s {
00815   tuint trace_bitfield;
00817   tsize get_size_rx;
00821   tsize get_size_tx;
00823 } aerTraceConfig_t;
00824
00833 #define aer_TRACE_MAX_SIZE_TX (3630 * sizeof(Fract))
00835 #define aer_TRACE_MAX_SIZE_RX (400 * sizeof(Fract))
00840
00841
00870 #define aer_TRACE_FILTER_COEF    0x0001
00871 #define aer_TRACE_COH_DATA       0x0002
00872 #define aer_TRACE_FDNLP_DATA     0x0004
00873 #define aer_TRACE_ASNR_DATA      0x0008
00874 #define aer_TRACE_RESERVED_BITS  0xFFF0
00878
00879
00888 typedef struct aerControl_s {
00889   tuint valid_bitfield_0;
00890 #define aer_CTL_VALID0_MODES_CTL0         0x0001
00891 #define aer_CTL_VALID0_MODES_CTL1         0x0002
00892 #define aer_CTL_VALID0_MODES_CTL2         0x0004
00893 #define aer_CTL_VALID0_Y2X_DELAY          0x0008
00894 #define aer_CTL_VALID0_SAMPLING_RATES     0x0010
00895 #define aer_CTL_VALID0_TAIL_LENGTH        0x0020
00896 #define aer_CTL_VALID0_TX_AG_CHG_DELAY    0x0040
00897 #define aer_CTL_VALID0_RX_AG_CHG_DELAY    0x0080
00898 #define aer_CTL_VALID0_TX_AG_CHG_INTERP   0x0100
00899 #define aer_CTL_VALID0_PHONE_MODE         0x0200
00900 #define aer_CTL_VALID0_RX_ANALOG          0x0400
00901 #define aer_CTL_VALID0_TX_ANALOG          0x0800
00902 #define aer_CTL_VALID0_RX_DIGITAL         0x1000
00903 #define aer_CTL_VALID0_TX_DIGITAL         0x2000
00904 #define aer_CTL_VALID0_RX_EQ_PARAMS       0x4000
00905 #define aer_CTL_VALID0_TX_EQ_PARAMS       0x8000
00906
00907   aerModeControl_t modes_0;
00908   aerModeControl_t modes_1;
00909   aerModeControl_t modes_2;
00917   tint   y2x_delay;
00928   tuint  srate_bitfield;
00943   tint   tail_length;
00954   tint   delay_tx_ag_chg;
00983   tint   delay_rx_ag_chg;
00999   tint   num_samp_interp;
01014   tint   phone_mode;
01022   Fract  gain_rx_analog;
01037   Fract  gain_tx_analog;
01055   Fract  gain_rx_digital;
01061   Fract  gain_tx_digital;
01067   aerEqConfig_t *rxeq_params;
01074   aerEqConfig_t *txeq_params;
01081   tuint valid_bitfield_1;
01082 #define aer_CTL_VALID1_NLP_CLOSS_TARGET       0x0001
01083 #define aer_CTL_VALID1_NLP_TX_CLIPAGG         0x0002
01084 #define aer_CTL_VALID1_NLP_LINATTN_MAX_ERLE   0x0004
01085 #define aer_CTL_VALID1_NLP_CLIPPER_MAX_ERLE   0x0008
01086 #define aer_CTL_VALID1_NLP_TOTAL_LINATTN_MIN  0x0010
01087 #define aer_CTL_VALID1_NLP_RX_LINATTN_MIN     0x0020
01088 #define aer_CTL_VALID1_NLP_RX_LINATTN_MAX     0x0040
01089 #define aer_CTL_VALID1_NLP_TX_LINATTN_MIN     0x0080
01090 #define aer_CTL_VALID1_NLP_TX_LINATTN_MAX     0x0100
01091 #define aer_CTL_VALID1_NLP_TX_IN_TC           0x0200
01092 #define aer_CTL_VALID1_NLP_TX_OUT_TC          0x0400
01093 #define aer_CTL_VALID1_NLP_RX_IN_TC           0x0800
01094 #define aer_CTL_VALID1_NLP_RX_OUT_TC          0x1000
01095 #define aer_CTL_VALID1_GAIN_SPLIT_TC          0x2000
01096 #define aer_CTL_VALID1_CNG_RX_LEVEL           0x4000
01097 #define aer_CTL_VALID1_CNG_TX_LEVEL           0x8000
01098
01099   Fract  nlp_combloss_target;
01113   tint   nlp_clip_agg_l2;
01120   tint   nlp_linattn_max_erle;
01129   tint   nlp_clipper_max_erle;
01134   tint   nlp_total_linattn_min;
01140   tint   nlp_rx_linattn_min;
01147   tint   nlp_rx_linattn_max;
01154   tint   nlp_tx_linattn_min;
01157   tint   nlp_tx_linattn_max;
01160   tint   nlp_tx_in_tc;
01167   tint   nlp_tx_out_tc;
01171   tint   nlp_rx_in_tc;
01175   tint   nlp_rx_out_tc;
01179   tint   gain_split_tc;
01186   tint   cng_rx_level;
01194   tint   cng_tx_level;
01204   tuint valid_bitfield_2;
01205 #define aer_CTL_VALID2_TX_FDNLP_MSEC_DELAY   0x0001
01206 #define aer_CTL_VALID2_TX_FDNLP_BIN_LO1      0x0002
01207 #define aer_CTL_VALID2_TX_FDNLP_BIN_LO2      0x0004
01208 #define aer_CTL_VALID2_TX_FDNLP_BIN_HI1      0x0008
01209 #define aer_CTL_VALID2_TX_FDNLP_BIN_HI2      0x0010
01210 #define aer_CTL_VALID2_TX_FDNLP_CNG_MAX      0x0020
01211 #define aer_CTL_VALID2_NR_FBIN1_LIM          0x0040
01212 #define aer_CTL_VALID2_NR_FBIN2_LIM          0x0080
01213 #define aer_CTL_VALID2_NR_FBAND1_MAX_ATTEN   0x0100
01214 #define aer_CTL_VALID2_NR_FBAND2_MAX_ATTEN   0x0200
01215 #define aer_CTL_VALID2_NR_FBAND3_MAX_ATTEN   0x0400
01216 #define aer_CTL_VALID2_NR_SIG_UPD_RATE_MAX   0x0800
01217 #define aer_CTL_VALID2_NR_SIG_UPD_RATE_MIN   0x1000
01218 #define aer_CTL_VALID2_NR_NOISE_THRESH       0x2000
01219 #define aer_CTL_VALID2_NR_NOISE_HANGOVER     0x4000
01220 #define aer_CTL_VALID2_TRACE_CONFIG          0x8000
01221
01222   tint   txfdnlp_msec_delay;
01232   tint   txfdnlp_bin_lo1;
01243   tint   txfdnlp_bin_lo2;
01250   tint   txfdnlp_bin_hi1;
01257   tint   txfdnlp_bin_hi2;
01264   tint   txfdnlp_cng_max;
01279   tint   nr_fbin1_lim;
01288   tint   nr_fbin2_lim;
01294   tint   nr_fband1_max_atten;
01298   tint   nr_fband2_max_atten;
01303   tint   nr_fband3_max_atten;
01307   Fract  nr_sig_upd_rate_max;
01319   Fract  nr_sig_upd_rate_min;
01326   tint   nr_noise_thresh;
01340   tint   nr_noise_hangover;
01349   aerTraceConfig_t trace_cfg;
01355   tuint valid_bitfield_3;
01356 #define aer_CTL_VALID3_COH_HANGOVER      0x0001
01357 #define aer_CTL_VALID3_COH_RATIO_THRESH  0x0002
01358 #define aer_CTL_VALID3_COH_CNT_THRESH    0x0004
01359 #define aer_CTL_VALID3_HLC_THRESHOLD     0x0008
01360 #define aer_CTL_VALID3_HLC_RAMP_OUT_TC   0x0010
01361 #define aer_CTL_VALID3_HLC_POWER_TC      0x0020
01362 #define aer_CTL_VALID3_THRESH_RX_NLD     0x0040
01363 #define aer_CTL_VALID3_THRESH_NOISE_RX   0x0080
01364 #define aer_CTL_VALID3_THRESH_NOISE_TX   0x0100
01365 #define aer_CTL_VALID3_HANGOVER_RXTOTX   0x0200
01366 #define aer_CTL_VALID3_HANGOVER_TXTORX   0x0400
01367 #define aer_CTL_VALID3_TX_SLIM_MODE      0x0800
01368 #define aer_CTL_VALID3_RX_SLIM_MODE      0x1000
01369 #define aer_CTL_VALID3_NG_HANGOVER       0x2000
01370 #define aer_CTL_VALID3_NG_RAMPIN_PERIOD  0x4000
01371 #define aer_CTL_VALID3_NG_NOISE_LEVEL    0x8000
01372
01373   tint   coh_hangover;
01379   UFract coh_ratio_thresh;
01386   tint   coh_cnt_thresh;
01394   Fract  thresh_hlc;
01400   tint   ramp_out_tc_hlc;
01406   tint   power_tc_hlc;
01411   Fract  thresh_rx_nld;
01436   LFract thresh_rx_noise;
01444   LFract thresh_tx_noise;
01447   tint   hangover_rx_to_tx;
01453   tint   hangover_tx_to_rx;
01459   tint   tx_slim_mode;
01467   tint   rx_slim_mode;
01470   tint   hangover_ng;
01477   tint   rampin_period_ng;
01485   tint   noise_level_ng;
01495   tuint valid_bitfield_4;
01496 #define aer_CTL_VALID4_DT_THRESH      0x0001
01497 #define aer_CTL_VALID4_CLIP_SCALE     0x0002
01498 #define aer_CTL_VALID4_DT_HANGOVER    0x0004
01499
01500   tint   dt_thresh;
01509   tulong clip_scale_curve;
01520   tint dt_hangover;
01526 } aerControl_t;
01527
01528
01529
01539 #define aer_CNG_LEVEL_UPPER_LIMIT       0
01540 #define aer_CNG_LEVEL_LOWER_LIMIT   (-80)
01541 #define aer_FDNLP_DELAY_UPPER_LIMIT    6
01542 #define aer_FDNLP_DELAY_LOWER_LIMIT    3
01543 #define aer_FDNLP_BIN_LOWER_LIMIT      0
01544 #define aer_FDNLP_BIN_UPPER_LIMIT_8K  64
01546 #define aer_FDNLP_BIN_UPPER_LIMIT_16K 128
01549 #define aer_NR_NOISE_THR_LOWER_LIMIT (-80)
01550 #define aer_NR_NOISE_THR_UPPER_LIMIT (-40)
01551 #define aer_SLIM_MODE_UPPER_LIMIT      5
01553 #define aer_SLIM_MODE_LOWER_LIMIT      0
01558
01559
01566 typedef struct aerEventStats_s {
01567
01568   tint  num_reset_events;
01569   tint  num_howl_events;
01571   tint  num_coh_events;
01573   tint  num_sat_events;
01574   tint  num_rxgain_events;
01575   tint  num_txgain_events;
01576   tint  num_filter_updates;
01577   tint  num_dt_potential;
01578   tint  num_eqsat_events;
01581   tint  num_dt_detected;
01582   tint  num_bssat_events;
01585   tint  num_coh_potential;
01586 } aerEventStats_t;
01587
01595 typedef struct aerPiquaStats_s {
01596   Fract far_end_pow;
01597   Fract near_end_pow;
01598   Fract echo_removal_err_pow;
01599   Fract near_end_noise;
01600   Fract erl;
01601   tint erle;
01602 } aerPiquaStats_t;
01603
01622 typedef struct aerTailModel_s {
01623   tint  num_H_vec;
01625   tint  tail_length;
01626   Fract rx_ag;
01629   Fract tx_ag;
01631 } aerTailModel_t;
01632
01637 #define aer_NUM_WORDS_PER_H_VEC_8K  258
01638 #define aer_NUM_WORDS_PER_H_VEC_16K 514
01640
01641
01651 typedef struct aerDebugStat_s {
01652   tuint  control_bitfield0;
01654   tuint  control_bitfield1;
01656   tint   coherence_state;
01661   tint   path_select_state;
01670   tint   nguard_state;
01672   tuint  flag_bitfield0;
01677   tuint  flag_bitfield1;
01684   tint   tail_length;
01685   tuint  state_bitfield;
01690   tint   max_canc_l2;
01691   tint   curr_canc_l2;
01695   tint   curr_echo_loss_l2;
01697   linSample maxabs_error;
01698   linSample maxabs_pred_echo;
01700   Fract  gain_tx_digital;
01701   Fract  gain_rx_digital;
01702   Fract  gain_tx_analog;
01703   Fract  gain_rx_analog;
01704   Fract  nlp_linear_atten;
01706   tint   nlp_max_closs_target;
01708   tint   nlp_clip_agg_l2;
01709   tint   clip_level;
01710   tint   hangover_rx2tx;
01713   tint   hangover_tx2rx;
01716   Fract  nguard_atten;
01717   Fract  hlc_gain;
01718   LFract dt_thresh;
01720   LFract rx_sig_pwr;
01721   LFract rx_noise_pwr;
01722   LFract tx_pNLP_total_pwr;
01723   LFract tx_pNLP_sig_pwr;
01724   LFract tx_pNLP_noise_pwr;
01726   aerEventStats_t event_stats;
01727   aerPiquaStats_t piqua_stats;
01728   LFract clip_scale;
01729   LFract dt_ratio;
01730   tint   dt_hangover;
01731   Fract  nlp_linear_atten_tx;
01733   Fract  nlp_linear_atten_rx;
01735 } aerDebugStat_t;
01736
01743 typedef struct aerVersion_s {
01744   tuint  major;
01746   tuint  minor;
01748   tuint  patch;
01750   tuint  build;
01752   tuint  quality;
01760   tuint  btype;
01769 } aerVersion_t;
01770
01771
01772
01773
01774 /* ---------------------- AER EXTERNAL APIs ----------------------------------*/
01775
01776 /* aerinit.c */
01777
01797 tint aerCreate (aerCreateConfig_t *create_cfg);
01798
01857 tint aerGetSizes(tint *nbufs, const ecomemBuffer_t **bufs, aerSizeConfig_t *cfg);
01858
01891 tint aerNew (void **aerInst, tint nbufs, ecomemBuffer_t *bufs,
01892              aerNewConfig_t *cfg);
01893
01894
01895 /* aer.c */
01911 tint aerClose (void *aerInst);
01912
01944 tint aerControl (void *aerInst, aerControl_t *ctl);
01945
01971 tint aerDelete (void **aerInst, tint nbufs, ecomemBuffer_t *bufs);
01972
01973
02007 tint aerGetFilter (void *aerInst, aerTailModel_t *tail_model, Fract *coeff_mant,
02008                    tint *coeff_exp, tint start, tint length);
02009
02010 /* aer.c */
02055 tint aerPutFilter (void *aerInst, aerTailModel_t *tail_model, Fract *coeff_mant,
02056                    tint *coeff_exp, tint start, tint length, tbool flag_last_seg);
02057
02058
02071 tint aerGetGains (void *aerInst, tint *tx_dg_gain, tint *rx_dg_gain);
02072
02088 tint aerGetPerformance (void *aerInst, aerDebugStat_t *dbgstat, aerVersion_t
02089                         *version, tbool reset);
02090
02133 tint aerOpen (void *aerInst, aerConfig_t *cfg);
02134
02135
02136 /* aerrx.c */
02172 tint aerReceiveIn (void *aerInst, void *recv_in, void *recv_out, void *trace_buf);
02173
02174 /* aertx.c */
02219 tint aerSendIn (void *aerInst, void *send_in, void *send_out,
02220                 void *sout_8kHz, void *recv_out_sync, void *sout_pnlp_8kHz,
02221                 void *trace_buf);
02222
02223 /* aermmic.c */
02255 tint aerActivate (void *newActiveInst, void *oldActiveInst);
02256
02257
02258 /* -------------------------- AER Call Table -------------------------------- */
02265 typedef struct {
02266   tint  (*aerActivate)       (void *newActiveInst, void *oldActiveInst);
02267   tint  (*aerCreate)         (aerCreateConfig_t *create_cfg);
02268   tint  (*aerClose)          (void *aerInst);
02269   tint  (*aerControl)        (void *aerInst, aerControl_t *ctl);
02270   tint  (*aerDelete)         (void **aerInst, tint nbufs, ecomemBuffer_t *bufs);
02271   tint  (*aerGetFilter)      (void *aerInst, tint start, tint length, Fract
02272                               coeff[], tint *hscale_l2);
02273   tint  (*aerGetGains)       (void *aerInst, tint* tx_digital_gain, tint*
02274                               rx_digital_gain);
02275   tint  (*aerGetPerformance) (void *aerInst, aerDebugStat_t *dbgstat,
02276                               aerVersion_t *version, tbool reset);
02277   tint  (*aerGetSizes)       (tint *nbufs, const ecomemBuffer_t **bufs,
02278                               aerSizeConfig_t *cfg);
02279   tint  (*aerOpen)           (void *aerInst, aerConfig_t *cfg);
02280   tint  (*aerNew)            (void **aerInst, tint nbufs, ecomemBuffer_t *bufs,
02281                               aerNewConfig_t *cfg);
02282   tint  (*aerReceiveIn)      (void *aerInst, void *recv_in, void *recv_out,
02283                               void *trace_buf);
02284   tint  (*aerSendIn)         (void *aerInst, void *send_in, void *send_out,
02285                               void *send_out_8kHz, void *recv_out_sync,
02286                               void *sout_pnlp_8kHz, void *trace_buf);
02287   tint  (*aerPutFilter)      (void *aerInst, aerTailModel_t *tail_model,
02288                               Fract *coeff, tint start, tint length);
02289 } aerCallTable_t;
02290
02291 #endif  /* _AER_H */
02292 /* nothing past this point */


AER: AER Module

AER Module

Refer to AER Integration Guide for AER integration information, including MIPS and memory usage and optimization.

Refer to AER Module API for AER external API usage.

AER Module Feature Description

The AER module contains the implementation of Acoustic Echo Canceller (AEC), Transducer Equalization (EQ), High Level Compensation (HLC), Noise Guard (NG), Comfort Noise Generator (CNG), and Adaptive Spectral Noise Reduction (ASNR). AER can support handsfree, handset, headset and group listen modes. AER is compatible only with a 10 msec input and output.

Below is a block diagram of AER in a system with multiple hands-free microphones:

Below is a block diagram of AER in a system with a microphone array:

Acoustic Echo Canceller (AEC)

The AEC feature is designed to cancel acoustic echo and maximize the potential for full-duplex communication during the phone operation. It has a task of eliminating the unwanted acoustic echo from the send path while maintaining the high quality of duplex speakerphone performance. The AEC can operate on narrow-band (8 kHz sampling rate) and wide-band (16 kHz sampling rate) signals, or a combination of both.

The AEC is composed of the following funcional blocks:

  • Finite state machines: coordinating the adaptive algorithm operation and all other components within the AEC.
  • Adaptive filter: implementing the normalized LMS in frequency domain.
  • Bi-directional nonlinear processor (NLP): both send and receive direction have a nonlinear processor. In the send direction, the NLP follows the echo removal and is composed of a center clipper, a linear gain, CNG, ASNR, and a noise guard. It can operate in time domain (TDNLP) or frequency domain (FDNLP). The receive direction has a linear gain and always operates in time domain. The operation of the send NLP and the receive NLP is controlled by the finite state machines.
  • Digital gain units: to achieve the appropriate loudness rating. They are separate gain units from what are used within NLP.
  • Decimation/interpolation filters: to implemente the band split architecture.
  • Signal limiter: providing additional peak level control. It is available only for narrow-band operation.
  • Diagnostic support: providing performance and debug statistics, including voice quality.

Transducer Equalization (EQ)

The Transducer Equalization (EQ) is designed to correct for minor deficiencies in a transducer frequency response or the overall frequency response of the phone. The EQ applies a digital filter to the signal within the send or receive path. There are two instances of the EQ, one for each path respectively. Both EQ instances are fully independent and can be configured separately. The main purpose of the EQ is to condition the transducer frequency response.
  • Tx EQ: The equalization in the send path is applied before the decimation filters. Hence, it resides within the echo path. Its primary purpose is to improve the response and performance of the microphone when necessary and when possible. Since the Tx EQ resides within the echo path, care must be used when designing the filter to minimize the potential for saturation or excessive quantization noise. This is necessary to keep the adaptive filter in the AEC performing well.
  • Rx EQ: The equalization in receive path is applied after the interpolation filters prior to sending the signal out. Hence, it resides outside of the echo path. Its primary purpose is to modify the outgoing signal in such a way so that when played out at the speaker the acoustic frequency response and the characteristics would result in high audio quality as well as smooth speaker operation within the linear regimen.

High Level Compensation (HLC)

High Level Compensation (HLC) is designed to reduce the impact of high level signal transients that may arrive from the packet-network side and to minimize the unwanted signal distortion at the speaker. The HLC operates as a variable gain unit that applies attenuation whenever the incoming signal level crosses over the configured threshold. Once the signal drops below the threshold level, the HLC gradually removes the attenuation. The HLC does not apply gain to the incoming signal. Normally, the HLC does not affect the RLR. However, in some situations the HLC can be intentionally configured so it could impact the RLR measurements. The HLC and DRC should not be used at the same time.

Noise Guard (NG)

The Noise Guard (NG) is designed to reduce the signal level toward the packet network during silence to help the remote end break in when near end is exposed to high background noise levels.

Note: If both noise guard and CNG are enabled in the Tx direction at the same time, the NG may not reduce the noise level below the CNG level that is configured for the Tx direction.

Comfort Noise Generator (CNG)

The Comfort Noise Generator (CNG) is designed to provide either spectrum and level matched or a fixed level of comfort noise when the nonlinear processor (NLP) is active. The primary purpose of the CNG is masking the action of NLP. The secondary purpose of the CNG is to prevent a phone user from perceiving the connection as being dead or dropped. The CNG is implemented in both directions. The send direction CNG is active when the far end is dominant, based on the activity of the Tx NLP. Similarly, the receive direction CNG is active when the near end is dominant, based on the activity of the Rx NLP. The noise generated by the CNG is mixed with the signal. The mixing ratio is determined by the NLP activity.

Notes:

  • The spectral matching CNG is available only for the send path, i.e. within the Tx NLP, and it may be used only when Tx NLP is configured to operate in frequency domain (FDNLP is used). When TDNLP is used, it generates white noise at the configured level.
  • Receive path CNG always generates white noise at configured level.
  • CNG in Tx path is always narrow band (up to 4kHz).
  • CNG in Rx path may be narrow band or wideband depending on the sampling rate at Rx path output.

Adaptive Spectral Noise Reduction (ASNR)

The ASNR is designed to provide improvement of SNR within the send path. It is tightly integrated with the Tx NLP and Tx CNG. Only the stationary component of a background noise would be attenuated. Some minimal degradation of voice quality may be expected, especially during the initial estimation of background noise or when the background noise abruptly changes.

Notes:

  • In order to use ASNR, FDNLP has to be configured.
  • When both ASNR and NG are enabled, ASNR takes precedence over NG. It means that the attenuation requested by NG will not be applied if ASNR is enabled.


AER: agc.h File Reference

  • File List
  • Globals

agc.h File Reference

Detailed Description

Contains external API for the AGC component.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated ALL RIGHTS RESERVED

Definition in file agc.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/debug.h>

Include dependency graph for agc.h:

Go to the source code of this file.

Data Structures

struct | agcEvent_s
AGC event structure. It contains the event code and the associated parameters to be read or set by AGC eventOut function. It is one argument of AGC eventOut function passed to AGC by the user through agcCreateConfig_t and agcCreate(). More...
struct | agcCreateConfig_s
AGC create configuration structure which contains information to be shared by multiple AGC instances. It is used by function agcCreate(). More...
struct | agcSizeConfig_s
AGC size configuration structure used by function agcGetSizes(). It is also part of structure agcNewConfig_t. More...
struct | agcNewConfig_s
AGC configuration structure for creating a new AGC instance. It is used by function agcNew(). More...
struct | agcConfig_s
AGC configuration structure. It contains parameters needed to open an instance of AGC, and is used by function agcOpen(). More...
struct | agcVersion_s
AGC Version structure. More...
struct | agcDebugStat_s
AGC debug statistics data structure. More...
struct | agcAerData_s
Data structure to hold AER parameters needed by AGC. These parameters are provided by the user through agcControl() via control valid bit agc_CTL_VALID_AERDATA. More...
struct | agcModeControl_s
AGC operation modes control structure. Contains parameters needed to change AGC operational modes through function agcControl() via control valid bit agc_CTL_VALID_MODES. More...
struct | agcControl_s
AGC control data structure. It contains information to change operation of AGC through functin agcControl(). More...
struct | agcCallTable_t
AGC call table. More...

AGC sampling rates

AGC sampling rate definitions to set sampling_rate of agcConfig_t and max_sampling_rate of agcSizeConfig_t.

enum | { agc_SRATE_8K = 0, agc_SRATE_16K = 1 }
typedef tint | agcSrate_t

Defines

#define | agc_CTL_VALID_MICGAIN 0x0001
#define | agc_CTL_VALID_MICGAIN_ADAPT 0x0002
#define | agc_CTL_VALID_SPKGAIN 0x0004
#define | agc_CTL_VALID_AERDATA 0x0008
#define | agc_CTL_VALID_MODES 0x0010
#define | agc_CTL_VALID_SAT_THRESHOLD 0x0020
#define | agc_CTL_VALID_SAT_HANGOVER 0x0040
#define | agc_CTL_VALID_MIC_GAIN_MAX 0x0080
#define | agc_CTL_VALID_MIC_GAIN_MIN 0x0100
#define | agc_CTL_VALID_MICGAIN_SWING_MAX 0x0200
AGC control bitfield masks
Bitfield mask agc_CTL_MODES_XYZ to change AGC operation modes through agcControl(). Used to construct mask and value of agcModeControl_t.

    AGC control bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       enable AGC
                   0       disable AGC
        1          1       enable adaptive mode
                   0       disable adaptive mode
        2          1       clear everything and restart
                   0       do nothing
        3 - 15             RESERVED

#define | agc_CTL_MODES_ENABLE_AGC 0x0001
#define | agc_CTL_MODES_ENABLE_ADAPT 0x0002
#define | agc_CTL_MODES_CLEAR_ALL 0x0004
AGC reset bitfield masks
Bitfield mask agc_RESET_XYZ to reset AGC information through function agcOpen(). Used to construct reset_bitfield of agcConfig_t.

    AGC reset bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       perform a full reset
                   0       don't perform full reset
        1          1       clear signal power history
                   0       keep signal power history
        2          1       reset mic and speaker analog gains to default
                   0       keep mic and speaker analog gains
        3          1       reset cofigurable parameters except mic/speaker gains
                   0       keep cofigurable parameters
        4 - 15             RESERVED

#define | agc_RESET_FULL_RESET 0x0001
#define | agc_RESET_POWER_HIST 0x0002
#define | agc_RESET_MIC_SPK_GAINS 0x0004
#define | agc_RESET_OTHER_PARAMS 0x0008
AGC configuration valid bitfield masks
Bitfield mask agc_CFG_VALID_XYZ to configure AGC parameters through agcOpen(). Used to construct valid_bitfield of agcConfig_t.

    AGC config valid bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       configure sampling rate
                   0       don't configure sampling rate
        1 - 15             RESERVED

#define | agc_CFG_VALID_SAMP_RATE 0x0001
#define | agc_CFG_VALID_BITS_ALL_1 0x0001
AGC create configuration bitfield masks
Bitfield mask to construct config_bitfield of agcCreateConfig_t.

    AGC create bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       request support of multiple HF microphones
                   0       don't request support of multiple HF microphones
        0 - 15             RESERVED

#define | agc_CRT_MULT_MIC_MODE 0x0001

Typedefs

typedef agcEvent_s | agcEvent_t
AGC event structure. It contains the event code and the associated parameters to be read or set by AGC eventOut function. It is one argument of AGC eventOut function passed to AGC by the user through agcCreateConfig_t and agcCreate().
typedef agcCreateConfig_s | agcCreateConfig_t
AGC create configuration structure which contains information to be shared by multiple AGC instances. It is used by function agcCreate().
typedef agcSizeConfig_s | agcSizeConfig_t
AGC size configuration structure used by function agcGetSizes(). It is also part of structure agcNewConfig_t.
typedef agcNewConfig_s | agcNewConfig_t
AGC configuration structure for creating a new AGC instance. It is used by function agcNew().
typedef agcConfig_s | agcConfig_t
AGC configuration structure. It contains parameters needed to open an instance of AGC, and is used by function agcOpen().
typedef agcVersion_s | agcVersion_t
AGC Version structure.
typedef agcDebugStat_s | agcDebugStat_t
AGC debug statistics data structure.
typedef agcAerData_s | agcAerData_t
Data structure to hold AER parameters needed by AGC. These parameters are provided by the user through agcControl() via control valid bit agc_CTL_VALID_AERDATA.
typedef agcModeControl_s | agcModeControl_t
AGC operation modes control structure. Contains parameters needed to change AGC operational modes through function agcControl() via control valid bit agc_CTL_VALID_MODES.
typedef agcControl_s | agcControl_t
AGC control data structure. It contains information to change operation of AGC through functin agcControl().

Enumerations

AGC error codes
Error codes returned by AGC API functions.

enum {
agc_NOERR = 0, agc_ERR_NOTCREATED = 1, agc_ERR_NOMEMORY = 2, agc_ERR_NOTOPENED = 3,
agc_ERR_NOTCLOSED = 4, agc_ERR_INVALIDPAR = 5, agc_ERR_MEMBUFVECOVF = 6, agc_ERR_GAIN_REQ_NOT_SERVICED = 7,
agc_ERR_MIC_GAIN_DUPLICATE = 8
}
AGC event codes
AGC event codes for sending external message or request through eventOut function provided externally. Used to set event_code of structure agcEvent_t.

enum {
agc_EVC_SAT_FALSE = 0, agc_EVC_SAT_DETECTED = 1, agc_EVC_MGAIN_CHANGE = 2, agc_EVC_SGAIN_CHANGE = 3,
agc_EVC_GET_PRENLP_GAIN = 4, agc_EVC_SET_PRENLP_GAIN = 5
}

Functions

tint | agcCreate (agcCreateConfig_t *create_cfg)
This function provides system information that is shared among multiple instances of AGC.
Remarks:
Function agcCreate() must be called before any other AGC API function is called.

tint | agcGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, agcSizeConfig_t *cfg)
This function obtains memory requirements for an instance of AGC.
tint | agcNew (void **agcInst, tint nbufs, ecomemBuffer_t *bufs, agcNewConfig_t *cfg)
This function creates an instance of AGC and initializes the memory buffer pointers in the instance.
Remarks:
Function agcNew() must be called before agcOpen()is called.

tint | agcOpen (void *agcInst, agcConfig_t *cfg)
This function initializes and configures an AGC instance.
tint | agcControl (void *agcInst, agcControl_t *ctl)
This function enables or disables a type of AGC function or changes the value of a certain parameter.
tint | agcClose (void *agcInst)
This function closes the AGC instance identified by agcInst. It sets the state of AGC to CLOSED.
tint | agcDelete (void **agcInst, tint nbufs, ecomemBuffer_t *bufs)
This function deletes the AGC instance identified by agcInst. It clears the instance pointer to NULL and returns the addresses of the buffers used by this instance.
tint | agcGetPerformance (void *agcInst, agcDebugStat_t *dbgstat, agcVersion_t *version, tbool reset)
This function reports the AGC performance debug statistics.
tint | agcSendIn (void *agcInst, void *send_in)
This function performs send path processing. It only examines the data without changing it.

When adaptive mode is disabled, AGC will just monitor the signal saturation status, and report to system through the eventOut funtion provided by agcCreateConfig_t. If saturation is detected, the event will be agc_EVC_SAT_DETECTED, and if saturation stops, it will be agc_EVC_SAT_FALSE.

When adaptive mode is enabled, besides monitoring saturation, AGC will also try to request for microphone analog gain change to optimize the Tx path digital dynamic range to enhance AER performance. If the ADC output is persistently saturating, AGC will ask to lower the mic gain, and if the ADC output is persistently too low AGC will ask to increase the mic gain. During these mic gain changes the loudness of the Tx path, or SLR, is preserved by maintaining the sum of mic analog gain and AER Tx digital gain (or known as pre-NLP gain).

Define Documentation

#define agc_CTL_VALID_MICGAIN 0x0001

Inform AGC the mic analog gain. Initiated by user. Corresponding parameter:

  • mic_gain.

Definition at line 428 of file agc.h.

#define agc_CTL_VALID_MICGAIN_ADAPT 0x0002

Inform AGC the new mic analog gain as a result of servicing request by adaptive AGC. Corresponding parameter:

  • mic_gain
  • preNLP_enable
  • preNLP_gain Returned parameter:
  • preNLP_gain

Definition at line 432 of file agc.h.

#define agc_CTL_VALID_SPKGAIN 0x0004

Inform AGC the speaker gain. Corresponding parameter:

  • spk_gain

Definition at line 441 of file agc.h.

#define agc_CTL_VALID_AERDATA 0x0008

Provide AER data for AGC to do gain control. Corresponding parameter:

  • aer_data

Definition at line 444 of file agc.h.

#define agc_CTL_VALID_MODES 0x0010

Set AGC operation modes. Corresponding parameter:

  • modes

Definition at line 448 of file agc.h.

#define agc_CTL_VALID_SAT_THRESHOLD 0x0020

Set mic saturation detection threshold. Corresponding parameter:

  • sat_threshold

Definition at line 451 of file agc.h.

#define agc_CTL_VALID_SAT_HANGOVER 0x0040

Set mic saturation detection hangover. Corresponding parameter:

  • sat_hangover

Definition at line 455 of file agc.h.

#define agc_CTL_VALID_MIC_GAIN_MAX 0x0080

Set maximum mic gain. Corresponding parameter:

  • max_micgain

Definition at line 459 of file agc.h.

#define agc_CTL_VALID_MIC_GAIN_MIN 0x0100

Set minimum mic gain. Corresponding parameter:

  • min_micgain

Definition at line 462 of file agc.h.

#define agc_CTL_VALID_MICGAIN_SWING_MAX 0x0200

Set maximum gain swing. Corresponding parameter:

  • max_micgain_swing

Definition at line 465 of file agc.h.


AER: agc.h Source File

  • File List
  • Globals

agc.h

Go to the documentation of this file.
00001 #ifndef _AGC_H
00002 #define _AGC_H
00003
00012 /* System definitions and utilities */
00013 #include <ti/mas/types/types.h>               /* DSP types                    */
00014 #include <ti/mas/util/ecomem.h>               /* memory descriptor structure  */
00015 #include <ti/mas/util/debug.h>                /* for debug function prototype */
00016
00017 /* Define AGC Module as a master group in Doxygen format and add all AGC API
00018    definitions to this group. */
00035
00044 enum {
00045   agc_NOERR              = 0,
00046   agc_ERR_NOTCREATED     = 1,
00047   agc_ERR_NOMEMORY       = 2,
00048   agc_ERR_NOTOPENED      = 3,
00049   agc_ERR_NOTCLOSED      = 4,
00050   agc_ERR_INVALIDPAR     = 5,
00051   agc_ERR_MEMBUFVECOVF   = 6,
00052   agc_ERR_GAIN_REQ_NOT_SERVICED = 7,
00053   agc_ERR_MIC_GAIN_DUPLICATE    = 8
00056 };
00070 enum {
00071   agc_EVC_SAT_FALSE       = 0,
00072   agc_EVC_SAT_DETECTED    = 1,
00073   agc_EVC_MGAIN_CHANGE    = 2,
00074   agc_EVC_SGAIN_CHANGE    = 3,
00075   agc_EVC_GET_PRENLP_GAIN = 4,
00076   agc_EVC_SET_PRENLP_GAIN = 5
00077 };
00081
00111 #define agc_CTL_MODES_ENABLE_AGC    0x0001
00112 #define agc_CTL_MODES_ENABLE_ADAPT  0x0002
00113 #define agc_CTL_MODES_CLEAR_ALL     0x0004
00147 #define agc_RESET_FULL_RESET       0x0001
00148 #define agc_RESET_POWER_HIST       0x0002
00149 #define agc_RESET_MIC_SPK_GAINS    0x0004
00150 #define agc_RESET_OTHER_PARAMS     0x0008
00154
00155
00180 #define agc_CFG_VALID_SAMP_RATE    0x0001
00181 #define agc_CFG_VALID_BITS_ALL_1   0x0001
00210 #define agc_CRT_MULT_MIC_MODE  0x0001
00223 enum {
00224   agc_SRATE_8K  = 0,
00225   agc_SRATE_16K = 1
00226 };
00227
00228 typedef tint agcSrate_t;
00233
00255 typedef struct agcEvent_s{
00256   tint event_code;
00257   union {
00258     Fract analog_gain;
00259     Fract pNLPgain;
00260   }u;
00261 } agcEvent_t;
00262
00272 typedef struct agcCreateConfig_s{
00273   dbgInfo_t debugInfo;
00274   void (*eventOut)(void *handle, agcEvent_t *event);
00276   agcSrate_t max_sampling_rate;
00277   tuint config_bitfield;
00279 } agcCreateConfig_t;
00280
00287 typedef struct agcSizeConfig_s{
00288   tuint config_bitfield;
00289 } agcSizeConfig_t;
00290
00297 typedef struct agcNewConfig_s{
00298   void  *handle;
00299   agcSizeConfig_t sizeCfg;
00300 } agcNewConfig_t;
00301
00302
00309 typedef struct agcConfig_s {
00310   tuint reset_bitfield;
00316   tuint valid_bitfield;
00324   agcSrate_t sampling_rate;
00325 } agcConfig_t;
00326
00336 typedef struct agcVersion_s{
00337   tuint  major;
00338   tuint  minor;
00339   tuint  patch;
00340   tuint  build;
00341   tuint  quality;
00342   tuint  btype;
00343 } agcVersion_t;
00344
00351 typedef struct agcDebugStat_s{
00352   tuint control_bitfield;
00353   tuint flag_bitfield;
00354   tint  sat_threshold;
00355   tint  sat_hangover;
00356   tuint sat_cntr;
00357   tint  echo_clip_penalty;
00358   tint  ne_clip_cntr;
00359   tint  lo_dynamic_range_cntr;
00360   Fract echo_max_0;
00361   Fract echo_max_1;
00362   Fract echo_max_2;
00363   Fract echo_max_3;
00364   Fract ne_max_0;
00365   Fract ne_max_1;
00366   Fract ne_max_2;
00367   Fract ne_max_3;
00368   tint  glim_reach_cntr;
00371 } agcDebugStat_t;
00372
00373
00384 typedef struct agcAerData_s{
00385    LFract pecho_pwr;
00386    LFract Si_with_echo;
00387    LFract Si_minus_echo;
00388    Fract  maxabs_pecho;
00389    tbool  nlp_on;
00390    tint   log2_attn;
00391    tint   SWR;
00392    tint   SWS;
00393    tbool  TS;
00395    tint   XS;
00396    tint   XR;
00397 } agcAerData_t;
00398
00399
00407 typedef struct agcModeControl_s{
00408   tuint mask;
00409   tuint value;
00412 } agcModeControl_t;
00413
00426 typedef struct agcControl_s{
00427   tuint valid_bitfield;
00428 #define agc_CTL_VALID_MICGAIN           0x0001
00432 #define agc_CTL_VALID_MICGAIN_ADAPT     0x0002
00441 #define agc_CTL_VALID_SPKGAIN           0x0004
00444 #define agc_CTL_VALID_AERDATA           0x0008
00448 #define agc_CTL_VALID_MODES             0x0010
00451 #define agc_CTL_VALID_SAT_THRESHOLD     0x0020
00455 #define agc_CTL_VALID_SAT_HANGOVER      0x0040
00459 #define agc_CTL_VALID_MIC_GAIN_MAX      0x0080
00462 #define agc_CTL_VALID_MIC_GAIN_MIN      0x0100
00465 #define agc_CTL_VALID_MICGAIN_SWING_MAX 0x0200
00469   Fract mic_gain;
00475   tbool preNLP_enable;
00478   Fract preNLP_gain;
00487   Fract spk_gain;
00490   agcAerData_t aer_data;
00492   agcModeControl_t modes;
00494   tint  sat_threshold;
00497   tint  sat_hangover;
00500   Fract max_micgain;
00505   Fract min_micgain;
00510   Fract max_micgain_swing;
00520 } agcControl_t;
00521
00522
00523 /* Function Prototypes */
00524 /* AGC APIs */
00525
00526 /* agcinit.c */
00527
00544 tint agcCreate (agcCreateConfig_t *create_cfg);
00545
00562 tint agcGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, agcSizeConfig_t *cfg);
00563
00597 tint agcNew (void **agcInst, tint nbufs, ecomemBuffer_t *bufs,
00598              agcNewConfig_t *cfg);
00599
00600 /* agc.c */
00629 tint agcOpen (void *agcInst, agcConfig_t *cfg);
00630
00646 tint agcControl (void *agcInst, agcControl_t *ctl);
00647
00662 tint agcClose (void *agcInst);
00663
00690 tint agcDelete (void **agcInst, tint nbufs, ecomemBuffer_t *bufs);
00691
00692
00707 tint agcGetPerformance (void *agcInst, agcDebugStat_t *dbgstat,
00708                         agcVersion_t *version, tbool reset);
00709
00710 /* agctx.c */
00754 tint agcSendIn (void *agcInst, void *send_in);
00755
00756 /* Call Table */
00762 typedef struct{
00763   tint (*agcCreate)   (agcCreateConfig_t *create_cfg);
00764   tint (*agcGetSizes) (tint *nbufs, const ecomemBuffer_t **bufs,
00765                        agcSizeConfig_t *cfg);
00766   tint (*agcNew)      (void **agcInst, tint nbufs, ecomemBuffer_t *bufs,
00767                        agcNewConfig_t *cfg);
00768   tint (*agcOpen)     (void *agcInst, agcConfig_t *cfg);
00769   tint (*agcSendIn)   (void *agcInst, void *send_in);
00770   tint (*agcControl)  (void *agcInst, agcControl_t *ctl);
00771   tint (*agcClose)    (void *agcInst);
00772   tint (*agcDelete)   (void **agcInst, tint nbufs, ecomemBuffer_t *bufs);
00773   tint (*agcGetPerformance)(void *agcInst, agcDebugStat_t *dbgstat,
00774                             agcVersion_t *version, tbool reset);
00775 } agcCallTable_t;
00776
00777 #endif    /* _AGC_H */
00778
00779 /* nothing past this point */
00780


AER: AGC Module

AGC Module

The AGC (Automatic Gain Control) is designed to handle and control the gain changes within the phone that can directly affect the AEC performance.

See AGC Module API for AGC external API.

The AGC provides the following functionality:

  • Bookkeeping of analog gains that are used by the AEC which, together with AEC digital gains, define the loudness rating of the phone.
  • Detecing saturation at the microphone input and informing the external software of saturation status.
  • Automatic gain control of the send path gains in the following cases:
    • Reduction in analog microphone gain when the saturation due to excessive echo is detected or when a phone user speaks very loud for a long time period driving the microphone into saturation.
    • Reduction in analog microphone gain when the increase in analog speaker gain occurred and the microphone input was relatively large in the recent past.
    • Increase in analog microphone gain when a person using the phone speaks very softly or is far away from the phone for a long time period.

The automatic gain control only acts upon the send path (Tx) gains. AGC keeps the SLR constant within the margin of error, as determined by the analog codec and the precision of the digital gain units. The Tx analog gain is changed by the AGC, while the Tx digital gain change request is passed to the AEC when necessary.


AER: Data Structures

  • Data Structures
  • Data Fields

AER Data Structures

Here are the data structures with brief descriptions:
aerCallTable_t | AER call table
aerConfig_s | Configuration structure for aerOpen() This structure contains system parameters to configure an AER instance through aerOpen(). AER doesn't have default value for these parameters, and they must be set explicitly when aerOpen() is called the first time after aerNew(). After that, these prameters may also be changed through aerControl()
aerControl_s | AER control structure This structure is used to change AER configurable parameters and mode of operation through aerControl(). It has two elements, a control code to tell what to change, and a union of parameters to tell the value of the new parameter
aerCreateConfig_s | Configuration structure for aerCreate() This structure contains information to be shared by different AER instances. This structure is used by function aerCreate()
aerDebugStat_s AER debug information data structure. This structure contains debug information regarding AER operation. It is one of the arguments of function aerGetPerformance().
Remarks:
In the comments, elements of this structure are numbered in units of the size of type tint
aerEQConfig_s AER Bi-quad EQ configuration structure.This structure contains Bi-quad EQ configurations. It includes:
  • Total number of sections
  • Sections types.
    There are 4 different types of sections used in an EQ. Each type is encoded using 2 bits(aer_EQBQ_SECTION_TYPE_xx). A 16-bit bitmap is used to represent the types for all the sections in the EQ. The least significant 2 bits are used for the 1st section, the next 2 bits are used for the 2nd section and so on till bit 12&13 which are used for the last section. Bit 14 is used to indicate LP filter order. If 1, 2nd order LP filter is used. Otherwise, 1st order LP is used. Bit 15 is used to indicate HP filter order. If 1, 2nd order HP filter is used. Otherwise, 1st order HP is used.
  • Section parameters.
    Parameters are set in the order of sections. A LP or HP section has one parameter - alpha. A BP or BS section has three parameters and they are in the order of alpha, gamma and G. Implementation of LP/HP and BP/BS filters and the corresponding parameters are shown in the figure below. All section parameters are in Q15 format
aerEventStats_s | AER Statistics Structure. This structure contains statistical counters to monitor the occurrance of particular events in AER
aerInfo_s | AER information reporting structure This strucutre contains the parameters that AER needs to report to an outside ECO through eventOut() function provided by aerCreateConfig_s
aerModeControl_s | AER mode control structure. This structure is used to change AER operational modes through function aerControl() using control code aer_CTL_MODES_0 or aer_CTL_MODES_1. For example, to enable AER, enable update, and disable NLP would need to set the mask and value to:
aerNewConfig_s | Configuration structure for aerNew() This structure is used for creating a new AER instance through function aerNew()
aerPiquaStats_s | AER PIQUA Statistics Structure. This structure contains measurements necessary for PIQUA performance monitoring
aerSizeConfig_s | Configuration structure for aerGetSizes() This structure specifies the maximum filter length and maximum y to x delay. It also has a bitfield, which currently has only one bit to indicate whether FDNLP is requested. It is used by function aerGetSizes(). It is also part of structure aerNewConfig_s used by aerNew()
aerTailModel_s AER tail model save/load structure. This structure is used for saving or loading AER adaptive tail model, which are defined by:
  • the adaptive filter coefficients, mantissas and exponents,
  • number of active tail model segments (or H vectors),
  • length of tail model in units of sampling period, e.g. 125us for 8kHz and 62.5us for 16kHz.
  • the speaker and microphone analog gains
aerTraceConfig_s | AER tracing configuration structure. This structure is used to configure AER tracing options and obtain from AER the size of traced data based on the configuration. The control valid bit for configuring trace is aer_CTL_VALID2_TRACE_CONFIG
aerVersion_s | AER version structure This structure contains the version information of the AER software
agcAerData_s | Data structure to hold AER parameters needed by AGC. These parameters are provided by the user through agcControl() via control valid bit agc_CTL_VALID_AERDATA
agcCallTable_t | AGC call table
agcConfig_s | AGC configuration structure. It contains parameters needed to open an instance of AGC, and is used by function agcOpen()
agcControl_s | AGC control data structure. It contains information to change operation of AGC through functin agcControl()
agcCreateConfig_s | AGC create configuration structure which contains information to be shared by multiple AGC instances. It is used by function agcCreate()
agcDebugStat_s | AGC debug statistics data structure
agcEvent_s | AGC event structure. It contains the event code and the associated parameters to be read or set by AGC eventOut function. It is one argument of AGC eventOut function passed to AGC by the user through agcCreateConfig_t and agcCreate()
agcModeControl_s | AGC operation modes control structure. Contains parameters needed to change AGC operational modes through function agcControl() via control valid bit agc_CTL_VALID_MODES
agcNewConfig_s | AGC configuration structure for creating a new AGC instance. It is used by function agcNew()
agcSizeConfig_s | AGC size configuration structure used by function agcGetSizes(). It is also part of structure agcNewConfig_t
agcVersion_s | AGC Version structure
bfCallTable_t | BF call table
bfConfig_s | Configuration structure for bfOpen() This structure contains system parameters to configure a BF instance through bfOpen(). BF doesn't have default value for these parameters, and they must be set explicitly when bfOpen() is called the first time after bfNew()
bfControl_s | Control structure for bfControl()This structure is used to change BF configurable parameters. Element bfControl_s.valid_bitfield indicates which parameter to be changed, and following elements give the parameter values
bfCtlCfg_s | BF control configuration bitfield
bfDebugStat_s
bfNewConfig_s | Configuration structure for bfNew() This structure is used for creating a new BF instance through function bfNew()
bfSizeConfig_s | Configuration structure for bfGetSizes() This structure is used for getting memory requirements of BF module through function bfGetSizes()
drcBandCfg_s | The DRC per band configurations. This structure specifies per band configurations through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}
drcBandParam_s | The configured DRC band parameters. This structure holds the DRC band parameters reported through drcGetParameter()
drcCallTable_t | DRC call table
drcControl_s | DRC control data structure. This structure contains parameters needed to control DRC parameters and mode of operation used in drcControl()
drcCreateConfig_t | DRC create structure which contains information to be shared by different DRC instances through drcCreate()
drcCurveParam_s | The DRC gain curve configuration structure. This structure specifies DRC gain curve configuration parameters. The parameters are set in drcBandCfg_t through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}
drcLimiterCfg_s | DRC Limiter configuration structure. This structure specifies DRC Limiter configuration parameters through drcControl() with drc_CTL_SET_LIMITER
drcLimParam_s | The configured DRC limiter parameters. This structure holds the DRC limiter parameters reported through drcGetParameter()
drcNewConfig_t | DRC new configuration structure. This contains parameters needed at the creation of a DRC instance through drcNew()
drcOpenConfig_s | DRC system/band independent configuration structure. This structure specifies DRC band independent configuration parameters used in drcOpen()
drcReportParam_s | The DRC parameters reported upon getParameter request. This structure specifies DRC parameters reported upon getParameter request through drcGetParameter()
drcSizeConfig_s | DRC size configuration structure. This structure specifies the parameters in drcGetSize() and drcNew()
mssCallTable_t | MSS call table
mssConfig_s | Configuration structure for mssOpen() This structure contains system parameters to configure an MSS instance through mssOpen(). MSS doesn't have default value for these parameters, and they must be set explicitly when mssOpen() is called the first time after mssNew()
mssNewConfig_s | Configuration structure for mssNew() This structure is used for creating a new MSS instance through function mssNew()
mssSizeConfig_s | Configuration structure for mssGetSizes() This structure is used for getting memory requirements of MSS through function mssGetSizes()
mssSrc_s | Source structure used to manually select a source


AER: bf.h File Reference

  • File List
  • Globals

bf.h File Reference

Detailed Description

Contains external API for BeamForming (BF) module.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated ALL RIGHTS RESERVED

Definition in file bf.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for bf.h:

Go to the source code of this file.

Data Structures

struct | bfSizeConfig_s
Configuration structure for bfGetSizes() This structure is used for getting memory requirements of BF module through function bfGetSizes(). More...
struct | bfNewConfig_s
Configuration structure for bfNew() This structure is used for creating a new BF instance through function bfNew(). More...
struct | bfConfig_s
Configuration structure for bfOpen() This structure contains system parameters to configure a BF instance through bfOpen(). BF doesn't have default value for these parameters, and they must be set explicitly when bfOpen() is called the first time after bfNew(). More...
struct | bfCtlCfg_s
BF control configuration bitfield. More...
struct | bfControl_s
Control structure for bfControl()This structure is used to change BF configurable parameters. Element bfControl_s.valid_bitfield indicates which parameter to be changed, and following elements give the parameter values. More...
struct | bfDebugStat_s
struct | bfCallTable_t
BF call table. More...

Defines

#define | bf_MAX_SUPPORTED_NUM_MICS 16
#define | bf_MAX_SUPPORTED_FILT_LEN 64
#define | bf_CTL_CONFIG 0x0001
#define | bf_CTL_MICS 0x0002
#define | bf_CTL_RESET 0x0004
#define | bf_DEBUG_STATE_NUM_TUINT 16
BF debug structure This structure is used to provide BF debugging information.
#define | bf_CTL_CFG_ENABLE 0x0001
#define | bf_CTL_CFG_OPERATION 0x0006

Typedefs

typedef bfSizeConfig_s | bfSizeConfig_t
Configuration structure for bfGetSizes() This structure is used for getting memory requirements of BF module through function bfGetSizes().
typedef bfNewConfig_s | bfNewConfig_t
Configuration structure for bfNew() This structure is used for creating a new BF instance through function bfNew().
typedef bfConfig_s | bfConfig_t
Configuration structure for bfOpen() This structure contains system parameters to configure a BF instance through bfOpen(). BF doesn't have default value for these parameters, and they must be set explicitly when bfOpen() is called the first time after bfNew().
typedef bfCtlCfg_s | bfCtlCfg_t
BF control configuration bitfield.
typedef bfControl_s | bfControl_t
Control structure for bfControl()This structure is used to change BF configurable parameters. Element bfControl_s.valid_bitfield indicates which parameter to be changed, and following elements give the parameter values.
typedef bfDebugStat_s | bfDebugStat_t

Enumerations

enum | { bf_FG_BF = 1 }
enum | { bf_DISABLE = 0, bf_ENABLE = 1 }
enum | { bf_OPT_NORMAL = 0, bf_OPT_BYPASS = 2, bf_OPT_SUBSET = 4, bf_OPT_ERROR = 6 }
BF Error Codes
Error codes returned by BF API functions.

enum {
bf_NOERR = 0, bf_ERR_NOMEMORY = 1, bf_ERR_NOTOPENED = 2, bf_ERR_DISABLED = 3,
bf_ERR_NOTCLOSED = 4, bf_ERR_INVALIDPAR = 5, bf_ERR_INVALIDSRC = 6, bf_ERR_INVALIDOPT = 7,
bf_ERR_INVALIDBUF = 8, bf_ERR_FILTNOCOEF = 9
}
BF sampling rates
Sampling rates that are supported by BF module.

enum | { bf_SAMP_RATE_8K = 1, bf_SAMP_RATE_16K = 2 }
BF type
Beamforming types that are supported by BF module.

enum | { bf_TYPE_FIXED = 1 }

Functions

tint | bfGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, bfSizeConfig_t *cfg)
Function bfGetSizes() obtains from BF the memory requirements of an instance, which depend on provided configuration parameters.
tint | bfNew (void **bfInst, tint nbufs, ecomemBuffer_t *bufs, bfNewConfig_t *cfg)
Function bfNew() creates a new instance of BF.
Remarks:
Function bfNew() must be called before bfOpen()is called.

tint | bfOpen (void *bfInst, bfConfig_t *cfg)
Function bfOpen() initializes and configures a BF instance.
tint | bfControl (void *bfInst, bfControl_t *ctl)
Function bfControl() changes BF operation modes or parameters.
tint | bfGetFilter (void *bfInst, Fract *coeff, tint *filter_length, tint filter_type, tint mic_index)
Function bfGetFilter() gets FIR filter coefficients for a given mic.
tint | bfPutFilter (void *bfInst, Fract *coeff, tint filter_type, tint mic_index, tint filter_length)
Function bfPutFilter() loads FIR filters for beamforming.
tint | bfProcess (void *bfInst, void *mics_in[], void *out)
Function bfProcess() processes input microphone signals according to the operation mode configured by bfControl().
tint | bfDebugStat (void *bfInst, bfDebugStat_t *bfDbg)
Function bfDebugStat() returns debug information.
tint | bfClose (void *bfInst)
Function bfClose() closes a BF instance.
Remarks:
Function bfClose() must be called before bfDelete() is called.

tint | bfDelete (void **bfInst, tint nbufs, ecomemBuffer_t *bufs)
Function bfDelete() deletes the BF instance identified by bfInst and returns the addresses of the buffers used by this instance.

Define Documentation

#define bf_CTL_CFG_ENABLE 0x0001

Bit 0 : BF Enable mask

Definition at line 218 of file bf.h.

#define bf_CTL_CFG_OPERATION 0x0006

Bits 1:2 : Operation mode mask

Definition at line 219 of file bf.h.

#define bf_CTL_CONFIG 0x0001

Use config structure to configure BF

Definition at line 263 of file bf.h.

#define bf_CTL_MICS 0x0002

Use mics bitfield to select active mics

Definition at line 264 of file bf.h.

#define bf_CTL_RESET 0x0004

Reset delay lines and all internal state status, debug stats, etc.

Definition at line 265 of file bf.h.

Typedef Documentation

typedef struct bfDebugStat_s bfDebugStat_t


AER: bf.h Source File

  • File List
  • Globals

bf.h

Go to the documentation of this file.
00001 #ifndef _BF_H
00002 #define _BF_H
00003
00012 #include <ti/mas/types/types.h>
00013 #include <ti/mas/util/ecomem.h>               /* memory descriptor structure */
00014
00015 /* Define BF Module as a master group in Doxygen format and add all BF API
00016    definitions to this group. */
00033
00043 enum {
00044   bf_NOERR          = 0,
00045   bf_ERR_NOMEMORY   = 1,
00046   bf_ERR_NOTOPENED  = 2,
00047   bf_ERR_DISABLED   = 3,
00048   bf_ERR_NOTCLOSED  = 4,
00049   bf_ERR_INVALIDPAR = 5,
00050   bf_ERR_INVALIDSRC = 6,
00051   bf_ERR_INVALIDOPT = 7,
00052   bf_ERR_INVALIDBUF = 8,
00053   bf_ERR_FILTNOCOEF = 9
00054 };
00067 enum {
00068   bf_SAMP_RATE_8K  = 1,
00069   bf_SAMP_RATE_16K = 2
00070 };
00081 #define bf_MAX_SUPPORTED_NUM_MICS  16
00082 #define bf_MAX_SUPPORTED_FILT_LEN  64
00095 enum {
00096   bf_TYPE_FIXED     = 1
00097 };
00107 enum {
00108   bf_FG_BF      = 1
00109 };
00112
00120 typedef struct bfSizeConfig_s {
00121   tint max_sampling_rate;
00123   tint max_num_mics;
00126   tint max_filter_length;
00129   tint bf_type;
00130 } bfSizeConfig_t;
00131
00139 typedef struct bfNewConfig_s {
00140   void  *handle;
00141   bfSizeConfig_t  sizeCfg;
00142 } bfNewConfig_t;
00143
00155 typedef struct bfConfig_s {
00156   tint  sampling_rate;
00159   tint  num_mics;
00160 } bfConfig_t;
00161
00214 typedef struct bfCtlCfg_s {
00215   tuint mask;
00216   tuint value;
00218 #define bf_CTL_CFG_ENABLE     0x0001
00219 #define bf_CTL_CFG_OPERATION  0x0006
00221 } bfCtlCfg_t;
00222
00228 enum {
00229   bf_DISABLE = 0,
00230   bf_ENABLE  = 1
00231 };
00243 enum {
00244   bf_OPT_NORMAL    = 0,
00245   bf_OPT_BYPASS    = 2,
00246   bf_OPT_SUBSET    = 4,
00247   bf_OPT_ERROR     = 6
00248 };
00261 typedef struct bfControl_s {
00262     tuint       valid_bitfield;
00263 #define bf_CTL_CONFIG  0x0001
00264 #define bf_CTL_MICS    0x0002
00265 #define bf_CTL_RESET   0x0004
00267     bfCtlCfg_t  config;
00268     tuint       mics;
00269 } bfControl_t;
00270
00278 #define bf_DEBUG_STATE_NUM_TUINT 16
00279 typedef struct bfDebugStat_s {
00280   tuint  sys_bits;
00283   tint   num_mics;
00284   tuint  act_mics;
00287   tuint  flags_filt_loaded;
00290   tint   sampling_rate;
00291   tint   frame_len;
00292   tint   filter_len;
00293 } bfDebugStat_t;
00294
00295
00318 tint bfGetSizes(tint *nbufs, const ecomemBuffer_t **bufs, bfSizeConfig_t *cfg);
00319
00352 tint bfNew (void **bfInst, tint nbufs, ecomemBuffer_t *bufs, bfNewConfig_t *cfg);
00353
00391 tint bfOpen (void *bfInst, bfConfig_t *cfg);
00392
00409 tint bfControl (void *bfInst, bfControl_t *ctl);
00410
00432 tint bfGetFilter (void *bfInst, Fract *coeff, tint *filter_length,
00433                   tint filter_type, tint mic_index);
00434
00473 tint bfPutFilter (void *bfInst, Fract *coeff, tint filter_type, tint mic_index,
00474                   tint filter_length);
00475
00512 tint bfProcess(void *bfInst, void *mics_in[], void *out);
00513
00527 tint bfDebugStat(void *bfInst, bfDebugStat_t *bfDbg);
00528
00542 tint bfClose(void *bfInst);
00543
00572 tint bfDelete(void **bfInst, tint nbufs, ecomemBuffer_t *bufs);
00573
00574
00575 /* -------------------------- BF Call Table -------------------------------- */
00582 typedef struct {
00583   tint  (*bfClose)     (void *bfInst);
00584   tint  (*bfControl)   (void *bfInst, bfControl_t *ctl);
00585   tint  (*bfDelete)    (void **bfInst, tint nbufs, ecomemBuffer_t *bufs);
00586   tint  (*bfGetSizes)  (tint *nbufs, const ecomemBuffer_t **bufs,
00587                         bfSizeConfig_t *cfg);
00588   tint  (*bfNew)       (void **bfInst, tint nbufs, ecomemBuffer_t *bufs,
00589                         bfNewConfig_t *cfg);
00590   tint  (*bfOpen)      (void *bfInst, bfConfig_t *cfg);
00591   tint  (*bfPutFilter) (void *bfInst, Fract *coeff, tint filter_type,
00592                         tint mic_index, tint filter_length);
00593   tint  (*bfGetFilter) (void *bfInst, Fract *coeff, tint *filter_length,
00594                         tint filter_type, tint mic_index);
00595   tint  (*bfProcess)   (void *bfInst, void *mics_in[], void *out);
00596 } bfCallTable_t;
00597
00598 #endif
00599 /* nothing past this point */
00600


AER: BF Module

BF Module

The Beamforming (BF) module implements a delay-and-sum fixed beamformer. BF reduces near end noise level and thus increases the signal-to-noise ratio before the adaptive filter, which helps the echo canceller converge deeper. BF can also reduce high frequency nonlinear echo. The combining effect would be improved duplex performance. In addition, attenuation on near end noise by BF allows to configure the ASNR less aggressively and thus reduce potential speech distortion. Refer to AER Module for the block diagram of AER and BF operating together.

See BF Module API for BF external API.


AER: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


AER: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which doxygen parses to generate the main
00003  * documentation page
00004  */
00005


AER: drc.h File Reference

  • File List
  • Globals

drc.h File Reference

Detailed Description

Contains definitions and external APIs for DRC.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated ALL RIGHTS RESERVED

Definition in file drc.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/util/debug.h>

Include dependency graph for drc.h:

Go to the source code of this file.

Data Structures

struct | drcCurveParam_s
The DRC gain curve configuration structure. This structure specifies DRC gain curve configuration parameters. The parameters are set in drcBandCfg_t through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}. More...
struct | drcBandCfg_s
The DRC per band configurations. This structure specifies per band configurations through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}. More...
struct | drcLimiterCfg_s
DRC Limiter configuration structure. This structure specifies DRC Limiter configuration parameters through drcControl() with drc_CTL_SET_LIMITER. More...
struct | drcControl_s
DRC control data structure. This structure contains parameters needed to control DRC parameters and mode of operation used in drcControl(). More...
struct | drcOpenConfig_s
DRC system/band independent configuration structure. This structure specifies DRC band independent configuration parameters used in drcOpen(). More...
struct | drcBandParam_s
The configured DRC band parameters. This structure holds the DRC band parameters reported through drcGetParameter(). More...
struct | drcLimParam_s
The configured DRC limiter parameters. This structure holds the DRC limiter parameters reported through drcGetParameter(). More...
struct | drcReportParam_s
The DRC parameters reported upon getParameter request. This structure specifies DRC parameters reported upon getParameter request through drcGetParameter(). More...
struct | drcCreateConfig_t
DRC create structure which contains information to be shared by different DRC instances through drcCreate(). More...
struct | drcSizeConfig_s
DRC size configuration structure. This structure specifies the parameters in drcGetSize() and drcNew(). More...
struct | drcNewConfig_t
DRC new configuration structure. This contains parameters needed at the creation of a DRC instance through drcNew(). More...
struct | drcCallTable_t
DRC call table. More...

Defines

#define | drc_FIR_HALF_COEF_8KHZ 9
#define | drc_FIR_HALF_COEF_16KHZ 17
DRC sampling rates
Sampling rates that are supported by DRC and set in drcOpen().

See System Configuration Parameters

See also:
drcOpenConfig_t

#define | drc_SAMP_RATE_8K 1
#define | drc_SAMP_RATE_16K 2

Typedefs

typedef drcCurveParam_s | drcCurveParam_t
The DRC gain curve configuration structure. This structure specifies DRC gain curve configuration parameters. The parameters are set in drcBandCfg_t through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.
typedef drcBandCfg_s | drcBandCfg_t
The DRC per band configurations. This structure specifies per band configurations through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.
typedef drcLimiterCfg_s | drcLimiterCfg_t
DRC Limiter configuration structure. This structure specifies DRC Limiter configuration parameters through drcControl() with drc_CTL_SET_LIMITER.
typedef drcControl_s | drcControl_t
DRC control data structure. This structure contains parameters needed to control DRC parameters and mode of operation used in drcControl().
typedef drcOpenConfig_s | drcOpenConfig_t
DRC system/band independent configuration structure. This structure specifies DRC band independent configuration parameters used in drcOpen().
typedef drcBandParam_s | drcBandParam_t
The configured DRC band parameters. This structure holds the DRC band parameters reported through drcGetParameter().
typedef drcLimParam_s | drcLimParam_t
The configured DRC limiter parameters. This structure holds the DRC limiter parameters reported through drcGetParameter().
typedef drcReportParam_s | drcReportParam_t
The DRC parameters reported upon getParameter request. This structure specifies DRC parameters reported upon getParameter request through drcGetParameter().
typedef drcSizeConfig_s | drcSizeConfig_t
DRC size configuration structure. This structure specifies the parameters in drcGetSize() and drcNew().

Enumerations

DRC error codes
Error codes returned by DRC API.

enum {
drc_NOERR = 0, drc_ERR_NOMEMORY = 1, drc_ERR_CREATED = 2, drc_ERR_NOTCREATED = 3,
drc_ERR_NOTOPENED = 4, drc_ERR_NOTCLOSED = 5, drc_ERR_INVALIDPAR = 6, drc_ERR_MEMBUFVECOVF = 7,
drc_ERR_INVALIDCFGBITS = 8, drc_ERR_INVALIDFIR = 9, drc_ERR_INVALIDSRATE = 10
}
DRC Operation Mode bitfield is used to set DRC operation mode/state.
The constants used in drcOpen(), drcControl() with control code drc_CTL_SET_CFGBITS and drcGetParameter() with get code drc_GET_CFGBITS

See System Configuration Parameters

enum {
drc_CFGBITS_FBAND = 0, drc_CFGBITS_LBAND = 1, drc_CFGBITS_MBAND = 2, drc_CFGBITS_HBAND = 3,
drc_CFGBITS_LIM = 4, drc_CFGBITS_VAD = 5
}
DRC valid bitfield used in drc_CTL_SET_XXX_BAND operation.
Bit field to select parameters to be configured through drc_CTL_SET_XXX_BAND operation in drcControl().

See also:
drcBandCfg_t

enum | { drc_BAND_CFG_VALID_LEV_TC_BIT = 0, drc_BAND_CFG_VALID_GAIN_TC_BIT = 1, drc_BAND_CFG_VALID_CURVE_PARAM_BIT = 2 }
DRC configuration valid bitfield used in drc_CTL_SET_LIMITER operation.
Bit field to select parameters to be configured through drc_CTL_SET_LIMITER in drcControl().

See also:
drcLimiterCfg_t

enum | { drc_LIM_CFG_VALID_LEV_TC_BIT = 0, drc_LIM_CFG_VALID_GAIN_TC_BIT = 1, drc_LIM_CFG_VALID_THRESH_BIT = 2, drc_LIM_CFG_VALID_DELAY_BIT = 3 }
DRC control operation code.
Constants drc_CTL_XXX to change DRC operation modes through drcControl().

See also:
drcControl_t

enum {
drc_CTL_DRC_ON = 1, drc_CTL_DRC_OFF = 2, drc_CTL_SET_BITS = 3, drc_CTL_SET_FBAND = 4,
drc_CTL_SET_LBAND = (drc_CTL_SET_FBAND+1), drc_CTL_SET_MBAND = (drc_CTL_SET_FBAND+2), drc_CTL_SET_HBAND = (drc_CTL_SET_FBAND+3), drc_CTL_SET_LIM = 8,
drc_CTL_SET_FIR_LBAND = 9, drc_CTL_SET_FIR_MBAND = (drc_CTL_SET_FIR_LBAND+1), drc_CTL_SET_FIR_HBAND = (drc_CTL_SET_FIR_LBAND+2)
}
DRC get parameter operation code.
Constants drc_GET_XXX are used to select which set of DRC parameters to be reported to HOST through drcGetParameter().

See also:
drcReportParam_t

enum {
drc_GET_CFGBITS = 1, drc_GET_FBAND_PARAM = 2, drc_GET_LBAND_PARAM = (drc_GET_FBAND_PARAM+1), drc_GET_MBAND_PARAM = (drc_GET_FBAND_PARAM+2),
drc_GET_HBAND_PARAM = (drc_GET_FBAND_PARAM+3), drc_GET_LIM_PARAM = 6, drc_GET_LBAND_FIR_COEF = 7, drc_GET_MBAND_FIR_COEF = (drc_GET_LBAND_FIR_COEF+1),
drc_GET_HBAND_FIR_COEF = (drc_GET_LBAND_FIR_COEF+2)
}

Functions

tint | drcCreate (drcCreateConfig_t *create_cfg)
Function drcCreate() provides DRC with the system information that is shared among multiple instances.
tint | drcGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, drcSizeConfig_t *cfg)
Function drcGetSizes() obtains from DRC the memory requirements of an instance, which depend on provided configuration parameters.
tint | drcNew (void **drcInst, tint nbufs, ecomemBuffer_t *bufs, drcNewConfig_t *cfg)
This function creates an instance of DRC and initializes the memory buffer pointers in the instance and drcContext.
tint | drcClose (void *drcInst)
Function drcClose() closes the DRC instance identified by drcInst.
tint | drcControl (void *drcInst, drcControl_t *ctl)
Function drcControl() enables or disables a type of DRC function or changes the value of a certain parameter.
tint | drcDelete (void **drcInst, tint nbufs, ecomemBuffer_t *bufs)
Function drcDelete() deletes the DRC instance identified by drcInst and returns the addresses of those buffers used by this instance.
tint | drcGetParameter (void *drcInst, tint get_code, drcReportParam_t *param)
This function reports the DRC performance debug statistics and the version information.
tint | drcOpen (void *drcInst, drcOpenConfig_t *cfg)
Function drcOpen() initializes and configures an DRC instance.
tint | drcProcess (void *drcInst, void *sin, void *sout)
It performs compressor and limiter processing. The input samples are passed in through sin pointer in linSample type. The output samples are placed to the buffer pointed by sout in linSample type.


AER: drc.h Source File

  • File List
  • Globals

drc.h

Go to the documentation of this file.
00001 #ifndef _DRC_H
00002 #define _DRC_H
00003
00012 /* System include files and utilities' APIs */
00013 #include <ti/mas/types/types.h>               /* DSP types                   */
00014 #include <ti/mas/util/ecomem.h>               /* memory descriptor structure */
00015 #include <ti/mas/util/debug.h>                /* debug structure defines     */
00016
00017 /*  DRC API definition group. */
00044 enum {
00045   drc_NOERR            = 0,
00046   drc_ERR_NOMEMORY     = 1,
00047   drc_ERR_CREATED      = 2,
00048   drc_ERR_NOTCREATED   = 3,
00049   drc_ERR_NOTOPENED    = 4,
00050   drc_ERR_NOTCLOSED    = 5,
00051   drc_ERR_INVALIDPAR   = 6,
00052   drc_ERR_MEMBUFVECOVF = 7,
00053   drc_ERR_INVALIDCFGBITS=8,
00054   drc_ERR_INVALIDFIR   = 9,
00055   drc_ERR_INVALIDSRATE= 10
00057 };
00058 /* @} */
00071 /* @{ */
00072 enum {
00073   drc_CFGBITS_FBAND       = 0,
00074   drc_CFGBITS_LBAND       = 1,
00075   drc_CFGBITS_MBAND       = 2,
00076   drc_CFGBITS_HBAND       = 3,
00077   drc_CFGBITS_LIM         = 4,
00078   drc_CFGBITS_VAD         = 5
00079 };
00080 /* @} */
00093 typedef struct drcCurveParam_s {
00094   tint  exp_knee;
00095   tuint ratios;
00102   tint  max_amp;
00103   tint  com_knee;
00104   tint  energy_lim;
00105 } drcCurveParam_t;
00118 /* @{ */
00119 enum {
00120   drc_BAND_CFG_VALID_LEV_TC_BIT      = 0,
00121   drc_BAND_CFG_VALID_GAIN_TC_BIT     = 1,
00122   drc_BAND_CFG_VALID_CURVE_PARAM_BIT = 2
00123 };
00124 /* @} */
00136 typedef struct drcBandCfg_s {
00137   tuint valid_bitfield;
00139   tuint tc_log2;
00158   drcCurveParam_t curve;
00159 } drcBandCfg_t;
00160 /* @} */
00161
00173 /* @{ */
00174 enum {
00175   drc_LIM_CFG_VALID_LEV_TC_BIT  = 0,
00176   drc_LIM_CFG_VALID_GAIN_TC_BIT = 1,
00177   drc_LIM_CFG_VALID_THRESH_BIT  = 2,
00178   drc_LIM_CFG_VALID_DELAY_BIT   = 3
00179 };
00180 /* @} */
00192 typedef struct drcLimiterCfg_s {
00193   tuint valid_bitfield;
00195   tuint tc_log2;
00215   Fract thresh_dBm;
00216   tint  delay_len;
00223 } drcLimiterCfg_t;
00224 /* @} */
00225
00240 /* @{ */
00241 #define drc_FIR_HALF_COEF_8KHZ   9
00242 #define drc_FIR_HALF_COEF_16KHZ  17
00243 /* @} */
00244
00256 /* @{ */
00257 enum {
00258   drc_CTL_DRC_ON        = 1,
00259   drc_CTL_DRC_OFF       = 2,
00260   drc_CTL_SET_BITS      = 3,
00261   drc_CTL_SET_FBAND     = 4,
00263   drc_CTL_SET_LBAND
00264     = (drc_CTL_SET_FBAND+1),
00265   drc_CTL_SET_MBAND
00266     = (drc_CTL_SET_FBAND+2),
00267   drc_CTL_SET_HBAND
00268     = (drc_CTL_SET_FBAND+3),
00270   drc_CTL_SET_LIM       = 8,
00272   drc_CTL_SET_FIR_LBAND = 9,
00273   drc_CTL_SET_FIR_MBAND
00274     = (drc_CTL_SET_FIR_LBAND+1),
00275   drc_CTL_SET_FIR_HBAND
00276     = (drc_CTL_SET_FIR_LBAND+2)
00277 };
00278 /* @} */
00289 typedef struct drcControl_s {
00290   tint ctl_code;
00291   union {
00292     tuint cfgbits;
00293     drcBandCfg_t band;
00294     drcLimiterCfg_t limiter;
00295     Fract coef[drc_FIR_HALF_COEF_16KHZ];
00296   }u;
00297 } drcControl_t;
00298
00309 /* @{ */
00310 #define drc_SAMP_RATE_8K   1
00311 #define drc_SAMP_RATE_16K  2
00312 /* @} */
00313
00323 typedef struct drcOpenConfig_s   {
00324   tuint          cfgbits;
00325   tint           samp_rate;
00326 } drcOpenConfig_t;
00327
00337 typedef struct drcBandParam_s {
00338   tuint tc_log2;
00348   drcCurveParam_t curve;
00349 } drcBandParam_t;
00350
00360 typedef struct drcLimParam_s {
00361   tuint tc_log2;
00362   Fract thresh_dBm;
00363   tint  delay_len;
00364 } drcLimParam_t;
00365
00377 /* @{ */
00378 enum {
00379   drc_GET_CFGBITS        = 1,
00380   drc_GET_FBAND_PARAM    = 2,
00382   drc_GET_LBAND_PARAM
00383     = (drc_GET_FBAND_PARAM+1),
00384   drc_GET_MBAND_PARAM
00385     = (drc_GET_FBAND_PARAM+2),
00386   drc_GET_HBAND_PARAM
00387     = (drc_GET_FBAND_PARAM+3),
00389   drc_GET_LIM_PARAM      = 6,
00391   drc_GET_LBAND_FIR_COEF = 7,
00392   drc_GET_MBAND_FIR_COEF
00393     = (drc_GET_LBAND_FIR_COEF+1),
00394   drc_GET_HBAND_FIR_COEF
00395     = (drc_GET_LBAND_FIR_COEF+2)
00396 };
00397 /* @} */
00408 typedef struct drcReportParam_s {
00409   union {
00410     tuint          bits;
00411     drcBandParam_t bandParam;
00412     drcLimParam_t  limParam;
00413     Fract coef[drc_FIR_HALF_COEF_16KHZ];
00414   } u;
00415 } drcReportParam_t;
00416
00423 typedef struct {
00424   dbgInfo_t     debugInfo;
00425 } drcCreateConfig_t;
00426
00435 typedef struct drcSizeConfig_s {
00436   tint    samp_rate;
00437   tint    max_delay_len;
00438 } drcSizeConfig_t;
00439
00447 typedef struct {
00448   void  *handle;
00449   drcSizeConfig_t sizeCfg;
00450 } drcNewConfig_t;
00451
00452 /* ---------------------- DRC EXTERNAL APIs ----------------------------------*/
00453
00454 /* drcinit.c */
00455
00468 tint drcCreate (drcCreateConfig_t *create_cfg);
00469
00488 tint  drcGetSizes       (tint *nbufs, const ecomemBuffer_t **bufs,
00489                          drcSizeConfig_t *cfg);
00517 tint  drcNew            (void **drcInst, tint nbufs, ecomemBuffer_t *bufs,
00518                          drcNewConfig_t *cfg);
00519 /* drc.c */
00535 tint  drcClose          (void *drcInst);
00536
00557 tint  drcControl        (void *drcInst, drcControl_t *ctl);
00558
00584 tint  drcDelete         (void **drcInst, tint nbufs, ecomemBuffer_t *bufs);
00585
00604 tint  drcGetParameter (void *drcInst, tint get_code, drcReportParam_t *param);
00605
00633 tint  drcOpen           (void *drcInst, drcOpenConfig_t *cfg);
00634
00635 /* drcproc.c */
00660 tint drcProcess         (void *drcInst, void *sin, void *sout);
00661
00662
00663 /* -------------------------- DRC Call Table -------------------------------- */
00667 typedef struct {
00668   tint  (*drcGetSizes)       (tint *nbufs, const ecomemBuffer_t **bufs,
00669                               drcSizeConfig_t *cfg);
00670   tint  (*drcNew)            (void **drcInst, tint nbufs, ecomemBuffer_t *bufs,
00671                               drcNewConfig_t *cfg);
00672   tint  (*drcCreate)         (drcCreateConfig_t *create_cfg);
00673   tint  (*drcClose)          (void *drcInst);
00674   tint  (*drcControl)        (void *drcInst, drcControl_t *ctl);
00675   tint  (*drcDelete)         (void **drcInst, tint nbufs, ecomemBuffer_t *bufs);
00676   tint  (*drcGetParameter)   (void *drcInst, tint get_code, drcReportParam_t *param);
00677   tint  (*drcOpen)           (void *drcInst, drcOpenConfig_t *cfg);
00678   tint  (*drcProcess)        (void *drcInst, void *sin, void *sout);
00679 } drcCallTable_t;
00680
00681 #endif  /* _DRC_H */
00682 /* nothing past this point */
00683


AER: DRC Configuration Parameters

DRC Configuration Parameters

System Configuration Parameters

  • Parameter 1: Sampling Rate. (See DRC Supported Sampling Rate)
    DRC supports two sampling rates, 8KHz or 16KHz.

  • Parameter 2: Operation Mode bitfield. (See DRC Operation Mode bitfield)
    It is used to select DRC operation mode. The initial settings of the parameter is passed in through drcOpen(). It can be changed in real time through drcControl() as well.

Compressor Configuration Parameters

  • Parameter1: Expansion knee point. (See parameter exp_knee in drcCurveParam_s)
    It is the starting point of the expansion. It is in dBm0 and Q0 format. The range is from -78dBm0 to +3dBm0 in 1dBm0 steps. The default value set in drcOpen() is -50dBm0 for all bands.

  • Parameter 2: Expansion and compression ratios. (See parameter ratios in drcCurveParam_s)
    The parameter corresponds to the ratio between the output energy and input energy. The ratios are represented in Q4.4 format. The range of the ratios is from 1.0 to 15.9375 or 16 to 255 in Q4.4 format. The expansion ratio is defined as: exp_ratio = (Energy Out/Energy In) where exp_ratio >= 1.0 since Energy Out >= Energy In.

The compression ratio is defined as: com_ratio = (Energy In/Energy Out) where com_ratio >= 1.0 since Energy In >= Energy Out.

The default expansion ratio set in drcOpen() for full, low, middle and high band are 2.0, 2.0, 2.0 and 1.0 and for compression ratio is 2.0 for all bands.

  • Parameter 3: Maximum amplification. (See parameter max_amp in drcCurveParam_s)
    The parameter specifies the maximum amplification. It is in dB in Q0. The range is from 0dB to +18dB in 1dB steps. The default values set in drcOpen() for full, low, middle and high band are +6dB, +6dB, +3dB and +3dB.

  • Parameter 4: Compression knee point. (See parameter com_knee in drcCurveParam_s)
    It is the starting pointer of the compression. It is in dBm0 and Q0 format. The range is from -78dBm0 to +3dBm0 in 1dBm steps. The default values set in drcOpen()for full, low, middle and high band are -15dBm0, -15dBm0, -20dBm0 and -25dBm0.

  • Parameter 5: Energy limiting threshold. (See parameter energy_lim in drcCurveParam_s)
    The parameter specifies the energy limiting threshold. It is in dBm0 and Q0 format. It is dedicated to the largest allowed signal energy at the compressor output. The range is from -78dBm0 to +3dBm0 in 1dBm0 steps. The default values set in drcOpen() for full, low, middle and high band are -3dBm0, -3dBm0,-6dBm0 and -7dBm0.

  • Parameter 6: Compressor time constants in log2. (See parameter tc_log2 in drcBandCfg_s)
    The level time constants are used in estimating the exponential average of signal energy and the gain time constants are used in estimating the exponential average of a compressor gain. The corresponding time constant (TC) are derived from tc_log2 as:
                   TC(second)=(2^tc_log2)/Samp_rate(Hz).
    The level attack time constant is used when signal power increases while release time constant is used when signal power decreases. The longer the time constants, the smoother the averaged result and less precision for low energy levels. The minimum measurable level of energy for different time constants is given in DRC Power Measurement Precision vs. Exponential Average Time Constant. The default values of level attack and release time constants in log2 used in drcOpen() are (8,8) for 8KHz and (9,9) for 16KHz and values of gain attack and release time constants in log2 are (8,8) for 8KHz and (9,9) for 16KHz for all bands.

Limiter Configuration Parameters

  • Parameter 1: limiter time constants in log2. (See parameter tc_log2 in drcLimiterCfg_s)
    The limiter level time constants are used in estimating the exponential average of energy of input signals to a limiter and gain time constants are used in estimating the exponential average of limiter gain. The corresponding time constant are derived from its tc_log2 as:
                     TC(second)=(2^tc_log2)/Samp_rate(Hz).
    Please be aware, the limiter level attack time constant CANNOT be changed. The limiter gain attack time constant is used when gain decreases while limiter release time constant is used when gain increases. The default values of limiter attack and release time constants in log2 used in drcOpen() are (0,8) for 8KHz and (0,9) for 16KHz and limiter gain attack and release time constants in log2 are (1,9) for 8KHz and (2,10) for 16KHz for all bands.

  • Parameter 2: Limiter threshold in dBm0. (See parameter thresh_dBm0 in drcLimiterCfg_s)
    The limiter threshold is used in order to prevent signal clipping at the output. It is in dBm0 and Q0 format. The range is from -78dBm0 to +3dBm0 in 1dBm0 steps. When thresh is +3dBm0, limiter is equivalent to be disabled. The default value is -3dBm0.

  • Parameter 3: Limiter forward looking delay in samples. (See parameter delay_len in drcLimiterCfg_s)
    This parameter is limiter forward looking delay in ms. It is in Q0 format. The maximum delay length is set at drcNew() time. The typical range of delay is from 0ms to 2ms. The default value used in drcOpen() is 1ms.

Filter Coefficients

  • Parameter 1 - 9 or 17: Filter Coefficients - array of 17 elements for 16KHz or 9 elements for 8KHz.
    Filter Coefficients are in Q15 format. Since symmetric FIR is used, only half of the filter coefficients are needed in a configuration. For multi-band compressor, three filters, namely a low pass, a band pass and a high pass filters, are used for low, middle and high band respectively. Since DRC doesn't store default coefficients, all the values have to be passed in through drcControl() pre enabling DRC if multi-band compressor is selected. See DRC Multi-band Filter Reference Design for filter reference design.


AER: DRC Multi-band Filter Reference Design

DRC Multi-band Filter Reference Design

In DRC, three filters are designed with the following specifications:
  • A low pass filter with cutoff frequency at 700Hz is designed for low band.
  • A band pass filter with frequency range from 700Hz to 1700Hz is designed for middle band.
  • A high pass filter with frequency above 1700Hz is designed for high band.

   The filter coefficients given in the tables are in Q15 format.
   The following coefficients used for 8KHz sampling rate are defined in the
   following orders:

   h[0]\h[16], h[1]\h[15], h[2]\h[14], h[3]\h[13], h[4]\h[12], h[5]\h[11],
   h[6]\h[10], h[7]\h[9] and h[8].

   const Fract drc_lowband_coef_8k[9] = {
     -103, -115, -61, 301, 1182, 2575, 4172, 5457, 5950
   };

   const Fract drc_midband_coef_8k[9] = {
     3, 129, 430, -10, -2324, -4473, -2118, 4356, 8013
   };

   const Fract drc_highband_coef_8k[9] = {
     99, -13, -370, -291, 1142, 1898, -2054, -9813, 18804
   };

   The following coefficients used for 16KHz sampling rate are defined in
   the following orders:
   h[0]\h[32], h[1]\h[31], h[2]\h[30], h[3]\h[29], h[4]\h[28], h[5]\h[27],
   h[6]\h[26], h[7]\h[25], h[8]\h[24], h[9]\h[23], h[10]\h[22], h[11]\h[21],
   h[12]\h[20], h[13]\h[19], h[14]\h[18], h[15]\h[17] and h[16].

   const Fract drc_lowband_coef_16k[17] = {
     -51, -53, -58, -55, -30, 33, 151,  335, 590, 912, 1286,
     1686, 2083,  2440, 2724, 2907, 2970
   };

   const Fract drc_midband_coef_16k[17] = {
     2, 19, 64, 141, 215, 203, -5, -476, -1160, -1851, -2233,
     -2010, -1057, 476, 2174, 3500, 4000
   };

   const Fract drc_highband_coef_16k[17] = {
     50, 34, -7,  -86, -185, -236, -145, 142, 570, 939, 948,
     324, -1025, -2916, -4899, -6407, 25797
   };

The matlab function of filter generation is:

   function filterbank = drcfilters(Fs,delay_ms,lowmid_f,midhi_f)
   %DRCFILTERS     Generate filters for Multi-Band Compressor in DRC
   %   hb=drcfilters(Fs,dms,lowmid,midhi) generates the filter bank hb for the
   %   Multi-Band Compressor. Sampling rate is Fs in Hz. Filter delay is
   %   dms in milliseconds. The low-mid cross frequency is lowmid and the mid-hi
   %   cross frequency is midhi. Both are in Hz.
   %
   %   The filter bank is a matrix with 3 columns, each column representing
   %   one of the compressor bands. Column 1 is low band, column 2 is mid band
   %   column 3 is high band.

   samp_f        = Fs;
   lowmid_cross  = lowmid_f;
   midhi_cross   = midhi_f;

   %  Trying to mimic previous version
   filter_len = round(samp_f/1000*delay_ms)*2+1;

   filterbank = zeros(filter_len,3);

   low_f    = fir1(filter_len-1, lowmid_cross*2/samp_f);
   low_f    = reshape(low_f,filter_len,1);

   lowmid_f = fir1(filter_len-1, midhi_cross*2/samp_f);
   lowmid_f = reshape(lowmid_f,filter_len,1);

   mid_f    = lowmid_f-low_f;

   % This was LEGACY filter (TI-Dallas)
   %else
   %    mid_f = fir1(filter_len-1,[lowmid_cross midhi_cross]*2/samp_f);%
   %end

   high_f = zeros(filter_len,1);
   high_f((filter_len+1)/2) = 1;
   high_f = high_f - (low_f + mid_f);   % calculate the high band filter

   hb = [low_f, mid_f, high_f];

   filterbank = round(hb*32768)/32768;   % quantize coefficients

   % nothing past this point


AER: DRC Module

DRC Module

The DRC (dynamic range compression) module may be used to provide a better performance for hands-free speaker. The DRC algorithm may help increase the perceived loudness of a speech signal by applying a time-varying gain depending on the power of the signal. It is designed to improve the loudness at the hands-free speaker while reducing negative impact of nonlinear distortion. It achieves this by amplifying only the quiet segments of the signal while compressing the loud segments. It uses a multi-band approach so as to control the signal level in separate bands precisely. In addition, it uses a soft limiter to reduce the saturation distortion.

See DRC Module API for DRC external API.

Note:
The DRC and HLC or Rx signal limiter should not be used at the same time. (see HLC description in AER Module)
DRC block diagram is shown below:

From the diagram we can see, DRC system consists of a Compressor and a Limiter. It is designed to be configurable to meet user's different requirements. It may be configured to work as a full-band compressor with or without a limiter, a multi-band compressor with or without a limiter or simply as a limiter. In addition, user may enable Voice Activity Detector in DRC to prevent the compressor gain being modified by background noise segments. Configuration parameters are described in Configuration Parameters Section. The description of controlling each parameter through DRC external API is given in DRC Module API. The MIPS and Memory usage can be found in DRC Resource Requirement. More detailed and up-to-date requirement can be found in the Unit Test Doxygen aersim.chm. DRC overall delay can be found in DRC System Delay.

Compressor

A compressor gain curve may be characterized in five regions:

These five regions may be configured by users to define their own compressors.

  • Region 1 - Zero dB Gain. The signals in this region are not modified.
  • Region 2 - 1 to x dB Expansion. The signals are expanded at 1 to x ratio in the region.
  • Region 3 - Maximum Gain. This is a constant amplification region.
  • Region 4 - y to 1 dB Compression. The signals are compressed at y to 1 ratio in the region.
  • Region 5 - z to 1 Compression. In energy limiting region, signal levels above the limiter threshold are compressed at z to 1 ratio and brought down below the threshold.

A multi-band compressor has up to three distinct frequency bands. Each band may define its own regions. As the result, a multi-band compressor can adjust signal levels more precisely than a full-band compressor.

A compressor has 6 configurable parameters. See descriptions in Compressor Configuration Parameters.

Limiter

After input signals are scaled to proper levels by compressors, limiters check the power level of each sample and apply proper limiter gains to ensure no output sample exceeds the limiter threshold.

A limiter has 3 configurable parameters. See descriptions in Limiter Configuration Parameters.

Configuration Parameters

DRC configuration parameters include:
  • System Configuration Parameters : contains sampling rate and operation mode configuration.
  • Compressor Configuration Parameters : contains 6 compressor configuration parameters.
  • Limiter Configuration Parameters : contains 3 limiter configuration parameters.
  • Filter Coefficients : contains filters coefficients.

In addition, DRC can be turned ON or OFF at run time. DRC off configuration disables DRC and resets all the variables as well.

For a multi-band compressor, each band has its own independent configurations and is configured separately.

DRC Resource Requirement

The MIPS given below are profiled with all program and data in external memory and for C64x+, cache is enabled and flushed every frame. For more detailed information, see Unit Test Doxygen aersim.chm.

MIPS Saving Tips:

  • Place DRC filter coefficient buffer and DRC scratch buffer in different memory blocks to reduce the filter MIPS.
  • Use symmetric time constants for Compressor power and gain estimation when possible.

DRC System Delay

DRC system delay = compressor delay + limiter delay

A fullband compressor has no delay while a multiband compressor has 1ms delay. The limiter delay is user configurable. The typical range is from 0ms to 2ms.


AER: DRC Power Measurement Precision vs. Exponential Average Time Constant

DRC Power Measurement Precision vs. Exponential Average Time Constant

Copyright 2013, Texas Instruments Incorporated


AER: File Index

  • File List
  • Globals

AER File List

Here is a list of all files with brief descriptions:
aer.h [code] | Contains external API for the AER component
agc.h [code] | Contains external API for the AGC component
bf.h [code] | Contains external API for BeamForming (BF) module
doxygen.h [code]
drc.h [code] | Contains definitions and external APIs for DRC
mss.h [code] | Contains external API for Multi-Source Selection (MSS) module


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • act_mics : bfDebugStat_s
  • active_path : aerInfo_s
  • aer_data : agcControl_s
  • aerActivate : aerCallTable_t
  • aerClose : aerCallTable_t
  • aerControl : aerCallTable_t
  • aerCreate : aerCallTable_t
  • aerDelete : aerCallTable_t
  • aerGetFilter : aerCallTable_t
  • aerGetGains : aerCallTable_t
  • aerGetPerformance : aerCallTable_t
  • aerGetSizes : aerCallTable_t
  • aerNew : aerCallTable_t
  • aerOpen : aerCallTable_t
  • aerPutFilter : aerCallTable_t
  • aerReceiveIn : aerCallTable_t
  • aerSendIn : aerCallTable_t
  • agcClose : agcCallTable_t
  • agcControl : agcCallTable_t
  • agcCreate : agcCallTable_t
  • agcDelete : agcCallTable_t
  • agcGetPerformance : agcCallTable_t
  • agcGetSizes : agcCallTable_t
  • agcNew : agcCallTable_t
  • agcOpen : agcCallTable_t
  • agcSendIn : agcCallTable_t
  • analog_gain : agcEvent_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- l -

  • limiter : drcControl_s
  • limParam : drcReportParam_s
  • lo_dynamic_range_cntr : agcDebugStat_s
  • log2_attn : agcAerData_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- m -

  • major : aerVersion_s , agcVersion_s
  • mask : agcModeControl_s , aerModeControl_s , bfCtlCfg_s
  • max_amp : drcCurveParam_s
  • max_canc_l2 : aerDebugStat_s , aerInfo_s
  • max_delay_len : drcSizeConfig_s
  • max_filter_length : bfSizeConfig_s
  • max_micgain : agcControl_s
  • max_micgain_swing : agcControl_s
  • max_num_beam : mssSizeConfig_s
  • max_num_mic_clean : mssSizeConfig_s
  • max_num_mic_fixed : mssSizeConfig_s
  • max_num_mic_remote : mssSizeConfig_s
  • max_num_mics : bfSizeConfig_s
  • max_sampling_rate : mssSizeConfig_s , bfSizeConfig_s , aerCreateConfig_s , agcCreateConfig_s
  • max_tail_length : aerSizeConfig_s
  • max_y2x_delay : aerSizeConfig_s
  • maxabs_error : aerDebugStat_s
  • maxabs_pecho : agcAerData_s
  • maxabs_pred_echo : aerDebugStat_s , aerInfo_s
  • mic_gain : agcControl_s
  • mics : bfControl_s
  • min_micgain : agcControl_s
  • minor : agcVersion_s , aerVersion_s
  • modes : agcControl_s
  • modes_0 : aerControl_s
  • modes_1 : aerControl_s
  • modes_2 : aerControl_s
  • mssClose : mssCallTable_t
  • mssControl : mssCallTable_t
  • mssDelete : mssCallTable_t
  • mssGetSizes : mssCallTable_t
  • mssNew : mssCallTable_t
  • mssOpen : mssCallTable_t
  • mssProcess : mssCallTable_t


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- n -

  • ne_clip_cntr : agcDebugStat_s
  • ne_max_0 : agcDebugStat_s
  • ne_max_1 : agcDebugStat_s
  • ne_max_2 : agcDebugStat_s
  • ne_max_3 : agcDebugStat_s
  • near_end_noise : aerPiquaStats_s
  • near_end_pow : aerPiquaStats_s
  • nguard_atten : aerDebugStat_s
  • nguard_state : aerDebugStat_s
  • nlp_clip_agg_l2 : aerControl_s , aerDebugStat_s
  • nlp_clipper_max_erle : aerControl_s
  • nlp_combloss_target : aerControl_s
  • nlp_linattn_max_erle : aerControl_s
  • nlp_linear_atten : aerDebugStat_s
  • nlp_linear_atten_rx : aerDebugStat_s
  • nlp_linear_atten_tx : aerDebugStat_s
  • nlp_max_closs_target : aerDebugStat_s
  • nlp_on : aerInfo_s , agcAerData_s
  • nlp_rx_in_tc : aerControl_s
  • nlp_rx_linattn_max : aerControl_s
  • nlp_rx_linattn_min : aerControl_s
  • nlp_rx_out_tc : aerControl_s
  • nlp_total_linattn_min : aerControl_s
  • nlp_tx_in_tc : aerControl_s
  • nlp_tx_linattn_max : aerControl_s
  • nlp_tx_linattn_min : aerControl_s
  • nlp_tx_out_tc : aerControl_s
  • noise_level_ng : aerControl_s
  • nr_fband1_max_atten : aerControl_s
  • nr_fband2_max_atten : aerControl_s
  • nr_fband3_max_atten : aerControl_s
  • nr_fbin1_lim : aerControl_s
  • nr_fbin2_lim : aerControl_s
  • nr_noise_hangover : aerControl_s
  • nr_noise_thresh : aerControl_s
  • nr_sig_upd_rate_max : aerControl_s
  • nr_sig_upd_rate_min : aerControl_s
  • num_beam : mssConfig_s
  • num_bssat_events : aerEventStats_s
  • num_coh_events : aerEventStats_s
  • num_coh_potential : aerEventStats_s
  • num_dt_detected : aerEventStats_s
  • num_dt_potential : aerEventStats_s
  • num_eqsat_events : aerEventStats_s
  • num_filter_updates : aerEventStats_s
  • num_H_vec : aerTailModel_s
  • num_howl_events : aerEventStats_s
  • num_mic_array : mssConfig_s
  • num_mic_clean : mssConfig_s
  • num_mic_fixed : mssConfig_s
  • num_mic_remote : mssConfig_s
  • num_mics : bfConfig_s , bfDebugStat_s
  • num_reset_events : aerEventStats_s
  • num_rxgain_events : aerEventStats_s
  • num_samp_interp : aerConfig_s , aerControl_s
  • num_sat_events : aerEventStats_s
  • num_sections : aerEQConfig_s
  • num_txgain_events : aerEventStats_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- b -

  • band : drcControl_s
  • bandParam : drcReportParam_s
  • bf_type : bfSizeConfig_s
  • bfClose : bfCallTable_t
  • bfControl : bfCallTable_t
  • bfDelete : bfCallTable_t
  • bfGetFilter : bfCallTable_t
  • bfGetSizes : bfCallTable_t
  • bfNew : bfCallTable_t
  • bfOpen : bfCallTable_t
  • bfProcess : bfCallTable_t
  • bfPutFilter : bfCallTable_t
  • bits : drcReportParam_s
  • btype : agcVersion_s , aerVersion_s
  • build : agcVersion_s , aerVersion_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- c -

  • cfgbits : drcControl_s , drcOpenConfig_s
  • clip_level : aerDebugStat_s
  • clip_scale : aerDebugStat_s
  • clip_scale_curve : aerControl_s
  • cng_rx_level : aerControl_s
  • cng_tx_level : aerControl_s
  • coef : drcControl_s , drcReportParam_s
  • coh_cnt_thresh : aerControl_s
  • coh_hangover : aerControl_s
  • coh_ratio_thresh : aerControl_s
  • coherence_state : aerDebugStat_s
  • com_knee : drcCurveParam_s
  • config : bfControl_s
  • config_bitfield : aerSizeConfig_s , agcCreateConfig_s , agcSizeConfig_s , aerCreateConfig_s
  • control_bitfield : agcDebugStat_s
  • control_bitfield0 : aerDebugStat_s
  • control_bitfield1 : aerDebugStat_s
  • ctl_code : drcControl_s
  • curr_canc_l2 : aerDebugStat_s
  • curr_echo_loss_l2 : aerDebugStat_s
  • curve : drcBandParam_s , drcBandCfg_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- d -

  • debugInfo : aerCreateConfig_s , agcCreateConfig_s , drcCreateConfig_t
  • delay_len : drcLimParam_s , drcLimiterCfg_s
  • delay_rx_ag_chg : aerControl_s , aerConfig_s
  • delay_tx_ag_chg : aerControl_s , aerConfig_s
  • drcClose : drcCallTable_t
  • drcControl : drcCallTable_t
  • drcCreate : drcCallTable_t
  • drcDelete : drcCallTable_t
  • drcGetParameter : drcCallTable_t
  • drcGetSizes : drcCallTable_t
  • drcNew : drcCallTable_t
  • drcOpen : drcCallTable_t
  • drcProcess : drcCallTable_t
  • dt_hangover : aerControl_s , aerDebugStat_s
  • dt_ratio : aerDebugStat_s
  • dt_thresh : aerDebugStat_s , aerControl_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- e -

  • echo_clip_penalty : agcDebugStat_s
  • echo_max_0 : agcDebugStat_s
  • echo_max_1 : agcDebugStat_s
  • echo_max_2 : agcDebugStat_s
  • echo_max_3 : agcDebugStat_s
  • echo_removal_err_pow : aerPiquaStats_s
  • energy_lim : drcCurveParam_s
  • erl : aerPiquaStats_s
  • erle : aerPiquaStats_s
  • event_code : agcEvent_s
  • event_stats : aerDebugStat_s
  • eventOut : agcCreateConfig_s , aerCreateConfig_s
  • exp_knee : drcCurveParam_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- f -

  • far_end_pow : aerPiquaStats_s
  • filter_len : bfDebugStat_s
  • flag_bitfield : agcDebugStat_s
  • flag_bitfield0 : aerDebugStat_s
  • flag_bitfield1 : aerDebugStat_s
  • flags_filt_loaded : bfDebugStat_s
  • frame_len : bfDebugStat_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- g -

  • gain_rx_analog : aerControl_s , aerDebugStat_s
  • gain_rx_digital : aerDebugStat_s , aerControl_s
  • gain_split_tc : aerControl_s
  • gain_tx_analog : aerControl_s , aerDebugStat_s
  • gain_tx_digital : aerDebugStat_s , aerControl_s
  • get_size_rx : aerTraceConfig_s
  • get_size_tx : aerTraceConfig_s
  • glim_reach_cntr : agcDebugStat_s
  • group : mssSrc_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- h -

  • handle : aerNewConfig_s , mssNewConfig_s , agcNewConfig_s , bfNewConfig_s , drcNewConfig_t
  • hangover_ng : aerControl_s
  • hangover_rx2tx : aerDebugStat_s
  • hangover_rx_to_tx : aerControl_s
  • hangover_tx2rx : aerDebugStat_s
  • hangover_tx_to_rx : aerControl_s
  • hlc_gain : aerDebugStat_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- i -

  • index : mssSrc_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- p -

  • patch : aerVersion_s , agcVersion_s
  • path_select_state : aerDebugStat_s
  • pecho_pwr : agcAerData_s
  • phone_mode : aerConfig_s , aerControl_s
  • piqua_stats : aerDebugStat_s
  • pNLPgain : agcEvent_s
  • power_tc_hlc : aerControl_s
  • pred_echo_pwr : aerInfo_s
  • preNLP_enable : agcControl_s
  • preNLP_gain : agcControl_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- q -

  • quality : aerVersion_s , agcVersion_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- r -

  • ramp_out_tc_hlc : aerControl_s
  • rampin_period_ng : aerControl_s
  • ratios : drcCurveParam_s
  • reset_bitfield : aerConfig_s , agcConfig_s
  • rx_ag : aerTailModel_s
  • rx_noise_pwr : aerDebugStat_s
  • rx_sig_pwr : aerDebugStat_s
  • rx_slim_mode : aerControl_s
  • rx_to_tx_hangover : aerInfo_s
  • rxeq_params : aerControl_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- s -

  • samp_rate : drcOpenConfig_s , drcSizeConfig_s
  • sampling_rate : bfConfig_s , agcConfig_s , bfDebugStat_s , mssConfig_s
  • sat_cntr : agcDebugStat_s
  • sat_hangover : agcControl_s , agcDebugStat_s
  • sat_threshold : agcControl_s , agcDebugStat_s
  • section_params : aerEQConfig_s
  • section_types : aerEQConfig_s
  • Si_minus_echo : agcAerData_s
  • Si_with_echo : agcAerData_s
  • sizeCfg : agcNewConfig_s , bfNewConfig_s , aerNewConfig_s , drcNewConfig_t , mssNewConfig_s
  • spk_gain : agcControl_s
  • srate_bitfield : aerConfig_s , aerControl_s
  • state_bitfield : aerDebugStat_s
  • switch2rx_period : aerInfo_s
  • switch2tx_period : aerInfo_s
  • SWR : agcAerData_s
  • SWS : agcAerData_s
  • sys_bits : bfDebugStat_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- t -

  • tail_length : aerConfig_s , aerTailModel_s , aerDebugStat_s , aerControl_s
  • tc_log2 : drcLimParam_s , drcBandCfg_s , drcLimiterCfg_s , drcBandParam_s
  • thresh_dBm : drcLimParam_s , drcLimiterCfg_s
  • thresh_hlc : aerControl_s
  • thresh_rx_nld : aerControl_s
  • thresh_rx_noise : aerControl_s
  • thresh_tx_noise : aerControl_s
  • trace_bitfield : aerTraceConfig_s
  • trace_cfg : aerControl_s
  • TS : agcAerData_s
  • tx_ag : aerTailModel_s
  • tx_mic_pwr : aerInfo_s
  • tx_mic_pwr_minus_echo : aerInfo_s
  • tx_pNLP_noise_pwr : aerDebugStat_s
  • tx_pNLP_sig_pwr : aerDebugStat_s
  • tx_pNLP_total_pwr : aerDebugStat_s
  • tx_slim_mode : aerControl_s
  • tx_to_rx_hangover : aerInfo_s
  • txeq_params : aerControl_s
  • txfdnlp_bin_hi1 : aerControl_s
  • txfdnlp_bin_hi2 : aerControl_s
  • txfdnlp_bin_lo1 : aerControl_s
  • txfdnlp_bin_lo2 : aerControl_s
  • txfdnlp_cng_max : aerControl_s
  • txfdnlp_msec_delay : aerControl_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- u -

  • u : agcEvent_s , drcReportParam_s , drcControl_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- v -

  • valid_bitfield : aerConfig_s , agcConfig_s , agcControl_s , bfControl_s , drcBandCfg_s , drcLimiterCfg_s
  • valid_bitfield_0 : aerControl_s
  • valid_bitfield_1 : aerControl_s
  • valid_bitfield_2 : aerControl_s
  • valid_bitfield_3 : aerControl_s
  • valid_bitfield_4 : aerControl_s
  • value : agcModeControl_s , aerModeControl_s , bfCtlCfg_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- x -

  • XR : agcAerData_s
  • XS : agcAerData_s


AER: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- y -

  • y2x_delay : aerConfig_s , aerControl_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- a -

  • act_mics : bfDebugStat_s
  • active_path : aerInfo_s
  • aer_data : agcControl_s
  • aerActivate : aerCallTable_t
  • aerClose : aerCallTable_t
  • aerControl : aerCallTable_t
  • aerCreate : aerCallTable_t
  • aerDelete : aerCallTable_t
  • aerGetFilter : aerCallTable_t
  • aerGetGains : aerCallTable_t
  • aerGetPerformance : aerCallTable_t
  • aerGetSizes : aerCallTable_t
  • aerNew : aerCallTable_t
  • aerOpen : aerCallTable_t
  • aerPutFilter : aerCallTable_t
  • aerReceiveIn : aerCallTable_t
  • aerSendIn : aerCallTable_t
  • agcClose : agcCallTable_t
  • agcControl : agcCallTable_t
  • agcCreate : agcCallTable_t
  • agcDelete : agcCallTable_t
  • agcGetPerformance : agcCallTable_t
  • agcGetSizes : agcCallTable_t
  • agcNew : agcCallTable_t
  • agcOpen : agcCallTable_t
  • agcSendIn : agcCallTable_t
  • analog_gain : agcEvent_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- l -

  • limiter : drcControl_s
  • limParam : drcReportParam_s
  • lo_dynamic_range_cntr : agcDebugStat_s
  • log2_attn : agcAerData_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- m -

  • major : aerVersion_s , agcVersion_s
  • mask : agcModeControl_s , aerModeControl_s , bfCtlCfg_s
  • max_amp : drcCurveParam_s
  • max_canc_l2 : aerDebugStat_s , aerInfo_s
  • max_delay_len : drcSizeConfig_s
  • max_filter_length : bfSizeConfig_s
  • max_micgain : agcControl_s
  • max_micgain_swing : agcControl_s
  • max_num_beam : mssSizeConfig_s
  • max_num_mic_clean : mssSizeConfig_s
  • max_num_mic_fixed : mssSizeConfig_s
  • max_num_mic_remote : mssSizeConfig_s
  • max_num_mics : bfSizeConfig_s
  • max_sampling_rate : mssSizeConfig_s , bfSizeConfig_s , aerCreateConfig_s , agcCreateConfig_s
  • max_tail_length : aerSizeConfig_s
  • max_y2x_delay : aerSizeConfig_s
  • maxabs_error : aerDebugStat_s
  • maxabs_pecho : agcAerData_s
  • maxabs_pred_echo : aerDebugStat_s , aerInfo_s
  • mic_gain : agcControl_s
  • mics : bfControl_s
  • min_micgain : agcControl_s
  • minor : agcVersion_s , aerVersion_s
  • modes : agcControl_s
  • modes_0 : aerControl_s
  • modes_1 : aerControl_s
  • modes_2 : aerControl_s
  • mssClose : mssCallTable_t
  • mssControl : mssCallTable_t
  • mssDelete : mssCallTable_t
  • mssGetSizes : mssCallTable_t
  • mssNew : mssCallTable_t
  • mssOpen : mssCallTable_t
  • mssProcess : mssCallTable_t


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- n -

  • ne_clip_cntr : agcDebugStat_s
  • ne_max_0 : agcDebugStat_s
  • ne_max_1 : agcDebugStat_s
  • ne_max_2 : agcDebugStat_s
  • ne_max_3 : agcDebugStat_s
  • near_end_noise : aerPiquaStats_s
  • near_end_pow : aerPiquaStats_s
  • nguard_atten : aerDebugStat_s
  • nguard_state : aerDebugStat_s
  • nlp_clip_agg_l2 : aerControl_s , aerDebugStat_s
  • nlp_clipper_max_erle : aerControl_s
  • nlp_combloss_target : aerControl_s
  • nlp_linattn_max_erle : aerControl_s
  • nlp_linear_atten : aerDebugStat_s
  • nlp_linear_atten_rx : aerDebugStat_s
  • nlp_linear_atten_tx : aerDebugStat_s
  • nlp_max_closs_target : aerDebugStat_s
  • nlp_on : aerInfo_s , agcAerData_s
  • nlp_rx_in_tc : aerControl_s
  • nlp_rx_linattn_max : aerControl_s
  • nlp_rx_linattn_min : aerControl_s
  • nlp_rx_out_tc : aerControl_s
  • nlp_total_linattn_min : aerControl_s
  • nlp_tx_in_tc : aerControl_s
  • nlp_tx_linattn_max : aerControl_s
  • nlp_tx_linattn_min : aerControl_s
  • nlp_tx_out_tc : aerControl_s
  • noise_level_ng : aerControl_s
  • nr_fband1_max_atten : aerControl_s
  • nr_fband2_max_atten : aerControl_s
  • nr_fband3_max_atten : aerControl_s
  • nr_fbin1_lim : aerControl_s
  • nr_fbin2_lim : aerControl_s
  • nr_noise_hangover : aerControl_s
  • nr_noise_thresh : aerControl_s
  • nr_sig_upd_rate_max : aerControl_s
  • nr_sig_upd_rate_min : aerControl_s
  • num_beam : mssConfig_s
  • num_bssat_events : aerEventStats_s
  • num_coh_events : aerEventStats_s
  • num_coh_potential : aerEventStats_s
  • num_dt_detected : aerEventStats_s
  • num_dt_potential : aerEventStats_s
  • num_eqsat_events : aerEventStats_s
  • num_filter_updates : aerEventStats_s
  • num_H_vec : aerTailModel_s
  • num_howl_events : aerEventStats_s
  • num_mic_array : mssConfig_s
  • num_mic_clean : mssConfig_s
  • num_mic_fixed : mssConfig_s
  • num_mic_remote : mssConfig_s
  • num_mics : bfConfig_s , bfDebugStat_s
  • num_reset_events : aerEventStats_s
  • num_rxgain_events : aerEventStats_s
  • num_samp_interp : aerConfig_s , aerControl_s
  • num_sat_events : aerEventStats_s
  • num_sections : aerEQConfig_s
  • num_txgain_events : aerEventStats_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- b -

  • band : drcControl_s
  • bandParam : drcReportParam_s
  • bf_type : bfSizeConfig_s
  • bfClose : bfCallTable_t
  • bfControl : bfCallTable_t
  • bfDelete : bfCallTable_t
  • bfGetFilter : bfCallTable_t
  • bfGetSizes : bfCallTable_t
  • bfNew : bfCallTable_t
  • bfOpen : bfCallTable_t
  • bfProcess : bfCallTable_t
  • bfPutFilter : bfCallTable_t
  • bits : drcReportParam_s
  • btype : agcVersion_s , aerVersion_s
  • build : agcVersion_s , aerVersion_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- c -

  • cfgbits : drcControl_s , drcOpenConfig_s
  • clip_level : aerDebugStat_s
  • clip_scale : aerDebugStat_s
  • clip_scale_curve : aerControl_s
  • cng_rx_level : aerControl_s
  • cng_tx_level : aerControl_s
  • coef : drcControl_s , drcReportParam_s
  • coh_cnt_thresh : aerControl_s
  • coh_hangover : aerControl_s
  • coh_ratio_thresh : aerControl_s
  • coherence_state : aerDebugStat_s
  • com_knee : drcCurveParam_s
  • config : bfControl_s
  • config_bitfield : aerSizeConfig_s , agcCreateConfig_s , agcSizeConfig_s , aerCreateConfig_s
  • control_bitfield : agcDebugStat_s
  • control_bitfield0 : aerDebugStat_s
  • control_bitfield1 : aerDebugStat_s
  • ctl_code : drcControl_s
  • curr_canc_l2 : aerDebugStat_s
  • curr_echo_loss_l2 : aerDebugStat_s
  • curve : drcBandParam_s , drcBandCfg_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- d -

  • debugInfo : aerCreateConfig_s , agcCreateConfig_s , drcCreateConfig_t
  • delay_len : drcLimParam_s , drcLimiterCfg_s
  • delay_rx_ag_chg : aerControl_s , aerConfig_s
  • delay_tx_ag_chg : aerControl_s , aerConfig_s
  • drcClose : drcCallTable_t
  • drcControl : drcCallTable_t
  • drcCreate : drcCallTable_t
  • drcDelete : drcCallTable_t
  • drcGetParameter : drcCallTable_t
  • drcGetSizes : drcCallTable_t
  • drcNew : drcCallTable_t
  • drcOpen : drcCallTable_t
  • drcProcess : drcCallTable_t
  • dt_hangover : aerControl_s , aerDebugStat_s
  • dt_ratio : aerDebugStat_s
  • dt_thresh : aerDebugStat_s , aerControl_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- e -

  • echo_clip_penalty : agcDebugStat_s
  • echo_max_0 : agcDebugStat_s
  • echo_max_1 : agcDebugStat_s
  • echo_max_2 : agcDebugStat_s
  • echo_max_3 : agcDebugStat_s
  • echo_removal_err_pow : aerPiquaStats_s
  • energy_lim : drcCurveParam_s
  • erl : aerPiquaStats_s
  • erle : aerPiquaStats_s
  • event_code : agcEvent_s
  • event_stats : aerDebugStat_s
  • eventOut : agcCreateConfig_s , aerCreateConfig_s
  • exp_knee : drcCurveParam_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- f -

  • far_end_pow : aerPiquaStats_s
  • filter_len : bfDebugStat_s
  • flag_bitfield : agcDebugStat_s
  • flag_bitfield0 : aerDebugStat_s
  • flag_bitfield1 : aerDebugStat_s
  • flags_filt_loaded : bfDebugStat_s
  • frame_len : bfDebugStat_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- g -

  • gain_rx_analog : aerControl_s , aerDebugStat_s
  • gain_rx_digital : aerDebugStat_s , aerControl_s
  • gain_split_tc : aerControl_s
  • gain_tx_analog : aerControl_s , aerDebugStat_s
  • gain_tx_digital : aerDebugStat_s , aerControl_s
  • get_size_rx : aerTraceConfig_s
  • get_size_tx : aerTraceConfig_s
  • glim_reach_cntr : agcDebugStat_s
  • group : mssSrc_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- h -

  • handle : aerNewConfig_s , mssNewConfig_s , agcNewConfig_s , bfNewConfig_s , drcNewConfig_t
  • hangover_ng : aerControl_s
  • hangover_rx2tx : aerDebugStat_s
  • hangover_rx_to_tx : aerControl_s
  • hangover_tx2rx : aerDebugStat_s
  • hangover_tx_to_rx : aerControl_s
  • hlc_gain : aerDebugStat_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- i -

  • index : mssSrc_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- p -

  • patch : aerVersion_s , agcVersion_s
  • path_select_state : aerDebugStat_s
  • pecho_pwr : agcAerData_s
  • phone_mode : aerConfig_s , aerControl_s
  • piqua_stats : aerDebugStat_s
  • pNLPgain : agcEvent_s
  • power_tc_hlc : aerControl_s
  • pred_echo_pwr : aerInfo_s
  • preNLP_enable : agcControl_s
  • preNLP_gain : agcControl_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- q -

  • quality : aerVersion_s , agcVersion_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- r -

  • ramp_out_tc_hlc : aerControl_s
  • rampin_period_ng : aerControl_s
  • ratios : drcCurveParam_s
  • reset_bitfield : aerConfig_s , agcConfig_s
  • rx_ag : aerTailModel_s
  • rx_noise_pwr : aerDebugStat_s
  • rx_sig_pwr : aerDebugStat_s
  • rx_slim_mode : aerControl_s
  • rx_to_tx_hangover : aerInfo_s
  • rxeq_params : aerControl_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- s -

  • samp_rate : drcOpenConfig_s , drcSizeConfig_s
  • sampling_rate : bfConfig_s , agcConfig_s , bfDebugStat_s , mssConfig_s
  • sat_cntr : agcDebugStat_s
  • sat_hangover : agcControl_s , agcDebugStat_s
  • sat_threshold : agcControl_s , agcDebugStat_s
  • section_params : aerEQConfig_s
  • section_types : aerEQConfig_s
  • Si_minus_echo : agcAerData_s
  • Si_with_echo : agcAerData_s
  • sizeCfg : agcNewConfig_s , bfNewConfig_s , aerNewConfig_s , drcNewConfig_t , mssNewConfig_s
  • spk_gain : agcControl_s
  • srate_bitfield : aerConfig_s , aerControl_s
  • state_bitfield : aerDebugStat_s
  • switch2rx_period : aerInfo_s
  • switch2tx_period : aerInfo_s
  • SWR : agcAerData_s
  • SWS : agcAerData_s
  • sys_bits : bfDebugStat_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- t -

  • tail_length : aerConfig_s , aerTailModel_s , aerDebugStat_s , aerControl_s
  • tc_log2 : drcLimParam_s , drcBandCfg_s , drcLimiterCfg_s , drcBandParam_s
  • thresh_dBm : drcLimParam_s , drcLimiterCfg_s
  • thresh_hlc : aerControl_s
  • thresh_rx_nld : aerControl_s
  • thresh_rx_noise : aerControl_s
  • thresh_tx_noise : aerControl_s
  • trace_bitfield : aerTraceConfig_s
  • trace_cfg : aerControl_s
  • TS : agcAerData_s
  • tx_ag : aerTailModel_s
  • tx_mic_pwr : aerInfo_s
  • tx_mic_pwr_minus_echo : aerInfo_s
  • tx_pNLP_noise_pwr : aerDebugStat_s
  • tx_pNLP_sig_pwr : aerDebugStat_s
  • tx_pNLP_total_pwr : aerDebugStat_s
  • tx_slim_mode : aerControl_s
  • tx_to_rx_hangover : aerInfo_s
  • txeq_params : aerControl_s
  • txfdnlp_bin_hi1 : aerControl_s
  • txfdnlp_bin_hi2 : aerControl_s
  • txfdnlp_bin_lo1 : aerControl_s
  • txfdnlp_bin_lo2 : aerControl_s
  • txfdnlp_cng_max : aerControl_s
  • txfdnlp_msec_delay : aerControl_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- u -

  • u : agcEvent_s , drcReportParam_s , drcControl_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- v -

  • valid_bitfield : aerConfig_s , agcConfig_s , agcControl_s , bfControl_s , drcBandCfg_s , drcLimiterCfg_s
  • valid_bitfield_0 : aerControl_s
  • valid_bitfield_1 : aerControl_s
  • valid_bitfield_2 : aerControl_s
  • valid_bitfield_3 : aerControl_s
  • valid_bitfield_4 : aerControl_s
  • value : agcModeControl_s , aerModeControl_s , bfCtlCfg_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- x -

  • XR : agcAerData_s
  • XS : agcAerData_s


AER: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- y -

  • y2x_delay : aerConfig_s , aerControl_s


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __extern : Version.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- m -

  • mss_ERR_INVALIDPAR : mss.h
  • mss_ERR_INVALIDSRC : mss.h
  • mss_ERR_NOMEMORY : mss.h
  • mss_ERR_NOTCLOSED : mss.h
  • mss_ERR_NOTOPENED : mss.h
  • mss_MAX_NUM_SRC_TYPES : mss.h
  • mss_NOERR : mss.h
  • mss_SAMP_RATE_16K : mss.h
  • mss_SAMP_RATE_8K : mss.h
  • mss_SRC_BEAM : mss.h
  • mss_SRC_INVALID : mss.h
  • mss_SRC_MAX : mss.h
  • mss_SRC_MIC_CLEAN : mss.h
  • mss_SRC_MIC_FIXED : mss.h
  • mss_SRC_MIC_REMOTE : mss.h
  • mssClose() : mss.h
  • mssConfig_t : mss.h
  • mssControl() : mss.h
  • mssDebugStat() : mss.h
  • mssDelete() : mss.h
  • mssNew() : mss.h
  • mssNewConfig_t : mss.h
  • mssOpen() : mss.h
  • mssProcess() : mss.h
  • mssSampRate_t : mss.h
  • mssSizeConfig_t : mss.h
  • mssSrc_t : mss.h
  • mssSrcType_t : mss.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

  • aer_CFG_VALID_BITS_ALL_1 : aer.h
  • aer_CFG_VALID_DELAY_RXAG : aer.h
  • aer_CFG_VALID_DELAY_TXAG : aer.h
  • aer_CFG_VALID_INTER_SAMP : aer.h
  • aer_CFG_VALID_PHONE_MODE : aer.h
  • aer_CFG_VALID_SAMP_RATES : aer.h
  • aer_CFG_VALID_TAIL_LENGTH : aer.h
  • aer_CFG_VALID_Y2X_DELAY : aer.h
  • aer_CNG_LEVEL_LOWER_LIMIT : aer.h
  • aer_CNG_LEVEL_UPPER_LIMIT : aer.h
  • aer_CRT_MULT_MIC_MODE : aer.h
  • aer_CTL0_ADAPT_IN_MUTE : aer.h
  • aer_CTL0_BS_HIGH_BAND_LOCK : aer.h
  • aer_CTL0_CLEAR_ALL : aer.h
  • aer_CTL0_CLEAR_FILTER : aer.h
  • aer_CTL0_DISABLE_RX_NLP : aer.h
  • aer_CTL0_DISABLE_TX_CLIPPER : aer.h
  • aer_CTL0_DISABLE_TX_NLP : aer.h
  • aer_CTL0_ENABLE_ECHO_CANCELLER : aer.h
  • aer_CTL0_ENABLE_FORCED_RX_CNG : aer.h
  • aer_CTL0_ENABLE_FORCED_TX_CNG : aer.h
  • aer_CTL0_ENABLE_NLP : aer.h
  • aer_CTL0_ENABLE_NORMAL_RX_CNG : aer.h
  • aer_CTL0_ENABLE_NORMAL_TX_CNG : aer.h
  • aer_CTL0_ENABLE_UPDATE : aer.h
  • aer_CTL0_HALF_DUPLEX : aer.h
  • aer_CTL0_RELAX_TXNLP_IDLE : aer.h
  • aer_CTL1_BIT_11_RESERVED : aer.h
  • aer_CTL1_CNG_ADAPT : aer.h
  • aer_CTL1_DROP_RX_HIGH_BAND : aer.h
  • aer_CTL1_DROP_TX_HIGH_BAND : aer.h
  • aer_CTL1_ENABLE_HLC : aer.h
  • aer_CTL1_ENABLE_NGUARD : aer.h
  • aer_CTL1_ENABLE_NR : aer.h
  • aer_CTL1_ENABLE_RX_EQ : aer.h
  • aer_CTL1_ENABLE_TX_EQ : aer.h
  • aer_CTL1_FREEZE_TAIL_UPDATE : aer.h
  • aer_CTL1_INCREASE_MIN_HVEC : aer.h
  • aer_CTL1_MUTE_ON : aer.h
  • aer_CTL1_NLP_RAMP_SCALE_ON : aer.h
  • aer_CTL1_PARTIAL_RESET : aer.h
  • aer_CTL1_RESET_PARAMS : aer.h
  • aer_CTL1_USE_FDNLP : aer.h
  • aer_CTL2_BIT_10_RESERVED : aer.h
  • aer_CTL2_BIT_11_RESERVED : aer.h
  • aer_CTL2_BIT_12_RESERVED : aer.h
  • aer_CTL2_BIT_13_RESERVED : aer.h
  • aer_CTL2_BIT_14_RESERVED : aer.h
  • aer_CTL2_BIT_15_RESERVED : aer.h
  • aer_CTL2_BIT_4_RESERVED : aer.h
  • aer_CTL2_BIT_5_RESERVED : aer.h
  • aer_CTL2_BIT_6_RESERVED : aer.h
  • aer_CTL2_BIT_7_RESERVED : aer.h
  • aer_CTL2_BIT_8_RESERVED : aer.h
  • aer_CTL2_BIT_9_RESERVED : aer.h
  • aer_CTL2_ENABLE_TRACE : aer.h
  • aer_CTL2_FREEZE_NOISE_EST : aer.h
  • aer_CTL2_MICSAT : aer.h
  • aer_CTL2_SKIP_COHERENCE : aer.h
  • aer_CTL_VALID0_MODES_CTL0 : aer.h
  • aer_CTL_VALID0_MODES_CTL1 : aer.h
  • aer_CTL_VALID0_MODES_CTL2 : aer.h
  • aer_CTL_VALID0_PHONE_MODE : aer.h
  • aer_CTL_VALID0_RX_AG_CHG_DELAY : aer.h
  • aer_CTL_VALID0_RX_ANALOG : aer.h
  • aer_CTL_VALID0_RX_DIGITAL : aer.h
  • aer_CTL_VALID0_RX_EQ_PARAMS : aer.h
  • aer_CTL_VALID0_SAMPLING_RATES : aer.h
  • aer_CTL_VALID0_TAIL_LENGTH : aer.h
  • aer_CTL_VALID0_TX_AG_CHG_DELAY : aer.h
  • aer_CTL_VALID0_TX_AG_CHG_INTERP : aer.h
  • aer_CTL_VALID0_TX_ANALOG : aer.h
  • aer_CTL_VALID0_TX_DIGITAL : aer.h
  • aer_CTL_VALID0_TX_EQ_PARAMS : aer.h
  • aer_CTL_VALID0_Y2X_DELAY : aer.h
  • aer_CTL_VALID1_CNG_RX_LEVEL : aer.h
  • aer_CTL_VALID1_CNG_TX_LEVEL : aer.h
  • aer_CTL_VALID1_GAIN_SPLIT_TC : aer.h
  • aer_CTL_VALID1_NLP_CLIPPER_MAX_ERLE : aer.h
  • aer_CTL_VALID1_NLP_CLOSS_TARGET : aer.h
  • aer_CTL_VALID1_NLP_LINATTN_MAX_ERLE : aer.h
  • aer_CTL_VALID1_NLP_RX_IN_TC : aer.h
  • aer_CTL_VALID1_NLP_RX_LINATTN_MAX : aer.h
  • aer_CTL_VALID1_NLP_RX_LINATTN_MIN : aer.h
  • aer_CTL_VALID1_NLP_RX_OUT_TC : aer.h
  • aer_CTL_VALID1_NLP_TOTAL_LINATTN_MIN : aer.h
  • aer_CTL_VALID1_NLP_TX_CLIPAGG : aer.h
  • aer_CTL_VALID1_NLP_TX_IN_TC : aer.h
  • aer_CTL_VALID1_NLP_TX_LINATTN_MAX : aer.h
  • aer_CTL_VALID1_NLP_TX_LINATTN_MIN : aer.h
  • aer_CTL_VALID1_NLP_TX_OUT_TC : aer.h
  • aer_CTL_VALID2_NR_FBAND1_MAX_ATTEN : aer.h
  • aer_CTL_VALID2_NR_FBAND2_MAX_ATTEN : aer.h
  • aer_CTL_VALID2_NR_FBAND3_MAX_ATTEN : aer.h
  • aer_CTL_VALID2_NR_FBIN1_LIM : aer.h
  • aer_CTL_VALID2_NR_FBIN2_LIM : aer.h
  • aer_CTL_VALID2_NR_NOISE_HANGOVER : aer.h
  • aer_CTL_VALID2_NR_NOISE_THRESH : aer.h
  • aer_CTL_VALID2_NR_SIG_UPD_RATE_MAX : aer.h
  • aer_CTL_VALID2_NR_SIG_UPD_RATE_MIN : aer.h
  • aer_CTL_VALID2_TRACE_CONFIG : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_HI1 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_HI2 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_LO1 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_LO2 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_CNG_MAX : aer.h
  • aer_CTL_VALID2_TX_FDNLP_MSEC_DELAY : aer.h
  • aer_CTL_VALID3_COH_CNT_THRESH : aer.h
  • aer_CTL_VALID3_COH_HANGOVER : aer.h
  • aer_CTL_VALID3_COH_RATIO_THRESH : aer.h
  • aer_CTL_VALID3_HANGOVER_RXTOTX : aer.h
  • aer_CTL_VALID3_HANGOVER_TXTORX : aer.h
  • aer_CTL_VALID3_HLC_POWER_TC : aer.h
  • aer_CTL_VALID3_HLC_RAMP_OUT_TC : aer.h
  • aer_CTL_VALID3_HLC_THRESHOLD : aer.h
  • aer_CTL_VALID3_NG_HANGOVER : aer.h
  • aer_CTL_VALID3_NG_NOISE_LEVEL : aer.h
  • aer_CTL_VALID3_NG_RAMPIN_PERIOD : aer.h
  • aer_CTL_VALID3_RX_SLIM_MODE : aer.h
  • aer_CTL_VALID3_THRESH_NOISE_RX : aer.h
  • aer_CTL_VALID3_THRESH_NOISE_TX : aer.h
  • aer_CTL_VALID3_THRESH_RX_NLD : aer.h
  • aer_CTL_VALID3_TX_SLIM_MODE : aer.h
  • aer_CTL_VALID4_CLIP_SCALE : aer.h
  • aer_CTL_VALID4_DT_HANGOVER : aer.h
  • aer_CTL_VALID4_DT_THRESH : aer.h
  • aer_EQBQ_MAX_NUM_SECTION_PARAMS : aer.h
  • aer_EQBQ_MAX_NUM_SECTIONS : aer.h
  • aer_EQBQ_SECTION_TYPE_2NDORDER_HPBIT : aer.h
  • aer_EQBQ_SECTION_TYPE_2NDORDER_LPBIT : aer.h
  • aer_EQBQ_SECTION_TYPE_BP : aer.h
  • aer_EQBQ_SECTION_TYPE_BS : aer.h
  • aer_EQBQ_SECTION_TYPE_HP : aer.h
  • aer_EQBQ_SECTION_TYPE_LP : aer.h
  • aer_ERR_INVALIDPAR : aer.h
  • aer_ERR_LOAD_INPROCESS : aer.h
  • aer_ERR_MEMBUFVECOVF : aer.h
  • aer_ERR_NOINITGAIN : aer.h
  • aer_ERR_NOMEMORY : aer.h
  • aer_ERR_NOTCLOSED : aer.h
  • aer_ERR_NOTCREATED : aer.h
  • aer_ERR_NOTOPENED : aer.h
  • aer_FDNLP_BIN_LOWER_LIMIT : aer.h
  • aer_FDNLP_BIN_UPPER_LIMIT_16K : aer.h
  • aer_FDNLP_BIN_UPPER_LIMIT_8K : aer.h
  • aer_FDNLP_DELAY_LOWER_LIMIT : aer.h
  • aer_FDNLP_DELAY_UPPER_LIMIT : aer.h
  • aer_NOERR : aer.h
  • aer_NR_NOISE_THR_LOWER_LIMIT : aer.h
  • aer_NR_NOISE_THR_UPPER_LIMIT : aer.h
  • aer_NUM_WORDS_PER_H_VEC_16K : aer.h
  • aer_NUM_WORDS_PER_H_VEC_8K : aer.h
  • aer_PHM_HES : aer.h
  • aer_PHM_HESGL : aer.h
  • aer_PHM_HF : aer.h
  • aer_PHM_HS : aer.h
  • aer_PHM_HSGL : aer.h
  • aer_RESET_FULL : aer.h
  • aer_RESET_OTHER_PARAMS : aer.h
  • aer_RESET_TAIL_MODEL : aer.h
  • aer_RESET_TXRX_EQ_FILT : aer.h
  • aer_RESET_TXRX_GAINS : aer.h
  • aer_SIZE_FDNLP_REQ : aer.h
  • aer_SIZE_USE_BANDSPLIT : aer.h
  • aer_SLIM_MODE_LOWER_LIMIT : aer.h
  • aer_SLIM_MODE_UPPER_LIMIT : aer.h
  • aer_SRATE_16K : aer.h
  • aer_SRATE_8K : aer.h
  • aer_SRATE_BIT_RXIN : aer.h
  • aer_SRATE_BIT_RXOUT_TXIN : aer.h
  • aer_SRATE_BIT_TXOUT : aer.h
  • aer_SRATE_RXIN_16K : aer.h
  • aer_SRATE_RXIN_8K : aer.h
  • aer_SRATE_RXOUT_TXIN_16K : aer.h
  • aer_SRATE_RXOUT_TXIN_8K : aer.h
  • aer_SRATE_TXOUT_16K : aer.h
  • aer_SRATE_TXOUT_8K : aer.h
  • aer_TRACE_ASNR_DATA : aer.h
  • aer_TRACE_COH_DATA : aer.h
  • aer_TRACE_FDNLP_DATA : aer.h
  • aer_TRACE_FILTER_COEF : aer.h
  • aer_TRACE_MAX_SIZE_RX : aer.h
  • aer_TRACE_MAX_SIZE_TX : aer.h
  • aer_TRACE_RESERVED_BITS : aer.h
  • aer_WARN_COMPUTE_CLIP : aer.h
  • aer_WARN_PATH_SELECT : aer.h
  • aer_WARN_RX_NLP : aer.h
  • aer_WARN_TX_NLP : aer.h
  • aerActivate() : aer.h
  • aerClose() : aer.h
  • aerConfig_t : aer.h
  • aerControl() : aer.h
  • aerControl_t : aer.h
  • aerCreate() : aer.h
  • aerCreateConfig_t : aer.h
  • aerDebugStat_t : aer.h
  • aerDelete() : aer.h
  • aerEqConfig_t : aer.h
  • aerEventStats_t : aer.h
  • aerGetFilter() : aer.h
  • aerGetGains() : aer.h
  • aerGetPerformance() : aer.h
  • aerGetSizes() : aer.h
  • aerInfo_t : aer.h
  • aerModeControl_t : aer.h
  • aerNew() : aer.h
  • aerNewConfig_t : aer.h
  • aerOpen() : aer.h
  • aerPiquaStats_t : aer.h
  • aerPutFilter() : aer.h
  • aerReceiveIn() : aer.h
  • aerSendIn() : aer.h
  • aerSizeConfig_t : aer.h
  • aerSrate_t : aer.h
  • aerTailModel_t : aer.h
  • aerTraceConfig_t : aer.h
  • aerVersion_t : aer.h
  • agc_CFG_VALID_BITS_ALL_1 : agc.h
  • agc_CFG_VALID_SAMP_RATE : agc.h
  • agc_CRT_MULT_MIC_MODE : agc.h
  • agc_CTL_MODES_CLEAR_ALL : agc.h
  • agc_CTL_MODES_ENABLE_ADAPT : agc.h
  • agc_CTL_MODES_ENABLE_AGC : agc.h
  • agc_CTL_VALID_AERDATA : agc.h
  • agc_CTL_VALID_MIC_GAIN_MAX : agc.h
  • agc_CTL_VALID_MIC_GAIN_MIN : agc.h
  • agc_CTL_VALID_MICGAIN : agc.h
  • agc_CTL_VALID_MICGAIN_ADAPT : agc.h
  • agc_CTL_VALID_MICGAIN_SWING_MAX : agc.h
  • agc_CTL_VALID_MODES : agc.h
  • agc_CTL_VALID_SAT_HANGOVER : agc.h
  • agc_CTL_VALID_SAT_THRESHOLD : agc.h
  • agc_CTL_VALID_SPKGAIN : agc.h
  • agc_ERR_GAIN_REQ_NOT_SERVICED : agc.h
  • agc_ERR_INVALIDPAR : agc.h
  • agc_ERR_MEMBUFVECOVF : agc.h
  • agc_ERR_MIC_GAIN_DUPLICATE : agc.h
  • agc_ERR_NOMEMORY : agc.h
  • agc_ERR_NOTCLOSED : agc.h
  • agc_ERR_NOTCREATED : agc.h
  • agc_ERR_NOTOPENED : agc.h
  • agc_EVC_GET_PRENLP_GAIN : agc.h
  • agc_EVC_MGAIN_CHANGE : agc.h
  • agc_EVC_SAT_DETECTED : agc.h
  • agc_EVC_SAT_FALSE : agc.h
  • agc_EVC_SET_PRENLP_GAIN : agc.h
  • agc_EVC_SGAIN_CHANGE : agc.h
  • agc_NOERR : agc.h
  • agc_RESET_FULL_RESET : agc.h
  • agc_RESET_MIC_SPK_GAINS : agc.h
  • agc_RESET_OTHER_PARAMS : agc.h
  • agc_RESET_POWER_HIST : agc.h
  • agc_SRATE_16K : agc.h
  • agc_SRATE_8K : agc.h
  • agcAerData_t : agc.h
  • agcClose() : agc.h
  • agcConfig_t : agc.h
  • agcControl() : agc.h
  • agcControl_t : agc.h
  • agcCreate() : agc.h
  • agcCreateConfig_t : agc.h
  • agcDebugStat_t : agc.h
  • agcDelete() : agc.h
  • agcEvent_t : agc.h
  • agcGetPerformance() : agc.h
  • agcGetSizes() : agc.h
  • agcModeControl_t : agc.h
  • agcNew() : agc.h
  • agcNewConfig_t : agc.h
  • agcOpen() : agc.h
  • agcSendIn() : agc.h
  • agcSizeConfig_t : agc.h
  • agcSrate_t : agc.h
  • agcVersion_t : agc.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- b -

  • bf_CTL_CFG_ENABLE : bf.h
  • bf_CTL_CFG_OPERATION : bf.h
  • bf_CTL_CONFIG : bf.h
  • bf_CTL_MICS : bf.h
  • bf_CTL_RESET : bf.h
  • bf_DEBUG_STATE_NUM_TUINT : bf.h
  • bf_DISABLE : bf.h
  • bf_ENABLE : bf.h
  • bf_ERR_DISABLED : bf.h
  • bf_ERR_FILTNOCOEF : bf.h
  • bf_ERR_INVALIDBUF : bf.h
  • bf_ERR_INVALIDOPT : bf.h
  • bf_ERR_INVALIDPAR : bf.h
  • bf_ERR_INVALIDSRC : bf.h
  • bf_ERR_NOMEMORY : bf.h
  • bf_ERR_NOTCLOSED : bf.h
  • bf_ERR_NOTOPENED : bf.h
  • bf_FG_BF : bf.h
  • bf_MAX_SUPPORTED_FILT_LEN : bf.h
  • bf_MAX_SUPPORTED_NUM_MICS : bf.h
  • bf_NOERR : bf.h
  • bf_OPT_BYPASS : bf.h
  • bf_OPT_ERROR : bf.h
  • bf_OPT_NORMAL : bf.h
  • bf_OPT_SUBSET : bf.h
  • bf_SAMP_RATE_16K : bf.h
  • bf_SAMP_RATE_8K : bf.h
  • bf_TYPE_FIXED : bf.h
  • bfClose() : bf.h
  • bfConfig_t : bf.h
  • bfControl() : bf.h
  • bfControl_t : bf.h
  • bfCtlCfg_t : bf.h
  • bfDebugStat() : bf.h
  • bfDebugStat_t : bf.h
  • bfDelete() : bf.h
  • bfGetFilter() : bf.h
  • bfGetSizes() : bf.h
  • bfNew() : bf.h
  • bfNewConfig_t : bf.h
  • bfOpen() : bf.h
  • bfProcess() : bf.h
  • bfPutFilter() : bf.h
  • bfSizeConfig_t : bf.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- d -

  • drc_BAND_CFG_VALID_CURVE_PARAM_BIT : drc.h
  • drc_BAND_CFG_VALID_GAIN_TC_BIT : drc.h
  • drc_BAND_CFG_VALID_LEV_TC_BIT : drc.h
  • drc_CFGBITS_FBAND : drc.h
  • drc_CFGBITS_HBAND : drc.h
  • drc_CFGBITS_LBAND : drc.h
  • drc_CFGBITS_LIM : drc.h
  • drc_CFGBITS_MBAND : drc.h
  • drc_CFGBITS_VAD : drc.h
  • drc_CTL_DRC_OFF : drc.h
  • drc_CTL_DRC_ON : drc.h
  • drc_CTL_SET_BITS : drc.h
  • drc_CTL_SET_FBAND : drc.h
  • drc_CTL_SET_FIR_HBAND : drc.h
  • drc_CTL_SET_FIR_LBAND : drc.h
  • drc_CTL_SET_FIR_MBAND : drc.h
  • drc_CTL_SET_HBAND : drc.h
  • drc_CTL_SET_LBAND : drc.h
  • drc_CTL_SET_LIM : drc.h
  • drc_CTL_SET_MBAND : drc.h
  • drc_ERR_CREATED : drc.h
  • drc_ERR_INVALIDCFGBITS : drc.h
  • drc_ERR_INVALIDFIR : drc.h
  • drc_ERR_INVALIDPAR : drc.h
  • drc_ERR_INVALIDSRATE : drc.h
  • drc_ERR_MEMBUFVECOVF : drc.h
  • drc_ERR_NOMEMORY : drc.h
  • drc_ERR_NOTCLOSED : drc.h
  • drc_ERR_NOTCREATED : drc.h
  • drc_ERR_NOTOPENED : drc.h
  • drc_FIR_HALF_COEF_16KHZ : drc.h
  • drc_FIR_HALF_COEF_8KHZ : drc.h
  • drc_GET_CFGBITS : drc.h
  • drc_GET_FBAND_PARAM : drc.h
  • drc_GET_HBAND_FIR_COEF : drc.h
  • drc_GET_HBAND_PARAM : drc.h
  • drc_GET_LBAND_FIR_COEF : drc.h
  • drc_GET_LBAND_PARAM : drc.h
  • drc_GET_LIM_PARAM : drc.h
  • drc_GET_MBAND_FIR_COEF : drc.h
  • drc_GET_MBAND_PARAM : drc.h
  • drc_LIM_CFG_VALID_DELAY_BIT : drc.h
  • drc_LIM_CFG_VALID_GAIN_TC_BIT : drc.h
  • drc_LIM_CFG_VALID_LEV_TC_BIT : drc.h
  • drc_LIM_CFG_VALID_THRESH_BIT : drc.h
  • drc_NOERR : drc.h
  • drc_SAMP_RATE_16K : drc.h
  • drc_SAMP_RATE_8K : drc.h
  • drcBandCfg_t : drc.h
  • drcBandParam_t : drc.h
  • drcClose() : drc.h
  • drcControl() : drc.h
  • drcControl_t : drc.h
  • drcCreate() : drc.h
  • drcCurveParam_t : drc.h
  • drcDelete() : drc.h
  • drcGetParameter() : drc.h
  • drcGetSizes() : drc.h
  • drcLimiterCfg_t : drc.h
  • drcLimParam_t : drc.h
  • drcNew() : drc.h
  • drcOpen() : drc.h
  • drcOpenConfig_t : drc.h
  • drcProcess() : drc.h
  • drcReportParam_t : drc.h
  • drcSizeConfig_t : drc.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- t -

  • ti_mas_aer_Version___VERS : Version.h
  • ti_mas_aer_Version__top__ : Version.h
  • ti_mas_aer_Version_BTYPE : Version.h
  • ti_mas_aer_Version_BUILD : Version.h
  • ti_mas_aer_Version_MAJOR : Version.h
  • ti_mas_aer_Version_MINOR : Version.h
  • ti_mas_aer_Version_PATCH : Version.h
  • ti_mas_aer_Version_QUALITY : Version.h
  • ti_mas_aer_Version_WIDTH : Version.h
  • ti_mas_aer_Version_XVERTICAL : Version.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

- _ -

  • __extern : Version.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

- m -

  • mss_MAX_NUM_SRC_TYPES : mss.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

- a -

  • aer_CFG_VALID_BITS_ALL_1 : aer.h
  • aer_CFG_VALID_DELAY_RXAG : aer.h
  • aer_CFG_VALID_DELAY_TXAG : aer.h
  • aer_CFG_VALID_INTER_SAMP : aer.h
  • aer_CFG_VALID_PHONE_MODE : aer.h
  • aer_CFG_VALID_SAMP_RATES : aer.h
  • aer_CFG_VALID_TAIL_LENGTH : aer.h
  • aer_CFG_VALID_Y2X_DELAY : aer.h
  • aer_CNG_LEVEL_LOWER_LIMIT : aer.h
  • aer_CNG_LEVEL_UPPER_LIMIT : aer.h
  • aer_CRT_MULT_MIC_MODE : aer.h
  • aer_CTL0_ADAPT_IN_MUTE : aer.h
  • aer_CTL0_BS_HIGH_BAND_LOCK : aer.h
  • aer_CTL0_CLEAR_ALL : aer.h
  • aer_CTL0_CLEAR_FILTER : aer.h
  • aer_CTL0_DISABLE_RX_NLP : aer.h
  • aer_CTL0_DISABLE_TX_CLIPPER : aer.h
  • aer_CTL0_DISABLE_TX_NLP : aer.h
  • aer_CTL0_ENABLE_ECHO_CANCELLER : aer.h
  • aer_CTL0_ENABLE_FORCED_RX_CNG : aer.h
  • aer_CTL0_ENABLE_FORCED_TX_CNG : aer.h
  • aer_CTL0_ENABLE_NLP : aer.h
  • aer_CTL0_ENABLE_NORMAL_RX_CNG : aer.h
  • aer_CTL0_ENABLE_NORMAL_TX_CNG : aer.h
  • aer_CTL0_ENABLE_UPDATE : aer.h
  • aer_CTL0_HALF_DUPLEX : aer.h
  • aer_CTL0_RELAX_TXNLP_IDLE : aer.h
  • aer_CTL1_BIT_11_RESERVED : aer.h
  • aer_CTL1_CNG_ADAPT : aer.h
  • aer_CTL1_DROP_RX_HIGH_BAND : aer.h
  • aer_CTL1_DROP_TX_HIGH_BAND : aer.h
  • aer_CTL1_ENABLE_HLC : aer.h
  • aer_CTL1_ENABLE_NGUARD : aer.h
  • aer_CTL1_ENABLE_NR : aer.h
  • aer_CTL1_ENABLE_RX_EQ : aer.h
  • aer_CTL1_ENABLE_TX_EQ : aer.h
  • aer_CTL1_FREEZE_TAIL_UPDATE : aer.h
  • aer_CTL1_INCREASE_MIN_HVEC : aer.h
  • aer_CTL1_MUTE_ON : aer.h
  • aer_CTL1_NLP_RAMP_SCALE_ON : aer.h
  • aer_CTL1_PARTIAL_RESET : aer.h
  • aer_CTL1_RESET_PARAMS : aer.h
  • aer_CTL1_USE_FDNLP : aer.h
  • aer_CTL2_BIT_10_RESERVED : aer.h
  • aer_CTL2_BIT_11_RESERVED : aer.h
  • aer_CTL2_BIT_12_RESERVED : aer.h
  • aer_CTL2_BIT_13_RESERVED : aer.h
  • aer_CTL2_BIT_14_RESERVED : aer.h
  • aer_CTL2_BIT_15_RESERVED : aer.h
  • aer_CTL2_BIT_4_RESERVED : aer.h
  • aer_CTL2_BIT_5_RESERVED : aer.h
  • aer_CTL2_BIT_6_RESERVED : aer.h
  • aer_CTL2_BIT_7_RESERVED : aer.h
  • aer_CTL2_BIT_8_RESERVED : aer.h
  • aer_CTL2_BIT_9_RESERVED : aer.h
  • aer_CTL2_ENABLE_TRACE : aer.h
  • aer_CTL2_FREEZE_NOISE_EST : aer.h
  • aer_CTL2_MICSAT : aer.h
  • aer_CTL2_SKIP_COHERENCE : aer.h
  • aer_CTL_VALID0_MODES_CTL0 : aer.h
  • aer_CTL_VALID0_MODES_CTL1 : aer.h
  • aer_CTL_VALID0_MODES_CTL2 : aer.h
  • aer_CTL_VALID0_PHONE_MODE : aer.h
  • aer_CTL_VALID0_RX_AG_CHG_DELAY : aer.h
  • aer_CTL_VALID0_RX_ANALOG : aer.h
  • aer_CTL_VALID0_RX_DIGITAL : aer.h
  • aer_CTL_VALID0_RX_EQ_PARAMS : aer.h
  • aer_CTL_VALID0_SAMPLING_RATES : aer.h
  • aer_CTL_VALID0_TAIL_LENGTH : aer.h
  • aer_CTL_VALID0_TX_AG_CHG_DELAY : aer.h
  • aer_CTL_VALID0_TX_AG_CHG_INTERP : aer.h
  • aer_CTL_VALID0_TX_ANALOG : aer.h
  • aer_CTL_VALID0_TX_DIGITAL : aer.h
  • aer_CTL_VALID0_TX_EQ_PARAMS : aer.h
  • aer_CTL_VALID0_Y2X_DELAY : aer.h
  • aer_CTL_VALID1_CNG_RX_LEVEL : aer.h
  • aer_CTL_VALID1_CNG_TX_LEVEL : aer.h
  • aer_CTL_VALID1_GAIN_SPLIT_TC : aer.h
  • aer_CTL_VALID1_NLP_CLIPPER_MAX_ERLE : aer.h
  • aer_CTL_VALID1_NLP_CLOSS_TARGET : aer.h
  • aer_CTL_VALID1_NLP_LINATTN_MAX_ERLE : aer.h
  • aer_CTL_VALID1_NLP_RX_IN_TC : aer.h
  • aer_CTL_VALID1_NLP_RX_LINATTN_MAX : aer.h
  • aer_CTL_VALID1_NLP_RX_LINATTN_MIN : aer.h
  • aer_CTL_VALID1_NLP_RX_OUT_TC : aer.h
  • aer_CTL_VALID1_NLP_TOTAL_LINATTN_MIN : aer.h
  • aer_CTL_VALID1_NLP_TX_CLIPAGG : aer.h
  • aer_CTL_VALID1_NLP_TX_IN_TC : aer.h
  • aer_CTL_VALID1_NLP_TX_LINATTN_MAX : aer.h
  • aer_CTL_VALID1_NLP_TX_LINATTN_MIN : aer.h
  • aer_CTL_VALID1_NLP_TX_OUT_TC : aer.h
  • aer_CTL_VALID2_NR_FBAND1_MAX_ATTEN : aer.h
  • aer_CTL_VALID2_NR_FBAND2_MAX_ATTEN : aer.h
  • aer_CTL_VALID2_NR_FBAND3_MAX_ATTEN : aer.h
  • aer_CTL_VALID2_NR_FBIN1_LIM : aer.h
  • aer_CTL_VALID2_NR_FBIN2_LIM : aer.h
  • aer_CTL_VALID2_NR_NOISE_HANGOVER : aer.h
  • aer_CTL_VALID2_NR_NOISE_THRESH : aer.h
  • aer_CTL_VALID2_NR_SIG_UPD_RATE_MAX : aer.h
  • aer_CTL_VALID2_NR_SIG_UPD_RATE_MIN : aer.h
  • aer_CTL_VALID2_TRACE_CONFIG : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_HI1 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_HI2 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_LO1 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_BIN_LO2 : aer.h
  • aer_CTL_VALID2_TX_FDNLP_CNG_MAX : aer.h
  • aer_CTL_VALID2_TX_FDNLP_MSEC_DELAY : aer.h
  • aer_CTL_VALID3_COH_CNT_THRESH : aer.h
  • aer_CTL_VALID3_COH_HANGOVER : aer.h
  • aer_CTL_VALID3_COH_RATIO_THRESH : aer.h
  • aer_CTL_VALID3_HANGOVER_RXTOTX : aer.h
  • aer_CTL_VALID3_HANGOVER_TXTORX : aer.h
  • aer_CTL_VALID3_HLC_POWER_TC : aer.h
  • aer_CTL_VALID3_HLC_RAMP_OUT_TC : aer.h
  • aer_CTL_VALID3_HLC_THRESHOLD : aer.h
  • aer_CTL_VALID3_NG_HANGOVER : aer.h
  • aer_CTL_VALID3_NG_NOISE_LEVEL : aer.h
  • aer_CTL_VALID3_NG_RAMPIN_PERIOD : aer.h
  • aer_CTL_VALID3_RX_SLIM_MODE : aer.h
  • aer_CTL_VALID3_THRESH_NOISE_RX : aer.h
  • aer_CTL_VALID3_THRESH_NOISE_TX : aer.h
  • aer_CTL_VALID3_THRESH_RX_NLD : aer.h
  • aer_CTL_VALID3_TX_SLIM_MODE : aer.h
  • aer_CTL_VALID4_CLIP_SCALE : aer.h
  • aer_CTL_VALID4_DT_HANGOVER : aer.h
  • aer_CTL_VALID4_DT_THRESH : aer.h
  • aer_EQBQ_MAX_NUM_SECTION_PARAMS : aer.h
  • aer_EQBQ_MAX_NUM_SECTIONS : aer.h
  • aer_EQBQ_SECTION_TYPE_2NDORDER_HPBIT : aer.h
  • aer_EQBQ_SECTION_TYPE_2NDORDER_LPBIT : aer.h
  • aer_EQBQ_SECTION_TYPE_BP : aer.h
  • aer_EQBQ_SECTION_TYPE_BS : aer.h
  • aer_EQBQ_SECTION_TYPE_HP : aer.h
  • aer_EQBQ_SECTION_TYPE_LP : aer.h
  • aer_FDNLP_BIN_LOWER_LIMIT : aer.h
  • aer_FDNLP_BIN_UPPER_LIMIT_16K : aer.h
  • aer_FDNLP_BIN_UPPER_LIMIT_8K : aer.h
  • aer_FDNLP_DELAY_LOWER_LIMIT : aer.h
  • aer_FDNLP_DELAY_UPPER_LIMIT : aer.h
  • aer_NR_NOISE_THR_LOWER_LIMIT : aer.h
  • aer_NR_NOISE_THR_UPPER_LIMIT : aer.h
  • aer_NUM_WORDS_PER_H_VEC_16K : aer.h
  • aer_NUM_WORDS_PER_H_VEC_8K : aer.h
  • aer_PHM_HES : aer.h
  • aer_PHM_HESGL : aer.h
  • aer_PHM_HF : aer.h
  • aer_PHM_HS : aer.h
  • aer_PHM_HSGL : aer.h
  • aer_RESET_FULL : aer.h
  • aer_RESET_OTHER_PARAMS : aer.h
  • aer_RESET_TAIL_MODEL : aer.h
  • aer_RESET_TXRX_EQ_FILT : aer.h
  • aer_RESET_TXRX_GAINS : aer.h
  • aer_SIZE_FDNLP_REQ : aer.h
  • aer_SIZE_USE_BANDSPLIT : aer.h
  • aer_SLIM_MODE_LOWER_LIMIT : aer.h
  • aer_SLIM_MODE_UPPER_LIMIT : aer.h
  • aer_SRATE_RXIN_16K : aer.h
  • aer_SRATE_RXIN_8K : aer.h
  • aer_SRATE_RXOUT_TXIN_16K : aer.h
  • aer_SRATE_RXOUT_TXIN_8K : aer.h
  • aer_SRATE_TXOUT_16K : aer.h
  • aer_SRATE_TXOUT_8K : aer.h
  • aer_TRACE_ASNR_DATA : aer.h
  • aer_TRACE_COH_DATA : aer.h
  • aer_TRACE_FDNLP_DATA : aer.h
  • aer_TRACE_FILTER_COEF : aer.h
  • aer_TRACE_MAX_SIZE_RX : aer.h
  • aer_TRACE_MAX_SIZE_TX : aer.h
  • aer_TRACE_RESERVED_BITS : aer.h
  • agc_CFG_VALID_BITS_ALL_1 : agc.h
  • agc_CFG_VALID_SAMP_RATE : agc.h
  • agc_CRT_MULT_MIC_MODE : agc.h
  • agc_CTL_MODES_CLEAR_ALL : agc.h
  • agc_CTL_MODES_ENABLE_ADAPT : agc.h
  • agc_CTL_MODES_ENABLE_AGC : agc.h
  • agc_CTL_VALID_AERDATA : agc.h
  • agc_CTL_VALID_MIC_GAIN_MAX : agc.h
  • agc_CTL_VALID_MIC_GAIN_MIN : agc.h
  • agc_CTL_VALID_MICGAIN : agc.h
  • agc_CTL_VALID_MICGAIN_ADAPT : agc.h
  • agc_CTL_VALID_MICGAIN_SWING_MAX : agc.h
  • agc_CTL_VALID_MODES : agc.h
  • agc_CTL_VALID_SAT_HANGOVER : agc.h
  • agc_CTL_VALID_SAT_THRESHOLD : agc.h
  • agc_CTL_VALID_SPKGAIN : agc.h
  • agc_RESET_FULL_RESET : agc.h
  • agc_RESET_MIC_SPK_GAINS : agc.h
  • agc_RESET_OTHER_PARAMS : agc.h
  • agc_RESET_POWER_HIST : agc.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

- b -

  • bf_CTL_CFG_ENABLE : bf.h
  • bf_CTL_CFG_OPERATION : bf.h
  • bf_CTL_CONFIG : bf.h
  • bf_CTL_MICS : bf.h
  • bf_CTL_RESET : bf.h
  • bf_DEBUG_STATE_NUM_TUINT : bf.h
  • bf_MAX_SUPPORTED_FILT_LEN : bf.h
  • bf_MAX_SUPPORTED_NUM_MICS : bf.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

- d -

  • drc_FIR_HALF_COEF_16KHZ : drc.h
  • drc_FIR_HALF_COEF_8KHZ : drc.h
  • drc_SAMP_RATE_16K : drc.h
  • drc_SAMP_RATE_8K : drc.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

- t -

  • ti_mas_aer_Version___VERS : Version.h
  • ti_mas_aer_Version__top__ : Version.h
  • ti_mas_aer_Version_BTYPE : Version.h
  • ti_mas_aer_Version_BUILD : Version.h
  • ti_mas_aer_Version_MAJOR : Version.h
  • ti_mas_aer_Version_MINOR : Version.h
  • ti_mas_aer_Version_PATCH : Version.h
  • ti_mas_aer_Version_QUALITY : Version.h
  • ti_mas_aer_Version_WIDTH : Version.h
  • ti_mas_aer_Version_XVERTICAL : Version.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • m
  • t
  • v

- v -

  • Version_BTYPE : Version.h
  • Version_BUILD : Version.h
  • Version_MAJOR : Version.h
  • Version_MINOR : Version.h
  • Version_PATCH : Version.h
  • Version_QUALITY : Version.h
  • Version_WIDTH : Version.h
  • Version_XVERTICAL : Version.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • a
  • b
  • d
  • m

- a -

  • aer_ERR_INVALIDPAR : aer.h
  • aer_ERR_LOAD_INPROCESS : aer.h
  • aer_ERR_MEMBUFVECOVF : aer.h
  • aer_ERR_NOINITGAIN : aer.h
  • aer_ERR_NOMEMORY : aer.h
  • aer_ERR_NOTCLOSED : aer.h
  • aer_ERR_NOTCREATED : aer.h
  • aer_ERR_NOTOPENED : aer.h
  • aer_NOERR : aer.h
  • aer_SRATE_16K : aer.h
  • aer_SRATE_8K : aer.h
  • aer_SRATE_BIT_RXIN : aer.h
  • aer_SRATE_BIT_RXOUT_TXIN : aer.h
  • aer_SRATE_BIT_TXOUT : aer.h
  • aer_WARN_COMPUTE_CLIP : aer.h
  • aer_WARN_PATH_SELECT : aer.h
  • aer_WARN_RX_NLP : aer.h
  • aer_WARN_TX_NLP : aer.h
  • agc_ERR_GAIN_REQ_NOT_SERVICED : agc.h
  • agc_ERR_INVALIDPAR : agc.h
  • agc_ERR_MEMBUFVECOVF : agc.h
  • agc_ERR_MIC_GAIN_DUPLICATE : agc.h
  • agc_ERR_NOMEMORY : agc.h
  • agc_ERR_NOTCLOSED : agc.h
  • agc_ERR_NOTCREATED : agc.h
  • agc_ERR_NOTOPENED : agc.h
  • agc_EVC_GET_PRENLP_GAIN : agc.h
  • agc_EVC_MGAIN_CHANGE : agc.h
  • agc_EVC_SAT_DETECTED : agc.h
  • agc_EVC_SAT_FALSE : agc.h
  • agc_EVC_SET_PRENLP_GAIN : agc.h
  • agc_EVC_SGAIN_CHANGE : agc.h
  • agc_NOERR : agc.h
  • agc_SRATE_16K : agc.h
  • agc_SRATE_8K : agc.h

- b -

  • bf_DISABLE : bf.h
  • bf_ENABLE : bf.h
  • bf_ERR_DISABLED : bf.h
  • bf_ERR_FILTNOCOEF : bf.h
  • bf_ERR_INVALIDBUF : bf.h
  • bf_ERR_INVALIDOPT : bf.h
  • bf_ERR_INVALIDPAR : bf.h
  • bf_ERR_INVALIDSRC : bf.h
  • bf_ERR_NOMEMORY : bf.h
  • bf_ERR_NOTCLOSED : bf.h
  • bf_ERR_NOTOPENED : bf.h
  • bf_FG_BF : bf.h
  • bf_NOERR : bf.h
  • bf_OPT_BYPASS : bf.h
  • bf_OPT_ERROR : bf.h
  • bf_OPT_NORMAL : bf.h
  • bf_OPT_SUBSET : bf.h
  • bf_SAMP_RATE_16K : bf.h
  • bf_SAMP_RATE_8K : bf.h
  • bf_TYPE_FIXED : bf.h

- d -

  • drc_BAND_CFG_VALID_CURVE_PARAM_BIT : drc.h
  • drc_BAND_CFG_VALID_GAIN_TC_BIT : drc.h
  • drc_BAND_CFG_VALID_LEV_TC_BIT : drc.h
  • drc_CFGBITS_FBAND : drc.h
  • drc_CFGBITS_HBAND : drc.h
  • drc_CFGBITS_LBAND : drc.h
  • drc_CFGBITS_LIM : drc.h
  • drc_CFGBITS_MBAND : drc.h
  • drc_CFGBITS_VAD : drc.h
  • drc_CTL_DRC_OFF : drc.h
  • drc_CTL_DRC_ON : drc.h
  • drc_CTL_SET_BITS : drc.h
  • drc_CTL_SET_FBAND : drc.h
  • drc_CTL_SET_FIR_HBAND : drc.h
  • drc_CTL_SET_FIR_LBAND : drc.h
  • drc_CTL_SET_FIR_MBAND : drc.h
  • drc_CTL_SET_HBAND : drc.h
  • drc_CTL_SET_LBAND : drc.h
  • drc_CTL_SET_LIM : drc.h
  • drc_CTL_SET_MBAND : drc.h
  • drc_ERR_CREATED : drc.h
  • drc_ERR_INVALIDCFGBITS : drc.h
  • drc_ERR_INVALIDFIR : drc.h
  • drc_ERR_INVALIDPAR : drc.h
  • drc_ERR_INVALIDSRATE : drc.h
  • drc_ERR_MEMBUFVECOVF : drc.h
  • drc_ERR_NOMEMORY : drc.h
  • drc_ERR_NOTCLOSED : drc.h
  • drc_ERR_NOTCREATED : drc.h
  • drc_ERR_NOTOPENED : drc.h
  • drc_GET_CFGBITS : drc.h
  • drc_GET_FBAND_PARAM : drc.h
  • drc_GET_HBAND_FIR_COEF : drc.h
  • drc_GET_HBAND_PARAM : drc.h
  • drc_GET_LBAND_FIR_COEF : drc.h
  • drc_GET_LBAND_PARAM : drc.h
  • drc_GET_LIM_PARAM : drc.h
  • drc_GET_MBAND_FIR_COEF : drc.h
  • drc_GET_MBAND_PARAM : drc.h
  • drc_LIM_CFG_VALID_DELAY_BIT : drc.h
  • drc_LIM_CFG_VALID_GAIN_TC_BIT : drc.h
  • drc_LIM_CFG_VALID_LEV_TC_BIT : drc.h
  • drc_LIM_CFG_VALID_THRESH_BIT : drc.h
  • drc_NOERR : drc.h

- m -

  • mss_ERR_INVALIDPAR : mss.h
  • mss_ERR_INVALIDSRC : mss.h
  • mss_ERR_NOMEMORY : mss.h
  • mss_ERR_NOTCLOSED : mss.h
  • mss_ERR_NOTOPENED : mss.h
  • mss_NOERR : mss.h
  • mss_SAMP_RATE_16K : mss.h
  • mss_SAMP_RATE_8K : mss.h
  • mss_SRC_BEAM : mss.h
  • mss_SRC_INVALID : mss.h
  • mss_SRC_MAX : mss.h
  • mss_SRC_MIC_CLEAN : mss.h
  • mss_SRC_MIC_FIXED : mss.h
  • mss_SRC_MIC_REMOTE : mss.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • a
  • b
  • d
  • m

- a -

  • aerActivate() : aer.h
  • aerClose() : aer.h
  • aerControl() : aer.h
  • aerCreate() : aer.h
  • aerDelete() : aer.h
  • aerGetFilter() : aer.h
  • aerGetGains() : aer.h
  • aerGetPerformance() : aer.h
  • aerGetSizes() : aer.h
  • aerNew() : aer.h
  • aerOpen() : aer.h
  • aerPutFilter() : aer.h
  • aerReceiveIn() : aer.h
  • aerSendIn() : aer.h
  • agcClose() : agc.h
  • agcControl() : agc.h
  • agcCreate() : agc.h
  • agcDelete() : agc.h
  • agcGetPerformance() : agc.h
  • agcGetSizes() : agc.h
  • agcNew() : agc.h
  • agcOpen() : agc.h
  • agcSendIn() : agc.h

- b -

  • bfClose() : bf.h
  • bfControl() : bf.h
  • bfDebugStat() : bf.h
  • bfDelete() : bf.h
  • bfGetFilter() : bf.h
  • bfGetSizes() : bf.h
  • bfNew() : bf.h
  • bfOpen() : bf.h
  • bfProcess() : bf.h
  • bfPutFilter() : bf.h

- d -

  • drcClose() : drc.h
  • drcControl() : drc.h
  • drcCreate() : drc.h
  • drcDelete() : drc.h
  • drcGetParameter() : drc.h
  • drcGetSizes() : drc.h
  • drcNew() : drc.h
  • drcOpen() : drc.h
  • drcProcess() : drc.h

- m -

  • mssClose() : mss.h
  • mssControl() : mss.h
  • mssDebugStat() : mss.h
  • mssDelete() : mss.h
  • mssNew() : mss.h
  • mssOpen() : mss.h
  • mssProcess() : mss.h


AER: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Typedefs
  • Enumerator
  • Defines
  • a
  • b
  • d
  • m

- a -

  • aerConfig_t : aer.h
  • aerControl_t : aer.h
  • aerCreateConfig_t : aer.h
  • aerDebugStat_t : aer.h
  • aerEqConfig_t : aer.h
  • aerEventStats_t : aer.h
  • aerInfo_t : aer.h
  • aerModeControl_t : aer.h
  • aerNewConfig_t : aer.h
  • aerPiquaStats_t : aer.h
  • aerSizeConfig_t : aer.h
  • aerSrate_t : aer.h
  • aerTailModel_t : aer.h
  • aerTraceConfig_t : aer.h
  • aerVersion_t : aer.h
  • agcAerData_t : agc.h
  • agcConfig_t : agc.h
  • agcControl_t : agc.h
  • agcCreateConfig_t : agc.h
  • agcDebugStat_t : agc.h
  • agcEvent_t : agc.h
  • agcModeControl_t : agc.h
  • agcNewConfig_t : agc.h
  • agcSizeConfig_t : agc.h
  • agcSrate_t : agc.h
  • agcVersion_t : agc.h

- b -

  • bfConfig_t : bf.h
  • bfControl_t : bf.h
  • bfCtlCfg_t : bf.h
  • bfDebugStat_t : bf.h
  • bfNewConfig_t : bf.h
  • bfSizeConfig_t : bf.h

- d -

  • drcBandCfg_t : drc.h
  • drcBandParam_t : drc.h
  • drcControl_t : drc.h
  • drcCurveParam_t : drc.h
  • drcLimiterCfg_t : drc.h
  • drcLimParam_t : drc.h
  • drcOpenConfig_t : drc.h
  • drcReportParam_t : drc.h
  • drcSizeConfig_t : drc.h

- m -

  • mssConfig_t : mss.h
  • mssNewConfig_t : mss.h
  • mssSampRate_t : mss.h
  • mssSizeConfig_t : mss.h
  • mssSrc_t : mss.h
  • mssSrcType_t : mss.h


AER: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


AER: AER Constants (enum's and define's)

AER Constants (enum's and define's)
[AER Module API]

Collaboration diagram for AER Constants (enum's and define's):

Modules

AER Error Codes
AER Sampling Rates Definitions
AER Create Bitfield Masks
AER GetSize Configuration Bitfield Masks
AER Phone Modes
AER Control Bitfield Masks
AER Reset Bitfield Masks
AER Configuration Valid Bitfield Masks
AER Warning Messages
AER Equalizer Control Codes
AER Trace Maximum Sizes
AER Trace Config Bitfield Masks
AER parameter configuration ranges


AER: AER Functions

AER Functions
[AER Module API]

Collaboration diagram for AER Functions:

Functions

tint | aerCreate (aerCreateConfig_t *create_cfg)
Function aerCreate() provides AER with the system information that is shared among multiple instances.
Remarks:
Function aerCreate() must be called before any other AER API function is called. For examle, aerGetSizes() needs the max_sampling_rate of aerCreateConfig_t.

tint | aerGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, aerSizeConfig_t *cfg)
Function aerGetSizes() obtains from AER the memory requirements of an instance, which depend on provided configuration parameters.
tint | aerNew (void **aerInst, tint nbufs, ecomemBuffer_t *bufs, aerNewConfig_t *cfg)
Function aerNew() creates a new instance of AER.
Remarks:
Function aerNew() must be called before aerOpen()is called.

tint | aerClose (void *aerInst)
Function aerClose() closes an AER instance.
Remarks:
Function aerClose() must be called before aerDelete() is called.

tint | aerControl (void *aerInst, aerControl_t *ctl)
Function aerControl() enables or disables a type of AER function or changes the value of a certain parameter.
tint | aerDelete (void **aerInst, tint nbufs, ecomemBuffer_t *bufs)
Function aerDelete() deletes the AER instance identified by aerInst and returns the addresses of those buffers used by this instance.
tint | aerGetFilter (void *aerInst, aerTailModel_t *tail_model, Fract *coeff_mant, tint *coeff_exp, tint start, tint length)
Function aerGetFilter() gets elements from the current adaptive impulse response 'tail' model coefficients(H) and saves into a block of memory specified by the user. Moreover, it returns other tail model related parameters to facilitate loading of H coefficients at a later time, or displaying the impulse reponse model in time domain.
tint | aerPutFilter (void *aerInst, aerTailModel_t *tail_model, Fract *coeff_mant, tint *coeff_exp, tint start, tint length, tbool flag_last_seg)
Function aerPutFilter() does the reverse of aerGetFilter: it loads the previously saved tail model to AER instance.
tint | aerGetGains (void *aerInst, tint *tx_dg_gain, tint *rx_dg_gain)
Function aerGetGains reports the AER Tx and Rx digital gains in S11.4 dB (or 1/16 of dB) units.
tint | aerGetPerformance (void *aerInst, aerDebugStat_t *dbgstat, aerVersion_t *version, tbool reset)
Function aerGetPerformance() reports the AER performance debug statistics and the version information.
tint | aerOpen (void *aerInst, aerConfig_t *cfg)
Function aerOpen() initializes and configures an AER instance.
tint | aerReceiveIn (void *aerInst, void *recv_in, void *recv_out, void *trace_buf)
Function aerReceiveIn() performs receive path processing.
tint | aerSendIn (void *aerInst, void *send_in, void *send_out, void *sout_8kHz, void *recv_out_sync, void *sout_pnlp_8kHz, void *trace_buf)
Function aerSendIn() performs send path processing.
tint | aerActivate (void *newActiveInst, void *oldActiveInst)
Function aerActivate() performs activation and/or deactivation of handsfree micropone instances. This function is used in a system with multiple handsfree microphones.
Remarks:
The active instance MUST be the first one among all instances to be processed by aerSendIn().

Instance is set to be inactive by default in aerOpen(). Therefore, this function must be called after aerOpen() to set one of the multiple instances to be active.

Function Documentation

tint aerCreate ( aerCreateConfig_t * create_cfg )

Function aerCreate() provides AER with the system information that is shared among multiple instances.

Remarks:
Function aerCreate() must be called before any other AER API function is called. For examle, aerGetSizes() needs the max_sampling_rate of aerCreateConfig_t.

Parameters:
[in] create_cfg Pointer to a create configuration structure.
Return values:
AER error code. See AER Error Codes.
    error code              description
    aer_NOERR               success
    aer_ERR_INVALIDPAR      max_sampling_rate of create_cfg is not equal to any
                            value defined in aerSrate_t.

tint aerGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | aerSizeConfig_t * | cfg
 | ) |  |

Function aerGetSizes() obtains from AER the memory requirements of an instance, which depend on provided configuration parameters.

Parameters:
[in] | cfg | Pointer to a size configuration structure.
[out] | nbufs | Memory location to store the returned number of buffers required by the instance.
[out] | bufs | Memory location to store the returned address of the vector of memory buffer descriptions required by the instance.
Remarks:
Type ecomemBuffer_t is defined in ecomem.h of util package.

For multi-mic (single speaker) hands-free applications, certain permanent buffers are shared among multiple AER instances (one per mic). The list below shows all the buffers requested by aerGetSizes() and shows which buffers are shared and which are not. For shared permanent buffers, the same base address must be provided through aerNew() to all multi-mic instances.

    Buffer number     Permanent or Scratch        Shared or not
          0                 Permanent               Not Shared
          1                 Scratch                   N/A
          2                 Permanent               Not Shared
          3                 Permanent               Must Be Shared
          4                 Permanent               Not Shared
          5                 Permanent               Must Be Shared
          6                 Permanent               Not Shared
          7                 Permanent               Not Shared
          8                 Scratch                   N/A
          9                 Scratch                   N/A
         10                 Permanent               Not Shared
         11                 Permanent               Must Be Shared
         12                 Permanent               Must Be Shared
         13                 Scratch                   N/A
         14                 Permanent               Must Be Shared
         15                 Permanent               Not Shared
         16                 Permanent               Not Shared
         17                 Permanent               Not Shared
         18                 Permanent               Not Shared

Note that aerGetSizes() does NOT return the information about shared buffers that is shown above.

Return values:
AER error code. See AER Error Codes.
    error code              description
    aer_ERR_NOTCREATED      aerCreate() has not been called
    aer_ERR_INVALIDPAR      max_y2x_delay or max_tail_length in cfg is negative
Remarks:
Even if a buffer is not needed based on information passed through aerCreateConfig_t and aerSizeConfig_t, aerGetSizes() will still count this buffer in the total number of required buffers, but will set the required size to 0.

tint aerNew | ( | void ** | aerInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | aerNewConfig_t * | cfg
 | ) |  |

Function aerNew() creates a new instance of AER.

Remarks:
Function aerNew() must be called before aerOpen()is called.

Parameters:
[in] | nbufs | Number of memory buffers allocated by the user.
[in] | bufs | Pointer to memory buffer descriptors defined by user.
Remarks:
Buffer alignment property of each buffer passed to aerNew() must be equal to or better than what is returned by aerGetSizes(), and must be in consistency with the base address of the buffer.
Parameters:
[in] | cfg | Pointer to new instance configuration structure.
[in,out] | aerInst | Memory location that will receive a pointer to the created AER instance.
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_INVALIDPAR      *aerInst is not NULL or nbufs is not correct
     aer_ERR_NOMEMORY        properties of certain buffer are bad:
                             - size is not zero but base address is NULL,
                             - alignment and base address are not consistent,
                             - volatility does not meet requirement.
Precondition:
The pointer at the location pointed to by aerInst must be set to NULL before this function is called.
Postcondition:
A pointer to the AER instance buffer will be returned to the location pointed to by aerInst. Instance state will be set to closed.

tint aerClose ( void * aerInst )

Function aerClose() closes an AER instance.

Remarks:
Function aerClose() must be called before aerDelete() is called.

Parameters:
[in] aerInst pointer to the instance to be closed
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTOPENED       AER instance is not in open state

tint aerControl | ( | void * | aerInst,
 |  | aerControl_t * | ctl
 | ) |  |

Function aerControl() enables or disables a type of AER function or changes the value of a certain parameter.

Parameters:
[in] aerInst Pointer to AER instance.
[in,out] ctl Pointer to AER control structure. Following fields in the control structure will be written by aerControl():
  • trace_cfg.get_size_rx and get_size_tx for control code aer_CTL_TRACE_CONFIG.
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTOPENED       AER instance has not been opened
     aer_ERR_INVALIDPAR      following parameters are out of the allowed range:
                               tail_length
                               eq_params
                               cng_rx_level
                               cng_tx_level
                               txfdnlp_msec_delay
                               txfdnlp_cng_max
                               y2x_delay
                               tx_slim_mode
                               rx_slim_mode

tint aerDelete | ( | void ** | aerInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Function aerDelete() deletes the AER instance identified by aerInst and returns the addresses of those buffers used by this instance.

Parameters:
[in] | nbufs | Number of buffers used by this instance.
[in] | bufs | Pointer to buffer descriptors to store returned addresses of the buffers used by this instance.
[in,out] | aerInst | Memory location where the pointer to AER instance is stored
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTCLOSED       AER instance has not been closed.
     aer_ERR_MEMBUFVECOVF    Not enough buffer descriptors to store all returned
                             buffer addresses.
Precondition:
AER instance must be closed by aerClose() before aerDelete() is called.
Postcondition:
After aerDelete() is called, AER instance pointer stored at aerInst will be set to NULL, and the addresses of the buffers used by this instance will be returned to the location pointed to by bufs.

tint aerGetFilter | ( | void * | aerInst,
 |  | aerTailModel_t * | tail_model,
 |  | Fract * | coeff_mant,
 |  | tint * | coeff_exp,
 |  | tint | start,
 |  | tint | length
 | ) |  |

Function aerGetFilter() gets elements from the current adaptive impulse response 'tail' model coefficients(H) and saves into a block of memory specified by the user. Moreover, it returns other tail model related parameters to facilitate loading of H coefficients at a later time, or displaying the impulse reponse model in time domain.

Parameters:
[in] | aerInst | Pointer to AER instance.
[in] | start | Start point of the mantissa elements in H to be copied, and start mut be >= 0.
[in] | length | Number of successive mantissa elements to be copied.
[out] | tail_model | Ponter to a strucutre holding tail model parameters returned by this function. This information is necessary for loading the saved coefficients.
[out] | coeff_mant | External array to store the coefficients mantissa to be returned by this function.
[out] | coeff_exp | External array to store the coefficients exponents, one per H vector, to be returned by this function. Total number of H vectors is specified by aerTailModel_S.num_H_vec.
Return values:
AER error code (always aer_NOERR).
Remarks:
The obtained coefficients are in frequency domain and their values are equal to mantissa*2^exponent. To convert these coefficients to time domain impulse response, tools provided by Texas Instruments must be used.
See also:
aerPutFilter

tint aerPutFilter | ( | void * | aerInst,
 |  | aerTailModel_t * | tail_model,
 |  | Fract * | coeff_mant,
 |  | tint * | coeff_exp,
 |  | tint | start,
 |  | tint | length,
 |  | tbool | flag_last_seg
 | ) |  |

Function aerPutFilter() does the reverse of aerGetFilter: it loads the previously saved tail model to AER instance.

Remarks:
If this function is to be used, it must be called after aerOpen() is called and after microphone and speaker analog gains are set to some initial values explicitly through aerControl() using control codes aer_CTL_GAIN_RX_ANALOG and aer_CTL_GAIN_TX_ANALOG. Otherwise, it will refuse to load the coefficients.

Number of total words to be loaded must be equal to tail_model.num_H_vec * aer_NUM_WORDS_PER_H_VEC_8K for 8kHz or tail_model.num_H_vec * aer_NUM_WORDS_PER_H_VEC_16K for 16kHz.

If this function needs to be called several times to finish the loading, then between the first and last call, aerSendIn() and aerReceiveIn() will process data as if AER is disabled.

Parameters:
[in] | aerInst | Pointer to AER instance.
[in] | tail_model | Ponter to strucutre holding tail model parameters.
[in] | coeff_mant | External array holding the coefficients mantissas to be loaded to AER by this function.
[in] | coeff_exp | External array holding the coefficients exponents, one per H vector, to be loaded to AER by this function. Total number of H vectors is specified by aerTailModel_S.num_H_vec.
[in] | start | Start point of the mantissa elements in H to be copied, and start mut be >= 0.
[in] | length | Number of successive mantissa elements to be copied.
[in] | last_seg | Flag to indicate whether this is the last call to load the coefficients.
Return values:
AER error code.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTOPENED       AER instance has not been opened
     aer_ERR_INVALIDPAR      start+length > number of total # of mantissa
     aer_ERR_NOINITGAIN      initial mic and speaker gains not set
See also:
aerGetFilter

tint aerGetGains | ( | void * | aerInst,
 |  | tint * | tx_dg_gain,
 |  | tint * | rx_dg_gain
 | ) |  |

Function aerGetGains reports the AER Tx and Rx digital gains in S11.4 dB (or 1/16 of dB) units.

Parameters:
[in] | aerInst | Pointer to AER instance
[out] | tx_dg_gain | Address to store AER Tx digital gain
[out] | rx_dg_gain | Address to store AER Rx digital gain
Return values:
AER error code (always aer_NOERR).

tint aerGetPerformance | ( | void * | aerInst,
 |  | aerDebugStat_t * | dbgstat,
 |  | aerVersion_t * | version,
 |  | tbool | reset
 | ) |  |

Function aerGetPerformance() reports the AER performance debug statistics and the version information.

Parameters:
[in] | aerInst | Pointer to AER instance.
[in] | dbgstat | Pointer to debug status structure.
[in] | version | Pointer to version information structure.
[in] | reset | Flag to tell AER to reset event counters.
Return values:
AER error code (always aer_NOERR).
Postcondition:
AER event counters will all be set to 0s if reset flag is true.

tint aerOpen | ( | void * | aerInst,
 |  | aerConfig_t * | cfg
 | ) |  |

Function aerOpen() initializes and configures an AER instance.

Remarks:
This function may be called after aerNew() to initialize a new AER instance. It may also be called to reconfigure an instance that has been closed by aerClose() but not deleted by aerDelete().
Parameters:
[in] | cfg | Pointer to AER configuration parameter.
[in] | aerInst | Pointer to AER instance.
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTCLOSED       AER instance state has not been set to closed, i.e,
                             aerNew() or aerClose() not called for the instance.
     aer_ERR_INVALIDPAR      bad configuration parameters:
                             - cfg is NULL
                             - valid_bitfield of aerConfig_t is not all 1's for
                               first time open after aerNew().
                             - sampling rate of aerConfig_t is larger than
                               max_sampling_rate specified in aerCreateConfig_t.
                             - tail_length of aerConfig_t is larger than
                               max_tail_length specified in aerSizeConfig_t.
                             - y2x_delay of aerConfig_t is larger than
                               max_y2x_delay specified in aerSizeConfig_t.
Precondition:
Function aerNew() must be called before aerOpen() is called the first time to open a new instance. For subsequent calls to open an existing instance, aerClose() must be called before aerOpen() to close the instance.
Postcondition:
All the parameters that are not part of aerConfig_t are set to default values by aerOpen. For example, control bitfield 0 (changeable through aer_CTL_MODES_0) is set to 0x86, which disables AER. For detailed information about AER parameters and their default values, refer to AER User's Guide.

After AER instance is opened, aerControl(), aerSendIn(), or aerReceiveIn() may be called for control or processing.

tint aerReceiveIn | ( | void * | aerInst,
 |  | void * | recv_in,
 |  | void * | recv_out,
 |  | void * | trace_buf
 | ) |  |

Function aerReceiveIn() performs receive path processing.

Parameters:
[in] | recv_in | A frame of received data to be processed.
[in] | aerInst | Pointer to AER instance.
[out] | recv_out | A frame of processed data.
[out] | trace_buf | Buffer to store AER trace data in Rx path.
Precondition:
Initial microphone and speaker analog gains must be set explicitly through aerControl(). Otherwise, aerReceiveIn() will process data as if AER is disabled.

If aerPutFilter() is loading the tail model, until it has completed the process, aerReceiveIn() will process data as if AER is disabled.

See also:
aerPutFilter
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTOPENED       AER instance has not been opened
     aer_ERR_NOINITGAIN      initial mic and speaker gains not set
     aer_ERR_LOAD_INPROCESS  tail model loading is in process
Remarks:
recv_in and recv_out may be the same. If they are different, content in recv_in will not be modified by this function.

If the rate on AER recv_in buffer is 16kHz, the recv_out buffer must have enough space to hold 16kHz frame no matter what the actual receive_out rate is. This is because AER uses recv_out buffer for internal calculations at 16kHz.

Tracing data will not be written to trace_buf unless tracing is turned on through control code aer_CTL_TRACE_TURN_ON.

tint aerSendIn | ( | void * | aerInst,
 |  | void * | send_in,
 |  | void * | send_out,
 |  | void * | sout_8kHz,
 |  | void * | recv_out_sync,
 |  | void * | sout_pnlp_8kHz,
 |  | void * | trace_buf
 | ) |  |

Function aerSendIn() performs send path processing.

Parameters:
[in] | send_in | A frame of data to be processed and sent.
[in] | recv_out_sync | A frame of synchronized receive path output data.
[in] | aerInst | Pointer to AER instance.
[out] | send_out | A frame of processed data.
[out] | sout_8kHz | Processed data at 8kHz for wideband build
[out] | sout_pnlp_8kHz | Pre-NLP data at 8kHz
[out] | trace_buf | Buffer to store AER trace data in Tx path. This buffer may be same as or different from the buffer passed to aerReceiveIn, but trace data of Tx path and Rx path must be written to two different files.
Precondition:
Initial microphone and speaker analog gains must be set explicitly through aerControl(). Otherwise, aerSendIn() will process data as if AER is disabled.

If aerPutFilter() is loading the tail model, until it has completed the process, aerSendIn() will process data as if AER is disabled.

See also:
aerPutFilter
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTOPENED       AER instance has not been opened
     aer_ERR_NOINITGAIN      initial mic and speaker gains not set
     aer_ERR_LOAD_INPROCESS  tail model loading is in process
Remarks:
Pointers send_in and send_out may be the same. If they are different, content in send_in will not be modified by this function.

If the rate on AER send_in buffer is 16kHz, the send_out buffer must have enough space to hold 16kHz frame no matter what the actual send_out rate is. This is because AER uses send_out buffer for internal calculations at 16kHz.

Pointers sout_8kHz and sout_pnlp_8kHz may be set to NULL if they are not used.

Tracing data will not be written to trace_buf unless tracing is turned on through control code aer_CTL_TRACE_TURN_ON.

tint aerActivate | ( | void * | newActiveInst,
 |  | void * | oldActiveInst
 | ) |  |

Function aerActivate() performs activation and/or deactivation of handsfree micropone instances. This function is used in a system with multiple handsfree microphones.

Remarks:
The active instance MUST be the first one among all instances to be processed by aerSendIn().

Instance is set to be inactive by default in aerOpen(). Therefore, this function must be called after aerOpen() to set one of the multiple instances to be active.

Parameters:
[in] | newActiveInst | Pointer to new active microphone instance.
[in] | oldActiveInst | Pointer to old active microphone instance.
Return values:
AER error code. See AER Error Codes.
     error code              description
     aer_NOERR               success
     aer_ERR_NOTOPENED       AER instance has not been opened
Remarks:
One or both arguments can be NULL and the corresponding actions are:
     newActiveInst == NULL: Deactivate instance pointed to by oldActiveInst.
     oldActiveInst == NULL: Activate instance pointed to by newActiveInst.
     both are NULL        : Do nothing.
     both point to the same instance: Do nothing.
     neither is NULL      : Activate new active instance and deactivate old one.


AER: AER Data Structures

AER Data Structures
[AER Module API]

Collaboration diagram for AER Data Structures:

Data Structures

struct | aerInfo_s
AER information reporting structure This strucutre contains the parameters that AER needs to report to an outside ECO through eventOut() function provided by aerCreateConfig_s. More...
struct | aerCreateConfig_s
Configuration structure for aerCreate() This structure contains information to be shared by different AER instances. This structure is used by function aerCreate(). More...
struct | aerSizeConfig_s
Configuration structure for aerGetSizes() This structure specifies the maximum filter length and maximum y to x delay. It also has a bitfield, which currently has only one bit to indicate whether FDNLP is requested. It is used by function aerGetSizes(). It is also part of structure aerNewConfig_s used by aerNew(). More...
struct | aerNewConfig_s
Configuration structure for aerNew() This structure is used for creating a new AER instance through function aerNew(). More...
struct | aerConfig_s
Configuration structure for aerOpen() This structure contains system parameters to configure an AER instance through aerOpen(). AER doesn't have default value for these parameters, and they must be set explicitly when aerOpen() is called the first time after aerNew(). After that, these prameters may also be changed through aerControl(). More...
struct | aerEQConfig_s
AER Bi-quad EQ configuration structure.This structure contains Bi-quad EQ configurations. It includes:
  • Total number of sections
  • Sections types.
    There are 4 different types of sections used in an EQ. Each type is encoded using 2 bits(aer_EQBQ_SECTION_TYPE_xx). A 16-bit bitmap is used to represent the types for all the sections in the EQ. The least significant 2 bits are used for the 1st section, the next 2 bits are used for the 2nd section and so on till bit 12&13 which are used for the last section. Bit 14 is used to indicate LP filter order. If 1, 2nd order LP filter is used. Otherwise, 1st order LP is used. Bit 15 is used to indicate HP filter order. If 1, 2nd order HP filter is used. Otherwise, 1st order HP is used.
  • Section parameters.
    Parameters are set in the order of sections. A LP or HP section has one parameter - alpha. A BP or BS section has three parameters and they are in the order of alpha, gamma and G. Implementation of LP/HP and BP/BS filters and the corresponding parameters are shown in the figure below. All section parameters are in Q15 format.
More...
struct | aerModeControl_s
AER mode control structure. This structure is used to change AER operational modes through function aerControl() using control code aer_CTL_MODES_0 or aer_CTL_MODES_1. For example, to enable AER, enable update, and disable NLP would need to set the mask and value to:. More...
struct | aerTraceConfig_s
AER tracing configuration structure. This structure is used to configure AER tracing options and obtain from AER the size of traced data based on the configuration. The control valid bit for configuring trace is aer_CTL_VALID2_TRACE_CONFIG. More...
struct | aerControl_s
AER control structure This structure is used to change AER configurable parameters and mode of operation through aerControl(). It has two elements, a control code to tell what to change, and a union of parameters to tell the value of the new parameter. More...
struct | aerEventStats_s
AER Statistics Structure. This structure contains statistical counters to monitor the occurrance of particular events in AER. More...
struct | aerPiquaStats_s
AER PIQUA Statistics Structure. This structure contains measurements necessary for PIQUA performance monitoring. More...
struct | aerTailModel_s
AER tail model save/load structure. This structure is used for saving or loading AER adaptive tail model, which are defined by:
  • the adaptive filter coefficients, mantissas and exponents,
  • number of active tail model segments (or H vectors),
  • length of tail model in units of sampling period, e.g. 125us for 8kHz and 62.5us for 16kHz.
  • the speaker and microphone analog gains.
More...
struct | aerDebugStat_s
AER debug information data structure. This structure contains debug information regarding AER operation. It is one of the arguments of function aerGetPerformance().
Remarks:
In the comments, elements of this structure are numbered in units of the size of type tint.
More...
struct | aerVersion_s
AER version structure This structure contains the version information of the AER software. More...
struct | aerCallTable_t
AER call table. More...

Typedefs

typedef aerInfo_s | aerInfo_t
AER information reporting structure This strucutre contains the parameters that AER needs to report to an outside ECO through eventOut() function provided by aerCreateConfig_s.
typedef aerCreateConfig_s | aerCreateConfig_t
Configuration structure for aerCreate() This structure contains information to be shared by different AER instances. This structure is used by function aerCreate().
typedef aerSizeConfig_s | aerSizeConfig_t
Configuration structure for aerGetSizes() This structure specifies the maximum filter length and maximum y to x delay. It also has a bitfield, which currently has only one bit to indicate whether FDNLP is requested. It is used by function aerGetSizes(). It is also part of structure aerNewConfig_s used by aerNew().
typedef aerNewConfig_s | aerNewConfig_t
Configuration structure for aerNew() This structure is used for creating a new AER instance through function aerNew().
typedef aerConfig_s | aerConfig_t
Configuration structure for aerOpen() This structure contains system parameters to configure an AER instance through aerOpen(). AER doesn't have default value for these parameters, and they must be set explicitly when aerOpen() is called the first time after aerNew(). After that, these prameters may also be changed through aerControl().
typedef aerEQConfig_s | aerEqConfig_t
AER Bi-quad EQ configuration structure.This structure contains Bi-quad EQ configurations. It includes:
  • Total number of sections
  • Sections types.
    There are 4 different types of sections used in an EQ. Each type is encoded using 2 bits(aer_EQBQ_SECTION_TYPE_xx). A 16-bit bitmap is used to represent the types for all the sections in the EQ. The least significant 2 bits are used for the 1st section, the next 2 bits are used for the 2nd section and so on till bit 12&13 which are used for the last section. Bit 14 is used to indicate LP filter order. If 1, 2nd order LP filter is used. Otherwise, 1st order LP is used. Bit 15 is used to indicate HP filter order. If 1, 2nd order HP filter is used. Otherwise, 1st order HP is used.
  • Section parameters.
    Parameters are set in the order of sections. A LP or HP section has one parameter - alpha. A BP or BS section has three parameters and they are in the order of alpha, gamma and G. Implementation of LP/HP and BP/BS filters and the corresponding parameters are shown in the figure below. All section parameters are in Q15 format.

typedef aerModeControl_s | aerModeControl_t
AER mode control structure. This structure is used to change AER operational modes through function aerControl() using control code aer_CTL_MODES_0 or aer_CTL_MODES_1. For example, to enable AER, enable update, and disable NLP would need to set the mask and value to:.
typedef aerTraceConfig_s | aerTraceConfig_t
AER tracing configuration structure. This structure is used to configure AER tracing options and obtain from AER the size of traced data based on the configuration. The control valid bit for configuring trace is aer_CTL_VALID2_TRACE_CONFIG.
typedef aerControl_s | aerControl_t
AER control structure This structure is used to change AER configurable parameters and mode of operation through aerControl(). It has two elements, a control code to tell what to change, and a union of parameters to tell the value of the new parameter.
typedef aerEventStats_s | aerEventStats_t
AER Statistics Structure. This structure contains statistical counters to monitor the occurrance of particular events in AER.
typedef aerPiquaStats_s | aerPiquaStats_t
AER PIQUA Statistics Structure. This structure contains measurements necessary for PIQUA performance monitoring.
typedef aerTailModel_s | aerTailModel_t
AER tail model save/load structure. This structure is used for saving or loading AER adaptive tail model, which are defined by:
  • the adaptive filter coefficients, mantissas and exponents,
  • number of active tail model segments (or H vectors),
  • length of tail model in units of sampling period, e.g. 125us for 8kHz and 62.5us for 16kHz.
  • the speaker and microphone analog gains.

typedef aerDebugStat_s | aerDebugStat_t
AER debug information data structure. This structure contains debug information regarding AER operation. It is one of the arguments of function aerGetPerformance().
Remarks:
In the comments, elements of this structure are numbered in units of the size of type tint.

typedef aerVersion_s | aerVersion_t
AER version structure This structure contains the version information of the AER software.

Typedef Documentation

typedef struct aerInfo_s aerInfo_t

AER information reporting structure This strucutre contains the parameters that AER needs to report to an outside ECO through eventOut() function provided by aerCreateConfig_s.

typedef struct aerCreateConfig_s aerCreateConfig_t

Configuration structure for aerCreate() This structure contains information to be shared by different AER instances. This structure is used by function aerCreate().

typedef struct aerSizeConfig_s aerSizeConfig_t

Configuration structure for aerGetSizes() This structure specifies the maximum filter length and maximum y to x delay. It also has a bitfield, which currently has only one bit to indicate whether FDNLP is requested. It is used by function aerGetSizes(). It is also part of structure aerNewConfig_s used by aerNew().

typedef struct aerNewConfig_s aerNewConfig_t

Configuration structure for aerNew() This structure is used for creating a new AER instance through function aerNew().

typedef struct aerConfig_s aerConfig_t

Configuration structure for aerOpen() This structure contains system parameters to configure an AER instance through aerOpen(). AER doesn't have default value for these parameters, and they must be set explicitly when aerOpen() is called the first time after aerNew(). After that, these prameters may also be changed through aerControl().

typedef struct aerEQConfig_s aerEqConfig_t

AER Bi-quad EQ configuration structure.This structure contains Bi-quad EQ configurations. It includes:

  • Total number of sections
  • Sections types.
    There are 4 different types of sections used in an EQ. Each type is encoded using 2 bits(aer_EQBQ_SECTION_TYPE_xx). A 16-bit bitmap is used to represent the types for all the sections in the EQ. The least significant 2 bits are used for the 1st section, the next 2 bits are used for the 2nd section and so on till bit 12&13 which are used for the last section. Bit 14 is used to indicate LP filter order. If 1, 2nd order LP filter is used. Otherwise, 1st order LP is used. Bit 15 is used to indicate HP filter order. If 1, 2nd order HP filter is used. Otherwise, 1st order HP is used.
  • Section parameters.
    Parameters are set in the order of sections. A LP or HP section has one parameter - alpha. A BP or BS section has three parameters and they are in the order of alpha, gamma and G. Implementation of LP/HP and BP/BS filters and the corresponding parameters are shown in the figure below. All section parameters are in Q15 format.

typedef struct aerModeControl_s aerModeControl_t

AER mode control structure. This structure is used to change AER operational modes through function aerControl() using control code aer_CTL_MODES_0 or aer_CTL_MODES_1. For example, to enable AER, enable update, and disable NLP would need to set the mask and value to:.

    mask = aer_CTL0_ENABLE_ECHO_CANCELLER | aer_CTL0_ENABLE_UPDATE
            | aer_CTL0_ENABLE_NLP;
    value = aer_CTL0_ENABLE_ECHO_CANCELLER | aer_CTL0_ENABLE_UPDATE;

typedef struct aerTraceConfig_s aerTraceConfig_t

AER tracing configuration structure. This structure is used to configure AER tracing options and obtain from AER the size of traced data based on the configuration. The control valid bit for configuring trace is aer_CTL_VALID2_TRACE_CONFIG.

Remarks:
  • Tracing is off by default.
  • Tracing is not changed by AER reset or re-opening of an instance, i.e. if tracing is on, it will still be on after reset or re-opening, and same for tracing off.
  • If tracing is turned on, AER instance will always be traced out by default, regardless of trace configuration, and will be written to both Tx and Rx tracing buffers.
  • If tracing is turned on but no buffer is provided to aerReceiveIn() or aerSendIn(), no data will be written out.

typedef struct aerControl_s aerControl_t

AER control structure This structure is used to change AER configurable parameters and mode of operation through aerControl(). It has two elements, a control code to tell what to change, and a union of parameters to tell the value of the new parameter.

typedef struct aerEventStats_s aerEventStats_t

AER Statistics Structure. This structure contains statistical counters to monitor the occurrance of particular events in AER.

typedef struct aerPiquaStats_s aerPiquaStats_t

AER PIQUA Statistics Structure. This structure contains measurements necessary for PIQUA performance monitoring.

typedef struct aerTailModel_s aerTailModel_t

AER tail model save/load structure. This structure is used for saving or loading AER adaptive tail model, which are defined by:

  • the adaptive filter coefficients, mantissas and exponents,
  • number of active tail model segments (or H vectors),
  • length of tail model in units of sampling period, e.g. 125us for 8kHz and 62.5us for 16kHz.
  • the speaker and microphone analog gains.

All information above can be retrieved from AER by API aerGetFilter() or loaded to AER through aerPutFilter(). The filter coefficients are stored in two buffers, one for mantissa and the other for exponents. The rest of the tail model information are stored in aerTailModel_t.

typedef struct aerDebugStat_s aerDebugStat_t

AER debug information data structure. This structure contains debug information regarding AER operation. It is one of the arguments of function aerGetPerformance().

Remarks:
In the comments, elements of this structure are numbered in units of the size of type tint.

typedef struct aerVersion_s aerVersion_t

AER version structure This structure contains the version information of the AER software.


AER: AER Configuration Valid Bitfield Masks

AER Configuration Valid Bitfield Masks
[AER Constants (enum's and define's)]

Collaboration diagram for AER Configuration Valid Bitfield Masks:

AER configuration valid bitfield masks

Bitfield mask aer_CFG_VALID_XYZ to configure AER system parameters through aerOpen(). Used to construct valid_bitfield of aerConfig_s.

    Config valid bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       configure y to x delay
                   0       don't configure y to x delay
        1          1       configure sampling rates
                   0       don't configure sampling rates
        2          1       configure tail length
                   0       don't configure tail length
        3          1       configure delay of setting Tx analog gain
                   0       don't configure delay of setting Tx analog gain
        4          1       configure delay of setting Rx analog gain
                   0       don't configure delay of setting Rx analog gain
        5          1       configure number of interpolation samples for Tx path
                           gain change
                   0       don't configure number of interpolation samples for
                           Tx path gain change
        6          1       configure phone mode
                   0       don't configure phone mode
        7 - 15             RESERVED

#define | aer_CFG_VALID_Y2X_DELAY 0x0001
#define | aer_CFG_VALID_SAMP_RATES 0x0002
#define | aer_CFG_VALID_TAIL_LENGTH 0x0004
#define | aer_CFG_VALID_DELAY_TXAG 0x0008
#define | aer_CFG_VALID_DELAY_RXAG 0x0010
#define | aer_CFG_VALID_INTER_SAMP 0x0020
#define | aer_CFG_VALID_PHONE_MODE 0x0040
#define | aer_CFG_VALID_BITS_ALL_1 0x007F

Define Documentation

#define aer_CFG_VALID_Y2X_DELAY 0x0001

config y2x delay

Definition at line 531 of file aer.h.

#define aer_CFG_VALID_SAMP_RATES 0x0002

config samp. rates

Definition at line 532 of file aer.h.

#define aer_CFG_VALID_TAIL_LENGTH 0x0004

config tail length

Definition at line 533 of file aer.h.

#define aer_CFG_VALID_DELAY_TXAG 0x0008

config Tx analog gain setting delay

Definition at line 534 of file aer.h.

#define aer_CFG_VALID_DELAY_RXAG 0x0010

config Rx analog gain setting delay

Definition at line 536 of file aer.h.

#define aer_CFG_VALID_INTER_SAMP 0x0020

config interpolation samples for Tx gain change

Definition at line 538 of file aer.h.

#define aer_CFG_VALID_PHONE_MODE 0x0040

config phone mode

Definition at line 540 of file aer.h.

#define aer_CFG_VALID_BITS_ALL_1 0x007F

all bits must be set to 1 when aerOpen() is called the first time after aerNew() is called.

Definition at line 541 of file aer.h.


AER: AER Control Bitfield Masks

AER Control Bitfield Masks
[AER Constants (enum's and define's)]

Collaboration diagram for AER Control Bitfield Masks:

AER control bitfield masks

Bitfield masks aer_CTL0_XYZ and aer_CTL1_XYZ may be used to change AER operation modes through aerControl(), by constructing mask and value of aerModeControl_s.

The control codes to change operation modes are aer_CTL_MODES_0 for control bitfield 0 and aer_CTL_MODES_1 for control bitfield 1. The corresponding parameter of aerControl_s is ctl_modes.

    Control bitfield 0:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       Enable AER or turn on AER.
                   0       Disable AER or turn off AER.
                           Note: when AER disabled, aerSendIn and aerReceiveIn
                                 will still process data by applying equalizer
                                 and digital gains. Upsampling and downsampling
                                 will also be applied if necessary (in and out
                                 sampling rates are different).
        1          1       Enable update (tail model and NLP state machine).
                   0       Disable update.
        2          1       Enable NLP.
                   0       Disable NLP.
        3          1       Continue updating AER when phone is in mute.
                   0       Stop updating AER when phone is in mute.
                           Note: If mute is achieved by cutting off Tx path PGA
                                 output, this bit should not be set. If mute is
                                 achieved by providing a zero signal to vocoder,
                                 and PGA output is still sent to AER to process,
                                 this bit should be set. It is recommended that
                                 mute be implemented the second way and this bit
                                 bet set. Otherwise, when phone goes out of mute,
                                 some brief clik or echo leakage may be heard.
        4          1       Clear tail model filter coefficients.
                   0       Do nothing.
                           Note: coefficients are not cleared in aerContro(), but
                                 in aerSendIn() of next frame processing.
                           Note: this bit will be automatically cleared once the
                                 the coefficients are cleared by AER.
        5          1       Clear all AER states and delay lines and reset tail
                           model, but will not reset configurable parameters
                           (including gains and equalizer).
                   0       Do nothing.
                           Note: reset is not performed in aerContro(), but
                                 in aerSendIn() of next frame processing.
                           Note: this bit will be automatically cleared once the
                                 clear all reset is finished by AER.
        6          1       Put AER in half duplex mode.
                   0       Put AER in full duplex mode.
        7          1       Relax Tx NLP during Tx/Rx mutual silence.
                   0       Don't relax Tx NLP in mutual silence.
        8          1       Disable Rx NLP.
                   0       Enable Rx NLP.
        9          1       Disable Tx NLP.
                   0       Enable Tx NLP.
        10         1       Disable Tx NLP clipper.
                   0       Enable Tx NLP clipper.
        11         1       Enable normal Rx comfort noise generation (CNG).
                   0       Disable normal Rx CNG.
        12         1       Enable normal Tx comfort noise generation (CNG).
                   0       Disable normal Tx CNG.
        13         1       Enable forced Rx CNG - full configured CNG overwrites
                           Rx path signal.
                   0       Disable forced Rx CNG.
        14         1       Enable forced Tx CNG - full configured CNG overwrites
                           Tx path signal.
                   0       Disable forced Tx CNG.
                           Note: Forced Tx CNG is available when TDNLP is used,
                                 but not available when FDNLP is used.
        15         1       High band attenuation follows low band for
                           subdominant path.
                   0       Infinite high band attenuation for subdominant path.

    Control bitfield 1:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       Enable noise guard.
                   0       Disable noise guard.
        1          1       Enable Tx equalizer.
                   0       Disable Tx equalizer.
        2          1       Enable Rx equalizer.
                   0       Disable Rx equalizer.
        3          1       Enable HLC.
                   0       Disable HLC.
        4          1       AER is informed that phone is on mute.
                   0       AER is informed that phone is not on mute.
        5          1       Enable scaling of NLP gain ramp. All four NLP linear
                           attenuation ramping in/out time constants will be
                           decreased by 1 for every 6 dB that the linear
                           attenuation goes above 6dB, until they reach a
                           minimum of 1.
                   0       Disable scaling of NLP gain ramp.
        6          1       Use frequency domain NLP (FDNLP)
                   0       Use time domain NLP (TDNLP)
                           Note: in order to use FDNLP, memory for FDNLP must
                                 first be requested throught aerGetSizes()
                                 by setting bit 0 of config_bitfield in
                                 aerSizeConfig_t. Otherwise, the setting of
                                 this bit has no effect.
        7          1       Enable adaptive spectral noise reduction (ASNR) in
                           send path.
                   0       Disable ASNR in send path.
                           Note: bit 6 must be set to 1 (use FDNLP) in order to
                                 enable ASNR. Otherwise, setting of this bit has
                                 no effect.
        8          1       Generate adaptive comfort noise (adaptive CNG) in
                           send path.
                   0       Generate fixed comfort noise (fixed CNG) in send path.
                           Note: bit 6 must be set to 1 (use FDNLP) in order to
                                 generate adaptive comfort noise. Otherwise,
                                 setting of this bit has no effect.
        9          1       Freeze tail model coefficients update, which may be
                           used for MIPS control.
                           (will not disable state machine update)
                   0       Do nothing.
        10         1       Perform a partial reset to clear delay lines and
                           state information, which may be used when switching
                           phone mode on the same instance.
                           Note: AER will NOT automatically perform a partial
                                 reset when being informed of phone mode change
                                 through aerControl() with control code
                                 aer_CTL_PHONE_MODE.
                           Note: this bit will be automatically cleared once the
                                 partial reset is finished by AER.
                   0       Do nothing.
        11         1       Keep clipper during double talk
                   0       Remove clipper completely during double talk
        12                 RESERVED
        13         1       Set minimum tail length, which convergence starts
                           with, to total tail length, for non-handsfree phone
                           mode.
                   0       Don't increase minimum tail length.
        14         1       Drop Tx high band signal at send path output.
                   0       Keep Tx high band signal at send path output.
        15         1       Drop Rx high band signal at receive path output.
                   0       Keep Rx high band signal at receive path output.

#define | aer_CTL0_ENABLE_ECHO_CANCELLER 0x0001
#define | aer_CTL0_ENABLE_UPDATE 0x0002
#define | aer_CTL0_ENABLE_NLP 0x0004
#define | aer_CTL0_ADAPT_IN_MUTE 0x0008
#define | aer_CTL0_CLEAR_FILTER 0x0010
#define | aer_CTL0_CLEAR_ALL 0x0020
#define | aer_CTL0_HALF_DUPLEX 0x0040
#define | aer_CTL0_RELAX_TXNLP_IDLE 0x0080
#define | aer_CTL0_DISABLE_RX_NLP 0x0100
#define | aer_CTL0_DISABLE_TX_NLP 0x0200
#define | aer_CTL0_DISABLE_TX_CLIPPER 0x0400
#define | aer_CTL0_ENABLE_NORMAL_RX_CNG 0x0800
#define | aer_CTL0_ENABLE_NORMAL_TX_CNG 0x1000
#define | aer_CTL0_ENABLE_FORCED_RX_CNG 0x2000
#define | aer_CTL0_ENABLE_FORCED_TX_CNG 0x4000
#define | aer_CTL0_BS_HIGH_BAND_LOCK 0x8000
#define | aer_CTL1_ENABLE_NGUARD 0x0001
#define | aer_CTL1_ENABLE_TX_EQ 0x0002
#define | aer_CTL1_ENABLE_RX_EQ 0x0004
#define | aer_CTL1_ENABLE_HLC 0x0008
#define | aer_CTL1_MUTE_ON 0x0010
#define | aer_CTL1_NLP_RAMP_SCALE_ON 0x0020
#define | aer_CTL1_USE_FDNLP 0x0040
#define | aer_CTL1_ENABLE_NR 0x0080
#define | aer_CTL1_CNG_ADAPT 0x0100
#define | aer_CTL1_FREEZE_TAIL_UPDATE 0x0200
#define | aer_CTL1_PARTIAL_RESET 0x0400
#define | aer_CTL1_BIT_11_RESERVED 0x0800
#define | aer_CTL1_RESET_PARAMS 0x1000
#define | aer_CTL1_INCREASE_MIN_HVEC 0x2000
#define | aer_CTL1_DROP_TX_HIGH_BAND 0x4000
#define | aer_CTL1_DROP_RX_HIGH_BAND 0x8000
#define | aer_CTL2_MICSAT 0x0001
#define | aer_CTL2_ENABLE_TRACE 0x0002
#define | aer_CTL2_SKIP_COHERENCE 0x0004
#define | aer_CTL2_FREEZE_NOISE_EST 0x0008
#define | aer_CTL2_BIT_4_RESERVED 0x0010
#define | aer_CTL2_BIT_5_RESERVED 0x0020
#define | aer_CTL2_BIT_6_RESERVED 0x0040
#define | aer_CTL2_BIT_7_RESERVED 0x0080
#define | aer_CTL2_BIT_8_RESERVED 0x0100
#define | aer_CTL2_BIT_9_RESERVED 0x0200
#define | aer_CTL2_BIT_10_RESERVED 0x0400
#define | aer_CTL2_BIT_11_RESERVED 0x0800
#define | aer_CTL2_BIT_12_RESERVED 0x1000
#define | aer_CTL2_BIT_13_RESERVED 0x2000
#define | aer_CTL2_BIT_14_RESERVED 0x4000
#define | aer_CTL2_BIT_15_RESERVED 0x8000

Define Documentation

#define aer_CTL0_ENABLE_ECHO_CANCELLER 0x0001

enable AER

Definition at line 382 of file aer.h.

#define aer_CTL0_ENABLE_UPDATE 0x0002

adapt filter and NLP

Definition at line 383 of file aer.h.

#define aer_CTL0_ENABLE_NLP 0x0004

enable NLP

Definition at line 384 of file aer.h.

#define aer_CTL0_ADAPT_IN_MUTE 0x0008

adapt filter in mute

Definition at line 385 of file aer.h.

#define aer_CTL0_CLEAR_FILTER 0x0010

clear tail model

Definition at line 386 of file aer.h.

#define aer_CTL0_CLEAR_ALL 0x0020

clear everything,restart

Definition at line 387 of file aer.h.

#define aer_CTL0_HALF_DUPLEX 0x0040

AEC halfduplex mode

Definition at line 388 of file aer.h.

#define aer_CTL0_RELAX_TXNLP_IDLE 0x0080

relax Tx NLP during mutual silence

Definition at line 389 of file aer.h.

#define aer_CTL0_DISABLE_RX_NLP 0x0100

disable Rx NLP atten

Definition at line 391 of file aer.h.

#define aer_CTL0_DISABLE_TX_NLP 0x0200

disable Tx NLP atten

Definition at line 392 of file aer.h.

#define aer_CTL0_DISABLE_TX_CLIPPER 0x0400

disable Tx NLP clipper

Definition at line 393 of file aer.h.

#define aer_CTL0_ENABLE_NORMAL_RX_CNG 0x0800

enable normal Rx CNG

Definition at line 394 of file aer.h.

#define aer_CTL0_ENABLE_NORMAL_TX_CNG 0x1000

enable normal Tx CNG

Definition at line 395 of file aer.h.

#define aer_CTL0_ENABLE_FORCED_RX_CNG 0x2000

enable forced Rx CNG

Definition at line 396 of file aer.h.

#define aer_CTL0_ENABLE_FORCED_TX_CNG 0x4000

enable forced Tx CNG

Definition at line 397 of file aer.h.

#define aer_CTL0_BS_HIGH_BAND_LOCK 0x8000

high band of subdominant path's attenuation follows low band

Definition at line 398 of file aer.h.

#define aer_CTL1_ENABLE_NGUARD 0x0001

enable noise guard

Definition at line 401 of file aer.h.

#define aer_CTL1_ENABLE_TX_EQ 0x0002

enable Tx path EQ

Definition at line 402 of file aer.h.

#define aer_CTL1_ENABLE_RX_EQ 0x0004

enable Rx path EQ

Definition at line 403 of file aer.h.

#define aer_CTL1_ENABLE_HLC 0x0008

enable HLC in Rx path

Definition at line 404 of file aer.h.

#define aer_CTL1_MUTE_ON 0x0010

notify send path is muted

Definition at line 405 of file aer.h.

#define aer_CTL1_NLP_RAMP_SCALE_ON 0x0020

enable scaling of NLP gain ramp

Definition at line 406 of file aer.h.

#define aer_CTL1_USE_FDNLP 0x0040

use frequency domain NLP

Definition at line 408 of file aer.h.

#define aer_CTL1_ENABLE_NR 0x0080

enable ASNR

Definition at line 409 of file aer.h.

#define aer_CTL1_CNG_ADAPT 0x0100

use adaptive comfort noise

Definition at line 410 of file aer.h.

#define aer_CTL1_FREEZE_TAIL_UPDATE 0x0200

freeze tail model update

Definition at line 411 of file aer.h.

#define aer_CTL1_PARTIAL_RESET 0x0400

peform partial reset

Definition at line 412 of file aer.h.

#define aer_CTL1_BIT_11_RESERVED 0x0800

reserved

Definition at line 413 of file aer.h.

#define aer_CTL1_RESET_PARAMS 0x1000

reset config. params

Definition at line 414 of file aer.h.

#define aer_CTL1_INCREASE_MIN_HVEC 0x2000

min tail length is set to total tail length

Definition at line 415 of file aer.h.

#define aer_CTL1_DROP_TX_HIGH_BAND 0x4000

drop Tx high band

Definition at line 417 of file aer.h.

#define aer_CTL1_DROP_RX_HIGH_BAND 0x8000

drop Rx high band

Definition at line 418 of file aer.h.

#define aer_CTL2_MICSAT 0x0001

indicate mic saturation

Definition at line 420 of file aer.h.

#define aer_CTL2_ENABLE_TRACE 0x0002

enable tracing

Definition at line 421 of file aer.h.

#define aer_CTL2_SKIP_COHERENCE 0x0004

skip coherence detection

Definition at line 422 of file aer.h.

#define aer_CTL2_FREEZE_NOISE_EST 0x0008

freeze ASNR/CNG noise estimate

Definition at line 423 of file aer.h.

#define aer_CTL2_BIT_4_RESERVED 0x0010

bit 4 is reserved

Definition at line 424 of file aer.h.

#define aer_CTL2_BIT_5_RESERVED 0x0020

bit 5 is reserved

Definition at line 425 of file aer.h.

#define aer_CTL2_BIT_6_RESERVED 0x0040

bit 6 is reserved

Definition at line 426 of file aer.h.

#define aer_CTL2_BIT_7_RESERVED 0x0080

bit 7 is reserved

Definition at line 427 of file aer.h.

#define aer_CTL2_BIT_8_RESERVED 0x0100

bit 8 is reserved

Definition at line 428 of file aer.h.

#define aer_CTL2_BIT_9_RESERVED 0x0200

bit 9 is reserved

Definition at line 429 of file aer.h.

#define aer_CTL2_BIT_10_RESERVED 0x0400

bit 10 is reserved

Definition at line 430 of file aer.h.

#define aer_CTL2_BIT_11_RESERVED 0x0800

bit 11 is reserved

Definition at line 431 of file aer.h.

#define aer_CTL2_BIT_12_RESERVED 0x1000

bit 12 is reserved

Definition at line 432 of file aer.h.

#define aer_CTL2_BIT_13_RESERVED 0x2000

bit 13 is reserved

Definition at line 433 of file aer.h.

#define aer_CTL2_BIT_14_RESERVED 0x4000

bit 14 is reserved

Definition at line 434 of file aer.h.

#define aer_CTL2_BIT_15_RESERVED 0x8000

bit 15 is reserved

Definition at line 435 of file aer.h.


AER: AER Create Bitfield Masks

AER Create Bitfield Masks
[AER Constants (enum's and define's)]

Collaboration diagram for AER Create Bitfield Masks:

AER create bitfield masks

Bitfield mask to construct config_bitfield of aerCreateConfig_s.

    Create bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       request support of multiple HF microphones
                   0       don't request support of multiple HF microphones
        0 - 15             RESERVED

#define aer_CRT_MULT_MIC_MODE 0x0001

Define Documentation

#define aer_CRT_MULT_MIC_MODE 0x0001

request multiple HF microphones

Definition at line 169 of file aer.h.


AER: AER Equalizer Control Codes

AER Equalizer Control Codes
[AER Constants (enum's and define's)]

Collaboration diagram for AER Equalizer Control Codes:

AER Equalizer control codes

Constants for loading Tx/Rx equalizer parameters. Used to set tx_or_rx and num_params of aerEqConfig_s.

#define aer_EQBQ_MAX_NUM_SECTION_PARAMS 17

Define Documentation

#define aer_EQBQ_MAX_NUM_SECTION_PARAMS 17

Max # of section parameters, which includes up to 2 LP/HP and up to 5 BP/BS sections.

Definition at line 708 of file aer.h.


AER: AER Error Codes

AER Error Codes
[AER Constants (enum's and define's)]

Collaboration diagram for AER Error Codes:

AER error codes

Error codes returned by AER API functions.

enum {
aer_NOERR = 0, aer_ERR_NOTCREATED = 1, aer_ERR_NOMEMORY = 2, aer_ERR_NOTOPENED = 3,
aer_ERR_NOTCLOSED = 4, aer_ERR_INVALIDPAR = 5, aer_ERR_MEMBUFVECOVF = 6, aer_ERR_NOINITGAIN = 7,
aer_ERR_LOAD_INPROCESS = 8
}

Enumeration Type Documentation

anonymous enum

Enumerator:
aer_NOERR | success, no error
aer_ERR_NOTCREATED | aerCreate() has not been called yet
aer_ERR_NOMEMORY | supplied memory are not enough
aer_ERR_NOTOPENED | AER instance has not been opened yet
aer_ERR_NOTCLOSED | AER instance has not been closed yet
aer_ERR_INVALIDPAR | configuration parameter is invalid
aer_ERR_MEMBUFVECOVF | no enough space to return buffer addresses
aer_ERR_NOINITGAIN | tx/rx initial analog gains not set
aer_ERR_LOAD_INPROCESS | loading of tail model not finished

Definition at line 45 of file aer.h.


AER: AER Module API

AER Module API

Collaboration diagram for AER Module API:

Modules

AER Functions
AER Data Structures
AER Constants (enum's and define's)


AER: AER parameter configuration ranges

AER parameter configuration ranges
[AER Constants (enum's and define's)]

Collaboration diagram for AER parameter configuration ranges:

AER parameter configuration ranges

Upper and lower limit for AER configurable parameters.

#define | aer_CNG_LEVEL_UPPER_LIMIT 0
#define | aer_CNG_LEVEL_LOWER_LIMIT (-80)
#define | aer_FDNLP_DELAY_UPPER_LIMIT 6
#define | aer_FDNLP_DELAY_LOWER_LIMIT 3
#define | aer_FDNLP_BIN_LOWER_LIMIT 0
#define | aer_FDNLP_BIN_UPPER_LIMIT_8K 64
#define | aer_FDNLP_BIN_UPPER_LIMIT_16K 128
#define | aer_NR_NOISE_THR_LOWER_LIMIT (-80)
#define | aer_NR_NOISE_THR_UPPER_LIMIT (-40)
#define | aer_SLIM_MODE_UPPER_LIMIT 5
#define | aer_SLIM_MODE_LOWER_LIMIT 0

Define Documentation

#define aer_CNG_LEVEL_UPPER_LIMIT 0

CNG level upper limit: 0dBm0

Definition at line 1539 of file aer.h.

#define aer_CNG_LEVEL_LOWER_LIMIT (-80)

CNG level lower limit: -80dBm0

Definition at line 1540 of file aer.h.

#define aer_FDNLP_DELAY_UPPER_LIMIT 6

FDNLP delay upper limit: 6msec

Definition at line 1541 of file aer.h.

#define aer_FDNLP_DELAY_LOWER_LIMIT 3

FDNLP delay lower limit: 3msec

Definition at line 1542 of file aer.h.

#define aer_FDNLP_BIN_LOWER_LIMIT 0

FDNLP bin lower limit: 0Hz

Definition at line 1543 of file aer.h.

#define aer_FDNLP_BIN_UPPER_LIMIT_8K 64

FDNLP bin upper limit for 8kHz sampling rate: 4000Hz

Definition at line 1544 of file aer.h.

#define aer_FDNLP_BIN_UPPER_LIMIT_16K 128

FDNLP bin upper limit for 16kHz sampling rate: 8000Hz

Definition at line 1546 of file aer.h.

#define aer_NR_NOISE_THR_LOWER_LIMIT (-80)

ASNR noise thr low lim: -80dBm0

Definition at line 1549 of file aer.h.

#define aer_NR_NOISE_THR_UPPER_LIMIT (-40)

ASNR noise thr up lim: -40dBm0

Definition at line 1550 of file aer.h.

#define aer_SLIM_MODE_UPPER_LIMIT 5

signal limiter mode upper limit: 5 (most aggressive)

Definition at line 1551 of file aer.h.

#define aer_SLIM_MODE_LOWER_LIMIT 0

signal limiter mode lower limit: 0 (disabled)

Definition at line 1553 of file aer.h.


AER: AER Phone Modes

AER Phone Modes
[AER Constants (enum's and define's)]

Collaboration diagram for AER Phone Modes:

AER phone modes

Parameter phone_mode of aerConfig_s or aerControl_s should be set to one of these phone modes.

#define | aer_PHM_HS 0x8000
#define | aer_PHM_HES 0x4000
#define | aer_PHM_HF 0x2000
#define | aer_PHM_HSGL 0x1000
#define | aer_PHM_HESGL 0x0800

Define Documentation

#define aer_PHM_HS 0x8000

Handset

Definition at line 215 of file aer.h.

#define aer_PHM_HES 0x4000

Headset

Definition at line 216 of file aer.h.

#define aer_PHM_HF 0x2000

Hands free

Definition at line 217 of file aer.h.

#define aer_PHM_HSGL 0x1000

Handset group listen

Definition at line 218 of file aer.h.

#define aer_PHM_HESGL 0x0800

Headset group listen

Definition at line 219 of file aer.h.


AER: AER Reset Bitfield Masks

AER Reset Bitfield Masks
[AER Constants (enum's and define's)]

Collaboration diagram for AER Reset Bitfield Masks:

AER reset bitfield mask

Bitfield mask aer_RESET_XYZ to reset AER information through aerOpen(). Used to construct reset_bitfield of aerConfig_s.

    Reset bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       perform full reset (see remark below about full reset)
                   0       don't perform full reset
                           Note: if the bit is 1, all other bits in this bitfield
                                 will be ignored.
        1          1       reset adaptive tail model
                   0       keep adaptive tail model
        2          1       reset Tx/Rx analog and digital gains to default
                   0       keep Tx/Rx analog and digital gains
        3          1       reset Tx/Rx equalizer filter coefficients to all 0's
                   0       keep Tx/Rx equalizer filter coefficients
        4          1       reset all non-system parameters (those configurable
                           only through aerControl, not aerOpen) except Tx/Rx
                           gains and equalizer coefficients.
                   0       keep all other parameters
        5 - 15             RESERVED

Remarks:
The full reset does the following:
  • reset all parameters to their default values
  • clear all AER states and delay lines including gains
  • reset equalizer filter coefficients
  • reset tail model filter coefficients
  • control bitfield 0 and 1 (AER Control Bitfield Masks) to their default values

#define | aer_RESET_FULL 0x0001
#define | aer_RESET_TAIL_MODEL 0x0002
#define | aer_RESET_TXRX_GAINS 0x0004
#define | aer_RESET_TXRX_EQ_FILT 0x0008
#define | aer_RESET_OTHER_PARAMS 0x0010

Define Documentation

#define aer_RESET_FULL 0x0001

full reset

Definition at line 484 of file aer.h.

#define aer_RESET_TAIL_MODEL 0x0002

reset tail model

Definition at line 485 of file aer.h.

#define aer_RESET_TXRX_GAINS 0x0004

reset Tx/Rx gains

Definition at line 486 of file aer.h.

#define aer_RESET_TXRX_EQ_FILT 0x0008

reset Tx/Rx Eq parameters

Definition at line 487 of file aer.h.

#define aer_RESET_OTHER_PARAMS 0x0010

reset all other parameters

Definition at line 488 of file aer.h.


AER: AER Sampling Rates Definitions

AER Sampling Rates Definitions
[AER Constants (enum's and define's)]

Collaboration diagram for AER Sampling Rates Definitions:

AER sampling rates

Sampling rates that are supported by AER. Used to define max_sampling_rate of aerCreateConfig_t.

enum | { aer_SRATE_8K = 0, aer_SRATE_16K = 1 }
typedef tint | aerSrate_t

AER sampling rate bitfield

AER sampling rate bitfield that specifies the sampling rates at four interfaces: Rx in, Tx out, Rx out and Tx in. It is required that Rx out and Tx in have the same sampling rate.

    Four interfaces of AER:
             Tx in          Tx out
     |------|  ->  |-------| ->  |---------|
     | TDM  |      |  AER  |     | Network |
     |------|  <-  |-------| <-  |---------|
             Rx out         Rx in

    Sampling rate bitfield:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

    bits (from LSB)    values   meaning
     0                   0       Rx in at 8kHz
                         1       Rx in at 16kHz
     1                   0       Tx out at 8kHz
                         1       Tx out at 16kHz
     2                   0       Rx out and Tx in at 8kHz
                         1       Rx out and Tx in at 16kHz
     3 - 15                      RESERVED

enum | { aer_SRATE_BIT_RXIN = 0, aer_SRATE_BIT_TXOUT = 1, aer_SRATE_BIT_RXOUT_TXIN = 2 }

AER sampling rate bitfield masks

Masks that are used to construct the sampling rate bitfield of aerConfig_s and aerControl_s.

#define | aer_SRATE_RXIN_16K (aer_SRATE_16K<<aer_SRATE_BIT_RXIN)
#define | aer_SRATE_RXIN_8K (aer_SRATE_8K<<aer_SRATE_BIT_RXIN)
#define | aer_SRATE_TXOUT_16K (aer_SRATE_16K<<aer_SRATE_BIT_TXOUT)
#define | aer_SRATE_TXOUT_8K (aer_SRATE_8K<<aer_SRATE_BIT_TXOUT)
#define | aer_SRATE_RXOUT_TXIN_16K (aer_SRATE_16K<<aer_SRATE_BIT_RXOUT_TXIN)
#define | aer_SRATE_RXOUT_TXIN_8K (aer_SRATE_8K<<aer_SRATE_BIT_RXOUT_TXIN)

Define Documentation

#define aer_SRATE_RXIN_16K (aer_SRATE_16K<<aer_SRATE_BIT_RXIN)

Definition at line 136 of file aer.h.

#define aer_SRATE_RXIN_8K (aer_SRATE_8K<<aer_SRATE_BIT_RXIN)

Definition at line 137 of file aer.h.

#define aer_SRATE_TXOUT_16K (aer_SRATE_16K<<aer_SRATE_BIT_TXOUT)

Definition at line 138 of file aer.h.

#define aer_SRATE_TXOUT_8K (aer_SRATE_8K<<aer_SRATE_BIT_TXOUT)

Definition at line 139 of file aer.h.

#define aer_SRATE_RXOUT_TXIN_16K (aer_SRATE_16K<<aer_SRATE_BIT_RXOUT_TXIN)

Definition at line 140 of file aer.h.

#define aer_SRATE_RXOUT_TXIN_8K (aer_SRATE_8K<<aer_SRATE_BIT_RXOUT_TXIN)

Definition at line 141 of file aer.h.

Typedef Documentation

typedef tint aerSrate_t

used by aerCreateConfig_t

Definition at line 75 of file aer.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
aer_SRATE_8K | 8kHz
aer_SRATE_16K | 16kHz

Definition at line 70 of file aer.h.

anonymous enum

Enumerator:
aer_SRATE_BIT_RXIN | Bit 0 indicates Rx in sampling rate: 0 = 8kHz, 1 = 16kHz.
aer_SRATE_BIT_TXOUT | Bit 1 indicates Tx out sampling rate: 0 = 8kHz, 1 = 16kHz.
aer_SRATE_BIT_RXOUT_TXIN | Bit 2 indicates Rx out and Tx in sampling rate: 0 = 8kHz, 1 = 16kHz.

Definition at line 114 of file aer.h.


AER: AER GetSize Configuration Bitfield Masks

AER GetSize Configuration Bitfield Masks
[AER Constants (enum's and define's)]

Collaboration diagram for AER GetSize Configuration Bitfield Masks:

AER getSize configuration bitfield masks

Bitfield mask to construct config_bitfield of aerSizeConfig_s.

    Size config bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       request memory for FDNLP
                   0       don't request memory for FDNLP
        1          1       use bandsplit to save memory
                   0       don't use bandsplit
        2 - 15             RESERVED

#define | aer_SIZE_FDNLP_REQ 0x0001
#define | aer_SIZE_USE_BANDSPLIT 0x0002

Define Documentation

#define aer_SIZE_FDNLP_REQ 0x0001

Request FDNLP memory

Definition at line 198 of file aer.h.

#define aer_SIZE_USE_BANDSPLIT 0x0002

Use bandsplit to save memory

Definition at line 199 of file aer.h.


AER: AER Trace Config Bitfield Masks

AER Trace Config Bitfield Masks
[AER Constants (enum's and define's)]

Collaboration diagram for AER Trace Config Bitfield Masks:

AER trace config bitfield masks

These bit masks may be used to contruct aerTraceConfig_s::trace_bitfield.

    Bits and explanations of trace_bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       adaptive filter coefficients will be traced
                   0       adaptive filter coefficients will not be traced
        1          1       coherence data will be traced
                   0       coherence data will not be traced
        2          1       FDNLP data will be traced
                   0       FDNLP data will not be traced
        3          1       ASNR data will be traced
                   0       ASNR data will not be traced
        4 - 15             RESERVED

#define | aer_TRACE_FILTER_COEF 0x0001
#define | aer_TRACE_COH_DATA 0x0002
#define | aer_TRACE_FDNLP_DATA 0x0004
#define | aer_TRACE_ASNR_DATA 0x0008
#define | aer_TRACE_RESERVED_BITS 0xFFF0

Define Documentation

#define aer_TRACE_FILTER_COEF 0x0001

trace filter coefficients

Definition at line 870 of file aer.h.

#define aer_TRACE_COH_DATA 0x0002

trace coherence data

Definition at line 871 of file aer.h.

#define aer_TRACE_FDNLP_DATA 0x0004

trace FDNLP data

Definition at line 872 of file aer.h.

#define aer_TRACE_ASNR_DATA 0x0008

trace ASNR data

Definition at line 873 of file aer.h.

#define aer_TRACE_RESERVED_BITS 0xFFF0

reserved for future usage

Definition at line 874 of file aer.h.


AER: AER Trace Maximum Sizes

AER Trace Maximum Sizes
[AER Constants (enum's and define's)]

Collaboration diagram for AER Trace Maximum Sizes:

AER trace maximum sizes for Tx and Rx

#define | aer_TRACE_MAX_SIZE_TX (3630 * sizeof(Fract))
#define | aer_TRACE_MAX_SIZE_RX (400 * sizeof(Fract))

Define Documentation

#define aer_TRACE_MAX_SIZE_TX (3630 * sizeof(Fract))

Maximum size of Tx tracing data

Definition at line 833 of file aer.h.

#define aer_TRACE_MAX_SIZE_RX (400 * sizeof(Fract))

Maximum size of Rx tracing data

Definition at line 835 of file aer.h.


AER: AER Warning Messages

AER Warning Messages
[AER Constants (enum's and define's)]

Collaboration diagram for AER Warning Messages:

AER Warning Messages

Used by debugInfo provided by aerCreateConfig_s to pass warning code.

enum { aer_WARN_PATH_SELECT = 1, aer_WARN_RX_NLP = 2, aer_WARN_TX_NLP = 3, aer_WARN_COMPUTE_CLIP = 4 }

Enumeration Type Documentation

anonymous enum

Enumerator:
aer_WARN_PATH_SELECT | error in path select state machine
aer_WARN_RX_NLP | error in Rx NLP state machine
aer_WARN_TX_NLP | error in Tx NLP state machine
aer_WARN_COMPUTE_CLIP | error in clipper calculation state machine

Definition at line 557 of file aer.h.


AER: AGC Constants (enum's and define's)

AGC Constants (enum's and define's)
[AGC Module API]

Collaboration diagram for AGC Constants (enum's and define's):

Modules

AGC Error Codes
AGC Event Codes
AGC Control Bitfield Masks
AGC Reset Bitfield Masks
AGC Configuration Valid Bitfield Masks
AGC Create Bitfield Masks
AGC Sampling Rates Definitions


AER: AGC Functions

AGC Functions
[AGC Module API]

Collaboration diagram for AGC Functions:

Functions

tint | agcCreate (agcCreateConfig_t *create_cfg)
This function provides system information that is shared among multiple instances of AGC.
Remarks:
Function agcCreate() must be called before any other AGC API function is called.

tint | agcGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, agcSizeConfig_t *cfg)
This function obtains memory requirements for an instance of AGC.
tint | agcNew (void **agcInst, tint nbufs, ecomemBuffer_t *bufs, agcNewConfig_t *cfg)
This function creates an instance of AGC and initializes the memory buffer pointers in the instance.
Remarks:
Function agcNew() must be called before agcOpen()is called.

tint | agcOpen (void *agcInst, agcConfig_t *cfg)
This function initializes and configures an AGC instance.
tint | agcControl (void *agcInst, agcControl_t *ctl)
This function enables or disables a type of AGC function or changes the value of a certain parameter.
tint | agcClose (void *agcInst)
This function closes the AGC instance identified by agcInst. It sets the state of AGC to CLOSED.
tint | agcDelete (void **agcInst, tint nbufs, ecomemBuffer_t *bufs)
This function deletes the AGC instance identified by agcInst. It clears the instance pointer to NULL and returns the addresses of the buffers used by this instance.
tint | agcGetPerformance (void *agcInst, agcDebugStat_t *dbgstat, agcVersion_t *version, tbool reset)
This function reports the AGC performance debug statistics.
tint | agcSendIn (void *agcInst, void *send_in)
This function performs send path processing. It only examines the data without changing it.

When adaptive mode is disabled, AGC will just monitor the signal saturation status, and report to system through the eventOut funtion provided by agcCreateConfig_t. If saturation is detected, the event will be agc_EVC_SAT_DETECTED, and if saturation stops, it will be agc_EVC_SAT_FALSE.

When adaptive mode is enabled, besides monitoring saturation, AGC will also try to request for microphone analog gain change to optimize the Tx path digital dynamic range to enhance AER performance. If the ADC output is persistently saturating, AGC will ask to lower the mic gain, and if the ADC output is persistently too low AGC will ask to increase the mic gain. During these mic gain changes the loudness of the Tx path, or SLR, is preserved by maintaining the sum of mic analog gain and AER Tx digital gain (or known as pre-NLP gain).

Function Documentation

tint agcCreate ( agcCreateConfig_t * create_cfg )

This function provides system information that is shared among multiple instances of AGC.

Remarks:
Function agcCreate() must be called before any other AGC API function is called.

Parameters:
[in] create_cfg Pointer to a create configuration structure.
Return values:
AGC error code.
    error code              description
    agc_NOERR               success
    agc_ERR_INVALIDPAR      max_sampling_rate of create_cfg is not equal to any
                            value defined in agcSrate_t.

tint agcGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | agcSizeConfig_t * | cfg
 | ) |  |

This function obtains memory requirements for an instance of AGC.

Parameters:
[in] | cfg | Pointer to a size configuration structure.
[out] | nbufs | Number of memory buffers stored in this address.
[out] | bufs | Address of buffer descriptors stored in this address.
Remarks:
Type ecomemBuffer_t is defined in ecomem.h of util package.
Return values:
AGC error code.
    error code              description
    agc_ERR_NOTCREATED      agcCreate() has not been called

tint agcNew | ( | void ** | agcInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | agcNewConfig_t * | cfg
 | ) |  |

This function creates an instance of AGC and initializes the memory buffer pointers in the instance.

Remarks:
Function agcNew() must be called before agcOpen()is called.

Parameters:
[in] | nbufs | Number of memory buffers allocated by the user.
[in] | bufs | Pointer to memory buffer descriptors defined by user.
Remarks:
Buffer alignment property of each buffer passed to aerNew() must be equal to or better than what is returned by aerGetSizes(), and must be in consistency with the base address of the buffer.
Parameters:
[in] | cfg | Pointer to new instance configuration structure.
[in,out] | agcInst | Memory location that will receive a pointer to the created AGC instance.
Return values:
AGC error code.
     error code              description
     agc_NOERR               success
     agc_ERR_INVALIDPAR      *agcInst is not NULL or nbufs is not correct
     agc_ERR_NOMEMORY        properties of certain buffer are bad:
                             - size is not zero but base address is NULL,
                             - alignment and base address are not consistent,
                             - volatility does not meet requirement.
Precondition:
The pointer at the location pointed to by agcInst must be set to NULL before this function is called.
Postcondition:
A pointer to the AGC instance buffer will be returned to the location pointed to by agcInst. Instance state will be set to closed.

tint agcOpen | ( | void * | agcInst,
 |  | agcConfig_t * | cfg
 | ) |  |

This function initializes and configures an AGC instance.

Parameters:
[in] | cfg | Pointer to AGC configuration parameter.
[in,out] | agcInst | Pointer to AGC instance.
Return values:
AGC error code.
     error code              description
     agc_NOERR               success
     agc_ERR_NOTCLOSED       AGC instance state has not been set to closed, i.e,
                             agcNew() or agcClose() not called for the instance.
     agc_ERR_INVALIDPAR      bad configuration parameters:
                             - cfg is NULL
                             - valid_bitfield of agcConfig_t is not all 1's for
                               first time open after agcNew().
                             - sampling rate of agcConfig_t is larger than
                               max_sampling_rate specified in agcCreateConfig_t.
Precondition:
Function agcNew() must be called before agcOpen() is called the first time to open a new instance. For subsequent calls to open an existing instance, agcClose() must be called before agcOpen() to close the instance.
Postcondition:
After AGC instance is opened, agcControl() or agcSendIn() may be called for control or processing.

tint agcControl | ( | void * | agcInst,
 |  | agcControl_t * | ctl
 | ) |  |

This function enables or disables a type of AGC function or changes the value of a certain parameter.

Parameters:
[in] | ctl | Pointer to AGC control structure.
[in,out] | agcInst | Pointer to AGC instance.
Return values:
AGC error code.
     error code              description
     agc_NOERR               success
     agc_ERR_NOTOPENED       AGC instance has not been opened

tint agcClose ( void * agcInst )

This function closes the AGC instance identified by agcInst. It sets the state of AGC to CLOSED.

Parameters:
[in,out] agcInst
Return values:
AGC error code.
     error code              description
     agc_NOERR               success
     agc_ERR_NOTOPENED       AGC instance is not in open state

tint agcDelete | ( | void ** | agcInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

This function deletes the AGC instance identified by agcInst. It clears the instance pointer to NULL and returns the addresses of the buffers used by this instance.

Parameters:
[in] | nbufs | Number of buffers used by this instance.
[in] | bufs | Pointer to buffer descriptors to store returned addresses of the buffers used by this instance.
[in,out] | agcInst | Memory location where the pointer to AGC instance is stored.
Return values:
AGC error code.
     error code              description
     agc_NOERR               success
     agc_ERR_NOTCLOSED       AGC instance has not been closed.
     agc_ERR_MEMBUFVECOVF    Not enough buffer descriptors to store all returned
                             buffer addresses.
Precondition:
AGC instance must be closed by agcClose() before agcDelete() is called.
Postcondition:
After agcDelete() is called, AGC instance pointer stored at agcInst will be set to NULL, and the addresses of the buffers used by this instance will be returned to the location pointed to by bufs.

tint agcGetPerformance | ( | void * | agcInst,
 |  | agcDebugStat_t * | dbgstat,
 |  | agcVersion_t * | version,
 |  | tbool | reset
 | ) |  |

This function reports the AGC performance debug statistics.

Parameters:
[in] | agcInst | Pointer to AGC instance.
[in] | dbgstat | Pointer to debug status structure.
[in] | version | Pointer to AGC version structure.
[in] | reset | Flag to tell AGC to reset event counters.
Return values:
AGC error code (always agc_NOERR).
Postcondition:
AGC event counters, sat_cntr and glim_reach_cntr of dbgstat, will be set to 0s if reset flag is true.

tint agcSendIn | ( | void * | agcInst,
 |  | void * | send_in
 | ) |  |

This function performs send path processing. It only examines the data without changing it.

When adaptive mode is disabled, AGC will just monitor the signal saturation status, and report to system through the eventOut funtion provided by agcCreateConfig_t. If saturation is detected, the event will be agc_EVC_SAT_DETECTED, and if saturation stops, it will be agc_EVC_SAT_FALSE.

When adaptive mode is enabled, besides monitoring saturation, AGC will also try to request for microphone analog gain change to optimize the Tx path digital dynamic range to enhance AER performance. If the ADC output is persistently saturating, AGC will ask to lower the mic gain, and if the ADC output is persistently too low AGC will ask to increase the mic gain. During these mic gain changes the loudness of the Tx path, or SLR, is preserved by maintaining the sum of mic analog gain and AER Tx digital gain (or known as pre-NLP gain).

Remarks:
Adaptive AGC will not ask for mic gain change is any of the following happens:
  • microphone gain max/min is going to be reached
  • pre-NLP gain min (-6dB) to be reached
  • gain swing max to be reached
    Instead, AGC will record the number of occurances of the above events and make it available in glim_reach_cntr of agcDebugStat_t.
See also:
max_micgain, min_micgain, and max_micgain_swing of agcControl_t.
Parameters:
[in] | send_in | A frame of data to be examined.
[in,out] | agcInst | Pointer to AGC instance.
Return values:
AGC error code.
     error code              description
     agc_NOERR               success
     agc_ERR_NOTOPENED       AGC instance has not been opened
     agc_ERR_INVALIDPAR      AGC has not been informed of the initial speaker
                             and mic gains.


AER: AGC Data Structures

AGC Data Structures
[AGC Module API]

Collaboration diagram for AGC Data Structures:

Data Structures

struct | agcEvent_s
AGC event structure. It contains the event code and the associated parameters to be read or set by AGC eventOut function. It is one argument of AGC eventOut function passed to AGC by the user through agcCreateConfig_t and agcCreate(). More...
struct | agcCreateConfig_s
AGC create configuration structure which contains information to be shared by multiple AGC instances. It is used by function agcCreate(). More...
struct | agcSizeConfig_s
AGC size configuration structure used by function agcGetSizes(). It is also part of structure agcNewConfig_t. More...
struct | agcNewConfig_s
AGC configuration structure for creating a new AGC instance. It is used by function agcNew(). More...
struct | agcConfig_s
AGC configuration structure. It contains parameters needed to open an instance of AGC, and is used by function agcOpen(). More...
struct | agcVersion_s
AGC Version structure. More...
struct | agcDebugStat_s
AGC debug statistics data structure. More...
struct | agcAerData_s
Data structure to hold AER parameters needed by AGC. These parameters are provided by the user through agcControl() via control valid bit agc_CTL_VALID_AERDATA. More...
struct | agcModeControl_s
AGC operation modes control structure. Contains parameters needed to change AGC operational modes through function agcControl() via control valid bit agc_CTL_VALID_MODES. More...
struct | agcControl_s
AGC control data structure. It contains information to change operation of AGC through functin agcControl(). More...
struct | agcCallTable_t
AGC call table. More...

Typedefs

typedef agcEvent_s | agcEvent_t
AGC event structure. It contains the event code and the associated parameters to be read or set by AGC eventOut function. It is one argument of AGC eventOut function passed to AGC by the user through agcCreateConfig_t and agcCreate().
typedef agcCreateConfig_s | agcCreateConfig_t
AGC create configuration structure which contains information to be shared by multiple AGC instances. It is used by function agcCreate().
typedef agcSizeConfig_s | agcSizeConfig_t
AGC size configuration structure used by function agcGetSizes(). It is also part of structure agcNewConfig_t.
typedef agcNewConfig_s | agcNewConfig_t
AGC configuration structure for creating a new AGC instance. It is used by function agcNew().
typedef agcConfig_s | agcConfig_t
AGC configuration structure. It contains parameters needed to open an instance of AGC, and is used by function agcOpen().
typedef agcVersion_s | agcVersion_t
AGC Version structure.
typedef agcDebugStat_s | agcDebugStat_t
AGC debug statistics data structure.
typedef agcAerData_s | agcAerData_t
Data structure to hold AER parameters needed by AGC. These parameters are provided by the user through agcControl() via control valid bit agc_CTL_VALID_AERDATA.
typedef agcModeControl_s | agcModeControl_t
AGC operation modes control structure. Contains parameters needed to change AGC operational modes through function agcControl() via control valid bit agc_CTL_VALID_MODES.
typedef agcControl_s | agcControl_t
AGC control data structure. It contains information to change operation of AGC through functin agcControl().

Typedef Documentation

typedef struct agcEvent_s agcEvent_t

AGC event structure. It contains the event code and the associated parameters to be read or set by AGC eventOut function. It is one argument of AGC eventOut function passed to AGC by the user through agcCreateConfig_t and agcCreate().

Remarks:
Usage of parameters depend on each of AGC Event Codes :
  • agc_EVC_SAT_FALSE : no parameter is needed.
  • agc_EVC_SAT_DETECTED : no parameter is needed.
  • agc_EVC_MGAIN_CHANGE : analog_gain has the new gain value requested by adaptive AGC.
  • agc_EVC_SGAIN_CHANGE : not used by AGC event out function.
  • agc_EVC_GET_PRENLP_GAIN : event out function should return AER's pre-NLP (or AER Tx digital) gain in pNLPgain.
  • agc_EVC_SET_PRENLP_GAIN : not used by AGC eventOut function.

Refer to agcSendIn() for adaptive operation of AGC.

typedef struct agcCreateConfig_s agcCreateConfig_t

AGC create configuration structure which contains information to be shared by multiple AGC instances. It is used by function agcCreate().

Remarks:
Type debugInfo_t is defined in debug.h of util package.

typedef struct agcSizeConfig_s agcSizeConfig_t

AGC size configuration structure used by function agcGetSizes(). It is also part of structure agcNewConfig_t.

typedef struct agcNewConfig_s agcNewConfig_t

AGC configuration structure for creating a new AGC instance. It is used by function agcNew().

typedef struct agcConfig_s agcConfig_t

AGC configuration structure. It contains parameters needed to open an instance of AGC, and is used by function agcOpen().

typedef struct agcVersion_s agcVersion_t

AGC Version structure.

Remarks:
AGC doesn't have its own version number. It uses AER's version number defined in aerVersion_s of aer.h.

typedef struct agcDebugStat_s agcDebugStat_t

AGC debug statistics data structure.

typedef struct agcAerData_s agcAerData_t

Data structure to hold AER parameters needed by AGC. These parameters are provided by the user through agcControl() via control valid bit agc_CTL_VALID_AERDATA.

Remarks:
These information must be provided to AGC every frame for AGC's adaptive operation.

typedef struct agcModeControl_s agcModeControl_t

AGC operation modes control structure. Contains parameters needed to change AGC operational modes through function agcControl() via control valid bit agc_CTL_VALID_MODES.

typedef struct agcControl_s agcControl_t

AGC control data structure. It contains information to change operation of AGC through functin agcControl().

Remarks:
Bits agc_CTL_VALID_MICGAIN and agc_CTL_VALID_MICGAIN_ADAPT should not be set at the same time. Otherwise, bit agc_CTL_VALID_MICGAIN_ADAPT will be ignored and agcControl() will take actions based on bit agc_CTL_VALID_MICGAIN, and error code agc_ERR_MIC_GAIN_DUPLICATE will be returned by agcControl().


AER: AGC Configuration Valid Bitfield Masks

AGC Configuration Valid Bitfield Masks
[AGC Constants (enum's and define's)]

Collaboration diagram for AGC Configuration Valid Bitfield Masks:

AGC configuration valid bitfield masks

Bitfield mask agc_CFG_VALID_XYZ to configure AGC parameters through agcOpen(). Used to construct valid_bitfield of agcConfig_t.

    AGC config valid bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       configure sampling rate
                   0       don't configure sampling rate
        1 - 15             RESERVED

#define | agc_CFG_VALID_SAMP_RATE 0x0001
#define | agc_CFG_VALID_BITS_ALL_1 0x0001

Define Documentation

#define agc_CFG_VALID_SAMP_RATE 0x0001

Definition at line 180 of file agc.h.

#define agc_CFG_VALID_BITS_ALL_1 0x0001

Definition at line 181 of file agc.h.


AER: AGC Control Bitfield Masks

AGC Control Bitfield Masks
[AGC Constants (enum's and define's)]

Collaboration diagram for AGC Control Bitfield Masks:

AGC control bitfield masks

Bitfield mask agc_CTL_MODES_XYZ to change AGC operation modes through agcControl(). Used to construct mask and value of agcModeControl_t.

    AGC control bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       enable AGC
                   0       disable AGC
        1          1       enable adaptive mode
                   0       disable adaptive mode
        2          1       clear everything and restart
                   0       do nothing
        3 - 15             RESERVED

#define | agc_CTL_MODES_ENABLE_AGC 0x0001
#define | agc_CTL_MODES_ENABLE_ADAPT 0x0002
#define | agc_CTL_MODES_CLEAR_ALL 0x0004

Define Documentation

#define agc_CTL_MODES_ENABLE_AGC 0x0001

enable AGC.

Definition at line 111 of file agc.h.

#define agc_CTL_MODES_ENABLE_ADAPT 0x0002

enable adaptive mode of AGC

Definition at line 112 of file agc.h.

#define agc_CTL_MODES_CLEAR_ALL 0x0004

clear everything, restart

Definition at line 113 of file agc.h.


AER: AGC Create Bitfield Masks

AGC Create Bitfield Masks
[AGC Constants (enum's and define's)]

Collaboration diagram for AGC Create Bitfield Masks:

AGC create configuration bitfield masks

Bitfield mask to construct config_bitfield of agcCreateConfig_t.

    AGC create bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       request support of multiple HF microphones
                   0       don't request support of multiple HF microphones
        0 - 15             RESERVED

#define agc_CRT_MULT_MIC_MODE 0x0001

Define Documentation

#define agc_CRT_MULT_MIC_MODE 0x0001

request multiple HF mic support.

Definition at line 210 of file agc.h.


AER: AGC Error Codes

AGC Error Codes
[AGC Constants (enum's and define's)]

Collaboration diagram for AGC Error Codes:

AGC error codes

Error codes returned by AGC API functions.

enum {
agc_NOERR = 0, agc_ERR_NOTCREATED = 1, agc_ERR_NOMEMORY = 2, agc_ERR_NOTOPENED = 3,
agc_ERR_NOTCLOSED = 4, agc_ERR_INVALIDPAR = 5, agc_ERR_MEMBUFVECOVF = 6, agc_ERR_GAIN_REQ_NOT_SERVICED = 7,
agc_ERR_MIC_GAIN_DUPLICATE = 8
}

Enumeration Type Documentation

anonymous enum

Enumerator:
agc_NOERR | success, no error
agc_ERR_NOTCREATED | agcCreate() has not been called yet
agc_ERR_NOMEMORY | supplied memory are not enough
agc_ERR_NOTOPENED | AGC instance has not been opened yet
agc_ERR_NOTCLOSED | AGC instance has not been closed yet
agc_ERR_INVALIDPAR | configuration parameter is invalid
agc_ERR_MEMBUFVECOVF | no enough space to return buffer addresses
agc_ERR_GAIN_REQ_NOT_SERVICED | last gain change request not serviced
agc_ERR_MIC_GAIN_DUPLICATE | bits agc_CTL_VALID_MICGAIN and agc_CTL_VALID_MICGAIN_ADAPT of agcControl_s.valid_bitfield are both set.

Definition at line 44 of file agc.h.


AER: AGC Event Codes

AGC Event Codes
[AGC Constants (enum's and define's)]

Collaboration diagram for AGC Event Codes:

AGC event codes

AGC event codes for sending external message or request through eventOut function provided externally. Used to set event_code of structure agcEvent_t.

enum {
agc_EVC_SAT_FALSE = 0, agc_EVC_SAT_DETECTED = 1, agc_EVC_MGAIN_CHANGE = 2, agc_EVC_SGAIN_CHANGE = 3,
agc_EVC_GET_PRENLP_GAIN = 4, agc_EVC_SET_PRENLP_GAIN = 5
}

Enumeration Type Documentation

anonymous enum

Enumerator:
agc_EVC_SAT_FALSE | no recent saturation detected
agc_EVC_SAT_DETECTED | mic input saturation detected
agc_EVC_MGAIN_CHANGE | request PGA mic gain change
agc_EVC_SGAIN_CHANGE | request PGA spk gain change
agc_EVC_GET_PRENLP_GAIN | Get the present Pre-NLP gain
agc_EVC_SET_PRENLP_GAIN | Set the new Pre-NLP gain

Definition at line 70 of file agc.h.


AER: AGC Module API

AGC Module API

Collaboration diagram for AGC Module API:

Modules

AGC Functions
AGC Data Structures
AGC Constants (enum's and define's)


AER: AGC Reset Bitfield Masks

AGC Reset Bitfield Masks
[AGC Constants (enum's and define's)]

Collaboration diagram for AGC Reset Bitfield Masks:

AGC reset bitfield masks

Bitfield mask agc_RESET_XYZ to reset AGC information through function agcOpen(). Used to construct reset_bitfield of agcConfig_t.

    AGC reset bitfield
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------

       bits      values       meaning
    (from LSB)
        0          1       perform a full reset
                   0       don't perform full reset
        1          1       clear signal power history
                   0       keep signal power history
        2          1       reset mic and speaker analog gains to default
                   0       keep mic and speaker analog gains
        3          1       reset cofigurable parameters except mic/speaker gains
                   0       keep cofigurable parameters
        4 - 15             RESERVED

#define | agc_RESET_FULL_RESET 0x0001
#define | agc_RESET_POWER_HIST 0x0002
#define | agc_RESET_MIC_SPK_GAINS 0x0004
#define | agc_RESET_OTHER_PARAMS 0x0008

Define Documentation

#define agc_RESET_FULL_RESET 0x0001

full reset.

Definition at line 147 of file agc.h.

#define agc_RESET_POWER_HIST 0x0002

reset signal power history.

Definition at line 148 of file agc.h.

#define agc_RESET_MIC_SPK_GAINS 0x0004

reset mic and speaker gains.

Definition at line 149 of file agc.h.

#define agc_RESET_OTHER_PARAMS 0x0008

reset configurable parameters.

Definition at line 150 of file agc.h.


AER: AGC Sampling Rates Definitions

AGC Sampling Rates Definitions
[AGC Constants (enum's and define's)]

Collaboration diagram for AGC Sampling Rates Definitions:

AGC sampling rates

AGC sampling rate definitions to set sampling_rate of agcConfig_t and max_sampling_rate of agcSizeConfig_t.

enum | { agc_SRATE_8K = 0, agc_SRATE_16K = 1 }
typedef tint | agcSrate_t

Typedef Documentation

typedef tint agcSrate_t

used by agcCreateConfig_t

Definition at line 228 of file agc.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
agc_SRATE_8K | 8kHz
agc_SRATE_16K | 16kHz

Definition at line 223 of file agc.h.


AER: BF Constants (enum's and define's)

BF Constants (enum's and define's)
[BF Module API]

Collaboration diagram for BF Constants (enum's and define's):

Modules

BF Error Codes
BF Sampling Rate Definitions
BF Size Configuration Max
BF Type Definitions
BF Filter Type Definitions
BF Enable/Disable Constants
BF Operation Mode Constants


AER: BF Functions

BF Functions
[BF Module API]

Collaboration diagram for BF Functions:

Functions

tint | bfGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, bfSizeConfig_t *cfg)
Function bfGetSizes() obtains from BF the memory requirements of an instance, which depend on provided configuration parameters.
tint | bfNew (void **bfInst, tint nbufs, ecomemBuffer_t *bufs, bfNewConfig_t *cfg)
Function bfNew() creates a new instance of BF.
Remarks:
Function bfNew() must be called before bfOpen()is called.

tint | bfOpen (void *bfInst, bfConfig_t *cfg)
Function bfOpen() initializes and configures a BF instance.
tint | bfControl (void *bfInst, bfControl_t *ctl)
Function bfControl() changes BF operation modes or parameters.
tint | bfGetFilter (void *bfInst, Fract *coeff, tint *filter_length, tint filter_type, tint mic_index)
Function bfGetFilter() gets FIR filter coefficients for a given mic.
tint | bfPutFilter (void *bfInst, Fract *coeff, tint filter_type, tint mic_index, tint filter_length)
Function bfPutFilter() loads FIR filters for beamforming.
tint | bfProcess (void *bfInst, void *mics_in[], void *out)
Function bfProcess() processes input microphone signals according to the operation mode configured by bfControl().
tint | bfDebugStat (void *bfInst, bfDebugStat_t *bfDbg)
Function bfDebugStat() returns debug information.
tint | bfClose (void *bfInst)
Function bfClose() closes a BF instance.
Remarks:
Function bfClose() must be called before bfDelete() is called.

tint | bfDelete (void **bfInst, tint nbufs, ecomemBuffer_t *bufs)
Function bfDelete() deletes the BF instance identified by bfInst and returns the addresses of the buffers used by this instance.

Function Documentation

tint bfGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | bfSizeConfig_t * | cfg
 | ) |  |

Function bfGetSizes() obtains from BF the memory requirements of an instance, which depend on provided configuration parameters.

Parameters:
[in] | cfg | Pointer to a size configuration structure.
[out] | nbufs | Memory location to store the returned number of buffers required by the instance.
[out] | bufs | Memory location to store the returned address of the vector of memory buffer descriptions required by BF.
Remarks:
Type ecomemBuffer_t is defined in ecomem.h of util package.
Return values:
BF error code:
  • bf_NOERR: success
  • bf_ERR_INVALIDPAR, any of the parameters in bfSizeConfig_t is invalid:
    • max_num_mics is larger than bf_MAX_SUPPORTED_NUM_MICS,
    • max_filter_length is larger than bf_MAX_SUPPORTED_FILT_LEN,
    • max_sampling_rate is not bf_SAMP_RATE_8K and not bf_SAMP_RATE_16K,
    • bf_type is not bf_TYPE_FIXED.

tint bfNew | ( | void ** | bfInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | bfNewConfig_t * | cfg
 | ) |  |

Function bfNew() creates a new instance of BF.

Remarks:
Function bfNew() must be called before bfOpen()is called.

Parameters:
[in] | nbufs | Number of memory buffers allocated by the user.
[in] | bufs | Pointer to memory buffer descriptors defined by user.
[in] | cfg | Pointer to new instance configuration structure.
[in,out] | bfInst | Memory location that will receive a pointer to the created BF instance.
Remarks:
Buffer alignment property of every buffer passed to bfNew() must be equal to or better than what is returned by bfGetSizes(), and must be in consistency with the base address of the buffer.
Precondition:
The pointer at the location pointed to by bfInst must be set to NULL before this function is called.
Postcondition:
A pointer to the BF instance buffer will be returned to the location pointed to by bfInst. Instance state will be set to closed.
Return values:
BF error code:
  • bf_NOERR: success
  • bf_ERR_INVALIDPAR: *bfInst is not NULL or nbufs is not correct
  • bf_ERR_INVALIDBUF: one or more provided buffers are invalid:
    • provided buffer size is less than requested, or
    • buffer alignment does not meet requirement, or
    • alignment and base address are not consistent, or
    • volatility does not meet requirement.
  • bf_ERR_NOMEMORY buffer size is not zero but base address is NULL.

tint bfOpen | ( | void * | bfInst,
 |  | bfConfig_t * | cfg
 | ) |  |

Function bfOpen() initializes and configures a BF instance.

Remarks:
This function must be called after bfNew() to initialize a new BF instance. It may also be called to reconfigure an instance that has been closed by bfClose() but not deleted by bfDelete(). After BF instance is opened, bfControl() and bfProcess() may be called for control or processing.
Parameters:
[in] | cfg | Pointer to BF configuration parameter.
[in,out] | bfInst | Pointer to BF instance.
Return values:
BF error code:
  • bf_NOERR: success
  • bf_ERR_NOTCLOSED: BF instance state has not been set to closed, i.e, bfNew() or bfClose() not called for the instance.
  • bf_ERR_INVALIDPAR: bad configuration parameters:
    • bfConfig_s.sampling_rate is larger than bfSizeConfig_s.max_sampling_rate, or
    • bfConfig_s.num_mics is larger than bfSizeConfig_s.max_num_mics.
Precondition:
Function bfNew() must be called before bfOpen() is called the first time to open a new instance. For subsequent calls to open an existing instance, bfClose() must be called before bfOpen() to close the instance.
Postcondition:
All the parameters and operation modes that are not part of bfConfig_t are set to default by bfOpen:
  • BF is disabled,
  • BF operation mode is set to bypass,
  • First mic is selected for bypass operation,
  • BF FIR filter coefficients are reset to 0's.

tint bfControl | ( | void * | bfInst,
 |  | bfControl_t * | ctl
 | ) |  |

Function bfControl() changes BF operation modes or parameters.

Parameters:
[in,out] | bfInst | Pointer to BF instance.
[in] | ctl | Pointer to BF control structure.
Return values:
BF error code:
  • bf_NOERR: success
  • bf_ERR_NOTOPENED: BF instance has not been opened
  • bf_ERR_INVALIDPAR: argument ctl is NULL
  • bf_ERR_INVALIDOPT: new operation mode is invalid
  • bf_ERR_FILTNOCOEF: try to enable BF before filters are loaded

tint bfGetFilter | ( | void * | bfInst,
 |  | Fract * | coeff,
 |  | tint * | filter_length,
 |  | tint | filter_type,
 |  | tint | mic_index
 | ) |  |

Function bfGetFilter() gets FIR filter coefficients for a given mic.

Parameters:
[in] | bfInst | Pointer to BF instance.
[in] | filter_type | BF FIR filter or mic EQ filter (only FIR filter is supported in this release).
[in] | mic_index | Indicating which mic's coefficients to get.
[out] | coeff | External array to store the returned coefficients. It must have enough space to store maximum number of coefficients.
[out] | filter_length | Length of the filter for the indicated mic.
Return values:
BF error code:
  • bf_NOERR: success
  • bf_ERR_INVALIDPAR: filter_type is not bf_FG_BF.
See also:
bfPutFilter

tint bfPutFilter | ( | void * | bfInst,
 |  | Fract * | coeff,
 |  | tint | filter_type,
 |  | tint | mic_index,
 |  | tint | filter_length
 | ) |  |

Function bfPutFilter() loads FIR filters for beamforming.

Parameters:
[in] | bfInst | Pointer to BF instance.
[in] | coeff | External array of the coefficients to be loaded.
[in] | filter_type | Beamforming FIR filter or mic EQ filter. Refer to BF Filter Type Definitions. For this release, only BF FIR filter (bf_FG_BF) is supported.
[in] | mic_index | Indicating which mic's coefficients to be loaded. Taking values 0, 1, 2, ...
[in] | filter_length | Number of coefficients. Must be less than bfSizeConfig_s.max_filter_length and must be the same for all mics.
Return values:
BF error code:
  • bf_NOERR: success
  • bf_ERR_NOTOPENED: BF instance has not been opened
  • bf_ERR_INVALIDPAR: one or more of following parameters are invalid:
    • filter_type is not bf_FG_BF.
    • filter_length is larger than bfSizeConfig_s.max_filter_length.
Remarks:
Coefficients must be loaded for all FIR filters before enabling BF to process data, unless BF is configured to run in subset mode.

BF assumes delay compensation is achieved solely through the FIR filter for every microphone, and doesn't make any additional delay compensation. Therefore filter coefficients must be designed to compensate all of the desired delay for each microphone.

For C64x+ platforms, filter length MUST be even. If the actual number of coefficients is odd, one padding zero can be added at the end to make filter length to be even.

See also:
bfGetFilter

tint bfProcess | ( | void * | bfInst,
 |  | void * | mics_in[],
 |  | void * | out
 | ) |  |

Function bfProcess() processes input microphone signals according to the operation mode configured by bfControl().

In normal operation or subset mode, all active mic signals are first filtered by the corresponding BF filters and then added together before going through a gain adjustment to produce the final BF output. Refer to bfCtlCfg_t for more information.

Parameters:
[in] bfInst Pointer to BF instance.
[in] mics_in Vector of pointers to signal frames of all mics.
  • mics_in[0] corresponds to mic 0,
  • mics_in[1] corresponds to mic 1,
  • mics_in[L-1] corresponds to mic L-1. Where L is the total number of mics.
Remarks:
If operation mode is set to subset, not all mics will be used for beamforming, but only the selected mics according to bfControl_s.mics.
Parameters:
[out] out Buffer to store the output signal
Remarks:
All input signals and output signal are 16-bit linear samples of 10 msec.
Return values:
BF error code:
     error code         description
     bf_NOERR           success
     bf_ERR_NOTOPENED   BF instance has not been opened, no operation is allowed
     bf_ERR_DISABLED    BF instance is not enabled, will output silence
     bf_ERR_INVALIDSRC  no microphone is active, output is invalid
     bf_ERR_INVALIDOPT  >1 mic is active in bypass mode, output is invalid

tint bfDebugStat | ( | void * | bfInst,
 |  | bfDebugStat_t * | bfDbg
 | ) |  |

Function bfDebugStat() returns debug information.

Parameters:
[in] | bfInst | Pointer to BF instance.
[out] | bfDbg | Debug information.
Return values:
BF error code.
  • bf_NOERR: success
  • bf_ERR_NOTOPENED: BF instance has not been opened

tint bfClose ( void * bfInst )

Function bfClose() closes a BF instance.

Remarks:
Function bfClose() must be called before bfDelete() is called.

Parameters:
[in,out] bfInst pointer to the instance to be closed
Return values:
BF error code.
  • bf_NOERR: success
  • bf_ERR_NOTOPENED: BF instance has not been opened

tint bfDelete | ( | void ** | bfInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Function bfDelete() deletes the BF instance identified by bfInst and returns the addresses of the buffers used by this instance.

Parameters:
[in] | nbufs | Number of buffers used by this instance.
[in] | bufs | Pointer to buffer descriptors to store returned addresses of the buffers used by this instance.
[in,out] | bfInst | Memory location where the pointer to BF instance is stored.
Remarks:
This function doesn't deallocate the memory used by BF. The actual deallocation of instance should be done elsewhere after this function is called. Hence, the user has to save the buffer descriptors to make "deallocation" possible.
Return values:
BF error code.
  • bf_NOERR: success
  • bf_ERR_NOTCLOSED: BF instance has not been closed.
  • bf_ERR_NOMEMORY: Not enough buffer descriptors to store the buffer addresses to be returned by this function.
Precondition:
BF instance must be closed by bfClose() before bfDelete() is called.
Postcondition:
After bfDelete() is called, BF instance pointer stored at bfInst will be set to NULL, and the addresses of the buffers used by this instance will be returned to the location pointed to by bufs.


AER: BF Data Structures

BF Data Structures
[BF Module API]

Collaboration diagram for BF Data Structures:

Data Structures

struct | bfSizeConfig_s
Configuration structure for bfGetSizes() This structure is used for getting memory requirements of BF module through function bfGetSizes(). More...
struct | bfNewConfig_s
Configuration structure for bfNew() This structure is used for creating a new BF instance through function bfNew(). More...
struct | bfConfig_s
Configuration structure for bfOpen() This structure contains system parameters to configure a BF instance through bfOpen(). BF doesn't have default value for these parameters, and they must be set explicitly when bfOpen() is called the first time after bfNew(). More...
struct | bfCtlCfg_s
BF control configuration bitfield. More...
struct | bfControl_s
Control structure for bfControl()This structure is used to change BF configurable parameters. Element bfControl_s.valid_bitfield indicates which parameter to be changed, and following elements give the parameter values. More...
struct | bfCallTable_t
BF call table. More...

Defines

#define | bf_DEBUG_STATE_NUM_TUINT 16
BF debug structure This structure is used to provide BF debugging information.

Typedefs

typedef bfSizeConfig_s | bfSizeConfig_t
Configuration structure for bfGetSizes() This structure is used for getting memory requirements of BF module through function bfGetSizes().
typedef bfNewConfig_s | bfNewConfig_t
Configuration structure for bfNew() This structure is used for creating a new BF instance through function bfNew().
typedef bfConfig_s | bfConfig_t
Configuration structure for bfOpen() This structure contains system parameters to configure a BF instance through bfOpen(). BF doesn't have default value for these parameters, and they must be set explicitly when bfOpen() is called the first time after bfNew().
typedef bfCtlCfg_s | bfCtlCfg_t
BF control configuration bitfield.
typedef bfControl_s | bfControl_t
Control structure for bfControl()This structure is used to change BF configurable parameters. Element bfControl_s.valid_bitfield indicates which parameter to be changed, and following elements give the parameter values.

Define Documentation

#define bf_DEBUG_STATE_NUM_TUINT 16

BF debug structure This structure is used to provide BF debugging information.

Definition at line 278 of file bf.h.

Typedef Documentation

typedef struct bfSizeConfig_s bfSizeConfig_t

Configuration structure for bfGetSizes() This structure is used for getting memory requirements of BF module through function bfGetSizes().

typedef struct bfNewConfig_s bfNewConfig_t

Configuration structure for bfNew() This structure is used for creating a new BF instance through function bfNew().

typedef struct bfConfig_s bfConfig_t

Configuration structure for bfOpen() This structure contains system parameters to configure a BF instance through bfOpen(). BF doesn't have default value for these parameters, and they must be set explicitly when bfOpen() is called the first time after bfNew().

Remarks:
This structure does not contain any configurable parameters that are controlled through bfControl_s.

typedef struct bfCtlCfg_s bfCtlCfg_t

BF control configuration bitfield.

Bitfield masks bf_CTL_CFG_XYZ may be used to change BF configuration through bfControl(), by constructing elements "mask" and "value" of bfCtlCfg_s.

    BF Control Configuration Bitfield:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------
       bits      values       meaning
    (from LSB)

        0                     bf_CTL_CFG_ENABLE mask
                   0          Disable BF: Ignore input signals and produce all
                                          0's as output.
                   1          Enable BF: Process input signals as configured
                                         by other control bits and commands.

       1:2                    bf_CTL_CFG_OPERATION mask
                   00 (0)     Perform normal beamforming operation using all
                              microphones in the array.
                   01 (1)     Bypass mode: single input is passed to the output
                              without any processing. The input must be selected
                              using the bf_CTL_MICS control. Note: only one mic
                              can be active. Will return error message if more
                              than one mic is selected.
                   10 (2)     Array subset mode: inputs that are selected by
                              the bf_CTL_MICS control will be used for beamforming.
                              All others are ignored. Note: even when just one
                              microphone is selected, the filtering will be still
                              applied. To avoid filtering use the bypass mode.
                   11 (3)     Invalid configuration: will result in error.

    +-------------------+----------------+
    | Operation Modes   | BF status      |
    +---------+---------+----------------+
    |    0    |    0    | Normal BF      |
    +---------+---------+----------------+
    |    0    |    1    | Bypass mode    |
    +---------+---------+----------------+
    |    1    |    0    | Array subset   |
    +---------+---------+----------------+
    |    1    |    1    | INVALID        |
    +---------+---------+----------------+

typedef struct bfControl_s bfControl_t

Control structure for bfControl()This structure is used to change BF configurable parameters. Element bfControl_s.valid_bitfield indicates which parameter to be changed, and following elements give the parameter values.


AER: BF Enable/Disable Constants

BF Enable/Disable Constants
[BF Constants (enum's and define's)]

Collaboration diagram for BF Enable/Disable Constants:

Enumerations

enum { bf_DISABLE = 0, bf_ENABLE = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
bf_DISABLE
bf_ENABLE

Definition at line 228 of file bf.h.


AER: BF Error Codes

BF Error Codes
[BF Constants (enum's and define's)]

Collaboration diagram for BF Error Codes:

BF Error Codes

Error codes returned by BF API functions.

enum {
bf_NOERR = 0, bf_ERR_NOMEMORY = 1, bf_ERR_NOTOPENED = 2, bf_ERR_DISABLED = 3,
bf_ERR_NOTCLOSED = 4, bf_ERR_INVALIDPAR = 5, bf_ERR_INVALIDSRC = 6, bf_ERR_INVALIDOPT = 7,
bf_ERR_INVALIDBUF = 8, bf_ERR_FILTNOCOEF = 9
}

Enumeration Type Documentation

anonymous enum

Enumerator:
bf_NOERR | success, no error
bf_ERR_NOMEMORY | supplied memory are not enough
bf_ERR_NOTOPENED | BF instance not in opened state
bf_ERR_DISABLED | BF instance not in enabled state
bf_ERR_NOTCLOSED | BF instance not in closed state
bf_ERR_INVALIDPAR | configuration parameter is invalid
bf_ERR_INVALIDSRC | no valid source is provided to process
bf_ERR_INVALIDOPT | invalid operation mode
bf_ERR_INVALIDBUF | provided buffers are not valid
bf_ERR_FILTNOCOEF | BF FIR filters have not been loaded.

Definition at line 43 of file bf.h.


AER: BF Filter Type Definitions

BF Filter Type Definitions
[BF Constants (enum's and define's)]

Collaboration diagram for BF Filter Type Definitions:

Detailed Description

Filter groups within the BF module.

Enumerations

enum { bf_FG_BF = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
bf_FG_BF fixed beamforming FIR filters

Definition at line 107 of file bf.h.


AER: BF Module API

BF Module API

Collaboration diagram for BF Module API:

Modules

BF Functions
BF Data Structures
BF Constants (enum's and define's)


AER: BF Operation Mode Constants

BF Operation Mode Constants
[BF Constants (enum's and define's)]

Collaboration diagram for BF Operation Mode Constants:

Detailed Description

These operation modes are associated with the mode control in bfCtlCfg_t.

Enumerations

enum { bf_OPT_NORMAL = 0, bf_OPT_BYPASS = 2, bf_OPT_SUBSET = 4, bf_OPT_ERROR = 6 }

Enumeration Type Documentation

anonymous enum

Enumerator:
bf_OPT_NORMAL | normal BF operational mode
bf_OPT_BYPASS | bypass mode, no filtering
bf_OPT_SUBSET | subset microphone mode
bf_OPT_ERROR | invalid operation code

Definition at line 243 of file bf.h.


AER: BF Sampling Rate Definitions

BF Sampling Rate Definitions
[BF Constants (enum's and define's)]

Collaboration diagram for BF Sampling Rate Definitions:

BF sampling rates

Sampling rates that are supported by BF module.

enum { bf_SAMP_RATE_8K = 1, bf_SAMP_RATE_16K = 2 }

Enumeration Type Documentation

anonymous enum

Enumerator:
bf_SAMP_RATE_8K | 8kHz
bf_SAMP_RATE_16K | 16kHz

Definition at line 67 of file bf.h.


AER: BF Size Configuration Max

BF Size Configuration Max
[BF Constants (enum's and define's)]

Collaboration diagram for BF Size Configuration Max:

Detailed Description

Maximum supported parameters by BF module.

Defines

#define | bf_MAX_SUPPORTED_NUM_MICS 16
#define | bf_MAX_SUPPORTED_FILT_LEN 64

Define Documentation

#define bf_MAX_SUPPORTED_NUM_MICS 16

Maximum supported number of mics

Definition at line 81 of file bf.h.

#define bf_MAX_SUPPORTED_FILT_LEN 64

Maximum supported filter length

Definition at line 82 of file bf.h.


AER: BF Type Definitions

BF Type Definitions
[BF Constants (enum's and define's)]

Collaboration diagram for BF Type Definitions:

BF type

Beamforming types that are supported by BF module.

enum { bf_TYPE_FIXED = 1 }

Enumeration Type Documentation

anonymous enum

Enumerator:
bf_TYPE_FIXED fixed beamforming

Definition at line 95 of file bf.h.


AER: DRC Constants (enum's and define's)

DRC Constants (enum's and define's)
[DRC Module API]

Collaboration diagram for DRC Constants (enum's and define's):

Modules

DRC Error Codes
DRC Operation Mode bitfield
DRC Band Configuration Valid Bit
DRC Limiter Configuration Valid Bit
DRC Filter Coefficient Configuration Size.
Constants used in configuring DRC Filter Coefficients. The 1ms delay symmetric FIRs are used. Low pass for lowband, band pass for midband and high pass for high band. Since FIRs are symmetric, only half+1 of the filter coefficients are needed in the configuration. The extra one is for the middle coefficient. The size of the configuration array is fixed to 17. For 8Khz filters, only the first 9 elements in the array are used.
DRC Control Codes
DRC Supported Sampling Rate
DRC Get Parameter Codes


AER: DRC Functions

DRC Functions
[DRC Module API]

Collaboration diagram for DRC Functions:

Functions

tint | drcCreate (drcCreateConfig_t *create_cfg)
Function drcCreate() provides DRC with the system information that is shared among multiple instances.
tint | drcGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, drcSizeConfig_t *cfg)
Function drcGetSizes() obtains from DRC the memory requirements of an instance, which depend on provided configuration parameters.
tint | drcNew (void **drcInst, tint nbufs, ecomemBuffer_t *bufs, drcNewConfig_t *cfg)
This function creates an instance of DRC and initializes the memory buffer pointers in the instance and drcContext.
tint | drcClose (void *drcInst)
Function drcClose() closes the DRC instance identified by drcInst.
tint | drcControl (void *drcInst, drcControl_t *ctl)
Function drcControl() enables or disables a type of DRC function or changes the value of a certain parameter.
tint | drcDelete (void **drcInst, tint nbufs, ecomemBuffer_t *bufs)
Function drcDelete() deletes the DRC instance identified by drcInst and returns the addresses of those buffers used by this instance.
tint | drcGetParameter (void *drcInst, tint get_code, drcReportParam_t *param)
This function reports the DRC performance debug statistics and the version information.
tint | drcOpen (void *drcInst, drcOpenConfig_t *cfg)
Function drcOpen() initializes and configures an DRC instance.
tint | drcProcess (void *drcInst, void *sin, void *sout)
It performs compressor and limiter processing. The input samples are passed in through sin pointer in linSample type. The output samples are placed to the buffer pointed by sout in linSample type.

Function Documentation

tint drcCreate ( drcCreateConfig_t * create_cfg )

Function drcCreate() provides DRC with the system information that is shared among multiple instances.

Parameters:
[in] create_cfg Pointer to a create configuration structure.
Return values:
DRC error code. See DRC Error Codes. drc_NOERR drc_ERR_CREATED

tint drcGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | drcSizeConfig_t * | cfg
 | ) |  |

Function drcGetSizes() obtains from DRC the memory requirements of an instance, which depend on provided configuration parameters.

Parameters:
[in] | cfg | Pointer to a size configuration structure.
[out] | nbufs | Memory location to store the returned number of buffers required by the instance.
[out] | bufs | Memory location to store the returned address of the vector of memory buffer descriptions required by the instance.
Remarks:
Type ecomemBuffer_t is defined in ecomem.h of util package.
Return values:
DRC error code. See DRC Error Codes. drc_NOERR success

tint drcNew | ( | void ** | drcInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | drcNewConfig_t * | cfg
 | ) |  |

This function creates an instance of DRC and initializes the memory buffer pointers in the instance and drcContext.

Parameters:
[in] | nbufs | Number of memory buffers
[in] | bufs | Pointer to memory buffer descriptors
[in] | cfg | Pointer to new instance configuration structure
[in,out] | drcInst | Pointer to DRC instance
Return values:
DRC error code. See DRC Error Codes.
     error code
     drc_NOERR
     drc_ERR_INVALIDPAR
     drc_ERR_NOMEMORY
     drc_ERR_NOTCREATED
     drc_ERR_INVALIDSRATE
Precondition:
The pointer at the location pointed to by drcInst must be set to NULL before this function is called.
Postcondition:
A pointer to the DRC instance buffer will be returned to the location pointed to by drcInst. Instance state will be set to closed.
See also:
drcNewConfig_t

tint drcClose ( void * drcInst )

Function drcClose() closes the DRC instance identified by drcInst.

Parameters:
[in,out] drcInst pointer to the instance to be closed
Return values:
DRC error code. See DRC Error Codes.
     error code
     drc_NOERR
     drc_ERR_NOTOPENED

tint drcControl | ( | void * | drcInst,
 |  | drcControl_t * | ctl
 | ) |  |

Function drcControl() enables or disables a type of DRC function or changes the value of a certain parameter.

Parameters:
[in] | ctl | Pointer to DRC control structure.
[in,out] | drcInst | Pointer to DRC instance.
Return values:
DRC error code. See DRC Error Codes.
     error code
     drc_NOERR
     drc_ERR_NOTOPENED
     drc_ERR_INVALIDPAR
     drc_ERR_INVALIDCFGBITS
     drc_ERR_INVALIDFIR

tint drcDelete | ( | void ** | drcInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Function drcDelete() deletes the DRC instance identified by drcInst and returns the addresses of those buffers used by this instance.

Parameters:
[in] | nbufs | Number of buffers used by this instance.
[in] | bufs | Pointer to buffer descriptors to store returned addresses of the buffers used by this instance.
[in,out] | drcInst | Memory location where the pointer to DRC instance is stored
Return values:
DRC error code. See DRC Error Codes.
     error code
     drc_NOERR
     drc_ERR_NOTCLOSED
     drc_ERR_MEMBUFVECOVF
Precondition:
DRC instance must be closed by drcClose() before drcDelete() is called.
Postcondition:
After drcDelete() is called, DRC instance pointer stored at drcInst will be set to NULL, and the addresses of the buffers used by this instance will be returned to the location pointed to by bufs.

tint drcGetParameter | ( | void * | drcInst,
 |  | tint | get_code,
 |  | drcReportParam_t * | param
 | ) |  |

This function reports the DRC performance debug statistics and the version information.

Parameters:
[in] | drcInst | Pointer to DRC instance.
[in] | get_code | Operation modes selection
[out] | param | Report parameter values.
Return values:
DRC error code. See DRC Error Codes.
     error code
     drc_NOERR
     drc_ERR_NOTOPENED
     drc_ERR_INVALIDPAR

tint drcOpen | ( | void * | drcInst,
 |  | drcOpenConfig_t * | cfg
 | ) |  |

Function drcOpen() initializes and configures an DRC instance.

Remarks:
This function may be called after drcNew() to initialize a new DRC instance. It may also be called to reconfigure an instance that has been closed by drcClose() but not deleted by drcDelete().
Parameters:
[in] | cfg | Pointer to DRC configuration parameter.
[in,out] | drcInst | Pointer to DRC instance.
Return values:
DRC error code. See DRC Error Codes.
     error code
     drc_NOERR
     drc_ERR_NOTCLOSED
     drc_ERR_INVALIDSRATE
Precondition:
Function drcNew() must be called before drcOpen() is called the first time to open a new instance. For subsequent calls to open an existing instance, drcClose() must be called before drcOpen() to close the instance.
Postcondition:
After DRC instance is opened, drcControl() or drcProcess() may be called for control or processing.

tint drcProcess | ( | void * | drcInst,
 |  | void * | sin,
 |  | void * | sout
 | ) |  |

It performs compressor and limiter processing. The input samples are passed in through sin pointer in linSample type. The output samples are placed to the buffer pointed by sout in linSample type.

Parameters:
[in,out] | drcInst | Pointer to DRC instance.
[in] | sin | Pointer to a frame of data in linSample type to be processed.
[out] | sout | Pointer to a frame of processed data in linSample type.
Remarks:
The location of input and output buffers are defined by sin and sout pointers. These two buffers are in linSample type and CANNOT be overlaid with each other. These buffers have no specific memory type or alignment requirment.
Return values:
DRC error code. See DRC Error Codes.
     error code
     drc_NOERR
     drc_ERR_NOTOPENED


AER: DRC Data Structures

DRC Data Structures
[DRC Module API]

Collaboration diagram for DRC Data Structures:

Data Structures

struct | drcCurveParam_s
The DRC gain curve configuration structure. This structure specifies DRC gain curve configuration parameters. The parameters are set in drcBandCfg_t through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}. More...
struct | drcBandCfg_s
The DRC per band configurations. This structure specifies per band configurations through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}. More...
struct | drcLimiterCfg_s
DRC Limiter configuration structure. This structure specifies DRC Limiter configuration parameters through drcControl() with drc_CTL_SET_LIMITER. More...
struct | drcControl_s
DRC control data structure. This structure contains parameters needed to control DRC parameters and mode of operation used in drcControl(). More...
struct | drcOpenConfig_s
DRC system/band independent configuration structure. This structure specifies DRC band independent configuration parameters used in drcOpen(). More...
struct | drcBandParam_s
The configured DRC band parameters. This structure holds the DRC band parameters reported through drcGetParameter(). More...
struct | drcLimParam_s
The configured DRC limiter parameters. This structure holds the DRC limiter parameters reported through drcGetParameter(). More...
struct | drcReportParam_s
The DRC parameters reported upon getParameter request. This structure specifies DRC parameters reported upon getParameter request through drcGetParameter(). More...
struct | drcCreateConfig_t
DRC create structure which contains information to be shared by different DRC instances through drcCreate(). More...
struct | drcSizeConfig_s
DRC size configuration structure. This structure specifies the parameters in drcGetSize() and drcNew(). More...
struct | drcNewConfig_t
DRC new configuration structure. This contains parameters needed at the creation of a DRC instance through drcNew(). More...

Typedefs

typedef drcCurveParam_s | drcCurveParam_t
The DRC gain curve configuration structure. This structure specifies DRC gain curve configuration parameters. The parameters are set in drcBandCfg_t through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.
typedef drcBandCfg_s | drcBandCfg_t
The DRC per band configurations. This structure specifies per band configurations through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.
typedef drcLimiterCfg_s | drcLimiterCfg_t
DRC Limiter configuration structure. This structure specifies DRC Limiter configuration parameters through drcControl() with drc_CTL_SET_LIMITER.
typedef drcControl_s | drcControl_t
DRC control data structure. This structure contains parameters needed to control DRC parameters and mode of operation used in drcControl().
typedef drcOpenConfig_s | drcOpenConfig_t
DRC system/band independent configuration structure. This structure specifies DRC band independent configuration parameters used in drcOpen().
typedef drcBandParam_s | drcBandParam_t
The configured DRC band parameters. This structure holds the DRC band parameters reported through drcGetParameter().
typedef drcLimParam_s | drcLimParam_t
The configured DRC limiter parameters. This structure holds the DRC limiter parameters reported through drcGetParameter().
typedef drcReportParam_s | drcReportParam_t
The DRC parameters reported upon getParameter request. This structure specifies DRC parameters reported upon getParameter request through drcGetParameter().
typedef drcSizeConfig_s | drcSizeConfig_t
DRC size configuration structure. This structure specifies the parameters in drcGetSize() and drcNew().

Typedef Documentation

typedef struct drcCurveParam_s drcCurveParam_t

The DRC gain curve configuration structure. This structure specifies DRC gain curve configuration parameters. The parameters are set in drcBandCfg_t through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.

See Compressor Configuration Parameters

See also:
drcBandCfg_t It is used in drcBandCfg_t for cfg band.

typedef struct drcBandCfg_s drcBandCfg_t

The DRC per band configurations. This structure specifies per band configurations through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.

See Compressor Configuration Parameters

See also:
drcControl_t

typedef struct drcLimiterCfg_s drcLimiterCfg_t

DRC Limiter configuration structure. This structure specifies DRC Limiter configuration parameters through drcControl() with drc_CTL_SET_LIMITER.

See Limiter Configuration Parameters

See also:
drcControl_t It is used in drcControl_t for cfg limiter

typedef struct drcControl_s drcControl_t

DRC control data structure. This structure contains parameters needed to control DRC parameters and mode of operation used in drcControl().

See Configuration Parameters

typedef struct drcOpenConfig_s drcOpenConfig_t

DRC system/band independent configuration structure. This structure specifies DRC band independent configuration parameters used in drcOpen().

See System Configuration Parameters

typedef struct drcBandParam_s drcBandParam_t

The configured DRC band parameters. This structure holds the DRC band parameters reported through drcGetParameter().

See Compressor Configuration Parameters

See also:
drcReportParam_t

typedef struct drcLimParam_s drcLimParam_t

The configured DRC limiter parameters. This structure holds the DRC limiter parameters reported through drcGetParameter().

See Limiter Configuration Parameters

See also:
drcReportParam_t

typedef struct drcReportParam_s drcReportParam_t

The DRC parameters reported upon getParameter request. This structure specifies DRC parameters reported upon getParameter request through drcGetParameter().

See Configuration Parameters

typedef struct drcSizeConfig_s drcSizeConfig_t

DRC size configuration structure. This structure specifies the parameters in drcGetSize() and drcNew().

See System Configuration Parameters

See also:
drcNewConfig_t


AER: DRC Band Configuration Valid Bit

DRC Band Configuration Valid Bit
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Band Configuration Valid Bit:

DRC valid bitfield used in drc_CTL_SET_XXX_BAND operation.

Bit field to select parameters to be configured through drc_CTL_SET_XXX_BAND operation in drcControl().

See also:
drcBandCfg_t

enum { drc_BAND_CFG_VALID_LEV_TC_BIT = 0, drc_BAND_CFG_VALID_GAIN_TC_BIT = 1, drc_BAND_CFG_VALID_CURVE_PARAM_BIT = 2 }

Enumeration Type Documentation

anonymous enum

Enumerator:
drc_BAND_CFG_VALID_LEV_TC_BIT | SET Bit 0 to enable level TC cfg
drc_BAND_CFG_VALID_GAIN_TC_BIT | SET Bit 1 to enable gain TC cfg
drc_BAND_CFG_VALID_CURVE_PARAM_BIT | SET Bit 2 to enable curve param cfg

Definition at line 119 of file drc.h.


AER: DRC Filter Coefficient Configuration Size.

DRC Filter Coefficient Configuration Size.
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Filter Coefficient Configuration Size.:

Detailed Description

Constants used in configuring DRC Filter Coefficients. The 1ms delay symmetric FIRs are used. Low pass for lowband, band pass for midband and high pass for high band. Since FIRs are symmetric, only half+1 of the filter coefficients are needed in the configuration. The extra one is for the middle coefficient. The size of the configuration array is fixed to 17. For 8Khz filters, only the first 9 elements in the array are used.

See Filter Coefficients

Defines

#define | drc_FIR_HALF_COEF_8KHZ 9
#define | drc_FIR_HALF_COEF_16KHZ 17

Define Documentation

#define drc_FIR_HALF_COEF_8KHZ 9

(half+1) of the filter length for 8K

Definition at line 241 of file drc.h.

#define drc_FIR_HALF_COEF_16KHZ 17

(half+1) of the filter length for 16K

Definition at line 242 of file drc.h.


AER: DRC Control Codes

DRC Control Codes
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Control Codes:

DRC control operation code.

Constants drc_CTL_XXX to change DRC operation modes through drcControl().

See also:
drcControl_t

enum {
drc_CTL_DRC_ON = 1, drc_CTL_DRC_OFF = 2, drc_CTL_SET_BITS = 3, drc_CTL_SET_FBAND = 4,
drc_CTL_SET_LBAND = (drc_CTL_SET_FBAND+1), drc_CTL_SET_MBAND = (drc_CTL_SET_FBAND+2), drc_CTL_SET_HBAND = (drc_CTL_SET_FBAND+3), drc_CTL_SET_LIM = 8,
drc_CTL_SET_FIR_LBAND = 9, drc_CTL_SET_FIR_MBAND = (drc_CTL_SET_FIR_LBAND+1), drc_CTL_SET_FIR_HBAND = (drc_CTL_SET_FIR_LBAND+2)
}

Enumeration Type Documentation

anonymous enum

Enumerator:
drc_CTL_DRC_ON | ENABLE DRC
drc_CTL_DRC_OFF | DISABLE DRC
drc_CTL_SET_BITS | ENABLE: DRC configuration bitfield change
drc_CTL_SET_FBAND | ENABLE: full band param configuration
drc_CTL_SET_LBAND | ENABLE: low band param configuration
drc_CTL_SET_MBAND | ENABLE: mid band param configuration
drc_CTL_SET_HBAND | ENABLE: high band param configuration
drc_CTL_SET_LIM | ENABLE: limiter param configuration
drc_CTL_SET_FIR_LBAND | ENABLE: low band fir coef configuration
drc_CTL_SET_FIR_MBAND | ENABLE: mid band fir coef configuration
drc_CTL_SET_FIR_HBAND | ENABLE: high band fir coef configuration

Definition at line 257 of file drc.h.


AER: DRC Error Codes

DRC Error Codes
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Error Codes:

DRC error codes

Error codes returned by DRC API.

enum {
drc_NOERR = 0, drc_ERR_NOMEMORY = 1, drc_ERR_CREATED = 2, drc_ERR_NOTCREATED = 3,
drc_ERR_NOTOPENED = 4, drc_ERR_NOTCLOSED = 5, drc_ERR_INVALIDPAR = 6, drc_ERR_MEMBUFVECOVF = 7,
drc_ERR_INVALIDCFGBITS = 8, drc_ERR_INVALIDFIR = 9, drc_ERR_INVALIDSRATE = 10
}

Enumeration Type Documentation

anonymous enum

Enumerator:
drc_NOERR | success, no error
drc_ERR_NOMEMORY | supplied memory are not enough
drc_ERR_CREATED | DRC has been created already
drc_ERR_NOTCREATED | DRC has not been created yet
drc_ERR_NOTOPENED | DRC instance has not been opened yet
drc_ERR_NOTCLOSED | DRC instance has not been closed yet
drc_ERR_INVALIDPAR | configuration parameter is invalid
drc_ERR_MEMBUFVECOVF | no enough space to return buffer addresses
drc_ERR_INVALIDCFGBITS | Invalid CFGBITS while enable DRC
drc_ERR_INVALIDFIR | FIRs are not set when multiband comp is on
drc_ERR_INVALIDSRATE | Invalid sampling rate.

Definition at line 44 of file drc.h.


AER: DRC Limiter Configuration Valid Bit

DRC Limiter Configuration Valid Bit
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Limiter Configuration Valid Bit:

DRC configuration valid bitfield used in drc_CTL_SET_LIMITER operation.

Bit field to select parameters to be configured through drc_CTL_SET_LIMITER in drcControl().

See also:
drcLimiterCfg_t

enum { drc_LIM_CFG_VALID_LEV_TC_BIT = 0, drc_LIM_CFG_VALID_GAIN_TC_BIT = 1, drc_LIM_CFG_VALID_THRESH_BIT = 2, drc_LIM_CFG_VALID_DELAY_BIT = 3 }

Enumeration Type Documentation

anonymous enum

Enumerator:
drc_LIM_CFG_VALID_LEV_TC_BIT | SET Bit 0 to enable level TC cfg
drc_LIM_CFG_VALID_GAIN_TC_BIT | SET Bit 1 to enable gain TC cfg
drc_LIM_CFG_VALID_THRESH_BIT | SET Bit 2 to enable thresh cfg
drc_LIM_CFG_VALID_DELAY_BIT | SET Bit 3 to enable delay length cfg

Definition at line 174 of file drc.h.


AER: DRC Module API

DRC Module API

Collaboration diagram for DRC Module API:

Modules

DRC Functions
DRC Data Structures
DRC Constants (enum's and define's)


AER: DRC Operation Mode bitfield

DRC Operation Mode bitfield
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Operation Mode bitfield:

DRC Operation Mode bitfield is used to set DRC operation mode/state.

The constants used in drcOpen(), drcControl() with control code drc_CTL_SET_CFGBITS and drcGetParameter() with get code drc_GET_CFGBITS

See System Configuration Parameters

enum {
drc_CFGBITS_FBAND = 0, drc_CFGBITS_LBAND = 1, drc_CFGBITS_MBAND = 2, drc_CFGBITS_HBAND = 3,
drc_CFGBITS_LIM = 4, drc_CFGBITS_VAD = 5
}

Enumeration Type Documentation

anonymous enum

Enumerator:
drc_CFGBITS_FBAND | Bit 0: if 1, Full band is enabled
drc_CFGBITS_LBAND | Bit 1: if 1, Low band is enabled
drc_CFGBITS_MBAND | Bit 2: if 1, Mid band is enabled
drc_CFGBITS_HBAND | Bit 3: if 1, High band is enabled
drc_CFGBITS_LIM | Bit 4: if 1, limiter is enabled
drc_CFGBITS_VAD | Bit 5: if 1, vad is enabled

Definition at line 72 of file drc.h.


AER: DRC Get Parameter Codes

DRC Get Parameter Codes
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Get Parameter Codes:

DRC get parameter operation code.

Constants drc_GET_XXX are used to select which set of DRC parameters to be reported to HOST through drcGetParameter().

See also:
drcReportParam_t

enum {
drc_GET_CFGBITS = 1, drc_GET_FBAND_PARAM = 2, drc_GET_LBAND_PARAM = (drc_GET_FBAND_PARAM+1), drc_GET_MBAND_PARAM = (drc_GET_FBAND_PARAM+2),
drc_GET_HBAND_PARAM = (drc_GET_FBAND_PARAM+3), drc_GET_LIM_PARAM = 6, drc_GET_LBAND_FIR_COEF = 7, drc_GET_MBAND_FIR_COEF = (drc_GET_LBAND_FIR_COEF+1),
drc_GET_HBAND_FIR_COEF = (drc_GET_LBAND_FIR_COEF+2)
}

Enumeration Type Documentation

anonymous enum

Enumerator:
drc_GET_CFGBITS | GET: Operation mode configuration
drc_GET_FBAND_PARAM | GET: full band configuration parameters
drc_GET_LBAND_PARAM | GET: low band configuration parameters
drc_GET_MBAND_PARAM | GET: mid band configuration parameters
drc_GET_HBAND_PARAM | GET: high band configuration parameters
drc_GET_LIM_PARAM | GET: limiter parameters in an instance
drc_GET_LBAND_FIR_COEF | GET: low band filter coefficients
drc_GET_MBAND_FIR_COEF | GET: mid band filter coefficients
drc_GET_HBAND_FIR_COEF | GET: high band filter coefficients

Definition at line 378 of file drc.h.


AER: DRC Supported Sampling Rate

DRC Supported Sampling Rate
[DRC Constants (enum's and define's)]

Collaboration diagram for DRC Supported Sampling Rate:

DRC sampling rates

Sampling rates that are supported by DRC and set in drcOpen().

See System Configuration Parameters

See also:
drcOpenConfig_t

#define | drc_SAMP_RATE_8K 1
#define | drc_SAMP_RATE_16K 2

Define Documentation

#define drc_SAMP_RATE_8K 1

8kHz

Definition at line 310 of file drc.h.

#define drc_SAMP_RATE_16K 2

16kHz

Definition at line 311 of file drc.h.


AER: MSS Constants (enum's and define's)

MSS Constants (enum's and define's)
[MSS Module API]

Collaboration diagram for MSS Constants (enum's and define's):

Modules

MSS Error Codes
MSS Sampling Rates Definitions
MSS Source Type Definitions


AER: MSS Functions

MSS Functions
[MSS Module API]

Collaboration diagram for MSS Functions:

Functions

tint | mssOpen (void *mssInst, mssConfig_t *cfg)
Function mssOpen() initializes and configures an MSS instance.
tint | mssControl (void *mssInst, mssControl_t *ctl)
Function mssControl() changes MSS operation modes or parameters.
tint | mssProcess (void *mssInst, void *out, void *rx_out_sync, void *mic_fixed[], void *mic_remote[], void *mic_clean[], void *mic_array[], void *beam[])
Function mssProcess() examines all input sources to MSS and selects the best one.
tint | mssDebugStat (void *mssInst, mssDebugStat_t *mssDbg)
Function mssDebugStat() returns debug information.
tint | mssClose (void *mssInst)
Function mssClose() closes an MSS instance.
Remarks:
Function mssClose() must be called before mssDelete() is called.

tint | mssDelete (void **mssInst, tint nbufs, ecomemBuffer_t *bufs)
Function mssDelete() deletes the MSS instance identified by mssInst and returns the addresses of those buffers used by this instance.

Function Documentation

tint mssOpen | ( | void * | mssInst,
 |  | mssConfig_t * | cfg
 | ) |  |

Function mssOpen() initializes and configures an MSS instance.

Remarks:
This function must be called after mssNew() to initialize a new MSS instance. It may also be called to reconfigure an instance that has been closed by mssClose() but not deleted by mssDelete().
Parameters:
[in] | cfg | Pointer to MSS configuration parameter.
[in] | mssInst | Pointer to MSS instance.
Return values:
MSS error code. See MSS Error Codes.
     error code              description
     mss_NOERR               success
     mss_ERR_NOTCLOSED       MSS instance state has not been set to closed, i.e,
                             mssNew() or mssClose() not called for the instance.
     mss_ERR_INVALIDPAR      bad configuration parameters:
                             - cfg is NULL
                             - total number of sources is less than or equal to 0.
Precondition:
Function mssNew() must be called before mssOpen() is called the first time to open a new instance. For subsequent calls to open an existing instance, mssClose() must be called before mssOpen() to close the instance.
Postcondition:
All the parameters that are not part of mssConfig_t are set to default values by mssOpen.

After MSS instance is opened, mssControl() and mssProcess() may be called for control or processing.

tint mssControl | ( | void * | mssInst,
 |  | mssControl_t * | ctl
 | ) |  |

Function mssControl() changes MSS operation modes or parameters.

Parameters:
[in] | mssInst | Pointer to MSS instance.
[in,out] | ctl | Pointer to MSS control structure.
Return values:
MSS error code. See MSS Error Codes.
     error code              description
     mss_NOERR               success
     mss_ERR_NOTOPENED       MSS instance has not been opened
     mss_ERR_INVALIDSRC      mssControl_s.source is an invalid source

tint mssProcess | ( | void * | mssInst,
 |  | void * | out,
 |  | void * | rx_out_sync,
 |  | void * | mic_fixed[],
 |  | void * | mic_remote[],
 |  | void * | mic_clean[],
 |  | void * | mic_array[],
 |  | void * | beam[]
 | ) |  |

Function mssProcess() examines all input sources to MSS and selects the best one.

Parameters:
[in] | mssInst | Pointer to MSS instance.
[in] | rx_out_sync | Synchronized Rx path output signal, NOT to be selected, but to assist source selection.
[in] | mic_fixed | Signals from fixed mics.
[in] | mic_remote | Signals from remote mics.
[in] | mic_clean | Signals from mics with own AEC.
[in] | mic_array | Signals from mics in the mic-array.
[in] | beam | Signals from beams formed from mic-array.
[out] | out | Buffer to store the selected source signal
Remarks:
All input signals and output signal are 16-bit linear samples of 10 msec.
Return values:
MSS error code. See MSS Error Codes.
     error code              description
     mss_NOERR               success
     mss_ERR_NOTOPENED       MSS instance has not been opened
     mss_ERR_INVALIDSRC      mssControl_s.source is an invalid source

tint mssDebugStat | ( | void * | mssInst,
 |  | mssDebugStat_t * | mssDbg
 | ) |  |

Function mssDebugStat() returns debug information.

Parameters:
[in] | mssInst | Pointer to MSS instance.
[out] | mssDbg | Debug information.
Return values:
MSS error code. See MSS Error Codes.
     error code              description
     mss_NOERR               success
     mss_ERR_NOTOPENED       MSS instance has not been opened

tint mssClose ( void * mssInst )

Function mssClose() closes an MSS instance.

Remarks:
Function mssClose() must be called before mssDelete() is called.

Parameters:
[in] mssInst pointer to the instance to be closed
Return values:
MSS error code. See MSS Error Codes.
     error code              description
     mss_NOERR               success
     mss_ERR_NOTOPENED       MSS instance is not in open state

tint mssDelete | ( | void ** | mssInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs
 | ) |  |

Function mssDelete() deletes the MSS instance identified by mssInst and returns the addresses of those buffers used by this instance.

Parameters:
[in] | nbufs | Number of buffers used by this instance.
[in] | bufs | Pointer to buffer descriptors to store returned addresses of the buffers used by this instance.
[in,out] | mssInst | Memory location where the pointer to MSS instance is stored.
Return values:
MSS error code. See MSS Error Codes.
     error code              description
     mss_NOERR               success
     mss_ERR_NOTCLOSED       MSS instance has not been closed.
     mss_ERR_NOMEMORY        Not enough buffer descriptors to store all returned
                             buffer addresses.
Precondition:
MSS instance must be closed by mssClose() before mssDelete() is called.
Postcondition:
After mssDelete() is called, MSS instance pointer stored at mssInst will be set to NULL, and the addresses of the buffers used by this instance will be returned to the location pointed to by bufs.


AER: MSS Data Structures

MSS Data Structures
[MSS Module API]

Collaboration diagram for MSS Data Structures:

Data Structures

struct | mssSrc_s
Source structure used to manually select a source. More...
struct | mssSizeConfig_s
Configuration structure for mssGetSizes() This structure is used for getting memory requirements of MSS through function mssGetSizes(). More...
struct | mssNewConfig_s
Configuration structure for mssNew() This structure is used for creating a new MSS instance through function mssNew(). More...
struct | mssConfig_s
Configuration structure for mssOpen() This structure contains system parameters to configure an MSS instance through mssOpen(). MSS doesn't have default value for these parameters, and they must be set explicitly when mssOpen() is called the first time after mssNew(). More...
struct | mssCallTable_t
MSS call table. More...

Typedefs

typedef mssSrc_s | mssSrc_t
Source structure used to manually select a source.
typedef mssSizeConfig_s | mssSizeConfig_t
Configuration structure for mssGetSizes() This structure is used for getting memory requirements of MSS through function mssGetSizes().
typedef mssNewConfig_s | mssNewConfig_t
Configuration structure for mssNew() This structure is used for creating a new MSS instance through function mssNew().
typedef mssConfig_s | mssConfig_t
Configuration structure for mssOpen() This structure contains system parameters to configure an MSS instance through mssOpen(). MSS doesn't have default value for these parameters, and they must be set explicitly when mssOpen() is called the first time after mssNew().

Functions

tint | mssNew (void **mssInst, tint nbufs, ecomemBuffer_t *bufs, mssNewConfig_t *cfg)
MSS control bitfield structure.

Typedef Documentation

typedef struct mssSrc_s mssSrc_t

Source structure used to manually select a source.

typedef struct mssSizeConfig_s mssSizeConfig_t

Configuration structure for mssGetSizes() This structure is used for getting memory requirements of MSS through function mssGetSizes().

typedef struct mssNewConfig_s mssNewConfig_t

Configuration structure for mssNew() This structure is used for creating a new MSS instance through function mssNew().

typedef struct mssConfig_s mssConfig_t

Configuration structure for mssOpen() This structure contains system parameters to configure an MSS instance through mssOpen(). MSS doesn't have default value for these parameters, and they must be set explicitly when mssOpen() is called the first time after mssNew().

Remarks:
This structure doesn't contain any configurable parameters that are controlled through mssControl_s to avoid confusion.

Function Documentation

tint mssNew | ( | void ** | mssInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | mssNewConfig_t * | cfg
 | ) |  |

MSS control bitfield structure.

Bitfield masks mss_CTL_MODES_XYZ may be used to change MSS operation modes through mssControl(), by constructing elements "mask" and "value" of mssModes_s.

    MSS Modes Control Bitfield:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------
       bits      values       meaning
    (from LSB)
        0          1       MSS bypass operation - MSS always selects the
                           first available source passed to mssProcess().
                   0       MSS normal operation.
        1          1       Freeze the update of MSS states - MSS always selects
                           whatever source that was selcted before update was
                           frozen.
                   0       Enable the update of MSS states - normal operation.
 *
 */
typedef struct mssCtlBf_s {
  tuint mask;            /**< Indicates the bits to be changed.               */
  tuint value;           /**< Gives new value of each bit indicated by mask.  */
/*@{*/
#define mss_CTL_MODES_BYPASS   0x0001  /**< Bypass MSS */
#define mss_CTL_MODES_FREEZE   0x0002  /**< Freeze MSS internal states update */
#define mss_CTL_MODES_DEFAULT  0x0000  /**< Default (normal) operation modes  */
/*@}*/
} mssCtlBf_t;

/**
 *  @ingroup mss_api_structures
 *
 *  @brief Control structure for mssControl()
 *
 *  \brief This structure is used to change MSS configurable parameters.
 *         Element mssControl_s.valid_bitfield indicates which parameter to be
 *         changed, and other elements give the parameter values.
 */
typedef struct mssControl_s {
    tuint      valid_bitfield;
/*@{*/
#define mss_CTL_MODES           0x0001 /**< change mssControl_s.modes         */
#define mss_CTL_SELECT_SRC      0x0002 /**< change mssControl_s.source        */
#define mss_CTL_SWITCH_THRESH   0x0004 /**< change mssControl_s.switch_thresh */
#define mss_CTL_SWITCH_DURATION 0x0008 /**< change mssControl_s.switch_duration */
#define mss_CTL_SWITCH_HNAGOVER 0x0010 /**< change mssControl_s.switch_hangover */
#define mss_CTL_ALL              (  mss_CTL_MODES \
                                  | mss_CTL_SELECT_SRC \
                                  | mss_CTL_SWITCH_THRESH \
                                  | mss_CTL_SWITCH_DURATION \
                                  | mss_CTL_SWITCH_HNAGOVER ) /**< change all */
/*@}*/
    mssCtlBf_t modes;             /**< controls MSS operation modes */
    mssSrc_t   source;            /**< the source selected by external user   */
    tint       switch_thresh;     /**< switch threshold in msec: a source needs
                                       to meet the selection criteria for this
                                       amount of time before switch to this
                                       source starts. Default is 250msec      */
    tint       switch_duration;   /**< switch duration in msec: it takes this
                                       amount of time to switch from one source
                                       to another. Default is 500msec.        */
    tint       switch_hangover;   /**< switch hangover in msec: after a new
                                       source is selected, it has to wait this
                                       time before evaluating next possible
                                       source switch. Default is 1000msec.    */
} mssControl_t;

/**
 *  @ingroup mss_api_structures
 *
 *  @brief MSS debug structure
 *
 *  \brief This structure is used to provide MSS debugging information.
 */
#define mss_DEBUG_STATE_NUM_TUINT 16
typedef struct mssDebugStat_s {
  mssSrc_t cur_src;                                 /**< Current source */
  mssSrc_t new_src;                                 /**< Temporary new source */
  tuint    states[mss_DEBUG_STATE_NUM_TUINT];       /**< MSS internal states */
} mssDebugStat_t;

/**
 *  @ingroup mss_api_functions
 *
 *  @brief Function mssGetSizes() obtains from MSS the memory requirements of
 *         an instance, which depend on provided configuration parameters.
 *
 *  @param[in]   cfg     Pointer to a size configuration structure.
 *  @param[out]  nbufs   Memory location to store the returned number of buffers
 *                       required by the instance.
 *  @param[out]  bufs    Memory location to store the returned address of the
 *                       vector of memory buffer descriptions required by MSS.
 *
 *  @remark Type ecomemBuffer_t is defined in ecomem.h of util package.
 *
 *  @retval              MSS error code, always mss_NOERR.
 */
tint mssGetSizes(tint *nbufs, const ecomemBuffer_t **bufs, mssSizeConfig_t *cfg);

/**
 *  @ingroup mss_api_functions
 *
 *  @brief Function mssNew() creates a new instance of MSS.
 *  \remark Function mssNew() must be called before mssOpen()is called.
 *
 *  @param[in]     nbufs     Number of memory buffers allocated by the user.
 *  @param[in]     bufs      Pointer to memory buffer descriptors defined by
 *                           user.
 *  \remark Buffer alignment property of each buffer passed to mssNew() must be
 *          equal to or better than what is returned by mssGetSizes(), and must
 *          be in consistency with the base address of the buffer.
 *
 *  @param[in]     cfg       Pointer to new instance configuration structure.
 *  @param[in,out] mssInst   Memory location that will receive a pointer to
 *                           the created MSS instance. This pointer will be
 *                           returned by mssNew().
 *  @retval                  MSS error code. See \ref mss_err_code.
 *  @verbatim
     error code              description
     mss_NOERR               success
     mss_ERR_INVALIDPAR      *mssInst is not NULL or nbufs is not correct
     mss_ERR_NOMEMORY        properties of certain buffer are bad:
                             - size is not zero but base address is NULL,
                             - alignment and base address are not consistent,
                             - volatility does not meet requirement.

Precondition:
The pointer at the location pointed to by mssInst must be set to NULL before this function is called.
Postcondition:
A pointer to the MSS instance buffer will be returned to the location pointed to by mssInst. Instance state will be set to closed.


AER: MSS Error Codes

MSS Error Codes
[MSS Constants (enum's and define's)]

Collaboration diagram for MSS Error Codes:

MSS error codes

Error codes returned by MSS API functions.

enum {
mss_NOERR = 0, mss_ERR_NOMEMORY = 1, mss_ERR_NOTOPENED = 2, mss_ERR_NOTCLOSED = 3,
mss_ERR_INVALIDPAR = 4, mss_ERR_INVALIDSRC = 5
}

Enumeration Type Documentation

anonymous enum

Enumerator:
mss_NOERR | success, no error
mss_ERR_NOMEMORY | supplied memory are not enough
mss_ERR_NOTOPENED | MSS instance not in opened state
mss_ERR_NOTCLOSED | MSS instance not in closed state
mss_ERR_INVALIDPAR | configuration parameter is invalid
mss_ERR_INVALIDSRC | no valid source is provided to process

Definition at line 43 of file mss.h.


AER: MSS Module API

MSS Module API

Collaboration diagram for MSS Module API:

Modules

MSS Functions
MSS Data Structures
MSS Constants (enum's and define's)


AER: MSS Sampling Rates Definitions

MSS Sampling Rates Definitions
[MSS Constants (enum's and define's)]

Collaboration diagram for MSS Sampling Rates Definitions:

MSS sampling rates

Sampling rates that are supported by MSS.

enum | { mss_SAMP_RATE_8K = 1, mss_SAMP_RATE_16K = 2 }
typedef tint | mssSampRate_t

Typedef Documentation

typedef tint mssSampRate_t

Definition at line 67 of file mss.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
mss_SAMP_RATE_8K | 8kHz
mss_SAMP_RATE_16K | 16kHz

Definition at line 63 of file mss.h.


AER: MSS Source Type Definitions

MSS Source Type Definitions
[MSS Constants (enum's and define's)]

Collaboration diagram for MSS Source Type Definitions:

MSS source types

MSS supports multiple types of sources which can be microphones, beams, etc. Microphones can be fixed (mounted on the device) or remote, and can have their own built-in acoustic echo canceller.

enum {
mss_SRC_INVALID = -1, mss_SRC_MIC_FIXED = 0, mss_SRC_MIC_REMOTE = 1, mss_SRC_MIC_CLEAN = 2,
mss_SRC_BEAM = 3, mss_SRC_MAX = mss_SRC_BEAM
}
typedef tint | mssSrcType_t
#define | mss_MAX_NUM_SRC_TYPES (mss_SRC_MAX+1)

Define Documentation

#define mss_MAX_NUM_SRC_TYPES (mss_SRC_MAX+1)

Max # of supported source types

Definition at line 93 of file mss.h.

Typedef Documentation

typedef tint mssSrcType_t

Definition at line 92 of file mss.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
mss_SRC_INVALID | Invalid source type
mss_SRC_MIC_FIXED | Fixed microphones
mss_SRC_MIC_REMOTE | Remote microphones
mss_SRC_MIC_CLEAN | Clean microphones (with built-in AEC)
mss_SRC_BEAM | Beams from microphone arrays
mss_SRC_MAX

Definition at line 83 of file mss.h.


AER: AER (Acoustic Echo Removal) Component

AER (Acoustic Echo Removal) Component

Release 17.0.0.0

Description

The Acoustic Echo Removal (AER) serves the purpose of removing and minimizing the impact of acoustic echo in a phone or other similar devices. The acoustic echo is generated by the coupling between the speaker and the microphone of the same device. When the phone is operated in hands-free mode, the acoustic echo can be very strong, and may be even higher than the direct speech power generated by the near-end talker.

The primary purposes of the AER are:

  • Canceling large amounts of echo down to levels that would not be perceptible.
  • Eliminating the strong echo in the presence of near-end speech, which is often weaker, while keeping the conversation full duplex and artifact free during double talk.
  • Gracefully handling nonlinear distortion that is common when operating at high speaker volumes.
  • Properly handling short-term or long-term changes in speech and noise levels.

The secondary purpose of the AER is:

  • Enabling phone manufacturers to achieve the required transmission characteristics of their phones as specified by various standards.

Features

This version of AER has the following features:
  • Acoustic Echo Canceller (AEC): designed to cancel acoustic echo and maximize the potential for full-duplex communication.
  • Transducer Equalization (EQ): designed to correct for minor deficiencies in a transducer frequency response or the overall frequency response of the phone.
  • High Level Compensation (HLC): designed to reduce the impact of high-level signal transients that may arrive from the packet-network side and to minimize the unwanted signal distortion at the speaker.
  • Noise Guard (NG): designed to reduce the signal level toward the packet network during silence to help the remote end break in when exposed to high levels of background noise.
  • Comfort Noise Generator (CNG): designed to provide comfort noise having a fixed level or matching background noise when the nonlinear processor (NLP) is active. The primary purpose of the CNG is preventing a phone user from perceiving the connection as being dead or dropped.
  • Adaptive Spectral Noise Reduction (ASNR): designed to provide signal to noise ratio (SNR) improvement in noisy operating environments. When properly used, ASNR may reduce the listening effort in noisy situations.
  • Automatic Gain Control (AGC): designed to handle and control the gain changes within the phone that may directly affect the AEC performance.
  • Dynamic Range Compressor (DRC): designed to provide better control of the dynamic range of a speech signal. The DRC may be used to increase the loudness as well as limit the excessive signal peaks.
  • Multi-Source Selection (MSS): designed to select the optimum source from multiple transmit sources such as multiple hands-free microphones, remote microphones, or beams formed from microphone arrays.
  • Beamforming (BF): designed to help AER reduce acoustic echo and near end noise in a system with a microphone array.

Modules

AER combines the above features in four independent modules. Each module has its own external API and needs to be instantiated individualy:
  • AER Module : contains the implementation of the AER module (AEC, EQ, HLC, NG, CNG and ASNR).
  • AGC Module : contains the implementation of the AGC module.
  • DRC Module : contains the implementation of the DRC module.
  • MSS Module : contains the implementation of the MSS module.
  • BF Module : contains the implementation of the BF module.

MIPS and Memory Rquirements

Refer to AER Integration Guide for MIPS and memory usage.

Signal Delay Introduced by AER

Receive path signal delay: 1 ~ 2 msec
  • bandsplit filter (if bandsplit operation is selected): 1 msec,
  • equalizer: up to 1 msec depending on filter design.

Transmit path signal delay: 6 ~ 9 msec

  • bandsplit filter (if bandsplit operation is selected): 2 msec
  • equalizer: up to 1ms depending on filter design,
  • FDNLP/ASNR: 3~6 msec depending on configuration (default is 5 msec).

Other Packages Supporting AER

  • TYPES (see TYPES.chm)
  • UTIL (see UTIL.chm)
  • VPE (see VPEAPI.chm)


AER: Module Index

AER Modules

Here is a list of all modules:
  • AER Module API
    • AER Functions
    • AER Data Structures
    • AER Constants (enum's and define's)
      • AER Error Codes
      • AER Sampling Rates Definitions
      • AER Create Bitfield Masks
      • AER GetSize Configuration Bitfield Masks
      • AER Phone Modes
      • AER Control Bitfield Masks
      • AER Reset Bitfield Masks
      • AER Configuration Valid Bitfield Masks
      • AER Warning Messages
      • AER Equalizer Control Codes
      • AER Trace Maximum Sizes
      • AER Trace Config Bitfield Masks
      • AER parameter configuration ranges
  • AGC Module API
    • AGC Functions
    • AGC Data Structures
    • AGC Constants (enum's and define's)
      • AGC Error Codes
      • AGC Event Codes
      • AGC Control Bitfield Masks
      • AGC Reset Bitfield Masks
      • AGC Configuration Valid Bitfield Masks
      • AGC Create Bitfield Masks
      • AGC Sampling Rates Definitions
  • BF Module API
    • BF Functions
    • BF Data Structures
    • BF Constants (enum's and define's)
      • BF Error Codes
      • BF Sampling Rate Definitions
      • BF Size Configuration Max
      • BF Type Definitions
      • BF Filter Type Definitions
      • BF Enable/Disable Constants
      • BF Operation Mode Constants
  • DRC Module API
    • DRC Functions
    • DRC Data Structures
    • DRC Constants (enum's and define's)
      • DRC Error Codes
      • DRC Operation Mode bitfield
      • DRC Band Configuration Valid Bit
      • DRC Limiter Configuration Valid Bit
      • DRC Filter Coefficient Configuration Size.
      • DRC Control Codes
      • DRC Supported Sampling Rate
      • DRC Get Parameter Codes
  • MSS Module API
    • MSS Functions
    • MSS Data Structures
    • MSS Constants (enum's and define's)
      • MSS Error Codes
      • MSS Sampling Rates Definitions
      • MSS Source Type Definitions


AER: mss.h File Reference

  • File List
  • Globals

mss.h File Reference

Detailed Description

Contains external API for Multi-Source Selection (MSS) module.

Copyright (c) 2007 – 2013 Texas Instruments Incorporated ALL RIGHTS RESERVED

Definition in file mss.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for mss.h:

Go to the source code of this file.

Data Structures

struct | mssSrc_s
Source structure used to manually select a source. More...
struct | mssSizeConfig_s
Configuration structure for mssGetSizes() This structure is used for getting memory requirements of MSS through function mssGetSizes(). More...
struct | mssNewConfig_s
Configuration structure for mssNew() This structure is used for creating a new MSS instance through function mssNew(). More...
struct | mssConfig_s
Configuration structure for mssOpen() This structure contains system parameters to configure an MSS instance through mssOpen(). MSS doesn't have default value for these parameters, and they must be set explicitly when mssOpen() is called the first time after mssNew(). More...
struct | mssCallTable_t
MSS call table. More...

MSS source types

MSS supports multiple types of sources which can be microphones, beams, etc. Microphones can be fixed (mounted on the device) or remote, and can have their own built-in acoustic echo canceller.

#define | mss_MAX_NUM_SRC_TYPES (mss_SRC_MAX+1)
enum {
mss_SRC_INVALID = -1, mss_SRC_MIC_FIXED = 0, mss_SRC_MIC_REMOTE = 1, mss_SRC_MIC_CLEAN = 2,
mss_SRC_BEAM = 3, mss_SRC_MAX = mss_SRC_BEAM
}
typedef tint | mssSrcType_t

MSS sampling rates

Sampling rates that are supported by MSS.

enum | { mss_SAMP_RATE_8K = 1, mss_SAMP_RATE_16K = 2 }
typedef tint | mssSampRate_t

Typedefs

typedef mssSrc_s | mssSrc_t
Source structure used to manually select a source.
typedef mssSizeConfig_s | mssSizeConfig_t
Configuration structure for mssGetSizes() This structure is used for getting memory requirements of MSS through function mssGetSizes().
typedef mssNewConfig_s | mssNewConfig_t
Configuration structure for mssNew() This structure is used for creating a new MSS instance through function mssNew().
typedef mssConfig_s | mssConfig_t
Configuration structure for mssOpen() This structure contains system parameters to configure an MSS instance through mssOpen(). MSS doesn't have default value for these parameters, and they must be set explicitly when mssOpen() is called the first time after mssNew().

Enumerations

MSS error codes
Error codes returned by MSS API functions.

enum {
mss_NOERR = 0, mss_ERR_NOMEMORY = 1, mss_ERR_NOTOPENED = 2, mss_ERR_NOTCLOSED = 3,
mss_ERR_INVALIDPAR = 4, mss_ERR_INVALIDSRC = 5
}

Functions

tint | mssNew (void **mssInst, tint nbufs, ecomemBuffer_t *bufs, mssNewConfig_t *cfg)
MSS control bitfield structure.
tint | mssOpen (void *mssInst, mssConfig_t *cfg)
Function mssOpen() initializes and configures an MSS instance.
tint | mssControl (void *mssInst, mssControl_t *ctl)
Function mssControl() changes MSS operation modes or parameters.
tint | mssProcess (void *mssInst, void *out, void *rx_out_sync, void *mic_fixed[], void *mic_remote[], void *mic_clean[], void *mic_array[], void *beam[])
Function mssProcess() examines all input sources to MSS and selects the best one.
tint | mssDebugStat (void *mssInst, mssDebugStat_t *mssDbg)
Function mssDebugStat() returns debug information.
tint | mssClose (void *mssInst)
Function mssClose() closes an MSS instance.
Remarks:
Function mssClose() must be called before mssDelete() is called.

tint | mssDelete (void **mssInst, tint nbufs, ecomemBuffer_t *bufs)
Function mssDelete() deletes the MSS instance identified by mssInst and returns the addresses of those buffers used by this instance.


AER: mss.h Source File

  • File List
  • Globals

mss.h

Go to the documentation of this file.
00001 #ifndef _MSS_H
00002 #define _MSS_H
00003
00012 #include <ti/mas/types/types.h>
00013 #include <ti/mas/util/ecomem.h>               /* memory descriptor structure */
00014
00015 /* Define MSS Module as a master group in Doxygen format and add all MSS API
00016    definitions to this group. */
00033
00043 enum {
00044   mss_NOERR              = 0,
00045   mss_ERR_NOMEMORY       = 1,
00046   mss_ERR_NOTOPENED      = 2,
00047   mss_ERR_NOTCLOSED      = 3,
00048   mss_ERR_INVALIDPAR     = 4,
00049   mss_ERR_INVALIDSRC     = 5
00050 };
00063 enum {
00064   mss_SAMP_RATE_8K  = 1,
00065   mss_SAMP_RATE_16K = 2
00066 };
00067 typedef tint mssSampRate_t;
00068
00083 enum {
00084   mss_SRC_INVALID     = -1,
00085   mss_SRC_MIC_FIXED   =  0,
00086   mss_SRC_MIC_REMOTE  =  1,
00087   mss_SRC_MIC_CLEAN   =  2,
00088   mss_SRC_BEAM        =  3,
00089   mss_SRC_MAX         =  mss_SRC_BEAM
00090 };
00091
00092 typedef tint mssSrcType_t;
00093 #define mss_MAX_NUM_SRC_TYPES (mss_SRC_MAX+1)
00102 typedef struct mssSrc_s {
00103   mssSrcType_t group;
00105   tint         index;
00107 } mssSrc_t;
00108
00116 typedef struct mssSizeConfig_s {
00117   mssSampRate_t max_sampling_rate;
00120   tint max_num_mic_fixed;
00121   tint max_num_mic_remote;
00122   tint max_num_mic_clean;
00123   tint max_num_beam;
00124 } mssSizeConfig_t;
00125
00133 typedef struct mssNewConfig_s {
00134   void  *handle;
00135   mssSizeConfig_t  sizeCfg;
00136 } mssNewConfig_t;
00137
00149 typedef struct mssConfig_s {
00150   mssSampRate_t sampling_rate;
00153   tint  num_mic_fixed;
00154   tint  num_mic_remote;
00155   tint  num_mic_clean;
00156   tint  num_mic_array;
00157   tint  num_beam;
00158 } mssConfig_t;
00159
00184 typedef struct mssCtlBf_s {
00185   tuint mask;
00186   tuint value;
00188 #define mss_CTL_MODES_BYPASS   0x0001
00189 #define mss_CTL_MODES_FREEZE   0x0002
00190 #define mss_CTL_MODES_DEFAULT  0x0000
00192 } mssCtlBf_t;
00193
00203 typedef struct mssControl_s {
00204     tuint      valid_bitfield;
00206 #define mss_CTL_MODES           0x0001
00207 #define mss_CTL_SELECT_SRC      0x0002
00208 #define mss_CTL_SWITCH_THRESH   0x0004
00209 #define mss_CTL_SWITCH_DURATION 0x0008
00210 #define mss_CTL_SWITCH_HNAGOVER 0x0010
00211 #define mss_CTL_ALL              (  mss_CTL_MODES \
00212                                   | mss_CTL_SELECT_SRC \
00213                                   | mss_CTL_SWITCH_THRESH \
00214                                   | mss_CTL_SWITCH_DURATION \
00215                                   | mss_CTL_SWITCH_HNAGOVER )
00217     mssCtlBf_t modes;
00218     mssSrc_t   source;
00219     tint       switch_thresh;
00223     tint       switch_duration;
00226     tint       switch_hangover;
00230 } mssControl_t;
00231
00239 #define mss_DEBUG_STATE_NUM_TUINT 16
00240 typedef struct mssDebugStat_s {
00241   mssSrc_t cur_src;
00242   mssSrc_t new_src;
00243   tuint    states[mss_DEBUG_STATE_NUM_TUINT];
00244 } mssDebugStat_t;
00245
00246
00263 tint mssGetSizes(tint *nbufs, const ecomemBuffer_t **bufs, mssSizeConfig_t *cfg);
00264
00298 tint mssNew (void **mssInst, tint nbufs, ecomemBuffer_t *bufs, mssNewConfig_t *cfg);
00299
00332 tint mssOpen (void *mssInst, mssConfig_t *cfg);
00333
00351 tint mssControl (void *mssInst, mssControl_t *ctl);
00352
00382 tint mssProcess(void *mssInst, void *out, void *rx_out_sync, void *mic_fixed[],
00383          void *mic_remote[], void *mic_clean[], void *mic_array[], void *beam[]);
00384
00401 tint mssDebugStat(void *mssInst, mssDebugStat_t *mssDbg);
00402
00418 tint mssClose(void *mssInst);
00419
00445 tint mssDelete(void **mssInst, tint nbufs, ecomemBuffer_t *bufs);
00446
00447
00448 /* -------------------------- MSS Call Table -------------------------------- */
00455 typedef struct {
00456   tint  (*mssClose)     (void *mssInst);
00457   tint  (*mssControl)   (void *mssInst, mssControl_t *ctl);
00458   tint  (*mssDelete)    (void **mssInst, tint nbufs, ecomemBuffer_t *bufs);
00459   tint  (*mssGetSizes)  (tint *nbufs, const ecomemBuffer_t **bufs,
00460                          mssSizeConfig_t *cfg);
00461   tint  (*mssNew)       (void **mssInst, tint nbufs, ecomemBuffer_t *bufs,
00462                          mssNewConfig_t *cfg);
00463   tint  (*mssOpen)      (void *mssInst, mssConfig_t *cfg);
00464   tint  (*mssProcess)   (void *mssInst, void *out, void *rx_out_sync,
00465                          void *mic_fixed[], void *mic_remote[], void *mic_clean[],
00466                          void *mic_array[], void *beam[]);
00467 } mssCallTable_t;
00468
00469 #endif
00470 /* Nothing past this point */
00471


AER: MSS Module

MSS Module

The Multi-Source Selection (MSS) module selects the optimum source from various transmit sources. In this release, the selection is based on power measurements on speech. The Simple Voice Detector (SVD) module of the Voice Processing Element (VPE) component is used to detect speech activity for power measurements. After new source is selected, the switch is performed by cross fading between previously selected source and newly selected source. Refer to AER Module for the block diagram of AER and MSS operating together.

See MSS Module API for MSS external API.


AER: Page Index

AER Related Pages

Here is a list of all related documentation pages:
  • AER Module
  • AGC Module
  • DRC Module
  • DRC Configuration Parameters
  • DRC Power Measurement Precision vs. Exponential Average Time Constant
  • DRC Multi-band Filter Reference Design
  • MSS Module
  • BF Module
  • External API usage examples


AER: aerCallTable_t Struct Reference

  • Data Structures
  • Data Fields

aerCallTable_t Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER call table.

Definition at line 2265 of file aer.h.

Data Fields

tint(* | aerActivate )(void *newActiveInst, void *oldActiveInst)
tint(* | aerCreate )(aerCreateConfig_t *create_cfg)
tint(* | aerClose )(void *aerInst)
tint(* | aerControl )(void *aerInst, aerControl_t *ctl)
tint(* | aerDelete )(void **aerInst, tint nbufs, ecomemBuffer_t *bufs)
tint(* | aerGetFilter )(void *aerInst, tint start, tint length, Fract coeff[], tint *hscale_l2)
tint(* | aerGetGains )(void *aerInst, tint *tx_digital_gain, tint *rx_digital_gain)
tint(* | aerGetPerformance )(void *aerInst, aerDebugStat_t *dbgstat, aerVersion_t *version, tbool reset)
tint(* | aerGetSizes )(tint *nbufs, const ecomemBuffer_t **bufs, aerSizeConfig_t *cfg)
tint(* | aerOpen )(void *aerInst, aerConfig_t *cfg)
tint(* | aerNew )(void **aerInst, tint nbufs, ecomemBuffer_t *bufs, aerNewConfig_t *cfg)
tint(* | aerReceiveIn )(void *aerInst, void *recv_in, void *recv_out, void *trace_buf)
tint(* | aerSendIn )(void *aerInst, void *send_in, void *send_out, void *send_out_8kHz, void *recv_out_sync, void *sout_pnlp_8kHz, void *trace_buf)
tint(* | aerPutFilter )(void *aerInst, aerTailModel_t *tail_model, Fract *coeff, tint start, tint length)

Field Documentation

tint(* aerCallTable_t::aerActivate)(void *newActiveInst, void *oldActiveInst)

tint(* aerCallTable_t::aerCreate)(aerCreateConfig_t *create_cfg)

tint(* aerCallTable_t::aerClose)(void *aerInst)

tint(* aerCallTable_t::aerControl)(void *aerInst, aerControl_t *ctl)

tint(* aerCallTable_t::aerDelete)(void **aerInst, tint nbufs, ecomemBuffer_t *bufs)

tint(* aerCallTable_t::aerGetFilter)(void *aerInst, tint start, tint length, Fract coeff[], tint *hscale_l2)

tint(* aerCallTable_t::aerGetGains)(void *aerInst, tint *tx_digital_gain, tint *rx_digital_gain)

tint(* aerCallTable_t::aerGetPerformance)(void *aerInst, aerDebugStat_t *dbgstat, aerVersion_t *version, tbool reset)

tint(* aerCallTable_t::aerGetSizes)(tint *nbufs, const ecomemBuffer_t **bufs, aerSizeConfig_t *cfg)

tint(* aerCallTable_t::aerOpen)(void *aerInst, aerConfig_t *cfg)

tint(* aerCallTable_t::aerNew)(void **aerInst, tint nbufs, ecomemBuffer_t *bufs, aerNewConfig_t *cfg)

tint(* aerCallTable_t::aerReceiveIn)(void *aerInst, void *recv_in, void *recv_out, void *trace_buf)

tint(* aerCallTable_t::aerSendIn)(void *aerInst, void *send_in, void *send_out, void *send_out_8kHz, void *recv_out_sync, void *sout_pnlp_8kHz, void *trace_buf)

tint(* aerCallTable_t::aerPutFilter)(void *aerInst, aerTailModel_t *tail_model, Fract *coeff, tint start, tint length)

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerConfig_s Struct Reference

  • Data Structures
  • Data Fields

aerConfig_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

Configuration structure for aerOpen() This structure contains system parameters to configure an AER instance through aerOpen(). AER doesn't have default value for these parameters, and they must be set explicitly when aerOpen() is called the first time after aerNew(). After that, these prameters may also be changed through aerControl().

Definition at line 667 of file aer.h.

Data Fields

tuint | reset_bitfield
tuint | valid_bitfield
tint | y2x_delay
tuint | srate_bitfield
tint | tail_length
tint | delay_tx_ag_chg
tint | delay_rx_ag_chg
tint | num_samp_interp
tint | phone_mode

Field Documentation

tuint aerConfig_s::reset_bitfield

Used to reset certain information specified by aer_RESET_XYZ. Will not affect system parameters contained in aerConfig_t. This bitfield is ignored when aerOpen() is called the first time after aerNew() is called. See AER Reset Bitfield Masks.

Definition at line 668 of file aer.h.

tuint aerConfig_s::valid_bitfield

Used to indicate which of the system parameters in aerConfig_t are valid and can be read by aerOpen(). It must be set to all 1's (aer_CFG_VALID_BITS_ALL_1) to configure all system parameters when aerOpen() is called the first time after aerNew() is called. See AER Configuration Valid Bitfield Masks.

Definition at line 674 of file aer.h.

tint aerConfig_s::y2x_delay

Corresponding to aer_CFG_VALID_Y2X_DELAY. See description of y2x_delay in aerControl_s.

Definition at line 681 of file aer.h.

tuint aerConfig_s::srate_bitfield

Corresponding to aer_CFG_VALID_SAMP_RATES. See description of srate_bitfield in aerControl_s.

Definition at line 683 of file aer.h.

tint aerConfig_s::tail_length

Corresponding to aer_CFG_VALID_TAIL_LENGTH. See description of tail_length in aerControl_s.

Definition at line 685 of file aer.h.

tint aerConfig_s::delay_tx_ag_chg

Corresponding to aer_CFG_VALID_DELAY_TXAG. See description of delay_tx_ag_chg in aerControl_s.

Definition at line 687 of file aer.h.

tint aerConfig_s::delay_rx_ag_chg

Corresponding to aer_CFG_VALID_DELAY_RXAG. See description of delay_rx_ag_chg in aerControl_s.

Definition at line 689 of file aer.h.

tint aerConfig_s::num_samp_interp

Corresponding to aer_CFG_VALID_INTER_SAMP. See description of num_samp_interp in aerControl_s.

Definition at line 691 of file aer.h.

tint aerConfig_s::phone_mode

Corresponding to aer_CFG_VALID_PHONE_MODE. See description of phone_mode in aerControl_s.

Definition at line 693 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerControl_s Struct Reference

  • Data Structures
  • Data Fields

aerControl_s Struct Reference
[AER Data Structures]

#include <aer.h>

Collaboration diagram for aerControl_s:

[legend]

Detailed Description

AER control structure This structure is used to change AER configurable parameters and mode of operation through aerControl(). It has two elements, a control code to tell what to change, and a union of parameters to tell the value of the new parameter.

Definition at line 888 of file aer.h.

Data Fields

tuint | valid_bitfield_0
aerModeControl_t modes_0
aerModeControl_t modes_1
aerModeControl_t modes_2
tint | y2x_delay
tuint | srate_bitfield
tint | tail_length
tint | delay_tx_ag_chg
tint | delay_rx_ag_chg
tint | num_samp_interp
tint | phone_mode
Fract | gain_rx_analog
Fract | gain_tx_analog
Fract | gain_rx_digital
Fract | gain_tx_digital
aerEqConfig_t * rxeq_params
aerEqConfig_t * txeq_params
tuint | valid_bitfield_1
Fract | nlp_combloss_target
tint | nlp_clip_agg_l2
tint | nlp_linattn_max_erle
tint | nlp_clipper_max_erle
tint | nlp_total_linattn_min
tint | nlp_rx_linattn_min
tint | nlp_rx_linattn_max
tint | nlp_tx_linattn_min
tint | nlp_tx_linattn_max
tint | nlp_tx_in_tc
tint | nlp_tx_out_tc
tint | nlp_rx_in_tc
tint | nlp_rx_out_tc
tint | gain_split_tc
tint | cng_rx_level
tint | cng_tx_level
tuint | valid_bitfield_2
tint | txfdnlp_msec_delay
tint | txfdnlp_bin_lo1
tint | txfdnlp_bin_lo2
tint | txfdnlp_bin_hi1
tint | txfdnlp_bin_hi2
tint | txfdnlp_cng_max
tint | nr_fbin1_lim
tint | nr_fbin2_lim
tint | nr_fband1_max_atten
tint | nr_fband2_max_atten
tint | nr_fband3_max_atten
Fract | nr_sig_upd_rate_max
Fract | nr_sig_upd_rate_min
tint | nr_noise_thresh
tint | nr_noise_hangover
aerTraceConfig_t trace_cfg
tuint | valid_bitfield_3
tint | coh_hangover
UFract | coh_ratio_thresh
tint | coh_cnt_thresh
Fract | thresh_hlc
tint | ramp_out_tc_hlc
tint | power_tc_hlc
Fract | thresh_rx_nld
LFract | thresh_rx_noise
LFract | thresh_tx_noise
tint | hangover_rx_to_tx
tint | hangover_tx_to_rx
tint | tx_slim_mode
tint | rx_slim_mode
tint | hangover_ng
tint | rampin_period_ng
tint | noise_level_ng
tuint | valid_bitfield_4
tint | dt_thresh
tulong | clip_scale_curve
tint | dt_hangover

Field Documentation

tuint aerControl_s::valid_bitfield_0

Definition at line 889 of file aer.h.

aerModeControl_t aerControl_s::modes_0

Bit 0: AER operational modes bitfield 0:

Definition at line 907 of file aer.h.

aerModeControl_t aerControl_s::modes_1

Bit 1: AER operational modes bitfield 1:

Definition at line 908 of file aer.h.

aerModeControl_t aerControl_s::modes_2

Bit 2: AER operational modes bitfield 3: AER operation is defined by three bitfields, modes bitfield 0, 1 and 2. These bitfields disable or enable certain feature (or mode) such as Tx NLP, Rx NLP, CNG, ASNR, etc. The bit masks for these two bitfields are defined in AER Control Bitfield Masks.

Default values for bitfield 0, 1 and 2 are 0x0086, 0x0000 and 0x0000 respectively.

Definition at line 909 of file aer.h.

tint aerControl_s::y2x_delay

Bit 3: System delay between AER receive out and send in: the delay between two interfaces referred to by the input pointers of aerSendIn(): send_in and recv_out_sync. It is specified in units of 125-usec (1/8000Hz) periods. For example, a value of 16 means 2 msec. This parameter does not have a default value and must be initialized through aerOpen().

Remarks:
y2x_delay must be positive and less than or equal to max_y2x_delay that is set in aerSizeConfig_t. Otherwise, aerControl() or aerOpen() will return an error.

Definition at line 917 of file aer.h.

tuint aerControl_s::srate_bitfield

Bit 4: Sampling rates bitfield: This bitfield defines the sampling rates on the following 3 interfaces:

  • Bit 0: Rx in, 0: 8k samples/second, 1: 16k samples/second
  • Bit 1: Tx out, 0: 8k samples/second, 1: 16k samples/second
  • Bit 2: Rx out/Tx In, 0: 8k samples/second, 1: 16k samples/second

The sampling rate at the speaker and the microphone must be the same. See AER Sampling Rates Definitions for bit masks that may be used to construct this bitfield. This parameter does not have a default value and must be initialized through aerOpen().

Remarks:
Sampling rates at all 3 interfaces must be less than or equal to the max_sampling_rate of aerCreateConfig_t. Otherwise, aerControl() or aerOpen() will return an error.

Definition at line 928 of file aer.h.

tint aerControl_s::tail_length

Bit 5: Tail model filter length: The AEC tail model filter length in units of 125usec. For handsfree and headset phone mode, it is an integral multiple of 160 (20msec) up to maximum tail length. For handset mode, it is an integral multiple of 32 (4msec) up to 160 (20msec). This parameter does not have a default value and must be initialized through aerOpen().

Remarks:
tail_length must be less than or equal to the max_tail_length of aerSizeConfig_t. Otherwise, aerControl() or aerOpen() will return an error.

Definition at line 943 of file aer.h.

tint aerControl_s::delay_tx_ag_chg

Bit 6: Tx path gain change synchronization delay: Tx path analog gain changes can happen either during testing/ calibration when the user requests an explicit gain change, or during normal operation when adaptive AGC induces gain change. In the latter case, AGC may alter Tx path analog gain (tx_ag) to optimize the Tx path digital dynamic range. Preserving the sum of tx_ag and AER Tx digital gain (aer_tx_dg) that affects each sample will avoid transmitting unwanted "clicks" duringgain transitions introduced by adaptive AGC.

When a Tx path analog gain change is requested, factors like buffering in the BSP, sampling frequency, phone mode, Tx path equalization filter, hardware codec and software implementation of the gain interface may impact the delay between the event of requesting a gain change and the first sample that AER observes to be actually impacted by the gain.

This parameter informs AER about the delay that is talked about above. The basic idea is to synchronize the transitions in tx_ag and aer_tx_dg gains. When AER is informed about a pending tx_ag change, it makes a corresponding change in its echo prediction after a delay of delay_tx_ag_chg samples. The request to apply a new aer_tx_dg is also processed after this delay. If properly configured, this parameter will reflect the number of future Tx path samples that will not be affected by a pending tx_ag gain change. The valid range for this parameter is [0, 240] (i.e. up to 30msec) and is specified in number of 8kHz samples (or 125usec). One setting per phone mode should be available.

This parameter does not have a default value and must be initialized through aerOpen().

Definition at line 954 of file aer.h.

tint aerControl_s::delay_rx_ag_chg

Bit 7: Rx path gain change synchronization delay: When AER is informed about a pending Rx analog gain (rx_ag) change, it makes a corresponding change in its echo prediction after a delay of delay_rx_ag_chg samples. Generally optimizing this parameter is not recommended, as this can add value to the phone in only extraordinary circumstances. Volume changes come with many more significant disturbances due to a hand interfering with the acoustic echo path to punch the volume button. Optimal values for delay_rx_ag_chg can change with the sampling frequency, phone mode, Tx equalization filter, hardware codec and software implementation of the gain interface.

The valid range for this parameter is [0, 240] (i.e. up to 30msec) and is specified in number of 8kHz samples (or 125usec). One setting per phone mode should be available. This parameter does not have a default value and must be initialized through aerOpen().

Definition at line 983 of file aer.h.

tint aerControl_s::num_samp_interp

Bit 8: Tx path analog gain change settling period: This parameter informs AER about the number of samples that get garbled during Tx analog gain changes due to the ADC PGA settling period. If this parameter is optimally configured, AER takes measures to conceal this transient amplifier noise. The number of samples after a gain change that ringing persists is observed in data to determine num_samp_interp.

The valid range for this parameter is [1, mod(delay_tx_ag_chg, 80) - 1] and is specified in number of 8kHz samples. If out of range, this parameter has no effect. One setting per phone mode should be available.

This parameter does not have a default value and must be initialized through aerOpen().

Definition at line 999 of file aer.h.

tint aerControl_s::phone_mode

Bit 9: Supported phone mode: AER supports 5 different phone modes: aer_PHM_HS (handset), aer_PHM_HES (headset), aer_PHM_HF (hands-free), aer_PHM_HSGL (handset group listen), and aer_PHM_HESGL (group listen with headset). See AER Phone Modes.

This parameter does not have a default value and must be initialized through aerOpen().

Definition at line 1014 of file aer.h.

Fract aerControl_s::gain_rx_analog

Bit 10: Receive path (speaker) analog gain: This gain is relative to a constant reference in S11.4 dB (or in 1/16 dB units). The default is 0dB. It is applied downstream of AER in the receive path. User adjustments of a programmable speaker volume should immediately result in a aerControl() call with notification of a gain change to avoid de-converging AER.

Remarks:
Before AER processing starts, this gain must be set explicitly to an initial value through aerControl() in order to ensure proper tail model rescaling. Otherwise, aerSendIn() and aerReceiveIn() will process data as if AER is disabled.
This parameter does not have a default value and must be initialized through aerOpen().

Definition at line 1022 of file aer.h.

Fract aerControl_s::gain_tx_analog

Bit 11: Send path (mic) analog gain: This gain is relative to a constant reference in S11.4 dB (or in 1/16 dB units). The default is 0dB. It is applied upstream of AER in the send path. AGC adjustments of the microphone gain should immediately result in an aerControl() call with notification of the gain change.

Remarks:
Note that activating the mic mute feature is achieved through aerControl() call with ctl_code set to aer_CTL_MODES_1, but not by setting tx_analog_gain to zero.

Before AER processing starts, this gain must be set explicitly to an initial value through aerControl() in order to ensure proper tail model rescaling. Otherwise, aerSendIn() and aerReceiveIn() will process data as if AER is disabled.

This parameter does not have a default value and must be initialized through aerOpen().

Definition at line 1037 of file aer.h.

Fract aerControl_s::gain_rx_digital

Bit 12: Receive path digital gain: AER Rx digital gain in S11.4 dB (or in 1/16 dB units). This gain is increased from a default of 0dB when the Rx analog gain fails to provide further gain without saturation. The range is [-200, 200] in 1/16 dB steps. Default value is 0.

Definition at line 1055 of file aer.h.

Fract aerControl_s::gain_tx_digital

Bit 13: Send path digital gain: AER Tx digital gain in S11.4 dB (or in 1/16 dB units), also known as the pre NLP gain. The range is [-200, 200] in 1/16 dB steps. Default is 0. If AGC module monitors and automatically adjusts the microphone gain, this Tx digital gain should be changed accordingly to maintain the SLR.

Definition at line 1061 of file aer.h.

aerEqConfig_t* aerControl_s::rxeq_params

Bit 14: Rx path equalizer parameters: For Equalizer design and parameters format, refer to AER Equalizer Design Tool Documentation (delivered separately).

Remarks:
If parameters of aerEqConfig_t are not valid, aerControl() will return an error.

Definition at line 1067 of file aer.h.

aerEqConfig_t* aerControl_s::txeq_params

Bit 15: Tx path equalizer parameters: For Equalizer design and parameters format, refer to AER Equalizer Design Tool Documentation (delivered separately).

Remarks:
If parameters of aerEqConfig_t are not valid, aerControl() will return an error.

Definition at line 1074 of file aer.h.

tuint aerControl_s::valid_bitfield_1

Definition at line 1081 of file aer.h.

Fract aerControl_s::nlp_combloss_target

Bit 0: Maximum NLP attenuation: This parameter determines the maximal NLP attenuation of subdominant path. It is in S0.15 giving the minimum gain which the NLP can apply to the signal. The actual attenuation applied by NLP also depends on ERLE and the estimated ERL. E.g., if this parameter is set to -40dB, and ERL and ERLE are 5dB and 30dB respectively, then NLP will apply 40-5-30 = 5dB attenuation.

Conversion from the value of this parameter to attenuation in dB is: Attenuation (dB) = 20*log10(2^15/x), where x is nlp_combloss_target.

Range is [1, 32767] and default is 327 corresponding to a -40 dB minimum gain (or 40dB maximal attenuation).

Definition at line 1099 of file aer.h.

tint aerControl_s::nlp_clip_agg_l2

Bit 1: Send path NLP clipper aggression: This parameter specifies the Tx path NLP center clipper rail amplitude scaling. The larger this parameter, the more aggressive the Tx NLP.

This parameter is in number of 3dB steps and is in the range [-10,10]. Default is 7.

Definition at line 1113 of file aer.h.

tint aerControl_s::nlp_linattn_max_erle

Bit 2: Maximum ERLE for linear attenuation reduction:NLP linear attenuation is adaptively reduced when ERLE increases (or AEC convergence depth increases). However, the adaptive reduction halts when the ERLE obtained by subtracting predicted echo increases beyond this configurable level.

This parameter is in dB with range [0, +45], and is truncated by AER to the nearest multiple of 3 dB. Default value is 21 (dB).

Definition at line 1120 of file aer.h.

tint aerControl_s::nlp_clipper_max_erle

Bit 3: Maximum ERLE for clipper reduction: Similar to the reduction of NLP linear attenuation, the adaptive reduction of NLP clipper halts when the ERLE increases beyond this configurable level. Same format and range as nlp_linattn_max_erle. Default is 21.

Definition at line 1129 of file aer.h.

tint aerControl_s::nlp_total_linattn_min

Bit 4:Minimum Rx and Tx total NLP linear attenuation: The sum of Rx and Tx NLP linear attenuation will not drop below this configurable level.

This parameter is in dB with input range [0, +70] dB. Default is 0.

Definition at line 1134 of file aer.h.

tint aerControl_s::nlp_rx_linattn_min

Bit 5: Minimum Rx NLP linear attenuation: Rx NLP linear attenuation stays above this level. This parameter will be ignored if it is larger than nlp_rx_linattn_max. It has no effect when set to zero.

This parameter is in dB with input range [0, +70] dB. Default is 0.

Definition at line 1140 of file aer.h.

tint aerControl_s::nlp_rx_linattn_max

Bit 6: Maximum Rx NLP linear attenuation: Rx NLP linear attenuation stays below this level. This parameter has no effect when set to 32767.

This parameter is in dB with input range [0, +70] dB and the value of 32767. Default is 32767.

Definition at line 1147 of file aer.h.

tint aerControl_s::nlp_tx_linattn_min

Bit 7: Minimum Tx NLP linear attenuation: Same as nlp_rx_linattn_min.

Definition at line 1154 of file aer.h.

tint aerControl_s::nlp_tx_linattn_max

Bit 8: Maximum Rx NLP linear attenuation: Same as nlp_rx_linattn_max.

Definition at line 1157 of file aer.h.

tint aerControl_s::nlp_tx_in_tc

Bit 9: Tx NLP ramping in time constant: This parameter is used to control the Tx linear attenuation slew rate, a time constant determining the speed at which the linear attenuation can change when Tx path becomes subdominant.

Input range is [1, 10]. Default is 1.

Definition at line 1160 of file aer.h.

tint aerControl_s::nlp_tx_out_tc

Bit 10: Tx NLP ramping out time constant: To control the speed at which the Tx linear attenuation can change when Tx path becomes dominant. Same range and default value as nlp_tx_in_tc.

Definition at line 1167 of file aer.h.

tint aerControl_s::nlp_rx_in_tc

Bit 11: Rx NLP ramping in time constant: To control the speed at which the Rx linear attenuation can change when Rx path becomes subdominant. Same range and default value as nlp_tx_in_tc.

Definition at line 1171 of file aer.h.

tint aerControl_s::nlp_rx_out_tc

Bit 12: Rx NLP ramping out time constant: To control the speed at which the Rx linear attenuation can change when Rx path becomes dominant. Same range and default value as nlp_tx_in_tc.

Definition at line 1175 of file aer.h.

tint aerControl_s::gain_split_tc

Bit 13: Tx/Rx NLP gain splitting time constant: Gain split slew rate time constant, which controls the speed at which the total linear attenuation is split between Tx and Rx paths during double talk.

Input range is [1, 10]. Default is 5.

Definition at line 1179 of file aer.h.

tint aerControl_s::cng_rx_level

Bit 14: Rx comfort noise level: The white noise level generated by Rx CNG. It is in dBm and the valid range is [aer_CNG_LEVEL_LOWER_LIMIT, aer_CNG_LEVEL_UPPER_LIMIT]. Default is -65.

Remarks:
If the configured value is out of the valid range, aerControl() will return an error.

Definition at line 1186 of file aer.h.

tint aerControl_s::cng_tx_level

Bit 15: Tx comfort noise level: The meaning of this parameter depends on the type of the Tx CNG:

  • For adaptive CNG, it is the minimum level, which means the Tx CNG will generate comfort noise that spectrally matches the background noise, but the total power will stay above this level.
  • For fixed CNG, it is the actual power of the generated comfort noise.

This parameter is in dBm, and the valid range is same as cng_rx_level. Default is -65.

Definition at line 1194 of file aer.h.

tuint aerControl_s::valid_bitfield_2

Definition at line 1204 of file aer.h.

tint aerControl_s::txfdnlp_msec_delay

Bit 0: Tx FDNLP processing delay: This parameter (in msecs) specifies the delay determining shape of Tx FDNLP pre-FFT windowing function. It may be 3, 4, 5, or 6 (ms). FDNLP, including ASNR, may produce less unwanted noise and speech artifacts for a longer delay. Default is 5ms.

Remarks:
If this parameter is out of the valid range specified by [aer_FDNLP_DELAY_LOWER_LIMIT aer_FDNLP_DELAY_UPPER_LIMIT], aerControl() will take no action and return an error.

Definition at line 1222 of file aer.h.

tint aerControl_s::txfdnlp_bin_lo1

Bit 1: Tx FDCC action boundary 1: High FDCC (frequency domain center clipper) attenuation is applied for frequency bins < txfdnlp_bin_lo1*62.5 Hz, because no echo subtraction ERLE is anticipated for these bins. Default is 1 (or 62.5 Hz) for both 8kHz and 16kHz sampling rates.

Remarks:
If this parameter is out of the valid range specified by [aer_FDNLP_BIN_LOWER_LIMIT aer_FDNLP_BIN_UPPER_LIMIT_8K] or [aer_FDNLP_BIN_LOWER_LIMIT aer_FDNLP_BIN_UPPER_LIMIT_16K], aerControl() will take no action and return an error.

Definition at line 1232 of file aer.h.

tint aerControl_s::txfdnlp_bin_lo2

Bit 2: Tx FDCC action boundary 2: Low FDCC attenuation is applied for frequency bins >= txfdnlp_bin_lo2* 62.5 Hz, because good echo subtraction ERLE is anticipated for these bins. It must be >= tx_fdnlp_bin_lo1. Default is 6 (or 375 Hz) for both 8kHz and 16kHz sampling rates. This parameter has the same valid range as txfdnlp_bin_lo1.

Definition at line 1243 of file aer.h.

tint aerControl_s::txfdnlp_bin_hi1

Bit 3: Tx FDCC action boundary 3: Low FDCC attenuation is applied for frequency bins <= txfdnlp_bin_hi1* 62.5 Hz, because good echo subtraction ERLE is anticipated for these bins. It must be > tx_fdnlp_bin_lo2. Default is 56 (or 3500 Hz) for 8kHz sampling rate or 112 (or 7000Hz) for 16kHz sampling rates. This parameter has the same valid range as txfdnlp_bin_lo1.

Definition at line 1250 of file aer.h.

tint aerControl_s::txfdnlp_bin_hi2

Bit 4: Tx FDCC action boundary 4: High FDCC attenuation is applied for frequency bins > tx_fdnlp_bin_hi2* 62.5 Hz, because no echo subtraction ERLE is anticipated for these bins. It must be >= tx_fdnlp_bin_hi1. Default is 60 (or 3750 Hz) for 8kHz sampling rate or 120 (or 7500Hz) for 16kHz sampling rates. This parameter has the same valid range as txfdnlp_bin_lo1.

Definition at line 1257 of file aer.h.

tint aerControl_s::txfdnlp_cng_max

Bit 5: Maximum adaptive Tx CNG level: FDCNG adaptively matches Tx NE stationary noise in level and spectrum, so FDCNG output may become very high at times. This parameter will limit the Tx FDCNG signal power (which is heard during Tx NLP attenuation). It sets a limit on maximum power in dBm0 units for the adaptive FDCNG noise estimate & FDCNG output. This parameter doesn't impact independent ASNR noise estimate.

The valid range of this parameter is specified by [aer_CNG_LEVEL_LOWER_LIMIT, aer_CNG_LEVEL_UPPER_LIMIT] dBm0. Default is -60 dBm0.

Remarks:
If this parameter is out of the valid range, aerControl() will return an error.

Definition at line 1264 of file aer.h.

tint aerControl_s::nr_fbin1_lim

Bit 6: Boundary 1 for ASNR attenuation limit: This parameter defines the first boundary of frequency bins for which ASNR attenuation is limited. Range is [1, 62] and default is 10 (625Hz).

Remarks:
If this parameter is out of the valid range specified by [aer_FDNLP_BIN_LOWER_LIMIT aer_FDNLP_BIN_UPPER_LIMIT_8K] or [aer_FDNLP_BIN_LOWER_LIMIT aer_FDNLP_BIN_UPPER_LIMIT_16K], aerControl() will take no action and return an error.

Definition at line 1279 of file aer.h.

tint aerControl_s::nr_fbin2_lim

Bit 7: Boundary 2 for ASNR attenuation limit: This parameter defines the second boundary of frequency bins for which ASNR attenuation is limited. Range is [2, 63] and it must be larger than nr_fbin1_lim. Default is 32 (2000Hz). This parameter has the same valid range as nr_fbin1_lim.

Definition at line 1288 of file aer.h.

tint aerControl_s::nr_fband1_max_atten

Bit 8: ASNR maximum attenuation in band 1: The maximum attenuation (dB) that ASNR may apply for frequency band [0, asnr_fbin1_lim-1]*62.5 Hz. Range is [0, 90], and default is 9.

Definition at line 1294 of file aer.h.

tint aerControl_s::nr_fband2_max_atten

Bit 9: ASNR maximum attenuation in band 2: The maximum attenuation (dB) that ASNR may apply for frequency band [asnr_fbin1_lim, asnr_fbin2_lim]*62.5 Hz. Range is [0, 90], and default is 9.

Definition at line 1298 of file aer.h.

tint aerControl_s::nr_fband3_max_atten

Bit 10: ASNR maximum attenuation in band 3: The maximum attenuation (dB) that ASNR may apply for frequency band [asnr_fbin2_lim+1, 64]*62.5 Hz. Range is [0, 90], and default is 9.

Definition at line 1303 of file aer.h.

Fract aerControl_s::nr_sig_upd_rate_max

Bit 11: ASNR maximum signal update rate: ASNR adaptive speech signal estimate inverse update rate upper bound. The actual inverse update rate is varied internally by AER between the configured maximum (this parameter) and mimimum constraints. A higher inverse update rate reduces frame to frame changes yielding greater temporal smoothing and less time varying ASNR distortion artifacts during speech or noise. A lower inverse update rate yields quicker speech onset "breaking in" to remove ASNR attenuation.

This parameter is in Q.15 format. The range is [2, 32767] and default is 31129 (0.95).

Definition at line 1307 of file aer.h.

Fract aerControl_s::nr_sig_upd_rate_min

Bit 12: ASNR minimum signal update rate: This is the minimum constraint on the ASNR adaptive speech signal estimate inverse update rate.

This parameter is in Q.15 format. The range is [1, 32766] and default is 29818 (0.91).

Definition at line 1319 of file aer.h.

tint aerControl_s::nr_noise_thresh

Bit 13: ASNR noise threshold: ASNR will not reduce noise below this level, and when noise is already lower than this level, ASNR will not apply any attenuation to the signal. ASNR spectral noise estimate will continue to update even if Tx signal is below this noise threshold.

This parameter is in dBm0. Default is -75dBm0. Valid range is specified by [aer_NR_NOISE_THR_LOWER_LIMIT, aer_NR_NOISE_THR_UPPER_LIMIT]. If it is set to any value less than aer_NR_NOISE_THR_LOWER_LIMIT, this parameter has no effect.

Remarks:
If this parameter is set above aer_NR_NOISE_THR_UPPER_LIMIT, aerControl() will return an error.

Definition at line 1326 of file aer.h.

tint aerControl_s::nr_noise_hangover

Bit 14: ASNR hangover: When noise is lower than nr_noise_thresh, ASNR will not apply any attenuation to the signal. After noise goes above nr_noise_thresh, ASNR waits a period of time specified by this parameter before applying attenuation again.

This parameter is in 10 msec units. Range is [0, 32767], default is 150 (1.5 seconds).

Definition at line 1340 of file aer.h.

aerTraceConfig_t aerControl_s::trace_cfg

Bit 15: AER tracing configuration: It can NOT be used to turn on/off the tracing, which has to be done through control bitfield mask aer_CTL2_ENABLE_TRACE.

Remarks:
Tracing MUST be turned off before being configured.

Definition at line 1349 of file aer.h.

tuint aerControl_s::valid_bitfield_3

Definition at line 1355 of file aer.h.

tint aerControl_s::coh_hangover

Bit 0: Coherence detection hangover: This parameter specifies the time to wait before looking for coherence again after coherence has been detected.

It is in 10 msec units. Range is [1,32767]. Default is 600 (6 seconds).

Definition at line 1373 of file aer.h.

UFract aerControl_s::coh_ratio_thresh

Bit 1: Coherence detection ratio threshold: To detect coherence, a ratio, which is the net LMS update drift divided by net LMS update length, is calculated and evaluated. This ratio must exceed this parameter in order to consider coherence presence.

It is in Q.15 format. Range is [0, 32767], and the default is 6554 (0.2).

Definition at line 1379 of file aer.h.

tint aerControl_s::coh_cnt_thresh

Bit 2: Coherence detection counter threshold: To declare coherence presence, the coherence ratio must exceed coh_ratio_thresh for a number of consecutive frames specified by this parameter.

It is in number of frames. Range is [1,100] and the default is 30 (30 frames or 300 msec).

Definition at line 1386 of file aer.h.

Fract aerControl_s::thresh_hlc

Bit 3: HLC threshold or target level: It is in S14.1 format or in units of 0.5dBm0. This parameter defines the threshold level to which the HLC attenuates the signal in case the signal exceeds this level. This parameter must lie between -48 dBm0 and +3 dBm0 or in the range [-96,+6] in 0.5dBm0 units. Default value is 0.

Definition at line 1394 of file aer.h.

tint aerControl_s::ramp_out_tc_hlc

Bit 4: HLC ramp out time constant (ms/dB): In case the signal level goes below HLC threshold level, HLC attenuation should be gradually reduced, based on the setting of this parameter. It should be set in 10msec/dB steps between 10ms/dB and 1000ms/dB. Default value is 700.

Definition at line 1400 of file aer.h.

tint aerControl_s::power_tc_hlc

Bit 5: HLC power measurement time constant(ms): Estimates of signal power is exponentially averaged using a low pass power measurement time constant. The allowed values are [1, 2, 3], corresponding to 4ms, 8ms or 16ms respectively. Default is 1.

Definition at line 1406 of file aer.h.

Fract aerControl_s::thresh_rx_nld

Bit 6: AER Rx nonlinear detection threshold: This is the signal level threshold to detect non-linear distortion in the receive path. This parameter warns the AER that non-linear breakdown may occur when the digital signal level driving the hands-free speaker exceeds a certain fixed level. The determination of whether the threshold is exceeded takes place downstream of the AER receive path digital gain, aer_rx_dg. This parameter helps attain the best degree of full duplex performance when the HF speaker is driven below a fixed threshold, and helps AER avoid leaking echo due to a non-linear breakdown that occurs when the handsfree speaker is driven above a the fixed threshold.

By setting this parameter to a value below 0x8000, there is an added benefit of detecting flat-top saturation in the receive path data (which may suddenly change the spectral content and cause AER performance degradation). Therefore, we do not reset this parameter for every different value of the handsfree speaker analog gain (speaker volume).

This parameter is specified in the range [0x0000 - 0x8000]. Default value is 32000.

  • When threshold is in [0x0000,0x7FFF], it corresponds to signal power of (10*log10(rx_linear_thresh/2^15) + 3) dBm0.
  • When threshold is 0x8000, the Rx saturation detector is disabled.

Remarks:
This parameter is valid only for the hands-free phone mode.

Definition at line 1411 of file aer.h.

LFract aerControl_s::thresh_rx_noise

Bit 7: Rx Minimum Noise Power Threshold: Long integer value in S0.31 with range [0, 2^31]. Expected range is [335, 65535], corresponding to a range of -60dBm0 to -37.1dBm0 approximately. Default value = 5380L (corresponding to -48 dBm0).

Conversion from the value of this parameter to dBm0 is: P_dBm0 = 10*log10(x/(2^23*80)) + 3,,where x is thresh_tx_noise.

Definition at line 1436 of file aer.h.

LFract aerControl_s::thresh_tx_noise

Bit 8: Tx Minimum Noise Power Threshold: Meaning and format same as thresh_rx_noise.

Definition at line 1444 of file aer.h.

tint aerControl_s::hangover_rx_to_tx

Bit 9: AER Rx to Tx switching hangover: The hangover to consider switching away from receive path dominace to send path dominace. It is specified in 5 msec steps. The range is [0, 50], corresponding to 0 msec to 250 msec switching hangover. Default value is 30 (150 msec).

Definition at line 1447 of file aer.h.

tint aerControl_s::hangover_tx_to_rx

Bit 10: AER Tx to Rx switching hangover: The hangover to consider switching away from send path dominace to receive path dominace. It is specified in 5 msec steps. The range is [0, 50], corresponding to 0 msec to 250 msec switching hangover. Default value is 10 (50msec).

Definition at line 1453 of file aer.h.

tint aerControl_s::tx_slim_mode

Bit 11: Signal limiter mode for Tx path: It may be 0, 1, 2, 3, 4, or 5 with 0 disabling the limiter and 1 being most aggressive. Default is 0 (disabled).

Remarks:
If this parameter is out of the valid range specified by [aer_SLIM_MODE_LOWER_LIMIT, aer_SLIM_MODE_UPPER_LIMIT], aerControl() will return an error.

Definition at line 1459 of file aer.h.

tint aerControl_s::rx_slim_mode

Bit 12: Signal limiter mode for Rx path: Same range as tx_slim_mode.

Definition at line 1467 of file aer.h.

tint aerControl_s::hangover_ng

Bit 13: Noise Guard hangover period (msec): Before actually starting to attenuate the noise signal, noise guard lets a certain hangover period (specified in msec) expire to make sure that what seems like near end noise isn't just a pause in speech. This hangover is a configurable parameter for AER noise guard. The default for hangover period is 1000msec and valid range is [1-2500]ms.

Definition at line 1470 of file aer.h.

tint aerControl_s::rampin_period_ng

Bit 14: Noise Guard ramp in period (msec): The hangover period is followed by a ramping in period (specified in msec) that controls how fast the noise guard ramps in. These two together determine the total duration for the noise guard action to take effect. The default ramping in period is 800msec. When near end speech is detected though, the noise-speech transition is instantaneous. Valid range for ramping in period is [1-2000]ms. Default value is 800msec.

Definition at line 1477 of file aer.h.

tint aerControl_s::noise_level_ng

Bit 15: Noise Guard Tx noise level (dBm0): The level of noise that needs to be sent to the far end so that it can break-in comfortably. If the noise guard detects the presence of near end speech, it should pass the signal across unaltered. If it, however, detects noise presence at the near end, it should attenuate the signal locally to get as close as possible to the configured send noise level. If the estimated noise level is at or below this level, the noise guard should not do anything. This parameter is specified in dBm0. The default is (-75) dBm0. The recommended range is (-50) to (-90) dBm0.

Definition at line 1485 of file aer.h.

tuint aerControl_s::valid_bitfield_4

Definition at line 1495 of file aer.h.

tint aerControl_s::dt_thresh

Double talk detection threshold: This parameter controls the threshold for double talk detection. The smaller this parameter is, the more easily the double talk will be detected, which means more duplex but potentially more echo leaks. The larger this parameter is, the less easily the double talk will be detected, which means less duplex but less echo leaks.

Typical range is [64,128] and the default is 96.

Definition at line 1500 of file aer.h.

tulong aerControl_s::clip_scale_curve

Clipper scaling curve: This parameter configures a curve to scale the clipper based on double talk detection. This 32-bit value contains 4 numbers, each of 8-bit, c1, c2, c3 and c4 from MSB to LSB. These 4 numbers determine the scaling curve and must be such that c1<c2<=c3<c4 and (c4-c1)<128. The scaling factor is 4 at c1, decreasing to 1 at c2, staying at 1 between c2 and c3, and then decreasing to 0 at c4. The larger these 4 numbers, the more aggressive the clipper is.

Default values are: c1=40, c2=64, c3=64, c4=128.

Definition at line 1509 of file aer.h.

tint aerControl_s::dt_hangover

Definition at line 1520 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerCreateConfig_s Struct Reference

  • Data Structures
  • Data Fields

aerCreateConfig_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

Configuration structure for aerCreate() This structure contains information to be shared by different AER instances. This structure is used by function aerCreate().

Definition at line 598 of file aer.h.

Data Fields

dbgInfo_t | debugInfo
void(* | eventOut )(void *handle, aerInfo_t *aer_info)
aerSrate_t max_sampling_rate
tuint | config_bitfield

Field Documentation

dbgInfo_t aerCreateConfig_s::debugInfo

Function pointer used for debugging. Type dbgInfo_t is defined in debug.h of util package: typedef void (*dbgInfo_t)(void *, tuint, tuint, tuint, tuint*). When AER calls this function, it passes the following information through function arguments (from left to right):

  • void * handle: AER instance handle provided in aerNewConfig_s;
  • tuint dbgMsg : debugging message, either dbg_WARNING or dbg_TRACE_INFO, defined in util\debug.h.
  • tuint dbgCode: debugging code.
    • warning code when dbgMsg is dbg_WARNING. See AER Warning Messages.
    • data tracing code when dbgMsg is dbg_TRACE_INFO. Currently, AER doesn't have data tracing.
  • tuint dbgSize: size of AER tracing data per call.
  • tuint *dbgData: location where AER tracing data is stored.

Definition at line 599 of file aer.h.

void(* aerCreateConfig_s::eventOut)(void *handle, aerInfo_t *aer_info)

Function pointer to relay internal AER information to other ECOs.

aerSrate_t aerCreateConfig_s::max_sampling_rate

Maximum sampling rate of the system: 8kHz: set to aer_SRATE_8K. 16kHz: set to aer_SRATE_16K.

Definition at line 617 of file aer.h.

tuint aerCreateConfig_s::config_bitfield

Bitfield constructed by aer_CRT_XYZ. see AER Create Bitfield Masks

Definition at line 620 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerDebugStat_s Struct Reference

  • Data Structures
  • Data Fields

aerDebugStat_s Struct Reference
[AER Data Structures]

#include <aer.h>

Collaboration diagram for aerDebugStat_s:

[legend]

Detailed Description

AER debug information data structure. This structure contains debug information regarding AER operation. It is one of the arguments of function aerGetPerformance().
Remarks:
In the comments, elements of this structure are numbered in units of the size of type tint.

Definition at line 1651 of file aer.h.

Data Fields

tuint | control_bitfield0
tuint | control_bitfield1
tint | coherence_state
tint | path_select_state
tint | nguard_state
tuint | flag_bitfield0
tuint | flag_bitfield1
tint | tail_length
tuint | state_bitfield
tint | max_canc_l2
tint | curr_canc_l2
tint | curr_echo_loss_l2
linSample | maxabs_error
linSample | maxabs_pred_echo
Fract | gain_tx_digital
Fract | gain_rx_digital
Fract | gain_tx_analog
Fract | gain_rx_analog
Fract | nlp_linear_atten
tint | nlp_max_closs_target
tint | nlp_clip_agg_l2
tint | clip_level
tint | hangover_rx2tx
tint | hangover_tx2rx
Fract | nguard_atten
Fract | hlc_gain
LFract | dt_thresh
LFract | rx_sig_pwr
LFract | rx_noise_pwr
LFract | tx_pNLP_total_pwr
LFract | tx_pNLP_sig_pwr
LFract | tx_pNLP_noise_pwr
aerEventStats_t event_stats
aerPiquaStats_t piqua_stats
LFract | clip_scale
LFract | dt_ratio
tint | dt_hangover
Fract | nlp_linear_atten_tx
Fract | nlp_linear_atten_rx

Field Documentation

tuint aerDebugStat_s::control_bitfield0

1 - current state of the control bitfield0. See AER Control Bitfield Masks.

Definition at line 1652 of file aer.h.

tuint aerDebugStat_s::control_bitfield1

2 - current state of the control bitfield1. See AER Control Bitfield Masks.

Definition at line 1654 of file aer.h.

tint aerDebugStat_s::coherence_state

3 - current state of coherence detector state machine:

  • 0: coherence detected
  • 1: looking for coherence event
  • 2: wait to start looking for coherence

Definition at line 1656 of file aer.h.

tint aerDebugStat_s::path_select_state

4 - current state of the path select state machine:

  • 0: send path active
  • 1: switching from send to receive
  • 2: receive path active
  • 3: switching from receive to send
  • 4: idle entered from send
  • 5: idle entered from receive
  • 6: switching to state 4 from state 5

Definition at line 1661 of file aer.h.

tint aerDebugStat_s::nguard_state

5 - current state of noise guard state machine

Definition at line 1670 of file aer.h.

tuint aerDebugStat_s::flag_bitfield0

6 - AER flags_bitfield[0]:

  • 0x0020: undergoing full reset
  • 0x0080: saturation of mic
  • 0x4000: inhibit updates of all state machines

Definition at line 1672 of file aer.h.

tuint aerDebugStat_s::flag_bitfield1

7 - AER flags_bitfield[1]:

  • 0x0001: bypass the noise guard
  • 0x0008: saturation of Tx equalizer
  • 0x0040: saturation of Tx input bandsplit filter
  • 0x0400: saturation of Rx sync output bandsplit filter

Definition at line 1677 of file aer.h.

tint aerDebugStat_s::tail_length

8 - tail length in units of sampling period

Definition at line 1684 of file aer.h.

tuint aerDebugStat_s::state_bitfield

9 - description of AER state machines:

  • 0x0004: Rx path nonlinear distortion present
  • 0x0020: Howling present
  • 0x0040: Double talk present

Definition at line 1685 of file aer.h.

tint aerDebugStat_s::max_canc_l2

10 - maximal ERLE record in 3 dB steps

Definition at line 1690 of file aer.h.

tint aerDebugStat_s::curr_canc_l2

11 - current frame's ERLE in 3 dB steps, ratio of send path signal power (exponentially averaged) before and after the cancellation.

Definition at line 1691 of file aer.h.

tint aerDebugStat_s::curr_echo_loss_l2

12 - ratio of send path power before and after the cancellation, in 3dB steps.

Definition at line 1695 of file aer.h.

linSample aerDebugStat_s::maxabs_error

13 - absolute value of max error sample

Definition at line 1697 of file aer.h.

linSample aerDebugStat_s::maxabs_pred_echo

14 - absolute value of max predicted echo sample

Definition at line 1698 of file aer.h.

Fract aerDebugStat_s::gain_tx_digital

15 - AER tx path digital gain in dB/16 steps

Definition at line 1700 of file aer.h.

Fract aerDebugStat_s::gain_rx_digital

16 - AER rx path digital gain in dB/16 steps

Definition at line 1701 of file aer.h.

Fract aerDebugStat_s::gain_tx_analog

17 - AER tx path analog gain in dB/16 steps

Definition at line 1702 of file aer.h.

Fract aerDebugStat_s::gain_rx_analog

18 - AER rx path analog gain in dB/16 steps

Definition at line 1703 of file aer.h.

Fract aerDebugStat_s::nlp_linear_atten

19 - S0.15 linear gain for current NLP attenuation

Definition at line 1704 of file aer.h.

tint aerDebugStat_s::nlp_max_closs_target

20 - S0.15 linear gain for NLP maximum attenuation

Definition at line 1706 of file aer.h.

tint aerDebugStat_s::nlp_clip_agg_l2

21 - clipper aggression

Definition at line 1708 of file aer.h.

tint aerDebugStat_s::clip_level

22 - current clipper level

Definition at line 1709 of file aer.h.

tint aerDebugStat_s::hangover_rx2tx

23 - current hangover count to decide making a switch from rx path active to tx path active

Definition at line 1710 of file aer.h.

tint aerDebugStat_s::hangover_tx2rx

24 - current hangover count to decide making a switch from tx path active to rx path active

Definition at line 1713 of file aer.h.

Fract aerDebugStat_s::nguard_atten

25 - Noise Guard attenuation in dB

Definition at line 1716 of file aer.h.

Fract aerDebugStat_s::hlc_gain

26 - HLC gain applied to signal in dB/2 steps

Definition at line 1717 of file aer.h.

LFract aerDebugStat_s::dt_thresh

27:28 - double talk detection threshold, equal to aerControl_s::dt_thresh*907

Definition at line 1718 of file aer.h.

LFract aerDebugStat_s::rx_sig_pwr

29:30 - current recive path frame power

Definition at line 1720 of file aer.h.

LFract aerDebugStat_s::rx_noise_pwr

31:32 - receive path background noise power

Definition at line 1721 of file aer.h.

LFract aerDebugStat_s::tx_pNLP_total_pwr

33:34 - pre NLP total power of Tx path signal

Definition at line 1722 of file aer.h.

LFract aerDebugStat_s::tx_pNLP_sig_pwr

35:36 - current send path pre NLP frame power

Definition at line 1723 of file aer.h.

LFract aerDebugStat_s::tx_pNLP_noise_pwr

37:38 - send path pre NLP background noise power

Definition at line 1724 of file aer.h.

aerEventStats_t aerDebugStat_s::event_stats

39:50 - AER event statistics

Definition at line 1726 of file aer.h.

aerPiquaStats_t aerDebugStat_s::piqua_stats

51:56 - PIQUA statistics

Definition at line 1727 of file aer.h.

LFract aerDebugStat_s::clip_scale

57:58 - clipper scaling curve configuration

Definition at line 1728 of file aer.h.

LFract aerDebugStat_s::dt_ratio

59:60 - double talk detection measurements

Definition at line 1729 of file aer.h.

tint aerDebugStat_s::dt_hangover

61 - double talk detection hangover time

Definition at line 1730 of file aer.h.

Fract aerDebugStat_s::nlp_linear_atten_tx

62 - S0.15 linear gain for current NLP attenuation in Tx path.

Definition at line 1731 of file aer.h.

Fract aerDebugStat_s::nlp_linear_atten_rx

63 - S0.15 linear gain for current NLP attenuation in Rx path.

Definition at line 1733 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerEQConfig_s Struct Reference

  • Data Structures
  • Data Fields

aerEQConfig_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER Bi-quad EQ configuration structure.This structure contains Bi-quad EQ configurations. It includes:
  • Total number of sections
  • Sections types.
    There are 4 different types of sections used in an EQ. Each type is encoded using 2 bits(aer_EQBQ_SECTION_TYPE_xx). A 16-bit bitmap is used to represent the types for all the sections in the EQ. The least significant 2 bits are used for the 1st section, the next 2 bits are used for the 2nd section and so on till bit 12&13 which are used for the last section. Bit 14 is used to indicate LP filter order. If 1, 2nd order LP filter is used. Otherwise, 1st order LP is used. Bit 15 is used to indicate HP filter order. If 1, 2nd order HP filter is used. Otherwise, 1st order HP is used.
  • Section parameters.
    Parameters are set in the order of sections. A LP or HP section has one parameter - alpha. A BP or BS section has three parameters and they are in the order of alpha, gamma and G. Implementation of LP/HP and BP/BS filters and the corresponding parameters are shown in the figure below. All section parameters are in Q15 format.

Definition at line 747 of file aer.h.

Data Fields

tint | num_sections
tuint | section_types
Fract | section_params [aer_EQBQ_MAX_NUM_SECTION_PARAMS]

Field Documentation

tint aerEQConfig_s::num_sections

Number of sections used in the EQBQ

Definition at line 748 of file aer.h.

tuint aerEQConfig_s::section_types

Type bitmap consists all the section types (as defined by aer_EQBQ_SECTION_TYPE_XX) in an EQ. Bit 0-1: 1st section type Bit 2-3: 2nd section type … Bit 12-13: 7th section type Bit 14: if 1, 2nd order LP is used Bit 15: if 1, 2nd order HP is used Note: Bits are arranged in the order of sections.

Definition at line 751 of file aer.h.

Fract aerEQConfig_s::section_params[aer_EQBQ_MAX_NUM_SECTION_PARAMS]

Section Parameters arranged in the order of sections.

Definition at line 768 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerEventStats_s Struct Reference

  • Data Structures
  • Data Fields

aerEventStats_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER Statistics Structure. This structure contains statistical counters to monitor the occurrance of particular events in AER.

Definition at line 1566 of file aer.h.

Data Fields

tint | num_reset_events
tint | num_howl_events
tint | num_coh_events
tint | num_sat_events
tint | num_rxgain_events
tint | num_txgain_events
tint | num_filter_updates
tint | num_dt_potential
tint | num_eqsat_events
tint | num_dt_detected
tint | num_bssat_events
tint | num_coh_potential

Field Documentation

tint aerEventStats_s::num_reset_events

39 - # of resets or aggressive startup occurences

Definition at line 1568 of file aer.h.

tint aerEventStats_s::num_howl_events

40 - # of times howling detected, stored at lower 8 bits

Definition at line 1569 of file aer.h.

tint aerEventStats_s::num_coh_events

41 - # of times rx & error signal coherence detected, stored at lower 8 bits

Definition at line 1571 of file aer.h.

tint aerEventStats_s::num_sat_events

42 - # of Tx saturations that AGC reported to AER

Definition at line 1573 of file aer.h.

tint aerEventStats_s::num_rxgain_events

43 - # of Rx AIC gain changes AGC reported to AER

Definition at line 1574 of file aer.h.

tint aerEventStats_s::num_txgain_events

44 - # of Tx AIC gain changes AGC reported to AER

Definition at line 1575 of file aer.h.

tint aerEventStats_s::num_filter_updates

45 - # of filter updates since startup <= FRCT_MAX

Definition at line 1576 of file aer.h.

tint aerEventStats_s::num_dt_potential

46 - # of times double talk is potential

Definition at line 1577 of file aer.h.

tint aerEventStats_s::num_eqsat_events

47 - # of times saturation occurs in equalizers:

  • upper 8 bits: Tx Eq saturation events
  • lower 8 bits: Rx Eq saturation events

Definition at line 1578 of file aer.h.

tint aerEventStats_s::num_dt_detected

48 - # of times double talk is detected

Definition at line 1581 of file aer.h.

tint aerEventStats_s::num_bssat_events

49 - # of times saturation occurs in band split:

  • upper 8 bits: Tx in saturation events
  • lower 8 bits: Rx sync saturation events

Definition at line 1582 of file aer.h.

tint aerEventStats_s::num_coh_potential

50 - # of times coherence is potential

Definition at line 1585 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerInfo_s Struct Reference

  • Data Structures
  • Data Fields

aerInfo_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER information reporting structure This strucutre contains the parameters that AER needs to report to an outside ECO through eventOut() function provided by aerCreateConfig_s.

Definition at line 574 of file aer.h.

Data Fields

tbool | active_path
tbool | nlp_on
tint | max_canc_l2
tint | rx_to_tx_hangover
tint | tx_to_rx_hangover
tint | switch2tx_period
tint | switch2rx_period
Fract | maxabs_pred_echo
LFract | pred_echo_pwr
LFract | tx_mic_pwr
LFract | tx_mic_pwr_minus_echo

Field Documentation

tbool aerInfo_s::active_path

Enabled path. send: TRUE, receive: FALSE

Definition at line 575 of file aer.h.

tbool aerInfo_s::nlp_on

nlp_on = TRUE, NLP is enabled

Definition at line 576 of file aer.h.

tint aerInfo_s::max_canc_l2

Maximal ERLE (Echo Return Loss Enhancement)

Definition at line 577 of file aer.h.

tint aerInfo_s::rx_to_tx_hangover

Current hangover count to decide making a switch from receive path

Definition at line 578 of file aer.h.

tint aerInfo_s::tx_to_rx_hangover

Current hangover count to decide making a switch from send path

Definition at line 580 of file aer.h.

tint aerInfo_s::switch2tx_period

Indicates receive to send NLP path change

Definition at line 582 of file aer.h.

tint aerInfo_s::switch2rx_period

Indicates send to receive NLP path change

Definition at line 583 of file aer.h.

Fract aerInfo_s::maxabs_pred_echo

Max absolute predicted echo over a frame

Definition at line 584 of file aer.h.

LFract aerInfo_s::pred_echo_pwr

Predicted echo power

Definition at line 585 of file aer.h.

LFract aerInfo_s::tx_mic_pwr

Send frame power including echo

Definition at line 586 of file aer.h.

LFract aerInfo_s::tx_mic_pwr_minus_echo

Send frame power after echo subtraction

Definition at line 587 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerModeControl_s Struct Reference

  • Data Structures
  • Data Fields

aerModeControl_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER mode control structure. This structure is used to change AER operational modes through function aerControl() using control code aer_CTL_MODES_0 or aer_CTL_MODES_1. For example, to enable AER, enable update, and disable NLP would need to set the mask and value to:.

    mask = aer_CTL0_ENABLE_ECHO_CANCELLER | aer_CTL0_ENABLE_UPDATE
            | aer_CTL0_ENABLE_NLP;
    value = aer_CTL0_ENABLE_ECHO_CANCELLER | aer_CTL0_ENABLE_UPDATE;

Definition at line 787 of file aer.h.

Data Fields

tuint | mask
tuint | value

Field Documentation

tuint aerModeControl_s::mask

tells which bits are to be changed.

Definition at line 788 of file aer.h.

tuint aerModeControl_s::value

tells new value of each bit indicated by mask. aer_CTL0_XYZ and aer_CTL1_XYZ can be used to construct mask and value.

Definition at line 789 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerNewConfig_s Struct Reference

  • Data Structures
  • Data Fields

aerNewConfig_s Struct Reference
[AER Data Structures]

#include <aer.h>

Collaboration diagram for aerNewConfig_s:

[legend]

Detailed Description

Configuration structure for aerNew() This structure is used for creating a new AER instance through function aerNew().

Definition at line 651 of file aer.h.

Data Fields

void * handle
aerSizeConfig_t sizeCfg

Field Documentation

void* aerNewConfig_s::handle

handle

Definition at line 652 of file aer.h.

aerSizeConfig_t aerNewConfig_s::sizeCfg

size configration

Definition at line 653 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerPiquaStats_s Struct Reference

  • Data Structures
  • Data Fields

aerPiquaStats_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER PIQUA Statistics Structure. This structure contains measurements necessary for PIQUA performance monitoring.

Definition at line 1595 of file aer.h.

Data Fields

Fract | far_end_pow
Fract | near_end_pow
Fract | echo_removal_err_pow
Fract | near_end_noise
Fract | erl
tint | erle

Field Documentation

Fract aerPiquaStats_s::far_end_pow

51 - Far end power (dBm) in S11.4

Definition at line 1596 of file aer.h.

Fract aerPiquaStats_s::near_end_pow

52 - Near end power (dBm) in S11.4

Definition at line 1597 of file aer.h.

Fract aerPiquaStats_s::echo_removal_err_pow

53 - Residual echo power (dBm) in S11.4

Definition at line 1598 of file aer.h.

Fract aerPiquaStats_s::near_end_noise

54 - Near end noise power (dBm) in S11.4

Definition at line 1599 of file aer.h.

Fract aerPiquaStats_s::erl

55 - Echo return loss (dB) in S11.4

Definition at line 1600 of file aer.h.

tint aerPiquaStats_s::erle

56 - Echo return loss enhancement by AEC

Definition at line 1601 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerSizeConfig_s Struct Reference

  • Data Structures
  • Data Fields

aerSizeConfig_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

Configuration structure for aerGetSizes() This structure specifies the maximum filter length and maximum y to x delay. It also has a bitfield, which currently has only one bit to indicate whether FDNLP is requested. It is used by function aerGetSizes(). It is also part of structure aerNewConfig_s used by aerNew().

Definition at line 634 of file aer.h.

Data Fields

tint | max_tail_length
tint | max_y2x_delay
tuint | config_bitfield

Field Documentation

tint aerSizeConfig_s::max_tail_length

Maximum supported tail length in units of 125usec, and must be an integral multiple of 20 msec (i.e, 160*125usec).

Definition at line 635 of file aer.h.

tint aerSizeConfig_s::max_y2x_delay

Maximum system delay between receive and send frame data, # of 125 micro seconds.

Definition at line 638 of file aer.h.

tuint aerSizeConfig_s::config_bitfield

Bitfield constructed by aer_SIZE_XYZ. See AER GetSize Configuration Bitfield Masks.

Definition at line 640 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerTailModel_s Struct Reference

  • Data Structures
  • Data Fields

aerTailModel_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER tail model save/load structure. This structure is used for saving or loading AER adaptive tail model, which are defined by:
  • the adaptive filter coefficients, mantissas and exponents,
  • number of active tail model segments (or H vectors),
  • length of tail model in units of sampling period, e.g. 125us for 8kHz and 62.5us for 16kHz.
  • the speaker and microphone analog gains.

All information above can be retrieved from AER by API aerGetFilter() or loaded to AER through aerPutFilter(). The filter coefficients are stored in two buffers, one for mantissa and the other for exponents. The rest of the tail model information are stored in aerTailModel_t.

Definition at line 1622 of file aer.h.

Data Fields

tint | num_H_vec
tint | tail_length
Fract | rx_ag
Fract | tx_ag

Field Documentation

tint aerTailModel_s::num_H_vec

number of active H vectors, each vector has aer_NUM_WORDS_PER_H_VEC words of coefficients.

Definition at line 1623 of file aer.h.

tint aerTailModel_s::tail_length

tail length, in units of sampling period.

Definition at line 1625 of file aer.h.

Fract aerTailModel_s::rx_ag

speaker analog gain, see aerControl_s::gain_rx_analog.

Definition at line 1626 of file aer.h.

Fract aerTailModel_s::tx_ag

microphone analog gain, see aerControl_s::gain_tx_analog.

Definition at line 1629 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerTraceConfig_s Struct Reference

  • Data Structures
  • Data Fields

aerTraceConfig_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER tracing configuration structure. This structure is used to configure AER tracing options and obtain from AER the size of traced data based on the configuration. The control valid bit for configuring trace is aer_CTL_VALID2_TRACE_CONFIG.

Remarks:
  • Tracing is off by default.
  • Tracing is not changed by AER reset or re-opening of an instance, i.e. if tracing is on, it will still be on after reset or re-opening, and same for tracing off.
  • If tracing is turned on, AER instance will always be traced out by default, regardless of trace configuration, and will be written to both Tx and Rx tracing buffers.
  • If tracing is turned on but no buffer is provided to aerReceiveIn() or aerSendIn(), no data will be written out.

Definition at line 814 of file aer.h.

Data Fields

tuint | trace_bitfield
tsize | get_size_rx
tsize | get_size_tx

Field Documentation

tuint aerTraceConfig_s::trace_bitfield

Bitfield to configure AER tracing options. See AER Trace Config Bitfield Masks for bit masks.

Definition at line 815 of file aer.h.

tsize aerTraceConfig_s::get_size_rx

Return value by aerControl() - size of Rx traced data in units of twords based on trace_bitfield. Refer to types.h for definition of twords. See AER Trace Maximum Sizes for maximum sizes.

Definition at line 817 of file aer.h.

tsize aerTraceConfig_s::get_size_tx

Return value by aerControl() - size of Tx traced data in units of twords based on trace_bitfield.

Definition at line 821 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: aerVersion_s Struct Reference

  • Data Structures
  • Data Fields

aerVersion_s Struct Reference
[AER Data Structures]

#include <aer.h>

Detailed Description

AER version structure This structure contains the version information of the AER software.

Definition at line 1743 of file aer.h.

Data Fields

tuint | major
tuint | minor
tuint | patch
tuint | build
tuint | quality
tuint | btype

Field Documentation

tuint aerVersion_s::major

Identifies major departure from the previous release in terms of algorithms, external API, and/or features.

Definition at line 1744 of file aer.h.

tuint aerVersion_s::minor

Identifies any new feature added, bug fixes, improvements to the algorithm as well as MIPS/memory optimizations.

Definition at line 1746 of file aer.h.

tuint aerVersion_s::patch

Identifies all situations other than above when source code would change.

Definition at line 1748 of file aer.h.

tuint aerVersion_s::build

Identifies different build number with same major, minor and patch numbers.

Definition at line 1750 of file aer.h.

tuint aerVersion_s::quality

Identifies release quality:

  • 0(prealpha): Under development. Cannot be delivered to customers. (default)
  • 1(alpha): Substantial features included. Not fully tested.
  • 2(beta): All features included. Not fully tested.
  • 3(empty): General availability (GA). All features included and fully tested.

Definition at line 1752 of file aer.h.

tuint aerVersion_s::btype

Identifies build type:

  • 0(empty): Regular build as described by the QUALITY field. (default)

1(eng): Engineering build provided prior to moving to next quality stage. Not fully tested.

  • 2(dbg): Debug build provided prior to moving to next quality stage. Not fully tested. May contain temporary code and traces that will be removed in the next regular or engineering build.

Definition at line 1760 of file aer.h.

The documentation for this struct was generated from the following file:
  • aer.h


AER: agcAerData_s Struct Reference

  • Data Structures
  • Data Fields

agcAerData_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

Data structure to hold AER parameters needed by AGC. These parameters are provided by the user through agcControl() via control valid bit agc_CTL_VALID_AERDATA.

Remarks:
These information must be provided to AGC every frame for AGC's adaptive operation.

Definition at line 384 of file agc.h.

Data Fields

LFract | pecho_pwr
LFract | Si_with_echo
LFract | Si_minus_echo
Fract | maxabs_pecho
tbool | nlp_on
tint | log2_attn
tint | SWR
tint | SWS
tbool | TS
tint | XS
tint | XR

Field Documentation

LFract agcAerData_s::pecho_pwr

send frame pwr predicted echo only

Definition at line 385 of file agc.h.

LFract agcAerData_s::Si_with_echo

send frame pwr including echo

Definition at line 386 of file agc.h.

LFract agcAerData_s::Si_minus_echo

send frame pwr after echo sub

Definition at line 387 of file agc.h.

Fract agcAerData_s::maxabs_pecho

maximum absolute predicted echo

Definition at line 388 of file agc.h.

tbool agcAerData_s::nlp_on

nlp_on = TRUE, NLP is enabled

Definition at line 389 of file agc.h.

tint agcAerData_s::log2_attn

maximal ERLE record

Definition at line 390 of file agc.h.

tint agcAerData_s::SWR

Switch from Recv Path AER NLP hang

Definition at line 391 of file agc.h.

tint agcAerData_s::SWS

Switch from Send Path AER NLP hang

Definition at line 392 of file agc.h.

tbool agcAerData_s::TS

Enabled path. TS = TRUE - Send Path = FALSE - Receive Path

Definition at line 393 of file agc.h.

tint agcAerData_s::XS

path switchover to send from recv

Definition at line 395 of file agc.h.

tint agcAerData_s::XR

path switchover to recv from send

Definition at line 396 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcCallTable_t Struct Reference

  • Data Structures
  • Data Fields

agcCallTable_t Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC call table.

Definition at line 762 of file agc.h.

Data Fields

tint(* | agcCreate )(agcCreateConfig_t *create_cfg)
tint(* | agcGetSizes )(tint *nbufs, const ecomemBuffer_t **bufs, agcSizeConfig_t *cfg)
tint(* | agcNew )(void **agcInst, tint nbufs, ecomemBuffer_t *bufs, agcNewConfig_t *cfg)
tint(* | agcOpen )(void *agcInst, agcConfig_t *cfg)
tint(* | agcSendIn )(void *agcInst, void *send_in)
tint(* | agcControl )(void *agcInst, agcControl_t *ctl)
tint(* | agcClose )(void *agcInst)
tint(* | agcDelete )(void **agcInst, tint nbufs, ecomemBuffer_t *bufs)
tint(* | agcGetPerformance )(void *agcInst, agcDebugStat_t *dbgstat, agcVersion_t *version, tbool reset)

Field Documentation

tint(* agcCallTable_t::agcCreate)(agcCreateConfig_t *create_cfg)

tint(* agcCallTable_t::agcGetSizes)(tint *nbufs, const ecomemBuffer_t **bufs, agcSizeConfig_t *cfg)

tint(* agcCallTable_t::agcNew)(void **agcInst, tint nbufs, ecomemBuffer_t *bufs, agcNewConfig_t *cfg)

tint(* agcCallTable_t::agcOpen)(void *agcInst, agcConfig_t *cfg)

tint(* agcCallTable_t::agcSendIn)(void *agcInst, void *send_in)

tint(* agcCallTable_t::agcControl)(void *agcInst, agcControl_t *ctl)

tint(* agcCallTable_t::agcClose)(void *agcInst)

tint(* agcCallTable_t::agcDelete)(void **agcInst, tint nbufs, ecomemBuffer_t *bufs)

tint(* agcCallTable_t::agcGetPerformance)(void *agcInst, agcDebugStat_t *dbgstat, agcVersion_t *version, tbool reset)

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcConfig_s Struct Reference

  • Data Structures
  • Data Fields

agcConfig_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC configuration structure. It contains parameters needed to open an instance of AGC, and is used by function agcOpen().

Definition at line 309 of file agc.h.

Data Fields

tuint | reset_bitfield
tuint | valid_bitfield
agcSrate_t sampling_rate

Field Documentation

tuint agcConfig_s::reset_bitfield

Used to reset certain information specified by AGC Reset Bitfield Masks.

Remarks:
This bitfield is ignored when agcOpen() is called the first time after agcNew() is called.

Definition at line 310 of file agc.h.

tuint agcConfig_s::valid_bitfield

Used to indicate which of the system parameters in agcConfig_t are valid and may be read by agcOpen(). See AGC Configuration Valid Bitfield Masks.

Remarks:
It must be set to all 1's (agc_CFG_VALID_BITS_ALL_1) to configure the system parameters when agcOpen() is called the first time after agcNew() is called.

Definition at line 316 of file agc.h.

agcSrate_t agcConfig_s::sampling_rate

sampling rate.

Definition at line 324 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcControl_s Struct Reference

  • Data Structures
  • Data Fields

agcControl_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Collaboration diagram for agcControl_s:

[legend]

Detailed Description

AGC control data structure. It contains information to change operation of AGC through functin agcControl().

Remarks:
Bits agc_CTL_VALID_MICGAIN and agc_CTL_VALID_MICGAIN_ADAPT should not be set at the same time. Otherwise, bit agc_CTL_VALID_MICGAIN_ADAPT will be ignored and agcControl() will take actions based on bit agc_CTL_VALID_MICGAIN, and error code agc_ERR_MIC_GAIN_DUPLICATE will be returned by agcControl().

Definition at line 426 of file agc.h.

Data Fields

tuint | valid_bitfield
Fract | mic_gain
tbool | preNLP_enable
Fract | preNLP_gain
Fract | spk_gain
agcAerData_t aer_data
agcModeControl_t modes
tint | sat_threshold
tint | sat_hangover
Fract | max_micgain
Fract | min_micgain
Fract | max_micgain_swing

Field Documentation

tuint agcControl_s::valid_bitfield

Definition at line 427 of file agc.h.

Fract agcControl_s::mic_gain

New mic analog gain (S11.4 dB) provided by user (default is 0dB). Corresponds to agc_CTL_VALID_MICGAIN when this gain change is initiated by the user, or corresponds to agc_CTL_VALID_MICGAIN_ADAPT when this gain change is initiated by the adaptive AGC.

Definition at line 469 of file agc.h.

tbool agcControl_s::preNLP_enable

Flag indicating whether to change the AER Tx digital gain, returned by agcControl(), when bit agc_CTL_VALID_MICGAIN_ADAPT is set.

Definition at line 475 of file agc.h.

Fract agcControl_s::preNLP_gain

AER Tx digital gain (S11.4 dB), both input and output of agcControl() corresponds to agc_CTL_VALID_MICGAIN_ADAPT is set. As input, it is the current AER Tx digital gain (or pre-NLP gain) provided by the user. As output when agcControl() returns, it holds the new Tx digital gain requested by adaptive AGC. The users needs to set the AER Tx digital gain afterward accordingly.

Definition at line 478 of file agc.h.

Fract agcControl_s::spk_gain

New speaker analog gain (S11.4 dB) provided by user (default is 0dB). Corresponds to agc_CTL_VALID_SPKGAIN.

Definition at line 487 of file agc.h.

agcAerData_t agcControl_s::aer_data

AER data provided by the user. Corresponds to agc_CTL_VALID_AERDATA.

Definition at line 490 of file agc.h.

agcModeControl_t agcControl_s::modes

AGC operational modes. Corresponds to agc_CTL_VALID_MODES.

Definition at line 492 of file agc.h.

tint agcControl_s::sat_threshold

ADC saturation threshold provided by the user (default is 32000). Corresponds to agc_CTL_VALID_SAT_THRESHOLD.

Definition at line 494 of file agc.h.

tint agcControl_s::sat_hangover

Saturation hangover in msec provided by the user (default is 20msec). Corresponds to agc_CTL_VALID_SAT_HANGOVER.

Definition at line 497 of file agc.h.

Fract agcControl_s::max_micgain

Maximum microphone analog gain in S11.4 dB provided by the user (default is 864, i.e. 54dB). Adaptive AGC will not request new mic gain above this limit. Corresponds to agc_CTL_VALID_MIC_GAIN_MAX.

Definition at line 500 of file agc.h.

Fract agcControl_s::min_micgain

Minimum microphone analog gain in S11.4 dB provided by the user (default is 0). Adaptive AGC will not request new mic gain below this limit. Corresponds to agc_CTL_VALID_MIC_GAIN_MIN.

Definition at line 505 of file agc.h.

Fract agcControl_s::max_micgain_swing

Maximum gain swing from reference gain which can be introduced by adaptive AGC. It is in S11.4 dB with default 384 (24dB). Corresponds to agc_CTL_VALID_MICGAIN_SWING_MAX. When adaptive AGC tries to change the mic gain, it will not make the absolute gain change from the reference gain larger than this parameter. The reference gain is the last analog mic gain set by the user through bit agc_CTL_VALID_MICGAIN.

Definition at line 510 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcCreateConfig_s Struct Reference

  • Data Structures
  • Data Fields

agcCreateConfig_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC create configuration structure which contains information to be shared by multiple AGC instances. It is used by function agcCreate().

Remarks:
Type debugInfo_t is defined in debug.h of util package.

Definition at line 272 of file agc.h.

Data Fields

dbgInfo_t | debugInfo
void(* | eventOut )(void *handle, agcEvent_t *event)
agcSrate_t max_sampling_rate
tuint | config_bitfield

Field Documentation

dbgInfo_t agcCreateConfig_s::debugInfo

Debug/exception function

Definition at line 273 of file agc.h.

void(* agcCreateConfig_s::eventOut)(void *handle, agcEvent_t *event)

pointer to event out function

agcSrate_t agcCreateConfig_s::max_sampling_rate

maximum sampling rate

Definition at line 276 of file agc.h.

tuint agcCreateConfig_s::config_bitfield

bitfield constructed by AGC Create Bitfield Masks.

Definition at line 277 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcDebugStat_s Struct Reference

  • Data Structures
  • Data Fields

agcDebugStat_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC debug statistics data structure.

Definition at line 351 of file agc.h.

Data Fields

tuint | control_bitfield
tuint | flag_bitfield
tint | sat_threshold
tint | sat_hangover
tuint | sat_cntr
tint | echo_clip_penalty
tint | ne_clip_cntr
tint | lo_dynamic_range_cntr
Fract | echo_max_0
Fract | echo_max_1
Fract | echo_max_2
Fract | echo_max_3
Fract | ne_max_0
Fract | ne_max_1
Fract | ne_max_2
Fract | ne_max_3
tint | glim_reach_cntr

Field Documentation

tuint agcDebugStat_s::control_bitfield

control bitfield reflecting agc_CTL_XYZ

Definition at line 352 of file agc.h.

tuint agcDebugStat_s::flag_bitfield

flag bitfield showing AGC states

Definition at line 353 of file agc.h.

tint agcDebugStat_s::sat_threshold

saturation threshold Q0

Definition at line 354 of file agc.h.

tint agcDebugStat_s::sat_hangover

saturation hangover in msec

Definition at line 355 of file agc.h.

tuint agcDebugStat_s::sat_cntr

saturation counter

Definition at line 356 of file agc.h.

tint agcDebugStat_s::echo_clip_penalty

current value of saturation penalty cntr

Definition at line 357 of file agc.h.

tint agcDebugStat_s::ne_clip_cntr

# frames mic has saturated to high NE sig

Definition at line 358 of file agc.h.

tint agcDebugStat_s::lo_dynamic_range_cntr

mic low dynamic range counter in of frames

Definition at line 359 of file agc.h.

Fract agcDebugStat_s::echo_max_0

echo signal max. abs value: 0th level

Definition at line 360 of file agc.h.

Fract agcDebugStat_s::echo_max_1

echo signal max. abs value: 1st level

Definition at line 361 of file agc.h.

Fract agcDebugStat_s::echo_max_2

echo signal max. abs value: 2nd level

Definition at line 362 of file agc.h.

Fract agcDebugStat_s::echo_max_3

echo signal max. abs value: 3rd level

Definition at line 363 of file agc.h.

Fract agcDebugStat_s::ne_max_0

near-end signal max. abs value: 0th level

Definition at line 364 of file agc.h.

Fract agcDebugStat_s::ne_max_1

near-end signal max. abs value: 1st level

Definition at line 365 of file agc.h.

Fract agcDebugStat_s::ne_max_2

near-end signal max. abs value: 2nd level

Definition at line 366 of file agc.h.

Fract agcDebugStat_s::ne_max_3

near-end signal max. abs value: 3rd level

Definition at line 367 of file agc.h.

tint agcDebugStat_s::glim_reach_cntr

counts how many times adaptive AGC reaches gain limits: max/min mic gain, min pre-NLP gain, or max gain swing.

Definition at line 368 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcEvent_s Struct Reference

  • Data Structures
  • Data Fields

agcEvent_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC event structure. It contains the event code and the associated parameters to be read or set by AGC eventOut function. It is one argument of AGC eventOut function passed to AGC by the user through agcCreateConfig_t and agcCreate().

Remarks:
Usage of parameters depend on each of AGC Event Codes :
  • agc_EVC_SAT_FALSE : no parameter is needed.
  • agc_EVC_SAT_DETECTED : no parameter is needed.
  • agc_EVC_MGAIN_CHANGE : analog_gain has the new gain value requested by adaptive AGC.
  • agc_EVC_SGAIN_CHANGE : not used by AGC event out function.
  • agc_EVC_GET_PRENLP_GAIN : event out function should return AER's pre-NLP (or AER Tx digital) gain in pNLPgain.
  • agc_EVC_SET_PRENLP_GAIN : not used by AGC eventOut function.

Refer to agcSendIn() for adaptive operation of AGC.

Definition at line 255 of file agc.h.

Data Fields

tint event_code
union {
Fract analog_gain
Fract pNLPgain
} u

Field Documentation

tint agcEvent_s::event_code

< AGC->SIU gain change report data see enum agc_EVC_XYZ

Definition at line 256 of file agc.h.

Fract agcEvent_s::analog_gain

speaker/mic gain in dB, S11.4 format

Definition at line 258 of file agc.h.

Fract agcEvent_s::pNLPgain

pre-NLP gain in dB, S11.4 format

Definition at line 259 of file agc.h.

union { ... } agcEvent_s::u

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcModeControl_s Struct Reference

  • Data Structures
  • Data Fields

agcModeControl_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC operation modes control structure. Contains parameters needed to change AGC operational modes through function agcControl() via control valid bit agc_CTL_VALID_MODES.

Definition at line 407 of file agc.h.

Data Fields

tuint | mask
tuint | value

Field Documentation

tuint agcModeControl_s::mask

mask tells which bits are to be changed.

Definition at line 408 of file agc.h.

tuint agcModeControl_s::value

value gives the new value of each bit to be changed. AGC Control Bitfield Masks can be used to construct mask and value.

Definition at line 409 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcNewConfig_s Struct Reference

  • Data Structures
  • Data Fields

agcNewConfig_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Collaboration diagram for agcNewConfig_s:

[legend]

Detailed Description

AGC configuration structure for creating a new AGC instance. It is used by function agcNew().

Definition at line 297 of file agc.h.

Data Fields

void * handle
agcSizeConfig_t sizeCfg

Field Documentation

void* agcNewConfig_s::handle

handle

Definition at line 298 of file agc.h.

agcSizeConfig_t agcNewConfig_s::sizeCfg

buffer sizes info

Definition at line 299 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcSizeConfig_s Struct Reference

  • Data Structures
  • Data Fields

agcSizeConfig_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC size configuration structure used by function agcGetSizes(). It is also part of structure agcNewConfig_t.

Definition at line 287 of file agc.h.

Data Fields

tuint config_bitfield

Field Documentation

tuint agcSizeConfig_s::config_bitfield

configuration bitfield - currently unused

Definition at line 288 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: agcVersion_s Struct Reference

  • Data Structures
  • Data Fields

agcVersion_s Struct Reference
[AGC Data Structures]

#include <agc.h>

Detailed Description

AGC Version structure.

Remarks:
AGC doesn't have its own version number. It uses AER's version number defined in aerVersion_s of aer.h.

Definition at line 336 of file agc.h.

Data Fields

tuint | major
tuint | minor
tuint | patch
tuint | build
tuint | quality
tuint | btype

Field Documentation

tuint agcVersion_s::major

Definition at line 337 of file agc.h.

tuint agcVersion_s::minor

Definition at line 338 of file agc.h.

tuint agcVersion_s::patch

Definition at line 339 of file agc.h.

tuint agcVersion_s::build

Definition at line 340 of file agc.h.

tuint agcVersion_s::quality

Definition at line 341 of file agc.h.

tuint agcVersion_s::btype

Definition at line 342 of file agc.h.

The documentation for this struct was generated from the following file:
  • agc.h


AER: bfCallTable_t Struct Reference

  • Data Structures
  • Data Fields

bfCallTable_t Struct Reference
[BF Data Structures]

#include <bf.h>

Detailed Description

BF call table.

Definition at line 582 of file bf.h.

Data Fields

tint(* | bfClose )(void *bfInst)
tint(* | bfControl )(void *bfInst, bfControl_t *ctl)
tint(* | bfDelete )(void **bfInst, tint nbufs, ecomemBuffer_t *bufs)
tint(* | bfGetSizes )(tint *nbufs, const ecomemBuffer_t **bufs, bfSizeConfig_t *cfg)
tint(* | bfNew )(void **bfInst, tint nbufs, ecomemBuffer_t *bufs, bfNewConfig_t *cfg)
tint(* | bfOpen )(void *bfInst, bfConfig_t *cfg)
tint(* | bfPutFilter )(void *bfInst, Fract *coeff, tint filter_type, tint mic_index, tint filter_length)
tint(* | bfGetFilter )(void *bfInst, Fract *coeff, tint *filter_length, tint filter_type, tint mic_index)
tint(* | bfProcess )(void *bfInst, void *mics_in[], void *out)

Field Documentation

tint(* bfCallTable_t::bfClose)(void *bfInst)

tint(* bfCallTable_t::bfControl)(void *bfInst, bfControl_t *ctl)

tint(* bfCallTable_t::bfDelete)(void **bfInst, tint nbufs, ecomemBuffer_t *bufs)

tint(* bfCallTable_t::bfGetSizes)(tint *nbufs, const ecomemBuffer_t **bufs, bfSizeConfig_t *cfg)

tint(* bfCallTable_t::bfNew)(void **bfInst, tint nbufs, ecomemBuffer_t *bufs, bfNewConfig_t *cfg)

tint(* bfCallTable_t::bfOpen)(void *bfInst, bfConfig_t *cfg)

tint(* bfCallTable_t::bfPutFilter)(void *bfInst, Fract *coeff, tint filter_type, tint mic_index, tint filter_length)

tint(* bfCallTable_t::bfGetFilter)(void *bfInst, Fract *coeff, tint *filter_length, tint filter_type, tint mic_index)

tint(* bfCallTable_t::bfProcess)(void *bfInst, void *mics_in[], void *out)

The documentation for this struct was generated from the following file:
  • bf.h


AER: bfConfig_s Struct Reference

  • Data Structures
  • Data Fields

bfConfig_s Struct Reference
[BF Data Structures]

#include <bf.h>

Detailed Description

Configuration structure for bfOpen() This structure contains system parameters to configure a BF instance through bfOpen(). BF doesn't have default value for these parameters, and they must be set explicitly when bfOpen() is called the first time after bfNew().

Remarks:
This structure does not contain any configurable parameters that are controlled through bfControl_s.

Definition at line 155 of file bf.h.

Data Fields

tint | sampling_rate
tint | num_mics

Field Documentation

tint bfConfig_s::sampling_rate

Sampling rate: bf_SAMP_RATE_8K: 8kHz bf_SAMP_RATE_16K: 16kHz

Definition at line 156 of file bf.h.

tint bfConfig_s::num_mics

Number of microphones

Definition at line 159 of file bf.h.

The documentation for this struct was generated from the following file:
  • bf.h


AER: bfControl_s Struct Reference

  • Data Structures
  • Data Fields

bfControl_s Struct Reference
[BF Data Structures]

#include <bf.h>

Collaboration diagram for bfControl_s:

[legend]

Detailed Description

Control structure for bfControl()This structure is used to change BF configurable parameters. Element bfControl_s.valid_bitfield indicates which parameter to be changed, and following elements give the parameter values.

Definition at line 261 of file bf.h.

Data Fields

tuint | valid_bitfield
bfCtlCfg_t config
tuint | mics

Field Documentation

tuint bfControl_s::valid_bitfield

Definition at line 262 of file bf.h.

bfCtlCfg_t bfControl_s::config

Configuration bitfield

Definition at line 267 of file bf.h.

tuint bfControl_s::mics

Microphone selection bitfield

Definition at line 268 of file bf.h.

The documentation for this struct was generated from the following file:
  • bf.h


AER: bfCtlCfg_s Struct Reference

  • Data Structures
  • Data Fields

bfCtlCfg_s Struct Reference
[BF Data Structures]

#include <bf.h>

Detailed Description

BF control configuration bitfield.

Bitfield masks bf_CTL_CFG_XYZ may be used to change BF configuration through bfControl(), by constructing elements "mask" and "value" of bfCtlCfg_s.

    BF Control Configuration Bitfield:
    ---------------------------------------
    |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|
    ---------------------------------------
       bits      values       meaning
    (from LSB)

        0                     bf_CTL_CFG_ENABLE mask
                   0          Disable BF: Ignore input signals and produce all
                                          0's as output.
                   1          Enable BF: Process input signals as configured
                                         by other control bits and commands.

       1:2                    bf_CTL_CFG_OPERATION mask
                   00 (0)     Perform normal beamforming operation using all
                              microphones in the array.
                   01 (1)     Bypass mode: single input is passed to the output
                              without any processing. The input must be selected
                              using the bf_CTL_MICS control. Note: only one mic
                              can be active. Will return error message if more
                              than one mic is selected.
                   10 (2)     Array subset mode: inputs that are selected by
                              the bf_CTL_MICS control will be used for beamforming.
                              All others are ignored. Note: even when just one
                              microphone is selected, the filtering will be still
                              applied. To avoid filtering use the bypass mode.
                   11 (3)     Invalid configuration: will result in error.

    +-------------------+----------------+
    | Operation Modes   | BF status      |
    +---------+---------+----------------+
    |    0    |    0    | Normal BF      |
    +---------+---------+----------------+
    |    0    |    1    | Bypass mode    |
    +---------+---------+----------------+
    |    1    |    0    | Array subset   |
    +---------+---------+----------------+
    |    1    |    1    | INVALID        |
    +---------+---------+----------------+

Definition at line 214 of file bf.h.

Data Fields

tuint | mask
tuint | value

Field Documentation

tuint bfCtlCfg_s::mask

Indicates the bits to be changed.

Definition at line 215 of file bf.h.

tuint bfCtlCfg_s::value

Provides new values for each bit selected by the mask.

Definition at line 216 of file bf.h.

The documentation for this struct was generated from the following file:
  • bf.h


AER: bfDebugStat_s Struct Reference

  • Data Structures
  • Data Fields

bfDebugStat_s Struct Reference

#include <bf.h>

Detailed Description

Definition at line 279 of file bf.h.

Data Fields

tuint | sys_bits
tint | num_mics
tuint | act_mics
tuint | flags_filt_loaded
tint | sampling_rate
tint | frame_len
tint | filter_len

Field Documentation

tuint bfDebugStat_s::sys_bits

BF system control bits (bfCtlCfg_t): bit 0: enable/disable, bits 1~2: operation mode.

Definition at line 280 of file bf.h.

tint bfDebugStat_s::num_mics

Number of total mics.

Definition at line 283 of file bf.h.

tuint bfDebugStat_s::act_mics

Active mic bitfield. For each bit mask, 0: this mic is inactive, 1: this mic is active.

Definition at line 284 of file bf.h.

tuint bfDebugStat_s::flags_filt_loaded

Definition at line 287 of file bf.h.

tint bfDebugStat_s::sampling_rate

Filter loaded bitfield. For each bit mask, 0: filter is not loaded for this mic, 1: filter is loaded for this mic. Sampling rate.

Definition at line 290 of file bf.h.

tint bfDebugStat_s::frame_len

Freame length.

Definition at line 291 of file bf.h.

tint bfDebugStat_s::filter_len

filter length.

Definition at line 292 of file bf.h.

The documentation for this struct was generated from the following file:
  • bf.h


AER: bfNewConfig_s Struct Reference

  • Data Structures
  • Data Fields

bfNewConfig_s Struct Reference
[BF Data Structures]

#include <bf.h>

Collaboration diagram for bfNewConfig_s:

[legend]

Detailed Description

Configuration structure for bfNew() This structure is used for creating a new BF instance through function bfNew().

Definition at line 139 of file bf.h.

Data Fields

void * handle
bfSizeConfig_t sizeCfg

Field Documentation

void* bfNewConfig_s::handle

handle

Definition at line 140 of file bf.h.

bfSizeConfig_t bfNewConfig_s::sizeCfg

size configration

Definition at line 141 of file bf.h.

The documentation for this struct was generated from the following file:
  • bf.h


AER: bfSizeConfig_s Struct Reference

  • Data Structures
  • Data Fields

bfSizeConfig_s Struct Reference
[BF Data Structures]

#include <bf.h>

Detailed Description

Configuration structure for bfGetSizes() This structure is used for getting memory requirements of BF module through function bfGetSizes().

Definition at line 120 of file bf.h.

Data Fields

tint | max_sampling_rate
tint | max_num_mics
tint | max_filter_length
tint | bf_type

Field Documentation

tint bfSizeConfig_s::max_sampling_rate

Maximum sampling rate: bf_SAMP_RATE_8K (8kHz) or bf_SAMP_RATE_16K (16kHz).

Definition at line 121 of file bf.h.

tint bfSizeConfig_s::max_num_mics

Maximum number of microphones in the mic array: must be smaller than or equal to bf_MAX_SUPPORTED_NUM_MICS, otherwise, bfGetSizes() will return an error.

Definition at line 123 of file bf.h.

tint bfSizeConfig_s::max_filter_length

Maximum filter length for BF FIR filters: must be smaller than or equal to bf_MAX_SUPPORTED_FILT_LEN, otherwise, bfGetSizes() will return an error.

Definition at line 126 of file bf.h.

tint bfSizeConfig_s::bf_type

BF type: must be bf_TYPE_FIXED in this release.

Definition at line 129 of file bf.h.

The documentation for this struct was generated from the following file:
  • bf.h


AER: drcBandCfg_s Struct Reference

  • Data Structures
  • Data Fields

drcBandCfg_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Collaboration diagram for drcBandCfg_s:

[legend]

Detailed Description

The DRC per band configurations. This structure specifies per band configurations through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.

See Compressor Configuration Parameters

See also:
drcControl_t

Definition at line 136 of file drc.h.

Data Fields

tuint | valid_bitfield
tuint | tc_log2
drcCurveParam_t curve

Field Documentation

tuint drcBandCfg_s::valid_bitfield

Bitfield for configuration parameters as defined in drc_BAND_CFG_VALID_xxx_BIT

Definition at line 137 of file drc.h.

tuint drcBandCfg_s::tc_log2

                              Q0 - tc_log2 of TC configuration for power and
                              gain estimation for compressor. tc = 1/2^tc_log2.
                                    Bit 0-3  :power attack log2.
                                    Bit 4-7  :power release log2.
                                    Bit 8-11 :gain attack log2.
                                    Bit 12-15:gain release log2.

                                Default values for compressor time constants (TC):
                                                    8KHz              16KHz
                                             tc_log2    TC     tc_log2     TC
                                power attack:   8      32ms       9       32ms
                                power release:  8      32ms       9       32ms
                                gain attack:    8      32ms       9       32ms
                                gain release:   8      32ms       9       32ms

Definition at line 139 of file drc.h.

drcCurveParam_t drcBandCfg_s::curve

parameters for generating gain curve table

Definition at line 158 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcBandParam_s Struct Reference

  • Data Structures
  • Data Fields

drcBandParam_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Collaboration diagram for drcBandParam_s:

[legend]

Detailed Description

The configured DRC band parameters. This structure holds the DRC band parameters reported through drcGetParameter().

See Compressor Configuration Parameters

See also:
drcReportParam_t

Definition at line 337 of file drc.h.

Data Fields

tuint tc_log2
drcCurveParam_t curve

Field Documentation

tuint drcBandParam_s::tc_log2

                               tc_log2 of TC configuration for power and
                               gain estimation .  tc = 1/2^tc_log2
                                    Bit 0-3  :power attack log2.
                                    Bit 4-7  :power release log2.
                                    Bit 8-11 :gain attack log2.
                                    Bit 12-15:gain release log2.

Definition at line 338 of file drc.h.

drcCurveParam_t drcBandParam_s::curve

curve parameters

Definition at line 348 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcCallTable_t Struct Reference

  • Data Structures
  • Data Fields

drcCallTable_t Struct Reference

#include <drc.h>

Detailed Description

DRC call table.

Definition at line 667 of file drc.h.

Data Fields

tint(* | drcGetSizes )(tint *nbufs, const ecomemBuffer_t **bufs, drcSizeConfig_t *cfg)
tint(* | drcNew )(void **drcInst, tint nbufs, ecomemBuffer_t *bufs, drcNewConfig_t *cfg)
tint(* | drcCreate )(drcCreateConfig_t *create_cfg)
tint(* | drcClose )(void *drcInst)
tint(* | drcControl )(void *drcInst, drcControl_t *ctl)
tint(* | drcDelete )(void **drcInst, tint nbufs, ecomemBuffer_t *bufs)
tint(* | drcGetParameter )(void *drcInst, tint get_code, drcReportParam_t *param)
tint(* | drcOpen )(void *drcInst, drcOpenConfig_t *cfg)
tint(* | drcProcess )(void *drcInst, void *sin, void *sout)

Field Documentation

tint(* drcCallTable_t::drcGetSizes)(tint *nbufs, const ecomemBuffer_t **bufs, drcSizeConfig_t *cfg)

tint(* drcCallTable_t::drcNew)(void **drcInst, tint nbufs, ecomemBuffer_t *bufs, drcNewConfig_t *cfg)

tint(* drcCallTable_t::drcCreate)(drcCreateConfig_t *create_cfg)

tint(* drcCallTable_t::drcClose)(void *drcInst)

tint(* drcCallTable_t::drcControl)(void *drcInst, drcControl_t *ctl)

tint(* drcCallTable_t::drcDelete)(void **drcInst, tint nbufs, ecomemBuffer_t *bufs)

tint(* drcCallTable_t::drcGetParameter)(void *drcInst, tint get_code, drcReportParam_t *param)

tint(* drcCallTable_t::drcOpen)(void *drcInst, drcOpenConfig_t *cfg)

tint(* drcCallTable_t::drcProcess)(void *drcInst, void *sin, void *sout)

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcControl_s Struct Reference

  • Data Structures
  • Data Fields

drcControl_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Collaboration diagram for drcControl_s:

[legend]

Detailed Description

DRC control data structure. This structure contains parameters needed to control DRC parameters and mode of operation used in drcControl().

See Configuration Parameters

Definition at line 289 of file drc.h.

Data Fields

tint ctl_code
union {
tuint cfgbits
drcBandCfg_t band
drcLimiterCfg_t limiter
Fract coef [drc_FIR_HALF_COEF_16KHZ]
} u

Field Documentation

tint drcControl_s::ctl_code

Control operation defined in drc_CTL_XXX

Definition at line 290 of file drc.h.

tuint drcControl_s::cfgbits

See DRC Operation Mode bitfield. Set by drc_CTL_SET_BITS

Definition at line 292 of file drc.h.

drcBandCfg_t drcControl_s::band

band cfg. Set by drc_CTL_SET_{FBAND,..., HBAND}

Definition at line 293 of file drc.h.

drcLimiterCfg_t drcControl_s::limiter

limiter cfg. Set by drc_CTL_SET_LIMITER

Definition at line 294 of file drc.h.

Fract drcControl_s::coef[drc_FIR_HALF_COEF_16KHZ]

FIR coef. Set by drc_CTL_SET_FIR_{LBAND..}

Definition at line 295 of file drc.h.

union { ... } drcControl_s::u

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcCreateConfig_t Struct Reference

  • Data Structures
  • Data Fields

drcCreateConfig_t Struct Reference
[DRC Data Structures]

#include <drc.h>

Detailed Description

DRC create structure which contains information to be shared by different DRC instances through drcCreate().

Definition at line 423 of file drc.h.

Data Fields

dbgInfo_t debugInfo

Field Documentation

dbgInfo_t drcCreateConfig_t::debugInfo

Used for exception handling.

Definition at line 424 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcCurveParam_s Struct Reference

  • Data Structures
  • Data Fields

drcCurveParam_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Detailed Description

The DRC gain curve configuration structure. This structure specifies DRC gain curve configuration parameters. The parameters are set in drcBandCfg_t through drcControl() with control code drc_CTL_SET_{FBAND, LBAND, MBAND and HBAND}.

See Compressor Configuration Parameters

See also:
drcBandCfg_t

Definition at line 93 of file drc.h.

Data Fields

tint | exp_knee
tuint | ratios
tint | max_amp
tint | com_knee
tint | energy_lim

Field Documentation

tint drcCurveParam_s::exp_knee

The expansion knee point in dBm0.

Definition at line 94 of file drc.h.

tuint drcCurveParam_s::ratios

Q4 - Expansion and Compression Ratios from 16 to 255 in Q4 format.

                                Bit 0-7: expansion ratio = E_out/E_in. From 1.0 - 15.9375.
                                Bit 8-15:compression ratio = E_in/E_out. From 1.0 - 15.9375.

Definition at line 95 of file drc.h.

tint drcCurveParam_s::max_amp

Maximum amplification in dB.

Definition at line 102 of file drc.h.

tint drcCurveParam_s::com_knee

The compression knee point in dBm0.

Definition at line 103 of file drc.h.

tint drcCurveParam_s::energy_lim

The energy limiting threshold in dBm0.

Definition at line 104 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcLimParam_s Struct Reference

  • Data Structures
  • Data Fields

drcLimParam_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Detailed Description

The configured DRC limiter parameters. This structure holds the DRC limiter parameters reported through drcGetParameter().

See Limiter Configuration Parameters

See also:
drcReportParam_t

Definition at line 360 of file drc.h.

Data Fields

tuint | tc_log2
Fract | thresh_dBm
tint | delay_len

Field Documentation

tuint drcLimParam_s::tc_log2

Refer to drcLimiterCfg_s:tc_log2.

Definition at line 361 of file drc.h.

Fract drcLimParam_s::thresh_dBm

Refer to drcLimiterCfg_s:thresh_dBm.

Definition at line 362 of file drc.h.

tint drcLimParam_s::delay_len

Refer to drcLimiterCfg_s:delay_len.

Definition at line 363 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcLimiterCfg_s Struct Reference

  • Data Structures
  • Data Fields

drcLimiterCfg_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Detailed Description

DRC Limiter configuration structure. This structure specifies DRC Limiter configuration parameters through drcControl() with drc_CTL_SET_LIMITER.

See Limiter Configuration Parameters

See also:
drcControl_t

Definition at line 192 of file drc.h.

Data Fields

tuint | valid_bitfield
tuint | tc_log2
Fract | thresh_dBm
tint | delay_len

Field Documentation

tuint drcLimiterCfg_s::valid_bitfield

Bitfield for configuration parameters as defined in drc_SET_LIMITER_xxx

Definition at line 193 of file drc.h.

tuint drcLimiterCfg_s::tc_log2

                           tc_log2 of TC configuration for limiter power
                           and gain estimation .  tc = 1/2^tc_log2
                                Bit 0-3  :power attack log2. This parameter is
                                          not configurable, but fixed to 0.
                                Bit 4-7  :power release log2.
                                Bit 8-11 :gain attack log2.
                                Bit 12-15:gain release log2.

                                Default values for limter time constants (TC):
                                                    8KHz              16KHz
                                             tc_log2    TC     tc_log2     TC
                                power attack:   0     (1/8)ms     0     (1/16)ms
                                power release:  8      32ms       9       32ms
                                gain attack:    1     (1/4)ms     2     (1/4)ms
                                gain release:   9      64ms       10      64ms

Definition at line 195 of file drc.h.

Fract drcLimiterCfg_s::thresh_dBm

Q4 - Limiter threshold in dBm0

Definition at line 215 of file drc.h.

tint drcLimiterCfg_s::delay_len

Limiter forward looking delay in samples

                           and gain estimation .  tc = 1/2^tc_log2
                                Bit 0-7  :current configured delay length.
                                Bit 8-15 :maximum allowed delay length.

Definition at line 216 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

drcNewConfig_t Struct Reference
[DRC Data Structures]

#include <drc.h>

Collaboration diagram for drcNewConfig_t:

[legend]

Detailed Description

DRC new configuration structure. This contains parameters needed at the creation of a DRC instance through drcNew().

Definition at line 447 of file drc.h.

Data Fields

void * handle
drcSizeConfig_t sizeCfg

Field Documentation

void* drcNewConfig_t::handle

handle

Definition at line 448 of file drc.h.

drcSizeConfig_t drcNewConfig_t::sizeCfg

size configuration

Definition at line 449 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcOpenConfig_s Struct Reference

  • Data Structures
  • Data Fields

drcOpenConfig_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Detailed Description

DRC system/band independent configuration structure. This structure specifies DRC band independent configuration parameters used in drcOpen().

See System Configuration Parameters

Definition at line 323 of file drc.h.

Data Fields

tuint | cfgbits
tint | samp_rate

Field Documentation

tuint drcOpenConfig_s::cfgbits

bitfield. See DRC Operation Mode bitfield

Definition at line 324 of file drc.h.

tint drcOpenConfig_s::samp_rate

Sampling rate. See DRC Supported Sampling Rate

Definition at line 325 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcReportParam_s Struct Reference

  • Data Structures
  • Data Fields

drcReportParam_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Collaboration diagram for drcReportParam_s:

[legend]

Detailed Description

The DRC parameters reported upon getParameter request. This structure specifies DRC parameters reported upon getParameter request through drcGetParameter().

See Configuration Parameters

Definition at line 408 of file drc.h.

Data Fields

union {
tuint bits
drcBandParam_t bandParam
drcLimParam_t limParam
Fract coef [drc_FIR_HALF_COEF_16KHZ]
} u

Field Documentation

tuint drcReportParam_s::bits

See DRC Operation Mode bitfield - requested drc_GET_CFGBITS.

Definition at line 410 of file drc.h.

drcBandParam_t drcReportParam_s::bandParam

band param - requested by drc_GET_{FBAND. }

Definition at line 411 of file drc.h.

drcLimParam_t drcReportParam_s::limParam

lim param - requested by drc_GET_LIM_PARAM

Definition at line 412 of file drc.h.

Fract drcReportParam_s::coef[drc_FIR_HALF_COEF_16KHZ]

coef in an inst- drc_GET_{LBAND.}

Definition at line 413 of file drc.h.

union { ... } drcReportParam_s::u

The documentation for this struct was generated from the following file:
  • drc.h


AER: drcSizeConfig_s Struct Reference

  • Data Structures
  • Data Fields

drcSizeConfig_s Struct Reference
[DRC Data Structures]

#include <drc.h>

Detailed Description

DRC size configuration structure. This structure specifies the parameters in drcGetSize() and drcNew().

See System Configuration Parameters

See also:
drcNewConfig_t

Definition at line 435 of file drc.h.

Data Fields

tint | samp_rate
tint | max_delay_len

Field Documentation

tint drcSizeConfig_s::samp_rate

The sampling rate as drc_SAMP_RATE_{8K,16K}.

Definition at line 436 of file drc.h.

tint drcSizeConfig_s::max_delay_len

Limiter forward looking delay in samples.

Definition at line 437 of file drc.h.

The documentation for this struct was generated from the following file:
  • drc.h


AER: mssCallTable_t Struct Reference

  • Data Structures
  • Data Fields

mssCallTable_t Struct Reference
[MSS Data Structures]

#include <mss.h>

Detailed Description

MSS call table.

Definition at line 455 of file mss.h.

Data Fields

tint(* | mssClose )(void *mssInst)
tint(* | mssControl )(void *mssInst, mssControl_t *ctl)
tint(* | mssDelete )(void **mssInst, tint nbufs, ecomemBuffer_t *bufs)
tint(* | mssGetSizes )(tint *nbufs, const ecomemBuffer_t **bufs, mssSizeConfig_t *cfg)
tint(* | mssNew )(void **mssInst, tint nbufs, ecomemBuffer_t *bufs, mssNewConfig_t *cfg)
tint(* | mssOpen )(void *mssInst, mssConfig_t *cfg)
tint(* | mssProcess )(void *mssInst, void *out, void *rx_out_sync, void *mic_fixed[], void *mic_remote[], void *mic_clean[], void *mic_array[], void *beam[])

Field Documentation

tint(* mssCallTable_t::mssClose)(void *mssInst)

tint(* mssCallTable_t::mssControl)(void *mssInst, mssControl_t *ctl)

tint(* mssCallTable_t::mssDelete)(void **mssInst, tint nbufs, ecomemBuffer_t *bufs)

tint(* mssCallTable_t::mssGetSizes)(tint *nbufs, const ecomemBuffer_t **bufs, mssSizeConfig_t *cfg)

tint(* mssCallTable_t::mssNew)(void **mssInst, tint nbufs, ecomemBuffer_t *bufs, mssNewConfig_t *cfg)

tint(* mssCallTable_t::mssOpen)(void *mssInst, mssConfig_t *cfg)

tint(* mssCallTable_t::mssProcess)(void *mssInst, void *out, void *rx_out_sync, void *mic_fixed[], void *mic_remote[], void *mic_clean[], void *mic_array[], void *beam[])

The documentation for this struct was generated from the following file:
  • mss.h


AER: mssConfig_s Struct Reference

  • Data Structures
  • Data Fields

mssConfig_s Struct Reference
[MSS Data Structures]

#include <mss.h>

Detailed Description

Configuration structure for mssOpen() This structure contains system parameters to configure an MSS instance through mssOpen(). MSS doesn't have default value for these parameters, and they must be set explicitly when mssOpen() is called the first time after mssNew().

Remarks:
This structure doesn't contain any configurable parameters that are controlled through mssControl_s to avoid confusion.

Definition at line 149 of file mss.h.

Data Fields

mssSampRate_t sampling_rate
tint | num_mic_fixed
tint | num_mic_remote
tint | num_mic_clean
tint | num_mic_array
tint | num_beam

Field Documentation

mssSampRate_t mssConfig_s::sampling_rate

Sampling rate: 8kHz: set to mss_SAMP_RATE_8K. 16kHz: set to mss_SAMP_RATE_16K.

Definition at line 150 of file mss.h.

tint mssConfig_s::num_mic_fixed

Number of fixed microphones

Definition at line 153 of file mss.h.

tint mssConfig_s::num_mic_remote

Number of remote microphones

Definition at line 154 of file mss.h.

tint mssConfig_s::num_mic_clean

Number of microphones with built-in AEC

Definition at line 155 of file mss.h.

tint mssConfig_s::num_mic_array

Number of microphones in microphone-array

Definition at line 156 of file mss.h.

tint mssConfig_s::num_beam

Number of beams from microphone array

Definition at line 157 of file mss.h.

The documentation for this struct was generated from the following file:
  • mss.h


AER: mssNewConfig_s Struct Reference

  • Data Structures
  • Data Fields

mssNewConfig_s Struct Reference
[MSS Data Structures]

#include <mss.h>

Collaboration diagram for mssNewConfig_s:

[legend]

Detailed Description

Configuration structure for mssNew() This structure is used for creating a new MSS instance through function mssNew().

Definition at line 133 of file mss.h.

Data Fields

void * handle
mssSizeConfig_t sizeCfg

Field Documentation

void* mssNewConfig_s::handle

handle

Definition at line 134 of file mss.h.

mssSizeConfig_t mssNewConfig_s::sizeCfg

size configration

Definition at line 135 of file mss.h.

The documentation for this struct was generated from the following file:
  • mss.h


AER: mssSizeConfig_s Struct Reference

  • Data Structures
  • Data Fields

mssSizeConfig_s Struct Reference
[MSS Data Structures]

#include <mss.h>

Detailed Description

Configuration structure for mssGetSizes() This structure is used for getting memory requirements of MSS through function mssGetSizes().

Definition at line 116 of file mss.h.

Data Fields

mssSampRate_t max_sampling_rate
tint | max_num_mic_fixed
tint | max_num_mic_remote
tint | max_num_mic_clean
tint | max_num_beam

Field Documentation

mssSampRate_t mssSizeConfig_s::max_sampling_rate

Maximum sampling rate: 8kHz: set to mss_SAMP_RATE_8K. 16kHz: set to mss_SAMP_RATE_16K.

Definition at line 117 of file mss.h.

tint mssSizeConfig_s::max_num_mic_fixed

Maximum number of fixed microphones

Definition at line 120 of file mss.h.

tint mssSizeConfig_s::max_num_mic_remote

Maximum number of remote microphones

Definition at line 121 of file mss.h.

tint mssSizeConfig_s::max_num_mic_clean

Maximum number of microphones with built-in AEC

Definition at line 122 of file mss.h.

tint mssSizeConfig_s::max_num_beam

Maximum number of beams from microphone array

Definition at line 123 of file mss.h.

The documentation for this struct was generated from the following file:
  • mss.h


AER: mssSrc_s Struct Reference

  • Data Structures
  • Data Fields

mssSrc_s Struct Reference
[MSS Data Structures]

#include <mss.h>

Detailed Description

Source structure used to manually select a source.

Definition at line 102 of file mss.h.

Data Fields

mssSrcType_t group
tint index

Field Documentation

mssSrcType_t mssSrc_s::group

source group to be manually selected: valid values: mss_SRC_MIC_FIXED, etc.

Definition at line 103 of file mss.h.

tint mssSrc_s::index

group index of the source to be manually selected: range: 0 - number of sources minus 1

Definition at line 105 of file mss.h.

The documentation for this struct was generated from the following file:
  • mss.h


AER Simulation: Memory Usage of AER Component

Memory Usage of AER Component

AER Memory (Including AER, AGC, and DRC modules)

For detailed information about AER memory usage, refer to AER Integration Guide.

AER Data Memory

AER module data memory usage depends on tail length and selected features. For hands free mode with 200msec tail with FDNLP and ASNR enabled and running at 16kHz (same for C55x, C64x+/C674x, and Cortex-A8):
  • Total permanent memory: 38732 bytes
  • Total scratch memory: 15760 bytes

AER Program Memory

  • Program memory on C55x: 50269
  • Program memory on C64x+/C674: 100044 bytes
  • Program memory on Cortex-A8: 93272 bytes


AER Simulation: MCPS Usage of AER Component

MCPS Usage of AER Component

AER MCPS Usage (Including AER, AGC, and DRC modules)

AER MCPS is measured by feeding the AER with two speech vectors, one from the far end, and the other from the near end. First, only the far end speech is applied for 20 seconds to converge the filter, and then near end speech is applied to create double talk situation. Measurement starts from the beginning of the test and ends 30 seconds after AER achieves 30dB cancellation.

AER MCPS on C55x

The MCPS shown below was measured on C5510 EVM, with all AER program and data put in on-chip memory. AER was configured to run with 1 hands-free microphone at 16kHz, full duplex hands-free operation, and 200msec tail length.
  • MCPS of modules without optional features:
  • MCPS of optional features:

AER MCPS on C64x+/C674x

The MCPS shown below was measured on C6486 dsk, with all AER program and data put in off-chip memory. Cache is enabled. To simulate real time scenarios, cached is flushed completely before AER is called every frame. AER was configured to run with 1 hands-free microphone at 16kHz, full duplex hands-free operation, and 200msec tail length:
  • MCPS of modules without optional features:
  • MCPS of optional features:

AER MCPS on ARM Cortex-A8

The MCPS shown below was measured on a Beagle Board running at 600MHz, using CodeSourcery profile tools. The Beagle Board interrupts and idle tasks were not disabled during the profiling, and thus the numbers shown in this section are actually larger than the real MCPS of AER. Only average MCPS was measured for Cortex-A8,
  • MCPS of modules without optional features:
  • MCPS of optional features:


AER Simulation: aerbuffs.h File Reference

  • File List
  • Globals

aerbuffs.h File Reference

#include <ti/mas/aer/test/aersim/aerbufst.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>

Include dependency graph for aerbuffs.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

tword | aer_buff0_hf [AER_SIM_NUM_HF_MIC][AER_SIM_BUF0_SIZE]
tword | aer_buff0_hs [AER_SIM_BUF0_SIZE]
tword | aer_buff1 [AER_SIM_BUF1_SIZE]
tword | aer_buff2_hf [AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HF]
tword | aer_buff2_hs [AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HS]
tword | aer_buff3 [AER_SIM_BUF3_SIZE_HF]
tword | aer_buff4_hf [AER_SIM_NUM_HF_MIC][AER_SIM_BUF4_SIZE]
tword | aer_buff4_hs [AER_SIM_BUF4_SIZE]
tword | aer_buff5 [AER_SIM_BUF5_SIZE]
tword | aer_buff6 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF6_SIZE]
tword | aer_buff7 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF7_SIZE]
tword | aer_buff8 [AER_SIM_BUF8_SIZE]
tword | aer_buff9 [AER_SIM_BUF9_SIZE]
tword | aer_buff10 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF10_SIZE]
tword | aer_buff11 [AER_SIM_BUF11_SIZE]
tword | aer_buff12 [AER_SIM_BUF12_SIZE]
tword | aer_buff13 [AER_SIM_BUF13_SIZE]
tword | aer_buff14 [AER_SIM_BUF14_SIZE]
tword | aer_buff15 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF15_SIZE]
tword | aer_buff16 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF16_SIZE]
tword | aer_buff17 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF17_SIZE]
tword | aer_buff18 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF18_SIZE]
tword | aer_buff19 [AER_SIM_BUF19_SIZE]
tword | aer_buff20 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF20_SIZE]
tword | agc_buff0_hf [AER_SIM_NUM_HF_MIC][AGC_SIM_BUF0_SIZE]
tword | agc_buff0_hs [AGC_SIM_BUF0_SIZE]
tword | drc_buff0 [DRC_SIM_BUF0_SIZE]
tword | drc_buff1 [DRC_SIM_BUF1_SIZE]
tword | drc_buff2 [DRC_SIM_BUF2_SIZE]
tword | drc_buff3 [DRC_SIM_BUF3_SIZE]
tword | drc_buff4 [DRC_SIM_BUF4_SIZE]
linSample | siu_rx_del_buf [SIU_RX_DELAY_LINE_LENGTH]
Fract | aer_in_buffer [AER_SIM_MAX_FRAME_LENGTH]
Fract | aer_out_buffer [AER_SIM_MAX_FRAME_LENGTH]
tword | tempIoBuf [AERSIM_FIO_BUF_SIZE *AERSIM_FIO_SIZEOF_WORD]

Variable Documentation

tword aer_buff0_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF0_SIZE]

Definition at line 18 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff0_hs[AER_SIM_BUF0_SIZE]

Definition at line 22 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff1[AER_SIM_BUF1_SIZE]

Definition at line 26 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs(), and siu_new_drc().

tword aer_buff2_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HF]

Definition at line 30 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff2_hs[AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HS]

Definition at line 34 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff3[AER_SIM_BUF3_SIZE_HF]

Definition at line 38 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff4_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF4_SIZE]

Definition at line 42 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff4_hs[AER_SIM_BUF4_SIZE]

Definition at line 46 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff5[AER_SIM_BUF5_SIZE]

Definition at line 50 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff6[AER_SIM_NUM_HF_MIC][AER_SIM_BUF6_SIZE]

Definition at line 54 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff7[AER_SIM_NUM_HF_MIC][AER_SIM_BUF7_SIZE]

Definition at line 58 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff8[AER_SIM_BUF8_SIZE]

Definition at line 62 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff9[AER_SIM_BUF9_SIZE]

Definition at line 66 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff10[AER_SIM_NUM_HF_MIC][AER_SIM_BUF10_SIZE]

Definition at line 70 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff11[AER_SIM_BUF11_SIZE]

Definition at line 74 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff12[AER_SIM_BUF12_SIZE]

Definition at line 78 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff13[AER_SIM_BUF13_SIZE]

Definition at line 82 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff14[AER_SIM_BUF14_SIZE]

Definition at line 86 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff15[AER_SIM_NUM_HF_MIC][AER_SIM_BUF15_SIZE]

Definition at line 90 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff16[AER_SIM_NUM_HF_MIC][AER_SIM_BUF16_SIZE]

Definition at line 94 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff17[AER_SIM_NUM_HF_MIC][AER_SIM_BUF17_SIZE]

Definition at line 98 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff18[AER_SIM_NUM_HF_MIC][AER_SIM_BUF18_SIZE]

Definition at line 102 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff19[AER_SIM_BUF19_SIZE]

Definition at line 106 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff20[AER_SIM_NUM_HF_MIC][AER_SIM_BUF20_SIZE]

Definition at line 110 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword agc_buff0_hf[AER_SIM_NUM_HF_MIC][AGC_SIM_BUF0_SIZE]

Definition at line 115 of file aersimbufs.c.

Referenced by siu_new_agc().

tword agc_buff0_hs[AGC_SIM_BUF0_SIZE]

Definition at line 119 of file aersimbufs.c.

Referenced by siu_new_agc().

tword drc_buff0[DRC_SIM_BUF0_SIZE]

Definition at line 124 of file aersimbufs.c.

Referenced by siu_new_drc().

tword drc_buff1[DRC_SIM_BUF1_SIZE]

tword drc_buff2[DRC_SIM_BUF2_SIZE]

Definition at line 132 of file aersimbufs.c.

Referenced by siu_new_drc().

tword drc_buff3[DRC_SIM_BUF3_SIZE]

Definition at line 136 of file aersimbufs.c.

Referenced by siu_new_drc().

tword drc_buff4[DRC_SIM_BUF4_SIZE]

Definition at line 140 of file aersimbufs.c.

Referenced by siu_new_drc().

linSample siu_rx_del_buf[SIU_RX_DELAY_LINE_LENGTH]

Definition at line 144 of file aersimbufs.c.

Referenced by aer_sim_init_siu().

Fract aer_in_buffer[AER_SIM_MAX_FRAME_LENGTH]

Definition at line 148 of file aersimbufs.c.

Fract aer_out_buffer[AER_SIM_MAX_FRAME_LENGTH]

Definition at line 149 of file aersimbufs.c.

tword tempIoBuf[AERSIM_FIO_BUF_SIZE *AERSIM_FIO_SIZEOF_WORD]

Definition at line 150 of file aersimbufs.c.

Referenced by aerSimFread(), and aerSimFwrite().


AER Simulation: aerbuffs.h Source File

  • File List
  • Globals

aerbuffs.h

Go to the documentation of this file.
00001 #ifndef _AERBUFFS_H
00002 #define _AERBUFFS_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Memory Buffer External References for AER Simulation
00005  ******************************************************************************
00006  * FILE NAME:   aerbuffs.h
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #include <ti/mas/aer/test/aersim/aerbufst.h>
00012 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00013
00014 extern tword aer_buff0_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF0_SIZE];
00015 extern tword aer_buff0_hs[AER_SIM_BUF0_SIZE];
00016 extern tword aer_buff1[AER_SIM_BUF1_SIZE];
00017 extern tword aer_buff2_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HF];
00018 extern tword aer_buff2_hs[AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HS];
00019 extern tword aer_buff3[AER_SIM_BUF3_SIZE_HF];
00020 extern tword aer_buff4_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF4_SIZE];
00021 extern tword aer_buff4_hs[AER_SIM_BUF4_SIZE];
00022 extern tword aer_buff5[AER_SIM_BUF5_SIZE];
00023 extern tword aer_buff6[AER_SIM_NUM_HF_MIC][AER_SIM_BUF6_SIZE];
00024 extern tword aer_buff7[AER_SIM_NUM_HF_MIC][AER_SIM_BUF7_SIZE];
00025 extern tword aer_buff8[AER_SIM_BUF8_SIZE];
00026 extern tword aer_buff9[AER_SIM_BUF9_SIZE];
00027 extern tword aer_buff10[AER_SIM_NUM_HF_MIC][AER_SIM_BUF10_SIZE];
00028 extern tword aer_buff11[AER_SIM_BUF11_SIZE];
00029 extern tword aer_buff12[AER_SIM_BUF12_SIZE];
00030 extern tword aer_buff13[AER_SIM_BUF13_SIZE];
00031 extern tword aer_buff14[AER_SIM_BUF14_SIZE];
00032 extern tword aer_buff15[AER_SIM_NUM_HF_MIC][AER_SIM_BUF15_SIZE];
00033 extern tword aer_buff16[AER_SIM_NUM_HF_MIC][AER_SIM_BUF16_SIZE];
00034 extern tword aer_buff17[AER_SIM_NUM_HF_MIC][AER_SIM_BUF17_SIZE];
00035 extern tword aer_buff18[AER_SIM_NUM_HF_MIC][AER_SIM_BUF18_SIZE];
00036 extern tword aer_buff19[AER_SIM_BUF19_SIZE];
00037 extern tword aer_buff20[AER_SIM_NUM_HF_MIC][AER_SIM_BUF20_SIZE];
00038 extern tword agc_buff0_hf[AER_SIM_NUM_HF_MIC][AGC_SIM_BUF0_SIZE];
00039 extern tword agc_buff0_hs[AGC_SIM_BUF0_SIZE];
00040 extern tword drc_buff0[DRC_SIM_BUF0_SIZE];
00041 extern tword drc_buff1[DRC_SIM_BUF1_SIZE];
00042 extern tword drc_buff2[DRC_SIM_BUF2_SIZE];
00043 extern tword drc_buff3[DRC_SIM_BUF3_SIZE];
00044 extern tword drc_buff4[DRC_SIM_BUF4_SIZE];
00045 extern linSample siu_rx_del_buf[SIU_RX_DELAY_LINE_LENGTH];
00046 extern Fract aer_in_buffer[AER_SIM_MAX_FRAME_LENGTH];
00047 extern Fract aer_out_buffer[AER_SIM_MAX_FRAME_LENGTH];
00048 extern tword tempIoBuf[AERSIM_FIO_BUF_SIZE*AERSIM_FIO_SIZEOF_WORD];
00049
00050 #endif  /* _AERBUFFS_H */
00051
00052 /* nothing past this point */


AER Simulation: aerbufst.h File Reference

  • File List
  • Globals

aerbufst.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | _AERTESTPORT_C55L 0
#define | _AERTESTPORT_C64P 0
#define | _AERTESTPORT_C64P_ELF 0
#define | _AERTESTPORT_C64P_BIG_ENDIAN 0
#define | _AERTESTPORT_C64P_BIG_ENDIAN_ELF 0
#define | _AERTESTPORT_C674 0
#define | _AERTESTPORT_C674_ELF 0
#define | _AERTESTPORT_ARM_GCARMV7A 0

Define Documentation

#define _AERTESTPORT_C55L 0

Definition at line 18 of file aerbufst.h.

#define _AERTESTPORT_C64P 0

Definition at line 24 of file aerbufst.h.

#define _AERTESTPORT_C64P_ELF 0

Definition at line 30 of file aerbufst.h.

#define _AERTESTPORT_C64P_BIG_ENDIAN 0

Definition at line 36 of file aerbufst.h.

#define _AERTESTPORT_C64P_BIG_ENDIAN_ELF 0

Definition at line 42 of file aerbufst.h.

#define _AERTESTPORT_C674 0

Definition at line 48 of file aerbufst.h.

#define _AERTESTPORT_C674_ELF 0

Definition at line 54 of file aerbufst.h.

#define _AERTESTPORT_ARM_GCARMV7A 0

Definition at line 62 of file aerbufst.h.


AER Simulation: aerbufst.h Source File

  • File List
  • Globals

aerbufst.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Memory Buffer Size and Alignment Definitions
00003  ******************************************************************************
00004  * FILE NAME:   aerbufst.h
00005  *
00006  * DESCRIPTION: Contains size and alignment definitions for AER/AGC/DRC buffers.
00007  *              This file includes a target specific header file with the
00008  *              actual definitions.
00009  *
00010  * (C) Copyright 2008, Texas Instruments, Inc.
00011  *****************************************************************************/
00012 #ifndef _AERBUFST_H
00013 #define _AERBUFST_H
00014
00015 #ifdef ti_targets_C55_large
00016 #define _AERTESTPORT_C55L 1
00017 #else
00018 #define _AERTESTPORT_C55L 0
00019 #endif
00020
00021 #ifdef ti_targets_C64P
00022 #define _AERTESTPORT_C64P 1
00023 #else
00024 #define _AERTESTPORT_C64P 0
00025 #endif
00026
00027 #ifdef ti_targets_elf_C64P
00028 #define _AERTESTPORT_C64P_ELF 1
00029 #else
00030 #define _AERTESTPORT_C64P_ELF 0
00031 #endif
00032
00033 #ifdef ti_targets_C64P_big_endian
00034 #define _AERTESTPORT_C64P_BIG_ENDIAN 1
00035 #else
00036 #define _AERTESTPORT_C64P_BIG_ENDIAN 0
00037 #endif
00038
00039 #ifdef ti_targets_elf_C64P_big_endian
00040 #define _AERTESTPORT_C64P_BIG_ENDIAN_ELF 1
00041 #else
00042 #define _AERTESTPORT_C64P_BIG_ENDIAN_ELF 0
00043 #endif
00044
00045 #ifdef ti_targets_C674
00046 #define _AERTESTPORT_C674 1
00047 #else
00048 #define _AERTESTPORT_C674 0
00049 #endif
00050
00051 #ifdef ti_targets_elf_C674
00052 #define _AERTESTPORT_C674_ELF 1
00053 #else
00054 #define _AERTESTPORT_C674_ELF 0
00055 #endif
00056
00057 /* C674 devices do not support big endian */
00058
00059 #ifdef gnu_targets_arm_GCArmv7A
00060 #define _AERTESTPORT_ARM_GCARMV7A 1
00061 #else
00062 #define _AERTESTPORT_ARM_GCARMV7A 0
00063 #endif
00064
00065 #if _AERTESTPORT_C55L
00066 #include <ti/mas/aer/test/aersim/c55/aerbufst.h>
00067 #elif _AERTESTPORT_C64P || _AERTESTPORT_C64P_BIG_ENDIAN || _AERTESTPORT_C674 || _AERTESTPORT_C64P_ELF || _AERTESTPORT_C64P_BIG_ENDIAN_ELF || _AERTESTPORT_C674_ELF
00068 #include <ti/mas/aer/test/aersim/c64P/aerbufst.h>
00069 #elif _AERTESTPORT_ARM_GCARMV7A
00070 #include <ti/mas/aer/test/aersim/arm/aerbufst.h>
00071 #else
00072 #error invalid target
00073 #endif
00074
00075
00076 #endif  /* _AERBUFST_H */
00077
00078 /* nothing past this point */


AER Simulation: aersim.c File Reference

  • File List
  • Globals

aersim.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/agc.h>
#include <ti/mas/aer/drc.h>
#include <ti/mas/aer/mss.h>
#include <ti/mas/aer/bf.h>
#include <ti/mas/aer/test/aersim/aersim.h>
#include <ti/mas/aer/test/aersim/aersim_fileIO.h>
#include <ti/mas/aer/test/aersim/aerbuffs.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuaer.h>
#include <ti/mas/aer/test/siusim/siubf.h>
#include <ti/mas/aer/test/piusim/piuloc.h>

Include dependency graph for aersim.c:

Go to the source code of this file.

Defines

#define | AER_SIM_PEAK_MIPS_ERLE_THRESH 10
#define | AER_SIM_DURATION_CONVERGED 3000
#define | NUM_H_VEC_GET 3
#define | NUM_H_VEC_PUT 3

Functions

tbool | aer_sim_fio_read_fe (aersimFileIO_t *fio, linSample *data_fe)
tbool | aer_sim_fio_read_ne (aersimFileIO_t *fio, linSample data_ne[][SIU_AER_MAX_FRAME_LENGTH], tint num_input)
void | aer_sim_fio_write_data (aersimFileIO_t *fio)
tint | aer_sim_get_erle (siuInst_t *inst)
void | aer_sim_print_version_mips (siuInst_t *inst)
void | aer_sim_cfg_on_the_fly (siuInst_t *inst)
int | main ()

Variables

siuSetup_t siuSetup
siuInst_t siu_inst
piuInst_t piu_inst
aepSimInst_t | aepSimInst
aersimFileIO_t aersim_fio
sgnInstBuf_t | sgnTxInst [AER_SIM_NUM_MIC]
sgnInstBuf_t | sgnRxInst
linSample | sim_data_rx_in [SIU_AER_MAX_FRAME_LENGTH]
linSample | sim_data_rx_out [SIU_AER_MAX_FRAME_LENGTH]
linSample | sim_data_dac [SIU_AER_MAX_FRAME_LENGTH]
linSample | sim_data_rx_sync [SIU_AER_MAX_FRAME_LENGTH]
linSample | sim_data_ne_speech [AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH]
linSample | sim_data_mic [AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH]
linSample | sim_data_tx_in [AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH]
linSample | sim_data_tx_out [SIU_AER_MAX_FRAME_LENGTH]
Fract | aer_coef_mant [aer_NUM_WORDS_PER_H_VEC_16K *NUM_H_VEC_PUT]
tint | aer_coef_exp [NUM_H_VEC_PUT]
aerTailModel_t | aer_tail_model
Fract | bf_filt_coef [AER_SIM_NUM_BF_MIC][bf_MAX_SUPPORTED_FILT_LEN]
tint | bf_filt_len
int | frm_cnt = 0
int | num_frames_converged = 0

Define Documentation

#define AER_SIM_PEAK_MIPS_ERLE_THRESH 10

Definition at line 36 of file aersim.c.

Referenced by main().

#define AER_SIM_DURATION_CONVERGED 3000

Definition at line 37 of file aersim.c.

Referenced by main().

#define NUM_H_VEC_GET 3

Definition at line 59 of file aersim.c.

#define NUM_H_VEC_PUT 3

Definition at line 60 of file aersim.c.

Function Documentation

tbool aer_sim_fio_read_fe | ( | aersimFileIO_t * | fio,
 |  | linSample * | data_fe
 | ) |  |

Definition at line 244 of file aersim.c.

References siuSetup_s::aer_rin_frm_size, aerSimFread(), aersimFileIO_s::fp_rxin, and siuSetup.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

tbool aer_sim_fio_read_ne | ( | aersimFileIO_t * | fio,
 |  | linSample | data_ne[][SIU_AER_MAX_FRAME_LENGTH],
 |  | tint | num_input
 | ) |  |

Definition at line 252 of file aersim.c.

References siuSetup_s::aer_sin_frm_size, aerSimFread(), aersimFileIO_s::fp_txin, and siuSetup.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_fio_write_data ( aersimFileIO_t * fio )

Definition at line 271 of file aersim.c.

References siuSetup_s::aer_rout_frm_size, siuSetup_s::aer_sout_frm_size, siuInst_t::aerHFInst, aerSimFwrite(), aersimFileIO_s::flag_rxout_wr, aersimFileIO_s::flag_txout_wr, aersimFileIO_s::fp_debug_aer, aersimFileIO_s::fp_rxout, aersimFileIO_s::fp_txout, siuSysCfg_s::num_HF_mic, sim_data_rx_out, sim_data_tx_out, siu_inst, siuSetup, and siuSetup_s::system_cfg.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

tint aer_sim_get_erle ( siuInst_t * inst )

Definition at line 305 of file aersim.c.

References siuInst_t::aerHFInst.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_print_version_mips ( siuInst_t * inst )

Definition at line 435 of file aersim.c.

References siuSetup_s::aer_mips_profile, siuInst_t::aerHFInst, siuSetup_s::RxCyclesAvg, siuSetup_s::RxCyclesMax, siuSetup, siuSetup_s::TxCyclesAvg, and siuSetup_s::TxCyclesMax.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_cfg_on_the_fly ( siuInst_t * inst )

Definition at line 319 of file aersim.c.

References siuSetup_s::aerCtl, siuInst_t::aerHFInst, siuSetup_s::agcCtl, siuInst_t::agcHFInst, siuPhoneSys_t::num_HF_mic, siuInst_t::phone_sys, siuSetup, siuSetup_s::toggle_aer, and siuSetup_s::toggle_agc.

Referenced by main().

Here is the caller graph for this function:

int main ( )

Definition at line 83 of file aersim.c.

References siuSetup_s::aep_gain_adj_exp, siuSetup_s::aep_gain_adj_mant, siuSetup_s::aep_params, aepSimInst, siuSetup_s::aer_mips_profile, siuSetup_s::aer_rin_frm_size, aer_sim_apply_config(), aer_sim_cfg_on_the_fly(), aer_sim_close_files(), aer_sim_config_aer_params(), AER_SIM_DURATION_CONVERGED, aer_sim_fio_read_fe(), aer_sim_fio_read_ne(), aer_sim_fio_write_data(), aer_sim_get_erle(), aer_sim_init(), aer_sim_init_piu(), aer_sim_init_siu(), aer_sim_instantiate_aer(), AER_SIM_MIC_TYPE_ARRAY, aer_sim_open_aep(), aer_sim_open_files(), aer_sim_open_txrx_sgns(), AER_SIM_PEAK_MIPS_ERLE_THRESH, aer_sim_print_version_mips(), aer_sim_read_cfg(), AER_SIM_ROOT_FOLDER, siuSetup_s::aer_sin_frm_size, siuSetup_s::aer_sout_frm_size, aersim_fio, siuSetup_s::fe_sgn_flag, aersimFileIO_s::flag_rxin_rd, aersimFileIO_s::flag_txin_echo, aersimFileIO_s::flag_txin_rd, frm_cnt, loop, siuSysCfg_s::mult_mic_type, siuSetup_s::ne_sgn_flag, siuSysCfg_s::num_BF_mic, num_frames_converged, siuSysCfg_s::num_HF_mic, piu_inst, piuReceiveIn(), piuSendIn(), sgnRxInst, sgnTxInst, sim_data_dac, sim_data_mic, sim_data_ne_speech, sim_data_rx_in, sim_data_rx_out, sim_data_rx_sync, sim_data_tx_in, sim_data_tx_out, SIU_AER_MAX_FRAME_LENGTH, siu_inst, siuReceiveIn(), siuSendIn(), siuSetup, and siuSetup_s::system_cfg.

Here is the call graph for this function:

Variable Documentation

siuSetup_t siuSetup

Definition at line 40 of file aersim.c.

siuInst_t siu_inst

Definition at line 41 of file aersim.c.

Referenced by aer_sim_fio_write_data(), aer_sim_instantiate_aer(), main(), siuAgcAerEvent(), siuAgcEvent(), siuGainControl(), and siuInit().

piuInst_t piu_inst

Definition at line 42 of file aersim.c.

Referenced by aer_sim_init_piu(), and main().

aepSimInst_t aepSimInst

Definition at line 43 of file aersim.c.

Referenced by main(), and siuGainControl().

aersimFileIO_t aersim_fio

Definition at line 44 of file aersim.c.

Referenced by main().

sgnInstBuf_t sgnTxInst[AER_SIM_NUM_MIC]

Definition at line 45 of file aersim.c.

Referenced by main().

sgnInstBuf_t sgnRxInst

Definition at line 46 of file aersim.c.

Referenced by main().

linSample sim_data_rx_in[SIU_AER_MAX_FRAME_LENGTH]

Definition at line 49 of file aersim.c.

Referenced by main().

linSample sim_data_rx_out[SIU_AER_MAX_FRAME_LENGTH]

Definition at line 50 of file aersim.c.

Referenced by aer_sim_fio_write_data(), and main().

linSample sim_data_dac[SIU_AER_MAX_FRAME_LENGTH]

Definition at line 51 of file aersim.c.

Referenced by main().

linSample sim_data_rx_sync[SIU_AER_MAX_FRAME_LENGTH]

Definition at line 52 of file aersim.c.

Referenced by main().

linSample sim_data_ne_speech[AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH]

Definition at line 53 of file aersim.c.

Referenced by main().

linSample sim_data_mic[AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH]

Definition at line 54 of file aersim.c.

Referenced by main().

linSample sim_data_tx_in[AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH]

Definition at line 55 of file aersim.c.

Referenced by main().

linSample sim_data_tx_out[SIU_AER_MAX_FRAME_LENGTH]

Definition at line 56 of file aersim.c.

Referenced by aer_sim_fio_write_data(), and main().

Fract aer_coef_mant[aer_NUM_WORDS_PER_H_VEC_16K *NUM_H_VEC_PUT]

Definition at line 61 of file aersim.c.

tint aer_coef_exp[NUM_H_VEC_PUT]

Definition at line 62 of file aersim.c.

aerTailModel_t aer_tail_model

Definition at line 63 of file aersim.c.

Fract bf_filt_coef[AER_SIM_NUM_BF_MIC][bf_MAX_SUPPORTED_FILT_LEN]

Definition at line 66 of file aersim.c.

tint bf_filt_len

Definition at line 67 of file aersim.c.

int frm_cnt = 0

Definition at line 79 of file aersim.c.

Referenced by main().

int num_frames_converged = 0

Definition at line 80 of file aersim.c.

Referenced by main().


AER Simulation: aersim.c Source File

  • File List
  • Globals

aersim.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main program for simulation/testing of AER
00003  ******************************************************************************
00004  * FILE NAME:   aersim.c
00005  *
00006  * (C) Copyright 2008, Texas Instruments, Inc.
00007  *****************************************************************************/
00008
00009 /* ANSI C headers */
00010 #include <stdlib.h>
00011 #include <stdio.h>
00012 #include <string.h>
00013
00014 /* System definitions and utilities */
00015 #include <ti/mas/types/types.h>
00016
00017 /* AER, DRC, AGC, MSS and BF header files */
00018 #include <ti/mas/aer/aer.h>
00019 #include <ti/mas/aer/agc.h>
00020 #include <ti/mas/aer/drc.h>
00021 #include <ti/mas/aer/mss.h>
00022 #include <ti/mas/aer/bf.h>
00023
00024 /* AER simulation constants and data structures */
00025 #include <ti/mas/aer/test/aersim/aersim.h>
00026 #include <ti/mas/aer/test/aersim/aersim_fileIO.h>
00027 #include <ti/mas/aer/test/aersim/aerbuffs.h>
00028
00029 /* SIU simulation header files */
00030 #include <ti/mas/aer/test/siusim/siu.h>
00031 #include <ti/mas/aer/test/siusim/siuloc.h>
00032 #include <ti/mas/aer/test/siusim/siuaer.h>
00033 #include <ti/mas/aer/test/siusim/siubf.h>
00034 #include <ti/mas/aer/test/piusim/piuloc.h>
00035
00036 #define AER_SIM_PEAK_MIPS_ERLE_THRESH 10
00037 #define AER_SIM_DURATION_CONVERGED    3000 /* Run 30 seconds after converged */
00038
00039 /* Global structures for AER simulation */
00040 siuSetup_t siuSetup;        /* simulation setup/configuration structure */
00041 siuInst_t  siu_inst;        /* system integration unit (SIU) instance structure */
00042 piuInst_t  piu_inst;        /* PCM interface unit (PIU) instance structure */
00043 aepSimInst_t aepSimInst;    /* Acoustic echo path (AEP) simulator structure */
00044 aersimFileIO_t  aersim_fio; /* File I/O structure */
00045 sgnInstBuf_t sgnTxInst[AER_SIM_NUM_MIC]; /* Signal Generator (SGN) for Tx path (Near End) */
00046 sgnInstBuf_t sgnRxInst;                  /* Signal Generator (SGN) for Rx path (Far End)  */
00047
00048 /* Input and output buffers for AER simulation */
00049 linSample sim_data_rx_in    [SIU_AER_MAX_FRAME_LENGTH];
00050 linSample sim_data_rx_out   [SIU_AER_MAX_FRAME_LENGTH];
00051 linSample sim_data_dac      [SIU_AER_MAX_FRAME_LENGTH];  /* signal to D/A */
00052 linSample sim_data_rx_sync  [SIU_AER_MAX_FRAME_LENGTH];  /* reference signal */
00053 linSample sim_data_ne_speech[AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH];
00054 linSample sim_data_mic      [AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH];
00055 linSample sim_data_tx_in    [AER_SIM_NUM_MIC][SIU_AER_MAX_FRAME_LENGTH];
00056 linSample sim_data_tx_out   [SIU_AER_MAX_FRAME_LENGTH];
00057
00058 /* Buffers for loading or reading AER tail model coefficients */
00059 #define NUM_H_VEC_GET 3
00060 #define NUM_H_VEC_PUT 3
00061 Fract aer_coef_mant[aer_NUM_WORDS_PER_H_VEC_16K*NUM_H_VEC_PUT];
00062 tint aer_coef_exp[NUM_H_VEC_PUT];
00063 aerTailModel_t aer_tail_model;
00064
00065 /* Buffers for reading BF filter coefficients */
00066 Fract bf_filt_coef[AER_SIM_NUM_BF_MIC][bf_MAX_SUPPORTED_FILT_LEN];
00067 tint bf_filt_len;
00068
00069 /* Prototypes of the funtions only referenced in this file */
00070 tbool aer_sim_fio_read_fe(aersimFileIO_t *fio, linSample *data_fe);
00071 tbool aer_sim_fio_read_ne(aersimFileIO_t *fio,
00072                           linSample data_ne[][SIU_AER_MAX_FRAME_LENGTH],tint num_input);
00073 void aer_sim_fio_write_data(aersimFileIO_t *fio);
00074 tint aer_sim_get_erle(siuInst_t *inst);
00075 void aer_sim_print_version_mips(siuInst_t *inst);
00076 void aer_sim_cfg_on_the_fly(siuInst_t *inst);
00077
00078 /* global variables for debugging purpose - to set conditional breakpoint */
00079 int frm_cnt = 0;
00080 int num_frames_converged = 0;
00081
00082 /* -------------------- MAIN SIMULATION FUNCTION --------------------------- */
00083 int main()
00084 {
00085   FILE * fp_sim_cfg;
00086   tint num_mic, mic_type;
00087   char fname[50];
00088
00089   /* Initialize simulation environment */
00090   printf("Initialize simulation environment.\n");
00091   aer_sim_init(&siuSetup);
00092
00093   /* Read simulation configuration parameters */
00094   printf("Read simulation configuration parameters.\n");
00095
00096   strcpy(fname, AER_SIM_ROOT_FOLDER);
00097   strcat(fname, "aersimcfg.txt");
00098   fp_sim_cfg = fopen(fname, "r");
00099
00100   if(fp_sim_cfg == NULL) {
00101     printf("Configuration file does NOT exist!\n");
00102     exit(0);
00103   }
00104   aer_sim_read_cfg(&siuSetup, &aersim_fio, fp_sim_cfg);
00105
00106   mic_type = siuSetup.system_cfg.mult_mic_type;
00107   if(mic_type == AER_SIM_MIC_TYPE_ARRAY) {
00108     num_mic = siuSetup.system_cfg.num_BF_mic;
00109   }
00110   else {
00111     num_mic = siuSetup.system_cfg.num_HF_mic;
00112   }
00113
00114   /* Configure simulation environment based on configuration file */
00115   printf("Configure simulation based on configuration file.\n");
00116   aer_sim_apply_config(&siuSetup);
00117
00118   /* SIU initialization */
00119   aer_sim_init_siu(&siu_inst, &siuSetup);
00120
00121   /* PIU initialization */
00122   aer_sim_init_piu(&piu_inst, &siuSetup);
00123
00124   /* AER instantiation */
00125   printf("Create one or more AER instances.\n");
00126   aer_sim_instantiate_aer(&siu_inst, &siuSetup);
00127
00128   /* Initialize near end (Tx) and far end (Rx) signal generators.
00129    *  - signal generator is set on or off depending on aersimcfg.txt. */
00130   printf("Initialize near end and far end signal generators.\n");
00131   aer_sim_open_txrx_sgns (&sgnTxInst[0], &sgnRxInst, &siuSetup);
00132
00133   /* Initialize the Acoustic Echo Path (AEP) simulator. */
00134   printf("Initialize the Acoustic Echo Path (AEP) simulator.\n");
00135   aer_sim_open_aep(&aepSimInst, &siuSetup);
00136
00137   /* File I/O */
00138   printf("Open simulation input and output files.\n");
00139   aer_sim_open_files(&aersim_fio, num_mic);
00140
00141   /* Configure AER, DRC, AGC parameters. */
00142   printf("Configure AER, DRC, AGC and BF parameters.\n");
00143   aer_sim_config_aer_params(&siu_inst, &siuSetup);
00144
00145   /* AEP configuration */
00146   aer_sim_aep_config(&aepSimInst, &siuSetup.aep_params,
00147                      siuSetup.aep_gain_adj_exp, siuSetup.aep_gain_adj_mant);
00148
00149   /* -----------------------  MAIN SIMULATION  LOOP --------------------------- */
00150
00151   printf("Start data processing...\n");
00152
00153   /* Enter main loop */
00154   loop {
00155     frm_cnt++;
00156
00157     /* Reconfigure AER on the fly during simulation: set breakpoint here and
00158        step into the function. */
00159     aer_sim_cfg_on_the_fly(&siu_inst);
00160
00161     /* Get far end data for Rx processing */
00162     if(aersim_fio.flag_rxin_rd) {
00163       /* Get far end data from file */
00164       if (!aer_sim_fio_read_fe(&aersim_fio, sim_data_rx_in)) {
00165         printf("End of far end input file reached!\n");
00166         break;
00167       }
00168     }
00169     else if (siuSetup.fe_sgn_flag) {
00170       /* Get far end data from signal generator */
00171       aer_sim_sgn_gen_rx_frame (&sgnRxInst, sim_data_rx_in, siuSetup.aer_rin_frm_size);
00172     }
00173     else {
00174       memset(sim_data_rx_in, 0, sizeof(linSample)*SIU_AER_MAX_FRAME_LENGTH);
00175     }
00176
00177     /* Receive path processing: DRC -> AER */
00178     siuReceiveIn(&siu_inst, sim_data_rx_in, sim_data_rx_out, NULL,
00179                  siuSetup.system_cfg.num_HF_mic);
00180
00181     /* PCM interface - receive side: AER -> DAC (speaker) */
00182     piuReceiveIn(&piu_inst, sim_data_rx_out, sim_data_dac, sim_data_rx_sync);
00183
00184     /* Get near end data for Tx processing */
00185     if(aersim_fio.flag_txin_rd) {
00186       /* Get from file near end data (with or without echo depending on configuration) */
00187       if(!aer_sim_fio_read_ne(&aersim_fio, sim_data_ne_speech, num_mic)) {
00188         printf("End of near end input files reached!\n");
00189         break;
00190       }
00191     }
00192     else if (siuSetup.ne_sgn_flag) {
00193       /* Get data from signal generator - pure signal without echo */
00194       aer_sim_sgn_gen_tx_frame(&sgnTxInst[0], sim_data_ne_speech,
00195                                siuSetup.aer_sin_frm_size, num_mic);
00196     }
00197     else {
00198       memset(sim_data_ne_speech, 0,
00199              sizeof(linSample)*num_mic*SIU_AER_MAX_FRAME_LENGTH);
00200     }
00201
00202     /* Generate echo and mix with NE speech depending on flag_txin_echo:
00203        flag_txin_echo = 1: Tx input already has echo, e.g. captured in real time,
00204                            don't generate echo in AEP.
00205        flag_txin_echo = 0: Tx input doesn't have echo, generate echo using AEP. */
00206     aer_sim_aep_add_echo(&aepSimInst, sim_data_dac, sim_data_ne_speech,
00207                          sim_data_mic, num_mic, aersim_fio.flag_txin_echo);
00208
00209     /* PCM interface - send side: ADC -> AER */
00210     piuSendIn(&piu_inst, sim_data_mic, sim_data_tx_in, num_mic);
00211
00212     /* Send path processing: AGC -> AER -> MMC -> DRC or BF -> AER -> DRC */
00213     siuSendIn(&siu_inst, sim_data_rx_sync, sim_data_tx_in, sim_data_tx_out,
00214               NULL, num_mic, mic_type, siuSetup.aer_sout_frm_size);
00215
00216     /* Write output to files */
00217     aer_sim_fio_write_data(&aersim_fio);
00218
00219     if (siuSetup.aer_mips_profile) {
00220       /* Check convergence and stop simulation is convergence is enough. */
00221       if (aer_sim_get_erle(&siu_inst) >= AER_SIM_PEAK_MIPS_ERLE_THRESH) {
00222         num_frames_converged++;
00223         if(num_frames_converged > AER_SIM_DURATION_CONVERGED) {
00224           printf("Enough convergence achieved. Stop simulation.\n");
00225           break;
00226         }
00227       }
00228     } /* aer_mips_profile */
00229
00230   } /* loop */
00231
00232   /* Print AER version information and MIPS measurements */
00233   aer_sim_print_version_mips(&siu_inst);
00234   aer_sim_close_files(&aersim_fio, num_mic);
00235
00236   printf("AER simulation finished.\n");
00237
00238   return(0);
00239 } /* end of aersim */
00240
00241 /******************************************************************************
00242  * FUNCTION PURPOSE: Read Far End Signal
00243  *****************************************************************************/
00244 tbool aer_sim_fio_read_fe(aersimFileIO_t *fio, linSample *data_fe)
00245 {
00246   return(aerSimFread(data_fe, siuSetup.aer_rin_frm_size, fio->fp_rxin));
00247 } /* aer_sim_fio_read_fe */
00248
00249 /******************************************************************************
00250  * FUNCTION PURPOSE: Read Near End Signal
00251  *****************************************************************************/
00252 tbool aer_sim_fio_read_ne(aersimFileIO_t *fio,
00253                           linSample data_ne[][SIU_AER_MAX_FRAME_LENGTH],
00254                           tint num_input)
00255 {
00256   int i;
00257   tbool flag_data_good;
00258
00259   flag_data_good = TRUE;
00260   for(i=0; i<num_input; i++) {
00261     flag_data_good &= aerSimFread(&data_ne[i][0], siuSetup.aer_sin_frm_size,
00262                                   fio->fp_txin[i]);
00263   }
00264
00265   return(flag_data_good);
00266 } /* aer_sim_fio_read_ne */
00267
00268 /******************************************************************************
00269  * FUNCTION PURPOSE: Write Rx/Tx/debug Output Data
00270  *****************************************************************************/
00271 void aer_sim_fio_write_data(aersimFileIO_t *fio)
00272 {
00273   int i;
00274   aerDebugStat_t aer_dbg;
00275   aerVersion_t aer_ver;
00276   tint *aer_dbg_tint;
00277
00278   /* Write Rx path output */
00279   if(fio->flag_rxout_wr) {
00280     aerSimFwrite(sim_data_rx_out, siuSetup.aer_rout_frm_size, fio->fp_rxout);
00281   }
00282
00283   /* Write Tx path output */
00284   if(fio->flag_txout_wr) {
00285     aerSimFwrite(sim_data_tx_out, siuSetup.aer_sout_frm_size, fio->fp_txout);
00286   }
00287
00288   /* Write AER debug status data */
00289   for(i=0; i<siuSetup.system_cfg.num_HF_mic; i++) {
00290     aerGetPerformance(siu_inst.aerHFInst[i], &aer_dbg, &aer_ver, FALSE);
00291     aer_dbg_tint = (tint *)&aer_dbg;
00292     aerSimFwrite(aer_dbg_tint, sizeof(aerDebugStat_t)/sizeof(tint), fio->fp_debug_aer);
00293   }
00294
00295   /* Write MSS debug data */
00296   // mssDebugStat(siu_inst.mssInst, &mss_dbg);
00297   // mss_dbg_tint = (tint *)&mss_dbg;
00298   // aerSimFwrite(mss_dbg_tint, sizeof(mssDebugStat_t)/sizeof(tint), fio->fp_debug_mss);
00299
00300 } /* aer_sim_fio_write_data */
00301
00302 /******************************************************************************
00303  * FUNCTION PURPOSE: Get ERLE Measurement form AER
00304  *****************************************************************************/
00305 tint aer_sim_get_erle(siuInst_t *inst)
00306 {
00307   aerDebugStat_t aer_dbg;
00308   aerVersion_t aer_ver;
00309
00310   /* get ERLE from the first mic */
00311   aerGetPerformance(inst->aerHFInst[0], &aer_dbg, &aer_ver, FALSE);
00312
00313   return(aer_dbg.max_canc_l2);
00314 } /* aer_sim_get_erle */
00315
00316 /******************************************************************************
00317  * FUNCTION PURPOSE: Simulate real time on-the-fly configuration/control of AER.
00318  *****************************************************************************/
00319 void aer_sim_cfg_on_the_fly(siuInst_t *inst)
00320 {
00321   int i;
00322   tint num_coeff_words, ret_code;
00323
00324   /* Control AER: First, stop the program and change toggle_aer to TRUE. */
00325   if (siuSetup.toggle_aer) { /* --> break point can be set here to stop the code */
00326     /* Second, change aerCtl in Code Composer watch window to configure AER. */
00327     for(i=0; i<inst->phone_sys.num_HF_mic; i++){
00328       aerControl (inst->aerHFInst[i], (aerControl_t *)&siuSetup.aerCtl);
00329     }
00330     siuSetup.toggle_aer = FALSE;
00331   }
00332
00333   /* Control AGC: First, stop the program and change toggle_agc to TRUE. */
00334   if (siuSetup.toggle_agc) { /* --> break point can be set here to stop the code */
00335     /* Second, change agcCtl in Code Composer watch window to configure AGC. */
00336     for(i=0; i<inst->phone_sys.num_HF_mic; i++){
00337       agcControl (inst->agcHFInst[i], (agcControl_t *)&siuSetup.agcCtl);
00338     }
00339     siuSetup.toggle_agc = FALSE;
00340   }
00341
00342   /* Change SIU gains: follow same procedure as above */
00343   if (siuSetup.toggle_siugain) {
00344     for(i=0; i<inst->phone_sys.num_HF_mic; i++){
00345       siuGainControl (inst->agcHFhandles[i], (siuGainControl_t *)&siuSetup.siuGainCtl);
00346     }
00347     siuSetup.toggle_siugain = FALSE;
00348   }
00349
00350   /* Read tail model filter from AER */
00351   if (siuSetup.toggle_getflt) {
00352     if(siuSetup.aer_kernel_srate == AER_SIM_SRATE_16000_DIV_8K) {
00353       num_coeff_words = aer_NUM_WORDS_PER_H_VEC_16K*NUM_H_VEC_GET;
00354     }
00355     else {
00356       num_coeff_words = aer_NUM_WORDS_PER_H_VEC_8K*NUM_H_VEC_GET;
00357     }
00358     ret_code = aerGetFilter(inst->aerHFInst[0], &aer_tail_model, &aer_coef_mant[0],
00359                             &aer_coef_exp[0], 0, num_coeff_words);
00360     if(ret_code != aer_NOERR) {
00361       printf("Error when calling aerGetFilter with error code %d!\n", ret_code);
00362       exit(0);
00363     }
00364
00365     for(i=0; i<siuSetup.system_cfg.num_BF_mic; i++)
00366     {
00367       ret_code = bfGetFilter(inst->bfInst, &bf_filt_coef[i][0], &bf_filt_len, bf_FG_BF, i);
00368       if(ret_code != bf_NOERR) {
00369         printf("Error when calling bfGetFilter with error code %d!\n", ret_code);
00370         exit(0);
00371       }
00372     }
00373
00374     siuSetup.toggle_getflt = FALSE;
00375   }
00376
00377   /* pre-load AER tail model filter */
00378   if (siuSetup.toggle_putflt) {
00379     if(siuSetup.aer_kernel_srate == AER_SIM_SRATE_16000_DIV_8K) {
00380       num_coeff_words = aer_NUM_WORDS_PER_H_VEC_16K*NUM_H_VEC_PUT;
00381     }
00382     else {
00383       num_coeff_words = aer_NUM_WORDS_PER_H_VEC_8K*NUM_H_VEC_PUT;
00384     }
00385
00386     /* load valid tail model through CCS before executing code below */
00387     ret_code = aerPutFilter(inst->aerHFInst[0], &aer_tail_model, &aer_coef_mant[0],
00388                  &aer_coef_exp[0], 0, aer_NUM_WORDS_PER_H_VEC_16K, FALSE);
00389     if(ret_code != aer_NOERR) {
00390       printf("Error when calling aerPutFilter with error code %d!\n", ret_code);
00391       exit(0);
00392     }
00393     ret_code = aerPutFilter(inst->aerHFInst[0], &aer_tail_model,
00394                             &aer_coef_mant[aer_NUM_WORDS_PER_H_VEC_16K],
00395                             &aer_coef_exp[0], aer_NUM_WORDS_PER_H_VEC_16K,
00396                             aer_NUM_WORDS_PER_H_VEC_16K, FALSE);
00397     if(ret_code != aer_NOERR) {
00398       printf("Error when calling aerPutFilter with error code %d!\n", ret_code);
00399       exit(0);
00400     }
00401     ret_code = aerPutFilter(inst->aerHFInst[0], &aer_tail_model,
00402                             &aer_coef_mant[aer_NUM_WORDS_PER_H_VEC_16K*2],
00403                             &aer_coef_exp[0], aer_NUM_WORDS_PER_H_VEC_16K*2,
00404                             aer_NUM_WORDS_PER_H_VEC_16K, TRUE);
00405     if(ret_code != aer_NOERR) {
00406       printf("Error when calling aerPutFilter with error code %d!\n", ret_code);
00407       exit(0);
00408     }
00409
00410     siuSetup.toggle_putflt = FALSE;
00411   }
00412
00413 /* code below can be used to test adaptive AGC
00414   if(frm_cnt == 1000) {
00415     siuSetup.agcCtl.valid_bitfield = agc_CTL_VALID_SAT_THRESHOLD;
00416     siuSetup.agcCtl.sat_threshold  = 1024;
00417     agcControl (inst->agcHFInst[0], (agcControl_t *)&siuSetup.agcCtl);
00418
00419     printf("Start filter rescaling test. Reduce AGC saturation threshold.\n");
00420   }
00421
00422   if(frm_cnt == 2000) {
00423     siuSetup.agcCtl.valid_bitfield = agc_CTL_VALID_SAT_THRESHOLD;
00424     siuSetup.agcCtl.sat_threshold  = 32500;
00425     agcControl (inst->agcHFInst[0], (agcControl_t *)&siuSetup.agcCtl);
00426     printf("Change AGC saturation threshold back to what it was.\n");
00427   }
00428 */
00429 } /* aer_sim_cfg_on_the_fly */
00430
00431
00432 /******************************************************************************
00433  * FUNCTION PURPOSE: Print AER version number and measured MIPS.
00434  *****************************************************************************/
00435 void aer_sim_print_version_mips(siuInst_t *inst)
00436 {
00437   aerDebugStat_t aer_dbg;
00438   aerVersion_t aer_ver;
00439
00440   aerGetPerformance(inst->aerHFInst[0], &aer_dbg, &aer_ver, FALSE);
00441
00442   printf("AER version: %d.%d.%d.%d.%d.%d\n", aer_ver.major, aer_ver.minor,
00443           aer_ver.patch, aer_ver.build, aer_ver.quality, aer_ver.btype);
00444
00445   if(siuSetup.aer_mips_profile) {
00446 #ifdef ti_targets_C55_large
00447     printf("C55x: AER Tx Max Cycles = %ld, Avg Cycles = %ld\n",
00448            siuSetup.TxCyclesMax, siuSetup.TxCyclesAvg);
00449     printf("C55x: AER Rx Max Cycles = %ld, Avg Cycles = %ld\n",
00450            siuSetup.RxCyclesMax, siuSetup.RxCyclesAvg);
00451 #else
00452 #ifndef gnu_targets_arm_GCArmv7A/* c64x+ */
00453     printf("C64x+/C674x: AER Tx Max Cycles = %d, Avg Cycles = %d\n",
00454            siuSetup.TxCyclesMax, siuSetup.TxCyclesAvg);
00455     printf("C64x+/C674x: AER Rx Max Cycles = %d, Avg Cycles = %d\n",
00456            siuSetup.RxCyclesMax, siuSetup.RxCyclesAvg);
00457 #endif
00458 #endif
00459
00460     printf("MIPS measurement done\n");
00461   }
00462 } /* aer_sim_print_version_mips */
00463
00464
00465 /* nothing past this line */


AER Simulation: aersim.h File Reference

  • File List
  • Globals

aersim.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <ti/mas/aer/test/sgnsim/sgnsim.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/piusim/piuloc.h>
#include <ti/mas/aer/test/aepsim/aepsim.h>
#include <ti/mas/aer/test/aersim/aersim_fileIO.h>
#include <ti/mas/aer/test/siusim/siuaer.h>
#include <ti/mas/types/types.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/agc.h>
#include <ti/mas/aer/drc.h>
#include <ti/mas/aer/bf.h>
#include <ti/mas/aer/test/siusim/siuagc.h>
#include <ti/mas/aer/test/siusim/siudrc.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>

Include dependency graph for aersim.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuSysCfg_s
struct | p651Pars_t
struct | siuSetup_s

Defines

#define | SIU_MAX_GETFLT_CNT 64
#define | AECHO_LOOPCNT 3
#define | LRIN_LOOPCNT 5
#define | LRIN_START (-30)
#define | LRIN_STEP 5
#define | PTABLE_LENGTH (AECHO_LOOPCNT*LRIN_LOOPCNT)
#define | POWER_TRACK_RX_PATH 0
#define | POWER_TRACK_TX_PATH 1
#define | POWER_TRACK_TX_OUT 2
#define | loop for(;;)

Typedefs

typedef siuSysCfg_s | siuSysCfg_t
typedef siuSetup_s | siuSetup_t

Functions

void | aer_sim_init (siuSetup_t *siu_setup)
void | aer_sim_read_cfg (siuSetup_t *siu_setup, aersimFileIO_t *fio, FILE *test_cfg)
void | aer_sim_open_aep (aepSimInst_t *aep_inst, siuSetup_t *siu_setup)
void | aer_sim_apply_config (siuSetup_t *siu_setup)
void | aer_sim_init_siu (siuInst_t *siu_inst_ptr, siuSetup_t *siu_setup_ptr)
void | aer_sim_init_piu (piuInst_t *piu_inst_ptr, siuSetup_t *siu_setup_ptr)
void | aer_sim_instantiate_aer (siuInst_t *siu_inst, siuSetup_t *siu_setup)
void | aer_sim_open_txrx_sgns (sgnInstBuf_t *sgn_inst_tx, sgnInstBuf_t *sgn_inst_rx, siuSetup_t *siu_setup)
void | aer_sim_config_aer_params (siuInst_t *inst, siuSetup_t *siu_setup)
void | aersim_cacheEnable ()
void | aersim_cacheFlush ()
tbool | aersim_initCycleProfiling ()
void | aersim_profile_get_cycle_before_aer (siuSetup_t *siu_setup)
void | aersim_profile_get_cycle_after_aer_send (siuSetup_t *siu_setup)
void | aersim_profile_get_cycle_after_aer_receive (siuSetup_t *siu_setup)

Define Documentation

#define SIU_MAX_GETFLT_CNT 64

Definition at line 38 of file aersim.h.

#define AECHO_LOOPCNT 3

Definition at line 39 of file aersim.h.

#define LRIN_LOOPCNT 5

Definition at line 40 of file aersim.h.

#define LRIN_START (-30)

Definition at line 41 of file aersim.h.

#define LRIN_STEP 5

Definition at line 42 of file aersim.h.

#define PTABLE_LENGTH (AECHO_LOOPCNT*LRIN_LOOPCNT)

Definition at line 43 of file aersim.h.

#define POWER_TRACK_RX_PATH 0

Definition at line 45 of file aersim.h.

#define POWER_TRACK_TX_PATH 1

Definition at line 46 of file aersim.h.

#define POWER_TRACK_TX_OUT 2

Definition at line 47 of file aersim.h.

#define loop for(;;)

Definition at line 50 of file aersim.h.

Typedef Documentation

typedef struct siuSysCfg_s siuSysCfg_t

typedef struct siuSetup_s siuSetup_t

Function Documentation

void aer_sim_init ( siuSetup_t * siu_setup )

Definition at line 89 of file aersim_setup.c.

References siuSetup_s::aep_gain_adj_exp, siuSetup_s::aep_gain_adj_mant, siuSetup_s::aep_gain_l2, siuSetup_s::aep_gain_start_exp, siuSetup_s::aep_gain_start_mant, siuSetup_s::aep_params, siuSetup_s::aep_vary_time, siuSetup_s::aepCtl, siuSetup_s::aer_dbgstat_freq, siuAerSysPars_s::aer_filter_len_HES, siuAerSysPars_s::aer_filter_len_HF, siuSetup_s::aer_mips_profile, siuSetup_s::aer_reset_bitfield, AER_SIM_HES_MAX_FILT_LENGTH, AER_SIM_HF_MAX_FILT_LENGTH, AER_SIM_PIU_DEL_RX, AER_SIM_PIU_DEL_TX, aer_sim_setup_aep(), aer_sim_setup_sgn(), AER_SIM_SIU_Y2X_DEL_ADJ, siuSetup_s::aer_sys_params, siuSetup_s::aer_trace_cfg, siuSetup_s::aer_trace_size_rx, siuSetup_s::aer_trace_size_tx, siuSetup_s::aer_valid_bitfield, aersim_cacheEnable(), aersim_cacheFlush(), siuAerSysPars_s::ag_chg_delay_rx, siuAerSysPars_s::ag_chg_delay_tx, siuAerSysPars_s::ag_chg_interp_samp, siuSetup_s::asnr_enable, siuSysCfg_s::band_split_flag, siuSetup_s::cng_enable, siuGainControl_s::ctl_code, siuSetup_s::doCacheEnable, siuSetup_s::drc_cfgbits, siuSetup_s::drc_mips_profile, siuSetup_s::drc_on_flag, p651Pars_t::enabled, siuSysCfg_s::frame_size, siuGainControl_s::mic_gain, siuSetup_s::new_phone_mode, siuSysCfg_s::num_HF_mic, siuSetup_s::p651Pars, siuSysCfg_s::pcm_bits, siuSetup_s::piu_tg_state, siuSetup_s::pow_track_enabled, siuSetup_s::putflt_flag_last, siuSetup_s::run_time, siuSetup_s::RxCyclesAvg, siuSetup_s::RxCyclesMax, siuSetup_s::rxSGN, siuSysCfg_s::sampling_rates, siuSysCfg_s::segment_size, siu_SET_MIC_GAIN, siuSetup_s::siuGainCtl, siuSetup_s::system_cfg, siuSetup_s::test_double_talk, siuSetup_s::toggle_aep, siuSetup_s::toggle_aer, siuSetup_s::toggle_agc, siuSetup_s::toggle_bf, siuSetup_s::toggle_drcCtrl, siuSetup_s::toggle_drcGetParam, siuSetup_s::toggle_getflt, siuSetup_s::toggle_phone_mode, siuSetup_s::toggle_piu_tg, siuSetup_s::toggle_putflt, siuSetup_s::toggle_rx_sg, siuSetup_s::toggle_siugain, siuSetup_s::toggle_tx_sg, siuSetup_s::toggle_veu, siuSetup_s::TxCyclesAvg, siuSetup_s::TxCyclesMax, siuSetup_s::txin_file_with_echo, siuSetup_s::txout_cng_only, siuSetup_s::txSGN, siuGainControl_s::u, siuSysCfg_s::ulaw, siuSetup_s::use_fdnlp, siuSetup_s::veu_enabled, and siuAerSysPars_s::y2x_delay.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_read_cfg | ( | siuSetup_t * | siu_setup,
 |  | aersimFileIO_t * | fio,
 |  | FILE * | test_cfg
 | ) |  |

Definition at line 280 of file aersim_setup.c.

References siuSetup_s::aer_ctl_bitfield_0, siuSetup_s::aer_ctl_bitfield_1, siuSetup_s::aer_mips_profile, AER_SIM_MIC_TYPE_ARRAY, AER_SIM_MIC_TYPE_STAND_ALONE, AER_SIM_NUM_BF_MIC, AER_SIM_NUM_HF_MIC, siuSetup_s::agc_ctl_bitfield, siuSysCfg_s::band_split_flag, siuSetup_s::bf_ctl_bitfield, siuSetup_s::bf_mics, siuSysCfg_s::bf_steer_angle, siuSetup_s::drc_cfgbits, siuSetup_s::drc_on_flag, siuSetup_s::fe_sgn_flag, aersimFileIO_s::flag_rxin_rd, aersimFileIO_s::flag_rxout_wr, aersimFileIO_s::flag_txin_echo, aersimFileIO_s::flag_txin_rd, aersimFileIO_s::flag_txout_wr, siuSysCfg_s::mult_mic_type, siuSetup_s::ne_sgn_flag, siuSysCfg_s::num_BF_mic, siuSysCfg_s::num_HF_mic, aersimFileIO_s::rx_in_file_name, siuSysCfg_s::sampling_rates, siuSetup_s::system_cfg, and aersimFileIO_s::tx_in_file_name.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_open_aep | ( | aepSimInst_t * | aep_inst,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 543 of file aersim_setup.c.

References siuSetup_s::aep_params, siuSetup_s::aep_vary_time, siuSetup_s::aer_rout_frm_size, AER_SIM_SRATE_16000_DIV_8K, AER_SIM_SRATE_8000_DIV_8K, aersim_chkbit, siuSysCfg_s::sampling_rates, and siuSetup_s::system_cfg.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_apply_config ( siuSetup_t * siu_setup )

Definition at line 368 of file aersim_setup.c.

References siuSetup_s::aep_params, siuSetup_s::aer_mips_profile, siuSetup_s::aer_rin_frm_size, siuSetup_s::aer_rout_frm_size, AER_SIM_SRATE_16000_DIV_8K, AER_SIM_SRATE_8000_DIV_8K, siuSetup_s::aer_sin_frm_size, siuSetup_s::aer_sout_frm_size, aersim_chkbit, aersim_initCycleProfiling(), siuSysCfg_s::frame_size, siuSysCfg_s::sampling_rates, siuSetup_s::segment_size, siuSysCfg_s::segment_size, and siuSetup_s::system_cfg.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_init_siu | ( | siuInst_t * | siu_inst_ptr,
 |  | siuSetup_t * | siu_setup_ptr
 | ) |  |

Definition at line 409 of file aersim_setup.c.

References siuInst_t::aer_recv_in_buf, siuSetup_s::aer_rin_frm_size, siuSetup_s::aer_rout_frm_size, siuSetup_s::aer_sin_frm_size, siuSetup_s::aer_sout_frm_size, siuConfig_t::companding_law, siuConfig_t::core_heap, siuConfig_t::debug, siuConfig_t::exception, siuConfig_t::ID, siuTxConfig_t::num_HF_mic, siuSysCfg_s::num_HF_mic, siuConfig_t::pcm_bits, siuSysCfg_s::pcm_bits, siuRxConfig_t::rin_frm_len, siuRxConfig_t::rout_frm_len, siuTxConfig_t::send_in_frame_length, siuTxConfig_t::send_out_frame_length, SIU_MID_SIU, siu_rx_del_buf, siuInit(), siuMakeID, siuRxOpen(), siuTxOpen(), siuSetup_s::system_cfg, siuSysCfg_s::ulaw, and siuConfig_t::voice_heap.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_init_piu | ( | piuInst_t * | piu_inst_ptr,
 |  | siuSetup_t * | siu_setup_ptr
 | ) |  |

Definition at line 446 of file aersim_setup.c.

References siuSetup_s::aer_rout_frm_size, piu_inst, and piuInit().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_instantiate_aer | ( | siuInst_t * | siu_inst,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 455 of file aersim_setup.c.

References AER_SIM_MIC_TYPE_ARRAY, siuSetup_s::aer_sys_params, siuSysCfg_s::band_split_flag, siuSetup_s::drc_cfgbits, siuSysCfg_s::mult_mic_type, siuSysCfg_s::num_BF_mic, siuSysCfg_s::num_HF_mic, siuSysCfg_s::sampling_rates, siu_inst, siu_mmic_init(), siu_new_aer(), siu_new_agc(), siu_new_bf(), siu_new_drc(), siu_new_mss(), siu_open_aer(), siu_open_agc(), siu_open_bf(), siu_open_drc(), siu_open_mss(), and siuSetup_s::system_cfg.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_open_txrx_sgns | ( | sgnInstBuf_t * | sgn_inst_tx,
 |  | sgnInstBuf_t * | sgn_inst_rx,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 505 of file aersim_setup.c.

References aersim_chkbit, siuSetup_s::fe_sgn_flag, siuSetup_s::ne_sgn_flag, siuSysCfg_s::num_HF_mic, siuSetup_s::rxSGN, siuSysCfg_s::sampling_rates, siuSetup_s::system_cfg, and siuSetup_s::txSGN.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_config_aer_params | ( | siuInst_t * | inst,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 569 of file aersim_setup.c.

References siuSetup_s::aer_ctl_bitfield_0, siuSetup_s::aer_ctl_bitfield_1, AER_SIM_AGC_GAINSWING_MAX, AER_SIM_AGC_MICGAIN_MAX, AER_SIM_AGC_MICGAIN_MIN, AER_SIM_AGC_SAT_HANGOVER, AER_SIM_AGC_SAT_THRESHOLD, AER_SIM_BF_STEER_ANGLE_0, AER_SIM_BF_STEER_ANGLE_45, AER_SIM_BF_STEER_ANGLE_90, AER_SIM_HF_MICGAIN_0dB, AER_SIM_HF_SPKGAIN_0dB, AER_SIM_MIC_TYPE_ARRAY, siuInst_t::aerHFInst, siuSetup_s::agc_ctl_bitfield, siuInst_t::agcHFhandles, siuInst_t::agcHFInst, bf_coeffs_0, bf_coeffs_45, bf_coeffs_90, siuSetup_s::bf_ctl_bitfield, siuSetup_s::bf_mics, siuSysCfg_s::bf_steer_angle, siuGainControl_s::ctl_code, siuSetup_s::drc_on_flag, siuGainControl_s::mic_gain, siuSysCfg_s::mult_mic_type, siuSysCfg_s::num_BF_mic, siuPhoneSys_t::num_HF_mic, siuInst_t::phone_sys, sampleEqBqParamsRx, sampleEqBqParamsTx, siuSysCfg_s::sampling_rates, siu_config_bf(), siu_control_drc(), siu_SET_MIC_GAIN, siu_SET_SPK_GAIN, siuGainControl(), siuGainControl_s::spk_gain, siuSetup_s::system_cfg, and siuGainControl_s::u.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aersim_cacheEnable ( )

Definition at line 737 of file aersim_setup.c.

Referenced by aer_sim_init().

Here is the caller graph for this function:

void aersim_cacheFlush ( )

Definition at line 745 of file aersim_setup.c.

Referenced by aer_sim_init(), siuReceiveIn(), and siuSendIn().

Here is the caller graph for this function:

tbool aersim_initCycleProfiling ( )

Definition at line 755 of file aersim_setup.c.

Referenced by aer_sim_apply_config().

Here is the caller graph for this function:

void aersim_profile_get_cycle_before_aer ( siuSetup_t * siu_setup )

Definition at line 764 of file aersim_setup.c.

References siuSetup_s::cycles_before_aer.

Referenced by siuReceiveIn(), and siuSendIn().

Here is the caller graph for this function:

void aersim_profile_get_cycle_after_aer_send ( siuSetup_t * siu_setup )

Definition at line 771 of file aersim_setup.c.

References siuSetup_s::cycles_before_aer, siuSetup_s::TxCyclesAvg, and siuSetup_s::TxCyclesMax.

void aersim_profile_get_cycle_after_aer_receive ( siuSetup_t * siu_setup )

Definition at line 788 of file aersim_setup.c.

References siuSetup_s::cycles_before_aer, siuSetup_s::RxCyclesAvg, and siuSetup_s::RxCyclesMax.

Referenced by siuReceiveIn().

Here is the caller graph for this function:


AER Simulation: aersim.h Source File

  • File List
  • Globals

aersim.h

Go to the documentation of this file.
00001 #ifndef _AERSIM_H
00002 #define _AERSIM_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE: Main program and supporting routines for the simulation of AER.
00006  ******************************************************************************
00007  * FILE NAME:   aersim.h
00008  *
00009  * DESCRIPTION: Contains routines for for the simulation testing of AER
00010  *
00011  * (C) Copyright 2008, Texas Instruments, Inc.
00012  *****************************************************************************/
00013 #include <stdlib.h>
00014 #include <stdio.h>
00015
00016 #include <ti/mas/aer/test/sgnsim/sgnsim.h>
00017 #include <ti/mas/aer/test/siusim/siuloc.h>
00018 #include <ti/mas/aer/test/piusim/piuloc.h>
00019 #include <ti/mas/aer/test/aepsim/aepsim.h>
00020 #include <ti/mas/aer/test/aersim/aersim_fileIO.h>
00021
00022 #include <ti/mas/aer/test/siusim/siuaer.h>
00023
00024 /* System level header files */
00025 #include <ti/mas/types/types.h>                      /* DSP types            */
00026 #include <ti/mas/aer/aer.h>
00027 #include <ti/mas/aer/agc.h>
00028 #include <ti/mas/aer/drc.h>
00029 #include <ti/mas/aer/bf.h>
00030 #include <ti/mas/aer/test/siusim/siuagc.h>
00031 #include <ti/mas/aer/test/siusim/siudrc.h>
00032 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00033
00034
00035 #include <ti/mas/aer/test/piusim/piuloc.h>
00036
00037 /* Internal Constants */
00038 #define SIU_MAX_GETFLT_CNT    64
00039 #define AECHO_LOOPCNT         3
00040 #define LRIN_LOOPCNT          5
00041 #define LRIN_START          (-30)
00042 #define LRIN_STEP             5
00043 #define PTABLE_LENGTH       (AECHO_LOOPCNT*LRIN_LOOPCNT)
00044
00045 #define POWER_TRACK_RX_PATH 0
00046 #define POWER_TRACK_TX_PATH 1
00047 #define POWER_TRACK_TX_OUT 2
00048
00049 /* Useful macros */
00050 #define loop    for(;;)     /* endless loop */
00051
00052 typedef struct siuSysCfg_s {
00053   tint ulaw;            /* companding law -1 (transparent),     */
00054                         /*  0 (A-law), 1 (u-law), 2 (linear)    */
00055   tint pcm_bits;        /* (1-16), num of bits in a pcm-sample  */
00056   tint num_BF_mic;      /* number of beamforming mics           */
00057   tint num_HF_mic;      /* number of remote hands-free mics     */
00058   tint segment_size;    /* # samples @8kHz in PIU (sub)segment  */
00059   tint frame_size;      /* frame size in # of samples @8kHz     */
00060   tint sampling_rates;  /* bitfield:                            */
00061                         /*  Bit 0: Available Rx in. 0=8kHz 1=16kHz        */
00062                         /*  Bit 1: Requested Tx out. 0=8kHz 1=16kHz       */
00063                         /*  Bit 2: Available Rx out/Tx in. 0=8kHz 1=16kHz */
00064   tint bf_steer_angle;
00065   tbool band_split_flag;/* 0: full band AER for 16kHz
00066                            1: bandsplit AER for 16kHz */
00067   tbool mult_mic_type;  /* Multiple-mic type:
00068                            0: microphone array for Beam Forming (BF)
00069                            1: remote hands-free microphones for Multi-Source
00070                               Selection (MSS)                             */
00071 }siuSysCfg_t;
00072
00073 /* IEC 651 Power Measurement Parameters */
00074 typedef struct {
00075   tbool       enabled;  /* TRUE: Power estimation is enabled */
00076   Fract       Px_high;  /* high 8 bits of Rx in signal's power in Q8 */
00077   ULFract     Px_low;   /* low 32 bits of Rx in signal's power in Q8 */
00078   LFract      Px_max;   /* maximum power of Rx in signal in Q0 */
00079   Fract       Py1_high; /* high 8 bits of NE signal's (without echo) power in Q8 */
00080   ULFract     Py1_low;  /* low 32 bits of NE signal's (without echo) power in Q8 */
00081   LFract      Py1_max;  /* maximum power of NE signal's (without echo) in Q0 */
00082   Fract       Py_high;  /* high 8 bits of Tx in signal's power in Q8 */
00083   ULFract     Py_low;   /* low 32 bits of Tx in signal's power in Q8 */
00084   LFract      Py_max;   /* maximum power of Tx in  signal in Q0 */
00085   Fract       Pe_high;  /* high 8 bits of Tx out signal's power in Q8 */
00086   ULFract     Pe_low;   /* low 32 bits of Tx out signal's power in Q8 */
00087   LFract      Pe_max;   /* maximum power of Tx out signal in Q0 */
00088   Fract       Pr_high;  /* high 8 bits of Rx out signal's power in Q8 */
00089   ULFract     Pr_low;   /* low 32 bits of Rx out signal's power in Q8 */
00090   LFract      Pr_max;   /* maximum power of Rx out signal in Q0 */
00091 } p651Pars_t;
00092
00093
00094 /******************************************************************************
00095  * DATA DEFINITION: Control structure to select parameters for AER simulation
00096  ******************************************************************************/
00097 typedef struct siuSetup_s {
00098   siuSysCfg_t     system_cfg;
00099   p651Pars_t      p651Pars;              /* IEC 651 Power Parameters */
00100   aepSimPars_t    aep_params;
00101   siuAerSysPars_t aer_sys_params;        /* system dependent AER parameters */
00102   tint            segment_size;          /* in # of samples, 8kHz or 16kHz */
00103   tint            aer_kernel_srate;      /* LMS sampling rate, 1(8kHz) or 2(16kHz) */
00104   tint            aer_rin_frm_size;      /* in # of samples, 8kHz or 16kHz */
00105   tint            aer_rout_frm_size;     /* in # of samples, 8kHz or 16kHz */
00106   tint            aer_sin_frm_size;      /* in # of samples, 8kHz or 16kHz */
00107   tint            aer_sout_frm_size;     /* in # of samples, 8kHz or 16kHz */
00108   tint            aer_receive_out_length;/* in # of samples, 8kHz or 16kHz */
00109   tint            aep_gain_l2[AECHO_LOOPCNT];/* echo path gain in log2(gain) */
00110   tint            aep_gain_start_exp;    /* AEP gain staring point, exponent */
00111   tint            aep_gain_start_mant;   /* AEP gain staring point, mantissa */
00112   tint            aep_gain_adj_exp;      /* AEP gain adjustment exponent */
00113   Fract           aep_gain_adj_mant;     /* AEP gain adjustment mantissa */
00114   tuint           aer_ctl_bitfield_0;
00115   tuint           aer_ctl_bitfield_1;
00116   tuint           bf_ctl_bitfield;
00117   tuint           bf_mics;
00118   tint            eqbq_tx_flag;
00119   tint            eqbq_rx_flag;
00120   tuint           agc_ctl_bitfield;
00121   tsize           aer_trace_size_rx;
00122   tsize           aer_trace_size_tx;
00123   tuint           aer_trace_cfg;
00124   tbool           aer_trace_flag;
00125   tbool           toggle_aer;         /* TRUE: change AER control parameters  */
00126   aerControl_t    aerCtl;             /* AER control parameters               */
00127   tbool           toggle_bf;          /* TRUE: change BF control parameters  */
00128   bfControl_t     bfCtl;              /* AER control parameters               */
00129   tbool           toggle_agc;         /* TRUE: change AGC control parameters  */
00130   agcControl_t    agcCtl;             /* AGC control parameters               */
00131   tbool           toggle_veu;         /* TRUE: change VEU control parameters  */
00132   aerControl_t    veuCtl;             /* VEU control parameters               */
00133   tbool           toggle_siugain;     /* TRUE: change AGC control parameters
00134                                          in event of gain changes             */
00135   siuGainControl_t siuGainCtl;        /* AGC control gain parameters          */
00136   tbool           toggle_aep;         /* TRUE: change acoustic echo path
00137                                          parameters                           */
00138   aepControl_t    aepCtl;             /* acoustic echo path control params    */
00139   tbool           toggle_tx_sg;       /* TRUE: toggle Tx signal generator     */
00140   sgnSimPars_t    txSGN;              /* Tx Signal Generator Parameters       */
00141   tbool           toggle_rx_sg;       /* TRUE: toggle Rx signal generator     */
00142   sgnSimPars_t    rxSGN;              /* Rx Signal Generator Parameters       */
00143   tbool           toggle_piu_tg;      /* TRUE: toggle PIU tone generator      */
00144   tbool           piu_tg_state;       /* TRUE: PIU has tone on                */
00145   tbool           piu_getlev;         /* TRUE: calculate levels in PIU        */
00146   tbool           toggle_getflt;      /* TRUE: get filter coefficients        */
00147   tbool           toggle_putflt;      /* TRUE: put filter coefficients        */
00148   tbool           putflt_flag_last;   /* TRUE: last call of aerPutFilter()    */
00149   tbool           aer_mips_profile;   /* Profile AER for peak MIPS usage      */
00150   tbool           fe_sgn_flag;        /* FE signal generator                  */
00151   tbool           ne_sgn_flag;        /* FE signal generator                  */
00152   tint            aer_dbgstat_freq;   /* Query AER Debug stats every such
00153                                          frames                               */
00154   tint            drc_on_flag;        /* 1: Enable DRC. 0: Disable DRC        */
00155   tuint           drc_cfgbits;        /* to select DRC operation mode         */
00156                                       /* Bit 0: if 1, Full band is enabled */
00157                                       /* Bit 1: if 1, Low band is enabled  */
00158                                       /* Bit 2: if 1, Mid band is enabled  */
00159                                       /* Bit 3: if 1, High band is enabled */
00160                                       /* Bit 5: if 1, limiter is enabled   */
00161                                       /* Bit 4: if 1, vad is enabled       */
00162   tbool            drc_mips_profile;  /* Profile AER for peak MIPS usage      */
00163   tbool            toggle_drcCtrl;    /* TRUE: toggle DRC control             */
00164   drcControl_t     drcCtl;            /* DRC control configurations           */
00165   tbool            toggle_drcGetParam;/* TRUE: toggle DRC get parameters      */
00166   tint             drcGetCode;        /* DRC get parameter control code       */
00167   drcReportParam_t drcGetParam;       /* DRC get parameter return value       */
00168   tbool            txin_file_with_echo;  /* Tx input file already has echo    */
00169   void             (*g167_power_calc_fnc) (struct siuSetup_s *siu_setup);
00170   FILE *           pow_track_file1;
00171   FILE *           pow_track_file2;
00172   tuint           aer_reset_bitfield; /* reset bit field for aerOpen          */
00173   tuint           aer_valid_bitfield; /* valid bit field for aerOpen          */
00174   tuint           new_phone_mode;
00175   tint            run_time;           /* default run time */
00176   tint            aep_vary_time;
00177   tint            pow_track_option;
00178   tbool           g167_save_sig_flag;
00179   tbool           AEC_enabled;
00180   tbool           pow_track_enabled;
00181   tbool           dt_on;
00182   tbool           toggle_phone_mode;
00183   tbool           txout_cng_only;
00184   tbool           use_fdnlp;
00185   tbool           asnr_enable;
00186   tbool           cng_enable;
00187   tbool           test_double_talk;
00188   tbool           veu_enabled;
00189   int             doCacheFlush;
00190   int             doCacheEnable;
00191   tulong          cycles_before_aer;
00192   tulong          RxCyclesMax;
00193   tulong          RxCyclesAvg;
00194   tulong          TxCyclesMax;
00195   tulong          TxCyclesAvg;
00196
00197 } siuSetup_t;
00198
00199
00200 extern void aer_sim_init(siuSetup_t *siu_setup);
00201 extern void aer_sim_read_cfg(siuSetup_t *siu_setup, aersimFileIO_t *fio, FILE *test_cfg);
00202 extern void aer_sim_open_aep(aepSimInst_t *aep_inst, siuSetup_t *siu_setup);
00203 extern void aer_sim_apply_config(siuSetup_t *siu_setup);
00204 extern void aer_sim_init_siu(siuInst_t *siu_inst_ptr, siuSetup_t *siu_setup_ptr);
00205 extern void aer_sim_init_piu(piuInst_t *piu_inst_ptr, siuSetup_t *siu_setup_ptr);
00206 extern void aer_sim_instantiate_aer(siuInst_t *siu_inst, siuSetup_t *siu_setup);
00207 extern void aer_sim_open_txrx_sgns(sgnInstBuf_t *sgn_inst_tx,
00208                                    sgnInstBuf_t *sgn_inst_rx, siuSetup_t *siu_setup);
00209 extern void aer_sim_config_aer_params(siuInst_t *inst, siuSetup_t *siu_setup);
00210
00211
00212 extern void aersim_cacheEnable();
00213 extern void aersim_cacheFlush();
00214 extern tbool aersim_initCycleProfiling();
00215 extern void aersim_profile_get_cycle_before_aer(siuSetup_t *siu_setup);
00216 extern void aersim_profile_get_cycle_after_aer_send(siuSetup_t *siu_setup);
00217 extern void aersim_profile_get_cycle_after_aer_receive(siuSetup_t *siu_setup);
00218
00219 #endif /* _AERSIM_H */
00220
00221 /* nothing past this point */


AER Simulation: aersim_fileIO.c File Reference

  • File List
  • Globals

aersim_fileIO.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>
#include <ti/mas/aer/test/aersim/aersim.h>
#include <ti/mas/aer/test/aersim/aersim_fileIO.h>
#include <ti/mas/aer/test/aersim/aerbuffs.h>

Include dependency graph for aersim_fileIO.c:

Go to the source code of this file.

Functions

tbool | aerSimFread (tint *buf, tint buf_size, FILE *file)
void | aerSimFwrite (tint *buf, tint buf_size, FILE *file)
void | aer_debug_stat (void *aer_inst, FILE *dbg_file)
void | aer_sim_open_files (aersimFileIO_t *fio, tint num_mic)
void | aer_sim_close_files (aersimFileIO_t *fio, tint num_mic)

Function Documentation

tbool aerSimFread | ( | tint * | buf,
 |  | tint | buf_size,
 |  | FILE * | file
 | ) |  |

Definition at line 51 of file aersim_fileIO.c.

References AERSIM_FIO_SIZEOF_WORD, and tempIoBuf.

Referenced by aer_sim_fio_read_fe(), aer_sim_fio_read_ne(), and siu_drc_process().

Here is the caller graph for this function:

void aerSimFwrite | ( | tint * | buf,
 |  | tint | buf_size,
 |  | FILE * | file
 | ) |  |

Definition at line 106 of file aersim_fileIO.c.

References AERSIM_FIO_SIZEOF_WORD, and tempIoBuf.

Referenced by aer_debug_stat(), aer_sim_fio_write_data(), and siu_drc_process().

Here is the caller graph for this function:

void aer_debug_stat | ( | void * | aer_inst,
 |  | FILE * | dbg_file
 | ) |  |

Definition at line 125 of file aersim_fileIO.c.

References aerSimFwrite().

Here is the call graph for this function:

void aer_sim_open_files | ( | aersimFileIO_t * | fio,
 |  | tint | num_mic
 | ) |  |

Definition at line 144 of file aersim_fileIO.c.

References AER_SIM_ROOT_FOLDER, aersimFileIO_s::flag_txin_rd, aersimFileIO_s::fp_debug_aer, aersimFileIO_s::fp_debug_mss, aersimFileIO_s::fp_rxin, aersimFileIO_s::fp_rxout, aersimFileIO_s::fp_trace_rx, aersimFileIO_s::fp_trace_tx, aersimFileIO_s::fp_txin, aersimFileIO_s::fp_txout, and aersimFileIO_s::tx_in_file_name.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_close_files | ( | aersimFileIO_t * | fio,
 |  | tint | num_mic
 | ) |  |

Definition at line 230 of file aersim_fileIO.c.

References aersimFileIO_s::fp_rxin, aersimFileIO_s::fp_rxout, and aersimFileIO_s::fp_txin.

Referenced by main().

Here is the caller graph for this function:


AER Simulation: aersim_fileIO.c Source File

  • File List
  • Globals

aersim_fileIO.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: File I/O for the simulation of AER.
00003  ******************************************************************************
00004  * FILE NAME:   aersim_fileIO.c
00005  *
00006  * (C) Copyright 2008, Texas Instruments, Inc.
00007  *****************************************************************************/
00008 /* ANSI C headers */
00009 #include <stdlib.h>
00010 #include <stdio.h>
00011 #include <string.h>
00012
00013 /* System definitions and utilities */
00014 #include <ti/mas/types/types.h>                      /* DSP types            */
00015 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00016 #include <ti/mas/aer/test/aersim/aersim.h>
00017 #include <ti/mas/aer/test/aersim/aersim_fileIO.h>
00018 #include <ti/mas/aer/test/aersim/aerbuffs.h>
00019
00020 /******************************************************************************
00021  * FUNCTION PURPOSE: Performs an fread() operations and packs bytes into words
00022  ******************************************************************************
00023  * DESCRIPTION: fread() function reads bytes from the host-based files into
00024  *              words in the DSP memory.  In order to make the data stream
00025  *              useful for the DSP, this data must be packed.  This function
00026  *              calls the fread() and packs the data for DSP programs to use
00027  *
00028  *              fread() returns data like this (16 bit DSP memory):
00029  *                        0000 0000 aaaa bbbb
00030  *                        0000 0000 cccc dddd
00031  *                        0000 0000 eeee ffff
00032  *                        0000 0000 gggg hhhh
00033  *
00034  *              aerSimFread() returns data like this (16 bit DSP memory):
00035  *                        aaaa bbbb cccc dddd
00036  *                        eeee ffff gggg hhhh
00037  *
00038  *              This function uses a global temporary buffer to store fread()
00039  *              results, then packs the data into a user-provided buffer.
00040  *
00041  *              Return value is TRUE if the number of bytes read is the same
00042  *              the number of bytes requested in buf_size.  False otherwise
00043  *              NOTE:  FALSE return value usually indicated end of file.
00044  *
00045  *  tbool aerSimFread (
00046  *   tint *buf      - pointer to the buffer to store read data
00047  *   tint *buf_size - size of buffer
00048  *   FILE *file)    - pointer to the file descriptor
00049  *
00050  *****************************************************************************/
00051 tbool aerSimFread(tint *buf, tint buf_size, FILE *file)
00052 {
00053   tuint numRead;
00054   tint  i, j;
00055
00056   if(file == NULL){
00057     return FALSE;
00058   }
00059
00060   /* read the file*/
00061   numRead = fread(tempIoBuf, buf_size, AERSIM_FIO_SIZEOF_WORD, file);
00062
00063   /* check for endo of file */
00064   if (numRead != AERSIM_FIO_SIZEOF_WORD)
00065   {
00066     return FALSE;
00067   }
00068
00069   /* pack bytes into words */
00070   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00071   {
00072     buf[i]  = tempIoBuf[j] << 8;
00073     buf[i] |= tempIoBuf[j+1];
00074   }
00075
00076   return TRUE;
00077 } /* aerSimFread */
00078
00079 /******************************************************************************
00080  * FUNCTION PURPOSE: Performs an fwrite() operations and packs bytes into words
00081  ******************************************************************************
00082  * DESCRIPTION: fwrite() function writes bytes to the host-based files from
00083  *              words in the DSP memory.  In order to make the data stream
00084  *              comprehendable by the host, this data must be un-packed.  This
00085  *              function un-packs DSP data and calls the fwrite().
00086  *
00087  *              fwrite() expectss data like this (16 bit DSP memory):
00088  *                        0000 0000 aaaa bbbb
00089  *                        0000 0000 cccc dddd
00090  *                        0000 0000 eeee ffff
00091  *                        0000 0000 gggg hhhh
00092  *
00093  *              aerSimFwrite() receivess data like this (16 bit DSP memory):
00094  *                        aaaa bbbb cccc dddd
00095  *                        eeee ffff gggg hhhh
00096  *
00097  *              This function uses a global temporary buffer to store the
00098  *              un-packed data and pass it to fwrite() as an argument.
00099  *
00100  *  void aerSimFwrite (
00101  *   tint *buf      - pointer to the buffer to be written
00102  *   tint *buf_size - size of buffer
00103  *   FILE *file)    - pointer to the file descriptor
00104  *
00105  *****************************************************************************/
00106 void aerSimFwrite(tint *buf, tint buf_size, FILE *file)
00107 {
00108   tint  i, j;
00109
00110   if(file == NULL){
00111     return;
00112   }
00113
00114   for (i = 0, j = 0; i < buf_size; i++, j+=2)
00115   {
00116     tempIoBuf[j]   = (buf[i] >> 8) & 0x00ff;
00117     tempIoBuf[j+1] = (buf[i])      & 0x00ff;
00118   }
00119   fwrite(tempIoBuf, buf_size, AERSIM_FIO_SIZEOF_WORD, file);
00120 } /* aerSimFwrite */
00121
00122 /*****************************************************************************
00123 * This function writes AER debug status to a file.
00124 *****************************************************************************/
00125 void aer_debug_stat(void * aer_inst, FILE *dbg_file)
00126 {
00127   aerDebugStat_t aer_dbg;
00128   aerVersion_t aer_ver;
00129   tint *aer_dbg_tint;
00130
00131   if (dbg_file == NULL) {
00132     return;
00133   }
00134
00135   aerGetPerformance(aer_inst, &aer_dbg, &aer_ver, FALSE);
00136
00137   aer_dbg_tint = (tint *)&aer_dbg;
00138   aerSimFwrite(aer_dbg_tint, sizeof(aerDebugStat_t)/sizeof(tint), dbg_file);
00139 }  /* aer_debug_stat */
00140
00141 /*****************************************************************************
00142 * This function opens files to reand and write for AER simulation.
00143 *****************************************************************************/
00144 void aer_sim_open_files(aersimFileIO_t  *fio, tint num_mic)
00145 {
00146   int i;
00147   char fname[50];
00148
00149   /* initialize all file pointers to NULL */
00150   for(i=0; i<num_mic; i++) {
00151     fio->fp_txin[i] = NULL;
00152   }
00153   fio->fp_txout    = NULL;
00154   fio->fp_rxin     = NULL;
00155   fio->fp_rxout    = NULL;
00156   fio->fp_debug_aer= NULL;
00157   fio->fp_debug_mss= NULL;
00158   fio->fp_trace_tx = NULL;
00159   fio->fp_trace_rx = NULL;
00160
00161   /* open Tx path input and output files */
00162   if (fio->flag_txin_rd) {
00163     for(i=0; i<num_mic; i++) {
00164       strcpy(fname, AER_SIM_ROOT_FOLDER);
00165       strcat(fname, fio->tx_in_file_name[i]);
00166       fio->fp_txin[i] = fopen(fname, "rb");
00167       if (fio->fp_txin[i] == NULL) {
00168         printf("Tx input file does NOT exist!\n");
00169         exit(0);
00170       }
00171     }
00172   }
00173
00174   if (fio->flag_txout_wr) {
00175     strcpy(fname, AER_SIM_ROOT_FOLDER);
00176     strcat(fname, "vectors/out/txout.pcm");
00177     fio->fp_txout = fopen(fname, "wb");
00178     if (fio->fp_txout == NULL) {
00179       printf("Can NOT open file to write Tx out data!\n");
00180       exit(0);
00181     }
00182   }
00183
00184   /* open Rx path input and output files */
00185   if (fio->flag_rxin_rd) {
00186     strcpy(fname, AER_SIM_ROOT_FOLDER);
00187     strcat(fname, fio->rx_in_file_name);
00188     fio->fp_rxin = fopen(fname, "rb");
00189
00190     if (fio->fp_rxin == NULL) {
00191       printf("Rx input file does NOT exist!\n");
00192       exit(0);
00193     }
00194   }
00195
00196   if (fio->flag_rxout_wr) {
00197     strcpy(fname, AER_SIM_ROOT_FOLDER);
00198     strcat(fname, "vectors/out/rxout.pcm");
00199     fio->fp_rxout = fopen(fname, "wb");
00200     if (fio->fp_rxout == NULL) {
00201       printf("Can NOT open file to write Rx out data!\n");
00202       exit(0);
00203     }
00204   }
00205
00206   /* Open AER debug and trace files */
00207 /*  strcpy(fname, AER_SIM_ROOT_FOLDER);
00208   strcat(fname, "vectors/out/aer_debug.pcm");
00209   fio->fp_debug_aer= fopen(fname, "wb");
00210   if (fio->fp_debug_aer == NULL) {
00211     printf("Can NOT open file to write AER debug data!\n");
00212     exit(0);
00213   }
00214 */
00215   /* Open MSS debug file */
00216 /*  fio->fp_debug_mss = fopen("mss_debug.pcm", "wb");
00217   if (fio->fp_debug_mss == NULL) {
00218     printf("Can NOT open file to write MSS debug data!\n");
00219     exit(0);
00220   }
00221 */
00222   fio->flag_rxin_end = FALSE;
00223   fio->flag_txin_end = FALSE;
00224
00225 } /* aer_sim_open_files */
00226
00227 /*****************************************************************************
00228 * This function closes all files.
00229 *****************************************************************************/
00230 void aer_sim_close_files(aersimFileIO_t  *fio, tint num_mic)
00231 {
00232   int i;
00233
00234   if (fio->fp_rxin != NULL) {
00235     fclose(fio->fp_rxin);
00236   }
00237   if (fio->fp_rxout != NULL) {
00238     fclose(fio->fp_rxout);
00239   }
00240
00241   for(i=0; i<num_mic; i++) {
00242     if(fio->fp_txin[i] == NULL) {
00243       fclose(fio->fp_txin[i]);
00244     }
00245   }
00246   if (fio->fp_txout != NULL) {
00247     fclose(fio->fp_txout);
00248   }
00249
00250   if (fio->fp_trace_rx != NULL) {
00251     fclose(fio->fp_trace_rx);
00252   }
00253   if (fio->fp_trace_tx != NULL) {
00254     fclose(fio->fp_trace_tx);
00255   }
00256   if (fio->fp_debug_aer != NULL) {
00257     fclose(fio->fp_debug_aer);
00258   }
00259   if (fio->fp_debug_mss != NULL) {
00260     fclose(fio->fp_debug_mss);
00261   }
00262
00263 } /* aer_sim_close_files */
00264
00265 /* nothing past this line */


AER Simulation: aersim_fileIO.h File Reference

  • File List
  • Globals

aersim_fileIO.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <ti/mas/types/types.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>

Include dependency graph for aersim_fileIO.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | aersimFileIO_s

Defines

#define | AER_SIM_ROOT_FOLDER "../../"

Typedefs

typedef aersimFileIO_s | aersimFileIO_t

Functions

void | aer_sim_open_files (aersimFileIO_t *fio, tint num_mic)
void | aer_sim_close_files (aersimFileIO_t *fio, tint num_mic)
tbool | aerSimFread (tint *buf, tint buf_size, FILE *file)
void | aerSimFwrite (tint *buf, tint buf_size, FILE *file)
void | aer_debug_stat (void *aer_inst, FILE *dbg_file)

Define Documentation

#define AER_SIM_ROOT_FOLDER "../../"

Definition at line 27 of file aersim_fileIO.h.

Referenced by aer_sim_open_files(), and main().

Typedef Documentation

typedef struct aersimFileIO_s aersimFileIO_t

Function Documentation

void aer_sim_open_files | ( | aersimFileIO_t * | fio,
 |  | tint | num_mic
 | ) |  |

Definition at line 144 of file aersim_fileIO.c.

References AER_SIM_ROOT_FOLDER, aersimFileIO_s::flag_txin_rd, aersimFileIO_s::fp_debug_aer, aersimFileIO_s::fp_debug_mss, aersimFileIO_s::fp_rxin, aersimFileIO_s::fp_rxout, aersimFileIO_s::fp_trace_rx, aersimFileIO_s::fp_trace_tx, aersimFileIO_s::fp_txin, aersimFileIO_s::fp_txout, and aersimFileIO_s::tx_in_file_name.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_close_files | ( | aersimFileIO_t * | fio,
 |  | tint | num_mic
 | ) |  |

Definition at line 230 of file aersim_fileIO.c.

References aersimFileIO_s::fp_rxin, aersimFileIO_s::fp_rxout, and aersimFileIO_s::fp_txin.

Referenced by main().

Here is the caller graph for this function:

tbool aerSimFread | ( | tint * | buf,
 |  | tint | buf_size,
 |  | FILE * | file
 | ) |  |

Definition at line 51 of file aersim_fileIO.c.

References AERSIM_FIO_SIZEOF_WORD, and tempIoBuf.

Referenced by aer_sim_fio_read_fe(), aer_sim_fio_read_ne(), and siu_drc_process().

Here is the caller graph for this function:

void aerSimFwrite | ( | tint * | buf,
 |  | tint | buf_size,
 |  | FILE * | file
 | ) |  |

Definition at line 106 of file aersim_fileIO.c.

References AERSIM_FIO_SIZEOF_WORD, and tempIoBuf.

Referenced by aer_debug_stat(), aer_sim_fio_write_data(), and siu_drc_process().

Here is the caller graph for this function:

void aer_debug_stat | ( | void * | aer_inst,
 |  | FILE * | dbg_file
 | ) |  |

Definition at line 125 of file aersim_fileIO.c.

References aerSimFwrite().

Here is the call graph for this function:


AER Simulation: aersim_fileIO.h Source File

  • File List
  • Globals

aersim_fileIO.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: File I/O for the simulation of AER.
00003  ******************************************************************************
00004  * FILE NAME:   aersim_fileIO.h
00005  *
00006  * (C) Copyright 2008, Texas Instruments, Inc.
00007  *****************************************************************************/
00008
00009 #ifndef _AERSOM_FILEIO_H
00010 #define _AERSOM_FILEIO_H
00011
00012 /* ANSI C headers */
00013 #include <stdlib.h>
00014 #include <stdio.h>
00015
00016 /* System definitions and utilities */
00017 #include <ti/mas/types/types.h>                      /* DSP types            */
00018
00019 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00020
00021 #ifdef  __CCS_PROJECT_REL_PATH
00022 #define AER_SIM_ROOT_FOLDER "../../../"
00023 #else
00024 #ifdef AER_TEST_AUTOMATE_PATH
00025 #define AER_SIM_ROOT_FOLDER       "./"
00026 #else
00027 #define AER_SIM_ROOT_FOLDER "../../"
00028 #endif
00029 #endif
00030
00031 /* File I/O for AER simulation */
00032 typedef struct aersimFileIO_s{
00033   tbool flag_rxin_rd;
00034   tbool flag_rxout_wr;
00035   tbool flag_rxin_end;
00036
00037   tbool flag_txin_rd;
00038   tbool flag_txout_wr;
00039   tbool flag_txin_end;
00040   tbool flag_txin_echo;
00041
00042   char rx_in_file_name[50];
00043   char tx_in_file_name[AER_SIM_NUM_BF_MIC][50];
00044   char bf_filter_file_name[AER_SIM_NUM_BF_MIC][50];
00045
00046   FILE *fp_rxin;
00047   FILE *fp_rxout;
00048   FILE *fp_txin[AER_SIM_NUM_BF_MIC];
00049   FILE *fp_bf_filter[AER_SIM_NUM_BF_MIC];
00050   FILE *fp_txout;
00051   FILE *drcReceiveOut;
00052   FILE *drcDebugOut;
00053   FILE *fp_debug_aer;
00054   FILE *fp_debug_mss;
00055   FILE *hcoefOut;
00056   FILE *fp_trace_tx;
00057   FILE *fp_trace_rx;
00058 } aersimFileIO_t;
00059
00060
00061 extern void aer_sim_open_files(aersimFileIO_t  *fio, tint num_mic);
00062 extern void aer_sim_close_files(aersimFileIO_t  *fio, tint num_mic);
00063 extern tbool aerSimFread(tint *buf, tint buf_size, FILE *file);
00064 extern void aerSimFwrite(tint *buf, tint buf_size, FILE *file);
00065 extern void aer_debug_stat(void * aer_inst, FILE *dbg_file);
00066
00067 #endif
00068
00069 /* nothing past this line */


AER Simulation: aersim_setup.c File Reference

  • File List
  • Globals

aersim_setup.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/agc.h>
#include <ti/mas/aer/drc.h>
#include <ti/mas/sdk/aep.h>
#include <ti/mas/aer/test/aersim/aersim.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>
#include <ti/mas/aer/test/aersim/aersim_fileIO.h>
#include <ti/mas/aer/test/aersim/aerbuffs.h>
#include <ti/mas/aer/test/aepsim/aepsim.h>
#include <ti/mas/aer/test/sgnsim/sgnsim.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/piusim/piuloc.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuport.h>
#include <ti/mas/aer/test/siusim/siuaer.h>
#include <ti/mas/aer/test/siusim/siudrc.h>
#include <ti/mas/aer/test/siusim/siubf.h>
#include <ti/mas/sdk/profile.h>
#include <ti/mas/sdk/memArchCfg.h>

Include dependency graph for aersim_setup.c:

Go to the source code of this file.

Functions

void | aer_sim_setup_sgn (sgnSimPars_t *rx_sgn, sgnSimPars_t *tx_sgn)
void | aer_sim_setup_aep (aepSimPars_t *aep_params)
void | aer_sim_test_api (void *aer_inst)
void | siu_new_mss (siuInst_t *inst, tint num_mic, tint samp_rates)
void | siu_open_mss (siuInst_t *inst, tint num_mic, tint samp_rates)
void | aer_sim_init (siuSetup_t *siu_setup)
void | aer_sim_read_cfg (siuSetup_t *siu_setup, aersimFileIO_t *fio, FILE *test_cfg)
void | aer_sim_apply_config (siuSetup_t *siu_setup)
void | aer_sim_init_siu (siuInst_t *siu_inst_ptr, siuSetup_t *siu_setup_ptr)
void | aer_sim_init_piu (piuInst_t *piu_inst, siuSetup_t *siu_setup)
void | aer_sim_instantiate_aer (siuInst_t *siu_inst, siuSetup_t *siu_setup)
void | aer_sim_open_txrx_sgns (sgnInstBuf_t *sgn_inst_tx, sgnInstBuf_t *sgn_inst_rx, siuSetup_t *siu_setup)
void | aer_sim_open_aep (aepSimInst_t *aep_inst, siuSetup_t *siu_setup)
void | aer_sim_config_aer_params (siuInst_t *inst, siuSetup_t *siu_setup)
void | aersim_cacheEnable ()
void | aersim_cacheFlush ()
tbool | aersim_initCycleProfiling ()
void | aersim_profile_get_cycle_before_aer (siuSetup_t *siu_setup)
void | aersim_profile_get_cycle_after_aer_send (siuSetup_t *siu_setup)
void | aersim_profile_get_cycle_after_aer_receive (siuSetup_t *siu_setup)

Variables

tint * | piu_segment_in
tint * | piu_segment_out
linSample * | segment_in
linSample * | rx_segment_out
const aerEqConfig_t | sampleEqBqParamsRx
const aerEqConfig_t | sampleEqBqParamsTx
Fract | bf_coeffs_0 [AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN]
Fract | bf_coeffs_90 [AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN]
Fract | bf_coeffs_45 [AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN]

Function Documentation

void aer_sim_setup_sgn | ( | sgnSimPars_t * | rx_sgn,
 |  | sgnSimPars_t * | tx_sgn
 | ) |  |

Definition at line 220 of file aersim_setup.c.

Referenced by aer_sim_init().

Here is the caller graph for this function:

void aer_sim_setup_aep ( aepSimPars_t * aep_params )

Definition at line 264 of file aersim_setup.c.

Referenced by aer_sim_init().

Here is the caller graph for this function:

void aer_sim_test_api ( void * aer_inst )

Definition at line 808 of file aersim_setup.c.

References AER_SIM_HF_MICGAIN_0dB, AER_SIM_HF_SPKGAIN_0dB, AER_SIM_PIU_DEL_RX, AER_SIM_PIU_DEL_TX, AER_SIM_SIU_Y2X_DEL_ADJ, sampleEqBqParamsRx, and sampleEqBqParamsTx.

void siu_new_mss | ( | siuInst_t * | inst,
 |  | tint | num_mic,
 |  | tint | samp_rates
 | ) |  |

Definition at line 59 of file siumss.c.

References AER_SIM_NUM_HF_MIC, mss_buf, siuInst_t::mssInst, SIU_MID_MSS, SIU_NUM_MSS_BUFFS, siu_print_buff_usage(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_mss | ( | siuInst_t * | inst,
 |  | tint | num_mic,
 |  | tint | samp_rates
 | ) |  |

Definition at line 118 of file siumss.c.

References aersim_chkbit, and siuInst_t::mssInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void aer_sim_init ( siuSetup_t * siu_setup )

Definition at line 89 of file aersim_setup.c.

References siuSetup_s::aep_gain_adj_exp, siuSetup_s::aep_gain_adj_mant, siuSetup_s::aep_gain_l2, siuSetup_s::aep_gain_start_exp, siuSetup_s::aep_gain_start_mant, siuSetup_s::aep_params, siuSetup_s::aep_vary_time, siuSetup_s::aepCtl, siuSetup_s::aer_dbgstat_freq, siuAerSysPars_s::aer_filter_len_HES, siuAerSysPars_s::aer_filter_len_HF, siuSetup_s::aer_mips_profile, siuSetup_s::aer_reset_bitfield, AER_SIM_HES_MAX_FILT_LENGTH, AER_SIM_HF_MAX_FILT_LENGTH, AER_SIM_PIU_DEL_RX, AER_SIM_PIU_DEL_TX, aer_sim_setup_aep(), aer_sim_setup_sgn(), AER_SIM_SIU_Y2X_DEL_ADJ, siuSetup_s::aer_sys_params, siuSetup_s::aer_trace_cfg, siuSetup_s::aer_trace_size_rx, siuSetup_s::aer_trace_size_tx, siuSetup_s::aer_valid_bitfield, aersim_cacheEnable(), aersim_cacheFlush(), siuAerSysPars_s::ag_chg_delay_rx, siuAerSysPars_s::ag_chg_delay_tx, siuAerSysPars_s::ag_chg_interp_samp, siuSetup_s::asnr_enable, siuSysCfg_s::band_split_flag, siuSetup_s::cng_enable, siuGainControl_s::ctl_code, siuSetup_s::doCacheEnable, siuSetup_s::drc_cfgbits, siuSetup_s::drc_mips_profile, siuSetup_s::drc_on_flag, p651Pars_t::enabled, siuSysCfg_s::frame_size, siuGainControl_s::mic_gain, siuSetup_s::new_phone_mode, siuSysCfg_s::num_HF_mic, siuSetup_s::p651Pars, siuSysCfg_s::pcm_bits, siuSetup_s::piu_tg_state, siuSetup_s::pow_track_enabled, siuSetup_s::putflt_flag_last, siuSetup_s::run_time, siuSetup_s::RxCyclesAvg, siuSetup_s::RxCyclesMax, siuSetup_s::rxSGN, siuSysCfg_s::sampling_rates, siuSysCfg_s::segment_size, siu_SET_MIC_GAIN, siuSetup_s::siuGainCtl, siuSetup_s::system_cfg, siuSetup_s::test_double_talk, siuSetup_s::toggle_aep, siuSetup_s::toggle_aer, siuSetup_s::toggle_agc, siuSetup_s::toggle_bf, siuSetup_s::toggle_drcCtrl, siuSetup_s::toggle_drcGetParam, siuSetup_s::toggle_getflt, siuSetup_s::toggle_phone_mode, siuSetup_s::toggle_piu_tg, siuSetup_s::toggle_putflt, siuSetup_s::toggle_rx_sg, siuSetup_s::toggle_siugain, siuSetup_s::toggle_tx_sg, siuSetup_s::toggle_veu, siuSetup_s::TxCyclesAvg, siuSetup_s::TxCyclesMax, siuSetup_s::txin_file_with_echo, siuSetup_s::txout_cng_only, siuSetup_s::txSGN, siuGainControl_s::u, siuSysCfg_s::ulaw, siuSetup_s::use_fdnlp, siuSetup_s::veu_enabled, and siuAerSysPars_s::y2x_delay.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_read_cfg | ( | siuSetup_t * | siu_setup,
 |  | aersimFileIO_t * | fio,
 |  | FILE * | test_cfg
 | ) |  |

Definition at line 280 of file aersim_setup.c.

References siuSetup_s::aer_ctl_bitfield_0, siuSetup_s::aer_ctl_bitfield_1, siuSetup_s::aer_mips_profile, AER_SIM_MIC_TYPE_ARRAY, AER_SIM_MIC_TYPE_STAND_ALONE, AER_SIM_NUM_BF_MIC, AER_SIM_NUM_HF_MIC, siuSetup_s::agc_ctl_bitfield, siuSysCfg_s::band_split_flag, siuSetup_s::bf_ctl_bitfield, siuSetup_s::bf_mics, siuSysCfg_s::bf_steer_angle, siuSetup_s::drc_cfgbits, siuSetup_s::drc_on_flag, siuSetup_s::fe_sgn_flag, aersimFileIO_s::flag_rxin_rd, aersimFileIO_s::flag_rxout_wr, aersimFileIO_s::flag_txin_echo, aersimFileIO_s::flag_txin_rd, aersimFileIO_s::flag_txout_wr, siuSysCfg_s::mult_mic_type, siuSetup_s::ne_sgn_flag, siuSysCfg_s::num_BF_mic, siuSysCfg_s::num_HF_mic, aersimFileIO_s::rx_in_file_name, siuSysCfg_s::sampling_rates, siuSetup_s::system_cfg, and aersimFileIO_s::tx_in_file_name.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_apply_config ( siuSetup_t * siu_setup )

Definition at line 368 of file aersim_setup.c.

References siuSetup_s::aep_params, siuSetup_s::aer_mips_profile, siuSetup_s::aer_rin_frm_size, siuSetup_s::aer_rout_frm_size, AER_SIM_SRATE_16000_DIV_8K, AER_SIM_SRATE_8000_DIV_8K, siuSetup_s::aer_sin_frm_size, siuSetup_s::aer_sout_frm_size, aersim_chkbit, aersim_initCycleProfiling(), siuSysCfg_s::frame_size, siuSysCfg_s::sampling_rates, siuSysCfg_s::segment_size, siuSetup_s::segment_size, and siuSetup_s::system_cfg.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_init_siu | ( | siuInst_t * | siu_inst_ptr,
 |  | siuSetup_t * | siu_setup_ptr
 | ) |  |

Definition at line 409 of file aersim_setup.c.

References siuInst_t::aer_recv_in_buf, siuSetup_s::aer_rin_frm_size, siuSetup_s::aer_rout_frm_size, siuSetup_s::aer_sin_frm_size, siuSetup_s::aer_sout_frm_size, siuConfig_t::companding_law, siuConfig_t::core_heap, siuConfig_t::debug, siuConfig_t::exception, siuConfig_t::ID, siuSysCfg_s::num_HF_mic, siuTxConfig_t::num_HF_mic, siuSysCfg_s::pcm_bits, siuConfig_t::pcm_bits, siuRxConfig_t::rin_frm_len, siuRxConfig_t::rout_frm_len, siuTxConfig_t::send_in_frame_length, siuTxConfig_t::send_out_frame_length, SIU_MID_SIU, siu_rx_del_buf, siuInit(), siuMakeID, siuRxOpen(), siuTxOpen(), siuSetup_s::system_cfg, siuSysCfg_s::ulaw, and siuConfig_t::voice_heap.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_init_piu | ( | piuInst_t * | piu_inst,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 446 of file aersim_setup.c.

References siuSetup_s::aer_rout_frm_size, piu_inst, and piuInit().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_instantiate_aer | ( | siuInst_t * | siu_inst,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 455 of file aersim_setup.c.

References AER_SIM_MIC_TYPE_ARRAY, siuSetup_s::aer_sys_params, siuSysCfg_s::band_split_flag, siuSetup_s::drc_cfgbits, siuSysCfg_s::mult_mic_type, siuSysCfg_s::num_BF_mic, siuSysCfg_s::num_HF_mic, siuSysCfg_s::sampling_rates, siu_inst, siu_mmic_init(), siu_new_aer(), siu_new_agc(), siu_new_bf(), siu_new_drc(), siu_new_mss(), siu_open_aer(), siu_open_agc(), siu_open_bf(), siu_open_drc(), siu_open_mss(), and siuSetup_s::system_cfg.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aer_sim_open_txrx_sgns | ( | sgnInstBuf_t * | sgn_inst_tx,
 |  | sgnInstBuf_t * | sgn_inst_rx,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 505 of file aersim_setup.c.

References aersim_chkbit, siuSetup_s::fe_sgn_flag, siuSetup_s::ne_sgn_flag, siuSysCfg_s::num_HF_mic, siuSetup_s::rxSGN, siuSysCfg_s::sampling_rates, siuSetup_s::system_cfg, and siuSetup_s::txSGN.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_open_aep | ( | aepSimInst_t * | aep_inst,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 543 of file aersim_setup.c.

References siuSetup_s::aep_params, siuSetup_s::aep_vary_time, siuSetup_s::aer_rout_frm_size, AER_SIM_SRATE_16000_DIV_8K, AER_SIM_SRATE_8000_DIV_8K, aersim_chkbit, siuSysCfg_s::sampling_rates, and siuSetup_s::system_cfg.

Referenced by main().

Here is the caller graph for this function:

void aer_sim_config_aer_params | ( | siuInst_t * | inst,
 |  | siuSetup_t * | siu_setup
 | ) |  |

Definition at line 569 of file aersim_setup.c.

References siuSetup_s::aer_ctl_bitfield_0, siuSetup_s::aer_ctl_bitfield_1, AER_SIM_AGC_GAINSWING_MAX, AER_SIM_AGC_MICGAIN_MAX, AER_SIM_AGC_MICGAIN_MIN, AER_SIM_AGC_SAT_HANGOVER, AER_SIM_AGC_SAT_THRESHOLD, AER_SIM_BF_STEER_ANGLE_0, AER_SIM_BF_STEER_ANGLE_45, AER_SIM_BF_STEER_ANGLE_90, AER_SIM_HF_MICGAIN_0dB, AER_SIM_HF_SPKGAIN_0dB, AER_SIM_MIC_TYPE_ARRAY, siuInst_t::aerHFInst, siuSetup_s::agc_ctl_bitfield, siuInst_t::agcHFhandles, siuInst_t::agcHFInst, bf_coeffs_0, bf_coeffs_45, bf_coeffs_90, siuSetup_s::bf_ctl_bitfield, siuSetup_s::bf_mics, siuSysCfg_s::bf_steer_angle, siuGainControl_s::ctl_code, siuSetup_s::drc_on_flag, siuGainControl_s::mic_gain, siuSysCfg_s::mult_mic_type, siuSysCfg_s::num_BF_mic, siuPhoneSys_t::num_HF_mic, siuInst_t::phone_sys, sampleEqBqParamsRx, sampleEqBqParamsTx, siuSysCfg_s::sampling_rates, siu_config_bf(), siu_control_drc(), siu_SET_MIC_GAIN, siu_SET_SPK_GAIN, siuGainControl(), siuGainControl_s::spk_gain, siuSetup_s::system_cfg, and siuGainControl_s::u.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void aersim_cacheEnable ( )

Definition at line 737 of file aersim_setup.c.

Referenced by aer_sim_init().

Here is the caller graph for this function:

void aersim_cacheFlush ( )

Definition at line 745 of file aersim_setup.c.

Referenced by aer_sim_init(), siuReceiveIn(), and siuSendIn().

Here is the caller graph for this function:

tbool aersim_initCycleProfiling ( )

Definition at line 755 of file aersim_setup.c.

Referenced by aer_sim_apply_config().

Here is the caller graph for this function:

void aersim_profile_get_cycle_before_aer ( siuSetup_t * siu_setup )

Definition at line 764 of file aersim_setup.c.

References siuSetup_s::cycles_before_aer.

Referenced by siuReceiveIn(), and siuSendIn().

Here is the caller graph for this function:

void aersim_profile_get_cycle_after_aer_send ( siuSetup_t * siu_setup )

Definition at line 771 of file aersim_setup.c.

References siuSetup_s::cycles_before_aer, siuSetup_s::TxCyclesAvg, and siuSetup_s::TxCyclesMax.

void aersim_profile_get_cycle_after_aer_receive ( siuSetup_t * siu_setup )

Definition at line 788 of file aersim_setup.c.

References siuSetup_s::cycles_before_aer, siuSetup_s::RxCyclesAvg, and siuSetup_s::RxCyclesMax.

Referenced by siuReceiveIn().

Here is the caller graph for this function:

Variable Documentation

tint* piu_segment_in

Definition at line 44 of file aersim_setup.c.

tint* piu_segment_out

Definition at line 45 of file aersim_setup.c.

linSample* segment_in

Definition at line 46 of file aersim_setup.c.

linSample* rx_segment_out

Definition at line 47 of file aersim_setup.c.

const aerEqConfig_t sampleEqBqParamsRx

Initial value:

{7, 65249, 31950, -28861, 27987, 32667, 1942, 21895, 32138, 3564, 21895, 30274,
3998, 13573, 23170, 3563, -11123, -3212, 3564}

Definition at line 56 of file aersim_setup.c.

Referenced by aer_sim_config_aer_params(), and aer_sim_test_api().

const aerEqConfig_t sampleEqBqParamsTx

Initial value:

{7, 60145, 31950, -28861, 29504, 32667, 1833, 28718, 31640, 3564, 13573, 30274,
1942, 13573, 18205, 3998, 4205, -28590, 10929}

Definition at line 60 of file aersim_setup.c.

Referenced by aer_sim_config_aer_params(), and aer_sim_test_api().

Fract bf_coeffs_0[AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN]

Initial value:

 {
  {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0}  }

Definition at line 65 of file aersim_setup.c.

Referenced by aer_sim_config_aer_params().

Fract bf_coeffs_90[AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN]

Initial value:

 {
   {-22,  98, -241,  471, -817, 1331, -2120,  3470, -6434, 20542, 20967, -6847,  3861, -2478,  1649, -1089,   692, -409,  213,  -88,   20,   0,   0, 0},
   {  0, -22,   98, -241,  471, -817,  1331, -2120,  3470, -6434, 20542, 20967, -6847,  3861, -2478,  1649, -1089,  692, -409,  213,  -88,  20,   0, 0},
   {  0,  20,  -88,  213, -409,  692, -1089,  1649, -2478,  3861, -6847, 20967, 20542, -6434,  3470, -2120,  1331, -817,  471, -241,   98, -22,   0, 0},
   {  0,   0,   20,  -88,  213, -409,   692, -1089,  1649, -2478,  3861, -6847, 20967, 20542, -6434,  3470, -2120, 1331, -817,  471, -241,  98, -22, 0} }

Definition at line 72 of file aersim_setup.c.

Referenced by aer_sim_config_aer_params().

Fract bf_coeffs_45[AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN]

Initial value:

 {
   {-4,  18, -43,   83, -143,  228,  -355,   556,  -938,  2061, 32572, -1825,   883,  -534,   344,  -223,   140,  -82,   42,  -17,   4,   0,  0, 0},
   { 0, -20,  86, -211,  412, -712,  1152, -1818,  2929, -5239, 14200, 26501, -6782,  3665, -2312,  1523, -1000,  632, -372,  194, -80,  18,  0, 0},
   { 0,  18, -80,  194, -372,  632, -1000,  1523, -2312,  3665, -6782, 26501, 14200, -5239,  2929, -1818,  1152, -712,  412, -211,  86, -20,  0, 0},
   { 0,   0,   4,  -17,   42,  -82,   140,  -223,   344,  -534,   883, -1825, 32572,  2061,  -938,   556,  -355,  228, -143,   83, -43,  18, -4, 0} }

Definition at line 79 of file aersim_setup.c.

Referenced by aer_sim_config_aer_params().


AER Simulation: aersim_setup.c Source File

  • File List
  • Globals

aersim_setup.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Setup routines for the simulation of AER.
00003  ******************************************************************************
00004  * FILE NAME:   aersim_setup.c
00005  *
00006  * DESCRIPTION: Contains routines for setting up the simulation testing of AER.
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012 /* ANSI C headers */
00013 #include <stdlib.h>
00014 #include <stdio.h>
00015 #include <string.h>
00016
00017 #include <ti/mas/aer/aer.h>
00018 #include <ti/mas/aer/agc.h>
00019 #include <ti/mas/aer/drc.h>
00020
00021 #include <ti/mas/sdk/aep.h>
00022
00023 #include <ti/mas/aer/test/aersim/aersim.h>
00024 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00025 #include <ti/mas/aer/test/aersim/aersim_fileIO.h>
00026 #include <ti/mas/aer/test/aersim/aerbuffs.h>
00027 #include <ti/mas/aer/test/aepsim/aepsim.h>
00028 #include <ti/mas/aer/test/sgnsim/sgnsim.h>
00029 #include <ti/mas/aer/test/siusim/siu.h>
00030 #include <ti/mas/aer/test/piusim/piuloc.h>
00031 #include <ti/mas/aer/test/siusim/siuloc.h>
00032 #include <ti/mas/aer/test/siusim/siuport.h>
00033 #include <ti/mas/aer/test/siusim/siuaer.h>
00034 #include <ti/mas/aer/test/siusim/siudrc.h>
00035 #include <ti/mas/aer/test/siusim/siubf.h>
00036
00037 /* profiling */
00038 #ifndef gnu_targets_arm_GCArmv7A
00039 #include <ti/mas/sdk/profile.h>
00040 #include <ti/mas/sdk/memArchCfg.h>
00041 #endif
00042
00043 /* Tx/Rx pointers for signal path */
00044 tint      *piu_segment_in;       /* Input PCM buffer for piuPcmIo()  */
00045 tint      *piu_segment_out;      /* Output PCM buffer for piuPcmIo() */
00046 linSample *segment_in;           /* linear buffer for Tx generator   */
00047 linSample *rx_segment_out;       /* linear buffer for Rx out display */
00048
00049 void aer_sim_setup_sgn(sgnSimPars_t *rx_sgn, sgnSimPars_t *tx_sgn);
00050 void aer_sim_setup_aep(aepSimPars_t *aep_params);
00051 void aer_sim_test_api(void *aer_inst);
00052 extern void siu_new_mss(siuInst_t *inst, tint num_mic, tint samp_rates);
00053 extern void siu_open_mss(siuInst_t *inst, tint num_mic, tint samp_rates);
00054
00055 /* Equalizers having flat response for measuring MIPS without screwing up the signal */
00056 const aerEqConfig_t sampleEqBqParamsRx =
00057 {7, 65249, 31950, -28861, 27987, 32667, 1942, 21895, 32138, 3564, 21895, 30274,
00058 3998, 13573, 23170, 3563, -11123, -3212, 3564};
00059
00060 const aerEqConfig_t sampleEqBqParamsTx =
00061 {7, 60145, 31950, -28861, 29504, 32667, 1833, 28718, 31640, 3564, 13573, 30274,
00062 1942, 13573, 18205, 3998, 4205, -28590, 10929};
00063
00064 /* BF FIR filter coefficients for 0 degree steering angle */
00065 Fract bf_coeffs_0[AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN] = {
00066   {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0},
00067   {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0},
00068   {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0},
00069   {0,0,0,0,0,0,0,0,0,0,0,32767,0,0,0,0,0,0,0,0,0,0,0,0}  };
00070
00071 /* BF FIR filter coefficients for 90 degree steering angle */
00072 Fract bf_coeffs_90[AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN] = {
00073    {-22,  98, -241,  471, -817, 1331, -2120,  3470, -6434, 20542, 20967, -6847,  3861, -2478,  1649, -1089,   692, -409,  213,  -88,   20,   0,   0, 0},
00074    {  0, -22,   98, -241,  471, -817,  1331, -2120,  3470, -6434, 20542, 20967, -6847,  3861, -2478,  1649, -1089,  692, -409,  213,  -88,  20,   0, 0},
00075    {  0,  20,  -88,  213, -409,  692, -1089,  1649, -2478,  3861, -6847, 20967, 20542, -6434,  3470, -2120,  1331, -817,  471, -241,   98, -22,   0, 0},
00076    {  0,   0,   20,  -88,  213, -409,   692, -1089,  1649, -2478,  3861, -6847, 20967, 20542, -6434,  3470, -2120, 1331, -817,  471, -241,  98, -22, 0} };
00077
00078 /* BF FIR filter coefficients for 45 degree steering angle */
00079 Fract bf_coeffs_45[AER_SIM_NUM_BF_MIC][SIU_BF_FLT_LEN] = {
00080    {-4,  18, -43,   83, -143,  228,  -355,   556,  -938,  2061, 32572, -1825,   883,  -534,   344,  -223,   140,  -82,   42,  -17,   4,   0,  0, 0},
00081    { 0, -20,  86, -211,  412, -712,  1152, -1818,  2929, -5239, 14200, 26501, -6782,  3665, -2312,  1523, -1000,  632, -372,  194, -80,  18,  0, 0},
00082    { 0,  18, -80,  194, -372,  632, -1000,  1523, -2312,  3665, -6782, 26501, 14200, -5239,  2929, -1818,  1152, -712,  412, -211,  86, -20,  0, 0},
00083    { 0,   0,   4,  -17,   42,  -82,   140,  -223,   344,  -534,   883, -1825, 32572,  2061,  -938,   556,  -355,  228, -143,   83, -43,  18, -4, 0} };
00084
00085 /******************************************************************************
00086  * FUNCTION PURPOSE: Initialize AER simulation environment.
00087  *
00088  *****************************************************************************/
00089 void aer_sim_init(siuSetup_t *siu_setup)
00090 {
00091   siuSysCfg_t     *sys_params;
00092   siuAerSysPars_t *aer_params;
00093
00094   sys_params = &siu_setup->system_cfg;
00095   aer_params = &siu_setup->aer_sys_params;
00096
00097   /* default system parameters for AER simulation */
00098   sys_params->ulaw = const_COMP_LINEAR;  /* Linear comapnding        */
00099   sys_params->pcm_bits = 16;             /* 16 bit linear comapnding */
00100   sys_params->num_HF_mic = 1;            /* 1 hands free microphone */
00101   sys_params->segment_size =  20;        /* default PIU (sub)segment @ 8kHz */
00102                                          /* must be <=40, multiple of frame_size */
00103                                          /* double to get PIU y2x_delay (Tx+Rx)  */
00104   sys_params->frame_size = 80;           /* 10ms frame size @8kHz - 80 samples */
00105   sys_params->sampling_rates = 7;        /* 16 kHz on all I/O interfaces */
00106   sys_params->band_split_flag = FALSE;   /* full band, don't use bandsplit */
00107
00108   /* AER parameters that depend on the system */
00109   aer_params->aer_filter_len_HF  = AER_SIM_HF_MAX_FILT_LENGTH; /* 200ms for HF tail        */
00110   aer_params->aer_filter_len_HES = AER_SIM_HES_MAX_FILT_LENGTH; /* 20ms for HES tail        */
00111   aer_params->y2x_delay  = AER_SIM_PIU_DEL_RX + AER_SIM_PIU_DEL_TX - AER_SIM_SIU_Y2X_DEL_ADJ;
00112   aer_params->ag_chg_delay_tx = AER_SIM_PIU_DEL_TX;
00113   aer_params->ag_chg_delay_rx = AER_SIM_PIU_DEL_RX;
00114   aer_params->ag_chg_interp_samp = 2;
00115
00116   siu_setup->p651Pars.enabled = FALSE;
00117
00118   siu_setup->aep_gain_l2[0] = 0;          /* linear gain = 2^0 = 1, ERL = 0dB */
00119   siu_setup->aep_gain_l2[1] = 1;          /* linear gain = 2^1 = 2, ERL = -6dB */
00120   siu_setup->aep_gain_l2[2] = 2;          /* linear gain = 2^2 = 4, ERL = -12dB */
00121   siu_setup->aep_gain_start_exp = 0;      /* for G.167 test only, 0dB starting point */
00122   siu_setup->aep_gain_start_mant = 32767; /* for G.167 test only */
00123   siu_setup->aep_gain_adj_exp = 0;        /* gain adjustment exponent, 0dB  */
00124   siu_setup->aep_gain_adj_mant = 21689;   /* gain adjustment mantissa (S.15):
00125                                              21689(-3.5838dB) for CSS,
00126                                              32767 (0dB) for white noise */
00127
00128   /*
00129    * Don't toggle AER by default. Have to manually change this bit during debug
00130      to change AER mode.
00131    * AER control bitfield 0 and bitfield 1 are configured through aersimcfg.txt
00132    */
00133   siu_setup->toggle_aer = FALSE;
00134
00135   /*
00136    * Don't toggle AGC by default. Have to manually change this bit during debug
00137      to change AGC mode.
00138    * AGC control bitfield is configured through aersimcfg.txt
00139    */
00140   siu_setup->toggle_agc = FALSE;
00141   siu_setup->toggle_veu = FALSE;
00142
00143   siu_setup->toggle_bf  = FALSE;
00144   siu_setup->toggle_siugain = FALSE;
00145   siu_setup->siuGainCtl.ctl_code = siu_SET_MIC_GAIN;
00146   siu_setup->siuGainCtl.u.mic_gain = 0;
00147
00148   /* do not toggle acoustic echo path paramrs*/
00149   siu_setup->toggle_aep = FALSE;
00150   siu_setup->aepCtl.code = aep_CTL_GAIN;   /* default control command        */
00151   siu_setup->aepCtl.u.gain_l2 = 0;         /* log2 gain = 0                  */
00152
00153   /* do not toggle Tx or Rx signal generator */
00154   siu_setup->toggle_tx_sg = FALSE;
00155   siu_setup->toggle_rx_sg = FALSE;
00156
00157   /* do not toggle PIU tone generator */
00158   siu_setup->toggle_piu_tg = FALSE;
00159   siu_setup->piu_tg_state  = FALSE;  /* init PIU tone generator state is OFF  */
00160
00161   /* do not ask for filter coefficients */
00162   siu_setup->toggle_getflt = FALSE;
00163   siu_setup->toggle_putflt = FALSE;
00164   siu_setup->putflt_flag_last = TRUE;
00165
00166   siu_setup->run_time = 3000;         /* 30 seconds for G.167 test */
00167   siu_setup->aep_vary_time = 0;       /* aep varying time */
00168   siu_setup->aer_mips_profile = FALSE;/* disable MIPS profiling */
00169   siu_setup->aer_dbgstat_freq = 10;   /* query AER debug stats every 10 frames */
00170   siu_setup->aer_reset_bitfield = 0;  /* reset nothing when AER is reopened    */
00171   siu_setup->aer_valid_bitfield = 0;  /* reconfigure nothing when AER reopened */
00172   siu_setup->toggle_phone_mode = FALSE;
00173   siu_setup->txout_cng_only    = FALSE;
00174   siu_setup->use_fdnlp         = FALSE;
00175   siu_setup->asnr_enable       = FALSE;
00176   siu_setup->cng_enable        = FALSE;
00177   siu_setup->test_double_talk  = FALSE;
00178   siu_setup->new_phone_mode = aer_PHM_HF;
00179
00180   siu_setup->pow_track_enabled = FALSE;
00181   siu_setup->txin_file_with_echo = FALSE;
00182
00183   /* DRC related */
00184   siu_setup->drc_on_flag        = 0;   /* OFF */
00185   siu_setup->drc_cfgbits        = 0;
00186   siu_setup->drc_mips_profile   = TRUE;/* enable DRC MIPS profiling           */
00187   siu_setup->toggle_drcCtrl     = FALSE;
00188   siu_setup->toggle_drcGetParam = FALSE;
00189
00190   /* VEU related */
00191   siu_setup->veu_enabled        = FALSE;
00192
00193   /* enabling cache */
00194   siu_setup->doCacheEnable = TRUE;
00195   aersim_cacheEnable();
00196   aersim_cacheFlush();
00197
00198   /* profiling */
00199   siu_setup->RxCyclesMax = (tlong)0;
00200   siu_setup->RxCyclesAvg = (tlong)0;
00201   siu_setup->TxCyclesMax = (tlong)0;
00202   siu_setup->TxCyclesAvg = (tlong)0;
00203
00204   siu_setup->aer_trace_size_rx = (tsize)0;
00205   siu_setup->aer_trace_size_tx = (tsize)0;
00206   siu_setup->aer_trace_cfg     = (tuint)0;
00207
00208   /* set up signal generators */
00209   aer_sim_setup_sgn (&siu_setup->rxSGN, &siu_setup->txSGN);
00210
00211   /* set up acoustic echo path */
00212   aer_sim_setup_aep (&siu_setup->aep_params);
00213
00214 } /* aer_sim_init */
00215
00216 /******************************************************************************
00217  * FUNCTION PURPOSE: Setup signal generators for AER simulation.
00218  *
00219  *****************************************************************************/
00220 void aer_sim_setup_sgn(sgnSimPars_t *rx_sgn, sgnSimPars_t *tx_sgn)
00221 {
00222   /* Rx path signal generator parameters */
00223   rx_sgn->state = TRUE;         /* default state is on */
00224   rx_sgn->samp_freq = 8000;     /* default sampling frequency is 8000Hz */
00225   rx_sgn->dcoffset = 0;         /* default dc-offset  */
00226   rx_sgn->wftype = sgn_WFT_CSS; /* default waveform */
00227   rx_sgn->f1 = 1000;            /* default frequencies for tone generator (Hz) */
00228   rx_sgn->f2 = 0;
00229   rx_sgn->amp1 = 30000;             /* default amplitudes of the two frequencies */
00230   rx_sgn->amp2 = 0;
00231   rx_sgn->nlevel = -65;         /* default noise generator level in dBm0 */
00232   rx_sgn->nseed = 1531;         /* initial noise generator seed */
00233   rx_sgn->ntype = sgn_NT_GAUSS; /* Gaussian white noise */
00234   rx_sgn->pow_level = -10;      /* default HOTH/CSS power level in dBm0 */
00235   rx_sgn->hoth_seed = 918401;   /* initial HOTH generator seed */
00236   rx_sgn->exception = NULL;
00237   rx_sgn->debug = NULL;
00238   rx_sgn->file_io_fcn = NULL;
00239
00240   /* Tx path signal generator parameters */
00241   tx_sgn->state = TRUE;             /* default state is on */
00242   tx_sgn->samp_freq = 8000;         /* default sampling frequency is 8000Hz */
00243   tx_sgn->dcoffset = 0;             /* default dc-offset   */
00244   tx_sgn->wftype = sgn_WFT_CSS_DTK; /* default waveform    */
00245   tx_sgn->f1 = 601;                 /* default frequencies for tone generator(Hz)*/
00246   tx_sgn->f2 = 0;                   /* default amplitudes of the two frequencies */
00247   tx_sgn->amp1 = 16000;
00248   tx_sgn->amp2 = 0;
00249   tx_sgn->nlevel = -65;             /* default noise generator level in dBm0 */
00250   tx_sgn->nseed = 0;                /* initial noise generator seed */
00251   tx_sgn->ntype = sgn_NT_GAUSS;     /* Gaussian white noise */
00252   tx_sgn->pow_level = -20;          /* default HOTH/CSS power level in dBm0  */
00253   tx_sgn->hoth_seed = 84771;        /* initial HOTH generator seed */
00254   tx_sgn->exception = NULL;
00255   tx_sgn->debug = NULL;
00256   tx_sgn->file_io_fcn = NULL;
00257
00258 } /* aer_sim_setup_sgn */
00259
00260 /******************************************************************************
00261  * FUNCTION PURPOSE: Setup AEP simulator for AER simulation.
00262  *
00263  *****************************************************************************/
00264 void aer_sim_setup_aep(aepSimPars_t *aep_params)
00265 {
00266   aep_params->aep_seg1_duration = 20*8;  /* 20ms aep segment1 @ 8kHz */
00267   aep_params->aep_seg2_duration = 20*8;  /* 20ms aep segment2 (periodic)  */
00268   aep_params->aep_delay = 0;             /* 0*125us */
00269   aep_params->aep_gain_l2 = 0;           /* gain = 2^0 = 1 */
00270   aep_params->aep_frame_M60dB = 20;      /* 20 frames for AEP to decay to -60dB */
00271   aep_params->aep_alpha = 0;
00272   aep_params->aep_delta_a = 0;
00273   aep_params->aep_morph_delay = 0;
00274 } /* aer_sim_setup_aep */
00275
00276 /******************************************************************************
00277  * FUNCTION PURPOSE: Read AER simulation configuration
00278  *
00279  *****************************************************************************/
00280 void aer_sim_read_cfg(siuSetup_t *siu_setup, aersimFileIO_t *fio, FILE *test_cfg)
00281 {
00282   int mic_type, num_mic, bf_steer_angle, rxin_fio_flag, rxout_fio_flag;
00283   int i, txin_fio_echo_flag, drc_on_flag, txout_fio_flag, txin_fio_flag;
00284   int sampling_rates, profile_flag, fe_sgn_flag, ne_sgn_flag, band_split_flag;
00285   unsigned int aer_ctl_bitfield_0, aer_ctl_bitfield_1, agc_ctl_bitfield, bf_ctl_bitfield;
00286   unsigned int drc_cfgbits, bf_mics;
00287
00288   fscanf(test_cfg, "%d\n", &mic_type);
00289   fscanf(test_cfg, "%d\n", &num_mic);
00290   if(mic_type == AER_SIM_MIC_TYPE_ARRAY) {
00291     if(num_mic > AER_SIM_NUM_BF_MIC) {
00292       printf("Error! Number of BF mics is larger than the configured maximum.\n");
00293       printf("Change AER_SIM_NUM_BF_MIC in aersimcfg.h and recompile code.\n");
00294       exit(0);
00295     }
00296     siu_setup->system_cfg.num_BF_mic = (tint)num_mic;
00297     siu_setup->system_cfg.num_HF_mic = 1;
00298   }
00299   else if(mic_type == AER_SIM_MIC_TYPE_STAND_ALONE) {
00300     if(num_mic > AER_SIM_NUM_HF_MIC) {
00301       printf("Error! Number of HF mics is larger than the configured maximum.\n");
00302       printf("Change AER_SIM_NUM_HF_MIC in aersimcfg.h and recompile code.\n");
00303       exit(0);
00304     }
00305     siu_setup->system_cfg.num_HF_mic = (tint)num_mic;
00306     siu_setup->system_cfg.num_BF_mic = 0;
00307   }
00308   else {
00309     printf("Error! Mic type should be either 0 or 1.\n");
00310   }
00311
00312   fscanf(test_cfg, "%d\n", &sampling_rates);
00313   fscanf(test_cfg, "%d\n", &band_split_flag);
00314   fscanf(test_cfg, "%x\n", &aer_ctl_bitfield_0);
00315   fscanf(test_cfg, "%x\n", &aer_ctl_bitfield_1);
00316   fscanf(test_cfg, "%x\n", &agc_ctl_bitfield);
00317   fscanf(test_cfg, "%x\n", &bf_ctl_bitfield);
00318   fscanf(test_cfg, "%x\n", &bf_mics);
00319   fscanf(test_cfg, "%d\n", &drc_on_flag);
00320   fscanf(test_cfg, "%x\n", &drc_cfgbits);
00321   fscanf(test_cfg, "%d\n", &fe_sgn_flag);
00322   fscanf(test_cfg, "%d\n", &ne_sgn_flag);
00323
00324   fscanf(test_cfg, "%d\n", &profile_flag);
00325
00326   fscanf(test_cfg, "%d\n", &rxin_fio_flag);
00327   fscanf(test_cfg, "%d\n", &rxout_fio_flag);
00328   fscanf(test_cfg, "%s\n", fio->rx_in_file_name);
00329
00330   fscanf(test_cfg, "%d\n", &txin_fio_flag);
00331   fscanf(test_cfg, "%d\n", &txin_fio_echo_flag);
00332   fscanf(test_cfg, "%d\n", &txout_fio_flag);
00333
00334   for(i=0; i<num_mic; i++) {
00335     fscanf(test_cfg, "%s\n", fio->tx_in_file_name[i]);
00336   }
00337
00338   fscanf(test_cfg, "%d\n", &bf_steer_angle);
00339   fclose(test_cfg);
00340
00341   siu_setup->system_cfg.mult_mic_type  = mic_type;
00342   siu_setup->system_cfg.sampling_rates = sampling_rates;
00343   siu_setup->system_cfg.band_split_flag = band_split_flag;
00344   siu_setup->aer_ctl_bitfield_0 = (tuint)aer_ctl_bitfield_0;
00345   siu_setup->aer_ctl_bitfield_1 = (tuint)aer_ctl_bitfield_1;
00346   siu_setup->agc_ctl_bitfield   = (tuint)agc_ctl_bitfield;
00347   siu_setup->bf_ctl_bitfield    = (tuint)bf_ctl_bitfield;
00348   siu_setup->bf_mics            = (tuint)bf_mics;
00349   siu_setup->aer_mips_profile = (tbool)profile_flag;
00350   siu_setup->ne_sgn_flag = ne_sgn_flag;
00351   siu_setup->fe_sgn_flag = fe_sgn_flag;
00352   siu_setup->drc_on_flag = drc_on_flag;
00353   siu_setup->drc_cfgbits = drc_cfgbits;
00354   siu_setup->system_cfg.bf_steer_angle = (tint)bf_steer_angle;
00355
00356   fio->flag_rxin_rd   = (tbool)rxin_fio_flag;
00357   fio->flag_rxout_wr  = (tbool)rxout_fio_flag;
00358   fio->flag_txin_rd   = (tbool)txin_fio_flag;
00359   fio->flag_txout_wr  = (tbool)txout_fio_flag;
00360   fio->flag_txin_echo = (tbool)txin_fio_echo_flag;
00361
00362 } /* aer_sim_read_cfg */
00363
00364 /******************************************************************************
00365  * FUNCTION PURPOSE: Configure simulation environment based on configuration file
00366  *
00367  *****************************************************************************/
00368 void aer_sim_apply_config(siuSetup_t *siu_setup)
00369 {
00370   siuSysCfg_t   *sys_cfg;
00371   aepSimPars_t  *aep_pars;
00372   tint sampling_rates, aer_srate_rxin, aer_srate_txout, aer_srate_rxout;
00373
00374   sys_cfg  = &siu_setup->system_cfg;
00375   aep_pars = &siu_setup->aep_params;
00376
00377   sampling_rates = sys_cfg->sampling_rates;
00378   aer_srate_rxin  = aersim_chkbit(sampling_rates, aer_SRATE_RXIN_16K)
00379                       ? AER_SIM_SRATE_16000_DIV_8K : AER_SIM_SRATE_8000_DIV_8K;
00380   aer_srate_txout = aersim_chkbit(sampling_rates, aer_SRATE_TXOUT_16K)
00381                       ? AER_SIM_SRATE_16000_DIV_8K : AER_SIM_SRATE_8000_DIV_8K;
00382   aer_srate_rxout = aersim_chkbit(sampling_rates, aer_SRATE_RXOUT_TXIN_16K)
00383                       ? AER_SIM_SRATE_16000_DIV_8K : AER_SIM_SRATE_8000_DIV_8K;
00384
00385   siu_setup->segment_size      = sys_cfg->segment_size * aer_srate_rxout;
00386   siu_setup->aer_rin_frm_size  = sys_cfg->frame_size * aer_srate_rxin;
00387   siu_setup->aer_rout_frm_size = sys_cfg->frame_size * aer_srate_rxout;
00388   siu_setup->aer_sin_frm_size  = sys_cfg->frame_size * aer_srate_rxout;
00389   siu_setup->aer_sout_frm_size = sys_cfg->frame_size * aer_srate_txout;
00390   aep_pars->aep_delay_samp     = aep_pars->aep_delay * aer_srate_rxout;
00391   aep_pars->aep_hseg1_length   = aep_pars->aep_seg1_duration * aer_srate_rxout;
00392   aep_pars->aep_hseg2_length   = aep_pars->aep_seg2_duration * aer_srate_rxout;
00393   aep_pars->aep_filter_length  = aep_pars->aep_hseg1_length + aep_pars->aep_hseg2_length;
00394   aep_pars->aep_buf_length     = aep_pars->aep_hseg2_length * AEP_PARTIAL_ECHO_SIZ;
00395
00396   if(siu_setup->aer_mips_profile) {
00397     if (!aersim_initCycleProfiling() ) {
00398       printf("Could not acquire profiling resources..Exiting\n");
00399       exit(0);
00400     }
00401   }
00402
00403 } /* aer_sim_apply_config */
00404
00405 /******************************************************************************
00406  * FUNCTION PURPOSE: Initialize SIU simulator instance
00407  *
00408  *****************************************************************************/
00409 void aer_sim_init_siu(siuInst_t *siu_inst_ptr, siuSetup_t *siu_setup_ptr)
00410 {
00411   siuConfig_t   siu_cfg;
00412   siuTxConfig_t siutx_cfg;
00413   siuRxConfig_t siurx_cfg;
00414
00415   siu_cfg.ID             = siuMakeID (SIU_MID_SIU, 0); /* use chnum 0 this time */
00416   siu_cfg.companding_law = siu_setup_ptr->system_cfg.ulaw;
00417   siu_cfg.pcm_bits       = siu_setup_ptr->system_cfg.pcm_bits;
00418   siu_cfg.core_heap      = NULL;
00419   siu_cfg.voice_heap     = NULL;
00420   siu_cfg.exception      = NULL;
00421   siu_cfg.debug          = NULL;
00422
00423   siuInit (siu_inst_ptr, &siu_cfg);      /* inits siu context & siu instance */
00424
00425   /* Open Tx Task */
00426   siutx_cfg.send_out_frame_length = siu_setup_ptr->aer_sout_frm_size;
00427   siutx_cfg.send_in_frame_length  = siu_setup_ptr->aer_sin_frm_size;
00428   siutx_cfg.num_HF_mic            = siu_setup_ptr->system_cfg.num_HF_mic;
00429   siuTxOpen (siu_inst_ptr, &siutx_cfg);
00430
00431   /* Open Rx Task */
00432   siurx_cfg.rout_frm_len = siu_setup_ptr->aer_rout_frm_size;
00433   siurx_cfg.rin_frm_len  = siu_setup_ptr->aer_rin_frm_size;
00434   siuRxOpen (siu_inst_ptr, &siurx_cfg);
00435
00436   /* Set SIU receive in buffer to be consistent with legacy AEP code - need to
00437      be cleaned up. */
00438   siu_inst_ptr->aer_recv_in_buf = &siu_rx_del_buf[0];
00439
00440 } /* aer_sim_init_siu */
00441
00442 /******************************************************************************
00443  * FUNCTION PURPOSE: Initialize PIU simulator
00444  *
00445  *****************************************************************************/
00446 void aer_sim_init_piu(piuInst_t *piu_inst, siuSetup_t *siu_setup)
00447 {
00448   piuInit(piu_inst, siu_setup->aer_rout_frm_size);
00449 }
00450
00451 /******************************************************************************
00452  * FUNCTION PURPOSE: Instantiate AER modules - AER, AGC, DRC, BF, MSS
00453  *
00454  *****************************************************************************/
00455 void aer_sim_instantiate_aer(siuInst_t *siu_inst, siuSetup_t *siu_setup)
00456 {
00457   tint num_mic, samp_rates;
00458
00459   num_mic    = siu_setup->system_cfg.num_HF_mic;
00460   samp_rates = siu_setup->system_cfg.sampling_rates;
00461
00462   /* Instantiate AER module */
00463   siu_new_aer (siu_inst, num_mic, siu_setup->system_cfg.band_split_flag);
00464
00465   /* Instantiate AGC module */
00466   siu_new_agc (siu_inst, num_mic);
00467
00468   /* Instantiate DRC module */
00469   siu_new_drc(siu_inst);
00470
00471   /* Instantiate BF module */
00472   if(siu_setup->system_cfg.mult_mic_type == AER_SIM_MIC_TYPE_ARRAY) {
00473     siu_new_bf(siu_inst, samp_rates);
00474   }
00475
00476   /* Instantiate MSS module */
00477   siu_new_mss(siu_inst, num_mic, samp_rates);
00478
00479   /* Open AER module instances */
00480   siu_open_aer(siu_inst, &siu_setup->aer_sys_params, samp_rates, num_mic);
00481
00482   /* Open AGC module instances */
00483   siu_open_agc(siu_inst, samp_rates, num_mic);
00484
00485   /* Open DRC module instances */
00486   siu_open_drc(siu_inst, siu_setup->drc_cfgbits, samp_rates);
00487
00488   /* Open BF module */
00489   if(siu_setup->system_cfg.mult_mic_type == AER_SIM_MIC_TYPE_ARRAY) {
00490     siu_open_bf(siu_inst, samp_rates, siu_setup->system_cfg.num_BF_mic);
00491   }
00492
00493   /* Open MSS module */
00494   siu_open_mss(siu_inst, num_mic, samp_rates);
00495
00496   /* Activate HF mic 0 */
00497   siu_mmic_init(siu_inst);
00498
00499 } /* aer_sim_instantiate_aer */
00500
00501 /******************************************************************************
00502  * FUNCTION PURPOSE: Open signal generators (SGN)
00503  *
00504  *****************************************************************************/
00505 void aer_sim_open_txrx_sgns(sgnInstBuf_t *sgn_inst_tx,
00506                             sgnInstBuf_t *sgn_inst_rx, siuSetup_t *siu_setup)
00507 {
00508   int i;
00509   tint sgn_size;
00510
00511   /* Get memory requirements for SGN */
00512   sgnGetSizes(&sgn_size);
00513
00514   if(sgn_size > sizeof(sgnInstBuf_t)) {
00515     printf("Error! SGN buffer has no enough memory.\n");
00516     exit(0);
00517   }
00518
00519   /* Turn on/off SGN based on simulation configuration */
00520   siu_setup->txSGN.state = siu_setup->ne_sgn_flag;
00521   siu_setup->rxSGN.state = siu_setup->fe_sgn_flag;
00522
00523   /* Open Rx SGN */
00524   siu_setup->rxSGN.samp_freq = aersim_chkbit(siu_setup->system_cfg.sampling_rates,
00525                                              aer_SRATE_RXIN_16K) ? 16000 : 8000;
00526   aer_sim_sgn_init(sgn_inst_rx, &siu_setup->rxSGN);
00527   aer_sim_sgn_set (sgn_inst_rx, &siu_setup->rxSGN);
00528
00529   /* Open Tx SGNs */
00530   siu_setup->txSGN.samp_freq = aersim_chkbit(siu_setup->system_cfg.sampling_rates,
00531                                              aer_SRATE_RXOUT_TXIN_16K) ? 16000 : 8000;
00532   for(i=0; i<siu_setup->system_cfg.num_HF_mic; i++) {
00533     aer_sim_sgn_init(&sgn_inst_tx[i], &siu_setup->txSGN);
00534     aer_sim_sgn_set (&sgn_inst_tx[i], &siu_setup->txSGN);
00535   }
00536
00537 } /* aer_sim_open_txrx_sgn */
00538
00539 /******************************************************************************
00540  * FUNCTION PURPOSE: Open acoustic echo path module (AEP)
00541  *
00542  *****************************************************************************/
00543 void aer_sim_open_aep(aepSimInst_t *aep_inst, siuSetup_t *siu_setup)
00544 {
00545   tint delay, samp_rate, frm_size;
00546   tbool aep_morph_flag;
00547
00548   /* Initialize AEP */
00549   delay = siu_setup->aep_params.aep_delay_samp;
00550   samp_rate = aersim_chkbit(siu_setup->system_cfg.sampling_rates, aer_SRATE_RXOUT_TXIN_16K)
00551                             ? AER_SIM_SRATE_16000_DIV_8K : AER_SIM_SRATE_8000_DIV_8K;
00552   aep_morph_flag = siu_setup->aep_vary_time > 0;
00553   aer_sim_aep_init(aep_inst, delay, samp_rate, aep_morph_flag);
00554
00555   /* Open AEP */
00556   frm_size = siu_setup->aer_rout_frm_size;
00557   aer_sim_aep_open(aep_inst, &siu_setup->aep_params, frm_size, samp_rate);
00558
00559 } /* aer_sim_open_aep */
00560
00561
00562 /******************************************************************************
00563  * FUNCTION PURPOSE: Configure AER parameters for simulation
00564  ******************************************************************************
00565  * DESCRIPTION: This function configures AER parameterst to verify functionality
00566  *              of AER modules: AER, AGC, DRC, BF, MSS.
00567  *
00568  *****************************************************************************/
00569 void aer_sim_config_aer_params(siuInst_t *inst, siuSetup_t *siu_setup)
00570 {
00571   void *aerInst;
00572   aerControl_t aer_ctl;
00573   agcControl_t agcCtl;
00574   bfControl_t bf_ctl;
00575   siuGainControl_t siuGainCtl;
00576   tint error_code;
00577   int i;
00578
00579   for (i=0; i<inst->phone_sys.num_HF_mic; i++) {
00580     aerInst = inst->aerHFInst[i];
00581
00582     /*== AER valid bitfield 0 ==*/
00583     aer_ctl.valid_bitfield_0 =  aer_CTL_VALID0_MODES_CTL0
00584                               | aer_CTL_VALID0_MODES_CTL1
00585                               | aer_CTL_VALID0_RX_EQ_PARAMS
00586                               | aer_CTL_VALID0_TX_EQ_PARAMS;
00587     /* Set AER operation modes: siu_setup->aer_ctl_bitfield_0 and
00588        siu_setup->aer_ctl_bitfield_1 are set through simulation configuration
00589        file: aersimcfg.txt.
00590      * The mask is set to 0xffff to set all bits, either to 0 or to 1.     */
00591     aer_ctl.modes_0.mask  = 0xffff;
00592     aer_ctl.modes_0.value = siu_setup->aer_ctl_bitfield_0;
00593     aer_ctl.modes_1.mask  = 0xffff;
00594     aer_ctl.modes_1.value = siu_setup->aer_ctl_bitfield_1;
00595
00596     /* Load equalizer coefficients (unity tap) in both tx and rx directions */
00597     aer_ctl.rxeq_params = (aerEqConfig_t *)&sampleEqBqParamsRx;
00598     aer_ctl.txeq_params = (aerEqConfig_t *)&sampleEqBqParamsTx;
00599
00600     /*== AER valid bitfield 1 ==*/
00601     /* configure NLP */
00602     aer_ctl.valid_bitfield_1 =  aer_CTL_VALID1_NLP_CLOSS_TARGET
00603                               | aer_CTL_VALID1_NLP_TX_CLIPAGG
00604                               | aer_CTL_VALID1_NLP_LINATTN_MAX_ERLE
00605                               | aer_CTL_VALID1_NLP_CLIPPER_MAX_ERLE
00606                               | aer_CTL_VALID1_NLP_TX_IN_TC
00607                               | aer_CTL_VALID1_NLP_TX_OUT_TC
00608                               | aer_CTL_VALID1_NLP_RX_IN_TC
00609                               | aer_CTL_VALID1_NLP_RX_OUT_TC
00610                               | aer_CTL_VALID1_GAIN_SPLIT_TC
00611                               | aer_CTL_VALID1_CNG_RX_LEVEL
00612                               | aer_CTL_VALID1_CNG_TX_LEVEL;
00613     aer_ctl.nlp_combloss_target  = 700;
00614     aer_ctl.nlp_clip_agg_l2      = 4;
00615     aer_ctl.nlp_linattn_max_erle = 30;
00616     aer_ctl.nlp_clipper_max_erle = 30;
00617     aer_ctl.nlp_tx_in_tc         = 4;
00618     aer_ctl.nlp_tx_out_tc        = 1;
00619     aer_ctl.nlp_rx_in_tc         = 4;
00620     aer_ctl.nlp_rx_out_tc        = 1;
00621     aer_ctl.gain_split_tc        = 3;
00622     aer_ctl.cng_rx_level         = -70;
00623     aer_ctl.cng_tx_level         = -70;
00624
00625     /*== AER valid bitfield 2 ==*/
00626     aer_ctl.valid_bitfield_2 =  aer_CTL_VALID2_TX_FDNLP_CNG_MAX
00627                               | aer_CTL_VALID2_NR_FBIN1_LIM
00628                               | aer_CTL_VALID2_NR_FBIN2_LIM
00629                               | aer_CTL_VALID2_NR_FBAND1_MAX_ATTEN
00630                               | aer_CTL_VALID2_NR_FBAND2_MAX_ATTEN
00631                               | aer_CTL_VALID2_NR_FBAND3_MAX_ATTEN
00632                               | aer_CTL_VALID2_NR_NOISE_THRESH;
00633     aer_ctl.txfdnlp_cng_max = -40;
00634     aer_ctl.nr_noise_thresh = -65;
00635     aer_ctl.nr_fbin1_lim    = 5;
00636     aer_ctl.nr_fbin2_lim    = 32;
00637     aer_ctl.nr_fband1_max_atten = 9;
00638     aer_ctl.nr_fband2_max_atten = 9;
00639     aer_ctl.nr_fband3_max_atten = 9;
00640
00641     /*== AER valid bitfield 3 ==*/
00642     aer_ctl.valid_bitfield_3 =  aer_CTL_VALID3_HLC_THRESHOLD
00643                               | aer_CTL_VALID3_HLC_RAMP_OUT_TC
00644                               | aer_CTL_VALID3_HLC_POWER_TC
00645                               | aer_CTL_VALID3_COH_HANGOVER
00646                               | aer_CTL_VALID3_COH_RATIO_THRESH
00647                               | aer_CTL_VALID3_COH_CNT_THRESH;
00648     aer_ctl.thresh_hlc      = -20;
00649     aer_ctl.ramp_out_tc_hlc = 700;
00650     aer_ctl.power_tc_hlc    = 1;
00651     aer_ctl.coh_hangover    = 600;
00652     aer_ctl.coh_ratio_thresh= 6000;
00653     aer_ctl.coh_cnt_thresh  = 30;
00654
00655     /*== AER valid bitfield 4 ==*/
00656     aer_ctl.valid_bitfield_4 =  aer_CTL_VALID4_DT_THRESH
00657                               | aer_CTL_VALID4_CLIP_SCALE
00658                               | aer_CTL_VALID4_DT_HANGOVER;
00659     aer_ctl.dt_thresh = 64;
00660     aer_ctl.clip_scale_curve = 0x3c404050;
00661     aer_ctl.dt_hangover = 5;
00662
00663     error_code = aerControl (aerInst,(aerControl_t *)&aer_ctl);
00664
00665     if(error_code != aer_NOERR) {
00666       printf("AER parameters configuration error!\n");
00667       exit(0);
00668     }
00669
00670     /*== AGC configuration  ==*/
00671     agcCtl.valid_bitfield =  agc_CTL_VALID_MODES
00672                            | agc_CTL_VALID_SAT_THRESHOLD
00673                            | agc_CTL_VALID_SAT_HANGOVER
00674                            | agc_CTL_VALID_MIC_GAIN_MAX
00675                            | agc_CTL_VALID_MIC_GAIN_MIN
00676                            | agc_CTL_VALID_MICGAIN_SWING_MAX;
00677
00678     /* Set AGC operation modes: siu_setup->agc_ctl_bitfield is set through
00679        simulation config file: aersimcfg.txt.
00680      * The mask is set to 0xffff to set all bits, either to 0 or to 1.
00681      */
00682     agcCtl.modes.mask  = 0xffff;
00683     agcCtl.modes.value = siu_setup->agc_ctl_bitfield;
00684     agcCtl.sat_threshold = AER_SIM_AGC_SAT_THRESHOLD;
00685     agcCtl.sat_hangover  = AER_SIM_AGC_SAT_HANGOVER;
00686     agcCtl.max_micgain   = AER_SIM_AGC_MICGAIN_MAX;
00687     agcCtl.min_micgain   = AER_SIM_AGC_MICGAIN_MIN;
00688     agcCtl.max_micgain_swing = AER_SIM_AGC_GAINSWING_MAX;
00689
00690     error_code = agcControl (inst->agcHFInst[i],(agcControl_t *)&agcCtl);
00691
00692     if(error_code != agc_NOERR) {
00693       printf("AGC parameters configuration error!\n");
00694       exit(0);
00695     }
00696
00697     /* Set speaker gain or Rx analog gain in simulation as well as AER and AGC
00698        record of this gain. */
00699     siuGainCtl.ctl_code = siu_SET_SPK_GAIN;
00700     siuGainCtl.u.spk_gain = AER_SIM_HF_SPKGAIN_0dB;
00701     siuGainControl(inst->agcHFhandles[i], &siuGainCtl);
00702
00703     /* Set mic gain or Tx analog gain in simulation as well as AER and AGC
00704        record of this gain. */
00705     siuGainCtl.ctl_code = siu_SET_MIC_GAIN;
00706     siuGainCtl.u.mic_gain = AER_SIM_HF_MICGAIN_0dB;
00707     siuGainControl(inst->agcHFhandles[i], &siuGainCtl);
00708   } /* for loop ends here */
00709
00710   siu_control_drc(inst, siu_setup->system_cfg.sampling_rates, siu_setup->drc_on_flag);
00711
00712   if(siu_setup->system_cfg.mult_mic_type == AER_SIM_MIC_TYPE_ARRAY) {
00713
00714     /* config bf parameters */
00715     bf_ctl.valid_bitfield = bf_CTL_CONFIG|bf_CTL_MICS; /* Enable BF, operation mode change */
00716     bf_ctl.config.mask    = bf_CTL_CFG_ENABLE|bf_CTL_CFG_OPERATION;
00717     bf_ctl.config.value   = siu_setup->bf_ctl_bitfield;/* read from aersimcfg.txt */
00718     bf_ctl.mics           = siu_setup->bf_mics;        /* read from aersimcfg.txt */
00719
00720     if(siu_setup->system_cfg.bf_steer_angle == AER_SIM_BF_STEER_ANGLE_0) {
00721       siu_config_bf(inst, &bf_ctl, bf_coeffs_0, siu_setup->system_cfg.sampling_rates,
00722                     siu_setup->system_cfg.num_BF_mic);
00723     }
00724     if(siu_setup->system_cfg.bf_steer_angle == AER_SIM_BF_STEER_ANGLE_45) {
00725       siu_config_bf(inst, &bf_ctl, bf_coeffs_45, siu_setup->system_cfg.sampling_rates,
00726                     siu_setup->system_cfg.num_BF_mic);
00727     }
00728     if(siu_setup->system_cfg.bf_steer_angle == AER_SIM_BF_STEER_ANGLE_90) {
00729       siu_config_bf(inst, &bf_ctl, bf_coeffs_90, siu_setup->system_cfg.sampling_rates,
00730                     siu_setup->system_cfg.num_BF_mic);
00731     }
00732   }
00733 } /* aer_sim_config_aer_params */
00734
00735
00736 /* enable cache */
00737 void aersim_cacheEnable()
00738 {
00739 #ifndef gnu_targets_arm_GCArmv7A
00740   memarchcfg_cacheEnable();
00741 #endif
00742 }
00743
00744 /* flush cache for profiling - need to recompile with "profile" option */
00745 void aersim_cacheFlush()
00746 {
00747 #ifndef gnu_targets_arm_GCArmv7A
00748 #ifdef AERSIM_PROFILE_FLUSH_CACHE
00749   memarchcfg_cacheFlush();
00750 #endif
00751 #endif
00752 }
00753
00754 /* prepare for MIPS profiling through direct reading of CPU cycle count */
00755 tbool aersim_initCycleProfiling()
00756 {
00757 #ifndef gnu_targets_arm_GCArmv7A
00758   return profile_initCycleProfiling();
00759 #else
00760   return TRUE;
00761 #endif
00762 }
00763
00764 void aersim_profile_get_cycle_before_aer(siuSetup_t *siu_setup)
00765 {
00766 #ifndef gnu_targets_arm_GCArmv7A
00767   siu_setup->cycles_before_aer = profile_getCPUcycleCount();
00768 #endif
00769 }
00770
00771 void aersim_profile_get_cycle_after_aer_send(siuSetup_t *siu_setup)
00772 {
00773 #ifndef gnu_targets_arm_GCArmv7A
00774   tlong cycles_aer;
00775
00776   cycles_aer = (tlong)(profile_getCPUcycleCount() - siu_setup->cycles_before_aer);
00777   if(cycles_aer < 0) {
00778     cycles_aer += sdk_PROFILE_MAXCNT;
00779   }
00780
00781   if(cycles_aer > siu_setup->TxCyclesMax) {
00782     siu_setup->TxCyclesMax = cycles_aer;
00783   }
00784   siu_setup->TxCyclesAvg = (siu_setup->TxCyclesAvg*511+cycles_aer) >> 9;
00785 #endif
00786 }
00787
00788 void aersim_profile_get_cycle_after_aer_receive(siuSetup_t *siu_setup)
00789 {
00790 #ifndef gnu_targets_arm_GCArmv7A
00791   tlong cycles_aer;
00792
00793   cycles_aer = (tlong)(profile_getCPUcycleCount() - siu_setup->cycles_before_aer);
00794   if(cycles_aer < 0) {
00795     cycles_aer += sdk_PROFILE_MAXCNT;
00796   }
00797
00798   if(cycles_aer > siu_setup->RxCyclesMax) {
00799     siu_setup->RxCyclesMax = cycles_aer;
00800   }
00801   siu_setup->RxCyclesAvg = (siu_setup->RxCyclesAvg*511+cycles_aer) >> 9;
00802 #endif
00803 }
00804
00805 /******************************************************************************
00806  * FUNCTION PURPOSE: Configure all AER parameters to test the API
00807  *****************************************************************************/
00808 void aer_sim_test_api(void *aer_inst)
00809 {
00810   aerControl_t aer_ctl;
00811   tint error_code;
00812
00813   /* valid bitfield 0 */
00814   aer_ctl.valid_bitfield_0 =   aer_CTL_VALID0_MODES_CTL0
00815                              | aer_CTL_VALID0_MODES_CTL1
00816                              | aer_CTL_VALID0_MODES_CTL2
00817                              | aer_CTL_VALID0_Y2X_DELAY
00818                              | aer_CTL_VALID0_SAMPLING_RATES
00819                              | aer_CTL_VALID0_TAIL_LENGTH
00820                              | aer_CTL_VALID0_TX_AG_CHG_DELAY
00821                              | aer_CTL_VALID0_RX_AG_CHG_DELAY
00822                              | aer_CTL_VALID0_TX_AG_CHG_INTERP
00823                              | aer_CTL_VALID0_PHONE_MODE
00824                              | aer_CTL_VALID0_RX_ANALOG
00825                              | aer_CTL_VALID0_TX_ANALOG
00826                              | aer_CTL_VALID0_RX_DIGITAL
00827                              | aer_CTL_VALID0_TX_DIGITAL
00828                              | aer_CTL_VALID0_RX_EQ_PARAMS
00829                              | aer_CTL_VALID0_TX_EQ_PARAMS;
00830
00831   aer_ctl.modes_0.mask     = 0xffff;
00832   aer_ctl.modes_0.value    = 0x188f;
00833   aer_ctl.modes_1.mask     = 0xffff;
00834   aer_ctl.modes_1.value    = 0xc1ce;
00835   aer_ctl.modes_2.mask     = 0xffff;
00836   aer_ctl.modes_2.value    = 0x001d;
00837   aer_ctl.y2x_delay        = AER_SIM_PIU_DEL_RX + AER_SIM_PIU_DEL_TX - AER_SIM_SIU_Y2X_DEL_ADJ - 1;
00838   aer_ctl.srate_bitfield   = 6;       /* Rx in 8kHz, Tx out 16kHz, Rx out/Tx in 16kHz */
00839   aer_ctl.tail_length      = 800;     /* 800 = 100msec/125usec */
00840   aer_ctl.delay_tx_ag_chg  = AER_SIM_PIU_DEL_TX + 1;
00841   aer_ctl.delay_rx_ag_chg  = AER_SIM_PIU_DEL_RX + 1;
00842   aer_ctl.num_samp_interp  = 5;
00843   aer_ctl.phone_mode       = aer_PHM_HES;
00844   aer_ctl.gain_rx_analog   = AER_SIM_HF_MICGAIN_0dB - 16;
00845   aer_ctl.gain_tx_analog   = AER_SIM_HF_SPKGAIN_0dB - 32;
00846   aer_ctl.gain_rx_digital  = 16;
00847   aer_ctl.gain_tx_digital  = 32;
00848   aer_ctl.rxeq_params = (aerEqConfig_t *)&sampleEqBqParamsRx;
00849   aer_ctl.txeq_params = (aerEqConfig_t *)&sampleEqBqParamsTx;
00850
00851   /* valid bitfield 1 */
00852   aer_ctl.valid_bitfield_1 =   aer_CTL_VALID1_NLP_CLOSS_TARGET
00853                              | aer_CTL_VALID1_NLP_TX_CLIPAGG
00854                              | aer_CTL_VALID1_NLP_LINATTN_MAX_ERLE
00855                              | aer_CTL_VALID1_NLP_CLIPPER_MAX_ERLE
00856                              | aer_CTL_VALID1_NLP_TOTAL_LINATTN_MIN
00857                              | aer_CTL_VALID1_NLP_RX_LINATTN_MIN
00858                              | aer_CTL_VALID1_NLP_RX_LINATTN_MAX
00859                              | aer_CTL_VALID1_NLP_TX_LINATTN_MIN
00860                              | aer_CTL_VALID1_NLP_TX_LINATTN_MAX
00861                              | aer_CTL_VALID1_NLP_TX_IN_TC
00862                              | aer_CTL_VALID1_NLP_TX_OUT_TC
00863                              | aer_CTL_VALID1_NLP_RX_IN_TC
00864                              | aer_CTL_VALID1_NLP_RX_OUT_TC
00865                              | aer_CTL_VALID1_GAIN_SPLIT_TC
00866                              | aer_CTL_VALID1_CNG_RX_LEVEL
00867                              | aer_CTL_VALID1_CNG_TX_LEVEL;
00868   aer_ctl.nlp_combloss_target   = 900;
00869   aer_ctl.nlp_clip_agg_l2       = 6;
00870   aer_ctl.nlp_linattn_max_erle  = 27;
00871   aer_ctl.nlp_clipper_max_erle  = 27;
00872   aer_ctl.nlp_total_linattn_min = 2;
00873   aer_ctl.nlp_rx_linattn_min    = 1;
00874   aer_ctl.nlp_rx_linattn_max    = 12;
00875   aer_ctl.nlp_tx_linattn_min    = 1;
00876   aer_ctl.nlp_tx_linattn_max    = 12;
00877   aer_ctl.nlp_tx_in_tc          = 5;
00878   aer_ctl.nlp_tx_out_tc         = 5;
00879   aer_ctl.nlp_rx_in_tc          = 5;
00880   aer_ctl.nlp_rx_out_tc         = 5;
00881   aer_ctl.gain_split_tc         = 5;
00882   aer_ctl.cng_rx_level          = -60;
00883   aer_ctl.cng_tx_level          = -60;
00884
00885
00886   /* valid bitfield 2 */
00887   aer_ctl.valid_bitfield_2 =   aer_CTL_VALID2_TX_FDNLP_MSEC_DELAY
00888                              | aer_CTL_VALID2_TX_FDNLP_BIN_LO1
00889                              | aer_CTL_VALID2_TX_FDNLP_BIN_LO2
00890                              | aer_CTL_VALID2_TX_FDNLP_BIN_HI1
00891                              | aer_CTL_VALID2_TX_FDNLP_BIN_HI2
00892                              | aer_CTL_VALID2_TX_FDNLP_CNG_MAX
00893                              | aer_CTL_VALID2_NR_FBIN1_LIM
00894                              | aer_CTL_VALID2_NR_FBIN2_LIM
00895                              | aer_CTL_VALID2_NR_FBAND1_MAX_ATTEN
00896                              | aer_CTL_VALID2_NR_FBAND2_MAX_ATTEN
00897                              | aer_CTL_VALID2_NR_FBAND3_MAX_ATTEN
00898                              | aer_CTL_VALID2_NR_SIG_UPD_RATE_MAX
00899                              | aer_CTL_VALID2_NR_SIG_UPD_RATE_MIN
00900                              | aer_CTL_VALID2_NR_NOISE_THRESH
00901                              | aer_CTL_VALID2_NR_NOISE_HANGOVER;
00902
00903   aer_ctl.txfdnlp_msec_delay  = 6;
00904   aer_ctl.txfdnlp_bin_lo1     = 2;
00905   aer_ctl.txfdnlp_bin_lo2     = 5;
00906   aer_ctl.txfdnlp_bin_hi1     = 60;
00907   aer_ctl.txfdnlp_bin_hi2     = 62;
00908   aer_ctl.txfdnlp_cng_max     = -62;
00909   aer_ctl.nr_fbin1_lim        = 12;
00910   aer_ctl.nr_fbin2_lim        = 40;
00911   aer_ctl.nr_fband1_max_atten = 12;
00912   aer_ctl.nr_fband2_max_atten = 12;
00913   aer_ctl.nr_fband3_max_atten = 12;
00914   aer_ctl.nr_sig_upd_rate_max = 32000;
00915   aer_ctl.nr_sig_upd_rate_min = 30000;
00916   aer_ctl.nr_noise_thresh     = -70;
00917   aer_ctl.nr_noise_hangover   = 100;
00918
00919   /* valid bitfield 3 */
00920   aer_ctl.valid_bitfield_3 =   aer_CTL_VALID3_COH_HANGOVER
00921                              | aer_CTL_VALID3_COH_RATIO_THRESH
00922                              | aer_CTL_VALID3_COH_CNT_THRESH
00923                              | aer_CTL_VALID3_HLC_THRESHOLD
00924                              | aer_CTL_VALID3_HLC_RAMP_OUT_TC
00925                              | aer_CTL_VALID3_HLC_POWER_TC
00926                              | aer_CTL_VALID3_THRESH_RX_NLD
00927                              | aer_CTL_VALID3_THRESH_NOISE_RX
00928                              | aer_CTL_VALID3_THRESH_NOISE_TX
00929                              | aer_CTL_VALID3_HANGOVER_RXTOTX
00930                              | aer_CTL_VALID3_HANGOVER_TXTORX
00931                              | aer_CTL_VALID3_TX_SLIM_MODE
00932                              | aer_CTL_VALID3_RX_SLIM_MODE
00933                              | aer_CTL_VALID3_NG_HANGOVER
00934                              | aer_CTL_VALID3_NG_RAMPIN_PERIOD
00935                              | aer_CTL_VALID3_NG_NOISE_LEVEL;
00936   aer_ctl.coh_hangover      = 500;
00937   aer_ctl.coh_ratio_thresh  = 7000;
00938   aer_ctl.coh_cnt_thresh    = 25;
00939   aer_ctl.thresh_hlc        = -12;
00940   aer_ctl.ramp_out_tc_hlc   = 500;
00941   aer_ctl.power_tc_hlc      = 2;
00942   aer_ctl.thresh_rx_nld     = 32500;
00943   aer_ctl.thresh_rx_noise   = 6000;
00944   aer_ctl.thresh_tx_noise   = 6000;
00945   aer_ctl.hangover_rx_to_tx = 20;
00946   aer_ctl.hangover_tx_to_rx = 20;
00947   aer_ctl.tx_slim_mode      = 1;
00948   aer_ctl.rx_slim_mode      = 1;
00949   aer_ctl.hangover_ng       = 500;
00950   aer_ctl.rampin_period_ng  = 700;
00951   aer_ctl.noise_level_ng    = -65;
00952
00953   /*== AER valid bitfield 4 ==*/
00954   aer_ctl.valid_bitfield_4 =  aer_CTL_VALID4_DT_THRESH
00955                             | aer_CTL_VALID4_CLIP_SCALE
00956                             | aer_CTL_VALID4_DT_HANGOVER;
00957   aer_ctl.dt_thresh = 80;
00958   aer_ctl.clip_scale_curve = 0x30405060;
00959   aer_ctl.dt_hangover = 10;
00960
00961   error_code = aerControl (aer_inst, &aer_ctl);
00962
00963   if(error_code != aer_NOERR) {
00964     printf("AER parameters configuration error in aer_sim_test_api()!\n");
00965     exit(0);
00966   }
00967 } /* aer_sim_test_api */
00968
00969 /* nothing past this line */
00970


AER Simulation: aersimbufs.c File Reference

  • File List
  • Globals

aersimbufs.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>
#include <ti/mas/aer/test/aersim/aerbufst.h>

Include dependency graph for aersimbufs.c:

Go to the source code of this file.

Variables

tword | aer_buff0_hf [AER_SIM_NUM_HF_MIC][AER_SIM_BUF0_SIZE]
tword | aer_buff0_hs [AER_SIM_BUF0_SIZE]
tword | aer_buff1 [AER_SIM_BUF1_SIZE]
tword | aer_buff2_hf [AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HF]
tword | aer_buff2_hs [AER_SIM_BUF2_SIZE_HS]
tword | aer_buff3 [AER_SIM_BUF3_SIZE_HF]
tword | aer_buff4_hf [AER_SIM_NUM_HF_MIC][AER_SIM_BUF4_SIZE]
tword | aer_buff4_hs [AER_SIM_BUF4_SIZE]
tword | aer_buff5 [AER_SIM_BUF5_SIZE]
tword | aer_buff6 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF6_SIZE]
tword | aer_buff7 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF7_SIZE]
tword | aer_buff8 [AER_SIM_BUF8_SIZE]
tword | aer_buff9 [AER_SIM_BUF9_SIZE]
tword | aer_buff10 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF10_SIZE]
tword | aer_buff11 [AER_SIM_BUF11_SIZE]
tword | aer_buff12 [AER_SIM_BUF12_SIZE]
tword | aer_buff13 [AER_SIM_BUF13_SIZE]
tword | aer_buff14 [AER_SIM_BUF14_SIZE]
tword | aer_buff15 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF15_SIZE]
tword | aer_buff16 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF16_SIZE]
tword | aer_buff17 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF17_SIZE]
tword | aer_buff18 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF18_SIZE]
tword | aer_buff19 [AER_SIM_BUF19_SIZE]
tword | aer_buff20 [AER_SIM_NUM_HF_MIC][AER_SIM_BUF20_SIZE]
tword | agc_buff0_hf [AER_SIM_NUM_HF_MIC][AGC_SIM_BUF0_SIZE]
tword | agc_buff0_hs [AGC_SIM_BUF0_SIZE]
tword | drc_buff0 [DRC_SIM_BUF0_SIZE]
tword | drc_buff2 [DRC_SIM_BUF2_SIZE]
tword | drc_buff3 [DRC_SIM_BUF3_SIZE]
tword | drc_buff4 [DRC_SIM_BUF4_SIZE]
linSample | siu_rx_del_buf [SIU_RX_DELAY_LINE_LENGTH]
Fract | aer_in_buffer [AER_SIM_MAX_FRAME_LENGTH]
Fract | aer_out_buffer [AER_SIM_MAX_FRAME_LENGTH]
tword | tempIoBuf [AERSIM_FIO_BUF_SIZE *AERSIM_FIO_SIZEOF_WORD]

Variable Documentation

tword aer_buff0_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF0_SIZE]

Definition at line 18 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff0_hs[AER_SIM_BUF0_SIZE]

Definition at line 22 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff1[AER_SIM_BUF1_SIZE]

Definition at line 26 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs(), and siu_new_drc().

tword aer_buff2_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HF]

Definition at line 30 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff2_hs[AER_SIM_BUF2_SIZE_HS]

Definition at line 34 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff3[AER_SIM_BUF3_SIZE_HF]

Definition at line 38 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff4_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF4_SIZE]

Definition at line 42 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff4_hs[AER_SIM_BUF4_SIZE]

Definition at line 46 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff5[AER_SIM_BUF5_SIZE]

Definition at line 50 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff6[AER_SIM_NUM_HF_MIC][AER_SIM_BUF6_SIZE]

Definition at line 54 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff7[AER_SIM_NUM_HF_MIC][AER_SIM_BUF7_SIZE]

Definition at line 58 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff8[AER_SIM_BUF8_SIZE]

Definition at line 62 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff9[AER_SIM_BUF9_SIZE]

Definition at line 66 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff10[AER_SIM_NUM_HF_MIC][AER_SIM_BUF10_SIZE]

Definition at line 70 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff11[AER_SIM_BUF11_SIZE]

Definition at line 74 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff12[AER_SIM_BUF12_SIZE]

Definition at line 78 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff13[AER_SIM_BUF13_SIZE]

Definition at line 82 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff14[AER_SIM_BUF14_SIZE]

Definition at line 86 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff15[AER_SIM_NUM_HF_MIC][AER_SIM_BUF15_SIZE]

Definition at line 90 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff16[AER_SIM_NUM_HF_MIC][AER_SIM_BUF16_SIZE]

Definition at line 94 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff17[AER_SIM_NUM_HF_MIC][AER_SIM_BUF17_SIZE]

Definition at line 98 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff18[AER_SIM_NUM_HF_MIC][AER_SIM_BUF18_SIZE]

Definition at line 102 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff19[AER_SIM_BUF19_SIZE]

Definition at line 106 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword aer_buff20[AER_SIM_NUM_HF_MIC][AER_SIM_BUF20_SIZE]

Definition at line 110 of file aersimbufs.c.

Referenced by siu_alloc_aer_buffs().

tword agc_buff0_hf[AER_SIM_NUM_HF_MIC][AGC_SIM_BUF0_SIZE]

Definition at line 115 of file aersimbufs.c.

Referenced by siu_new_agc().

tword agc_buff0_hs[AGC_SIM_BUF0_SIZE]

Definition at line 119 of file aersimbufs.c.

Referenced by siu_new_agc().

tword drc_buff0[DRC_SIM_BUF0_SIZE]

Definition at line 124 of file aersimbufs.c.

Referenced by siu_new_drc().

tword drc_buff2[DRC_SIM_BUF2_SIZE]

Definition at line 132 of file aersimbufs.c.

Referenced by siu_new_drc().

tword drc_buff3[DRC_SIM_BUF3_SIZE]

Definition at line 136 of file aersimbufs.c.

Referenced by siu_new_drc().

tword drc_buff4[DRC_SIM_BUF4_SIZE]

Definition at line 140 of file aersimbufs.c.

Referenced by siu_new_drc().

linSample siu_rx_del_buf[SIU_RX_DELAY_LINE_LENGTH]

Definition at line 144 of file aersimbufs.c.

Referenced by aer_sim_init_siu().

Fract aer_in_buffer[AER_SIM_MAX_FRAME_LENGTH]

Definition at line 148 of file aersimbufs.c.

Fract aer_out_buffer[AER_SIM_MAX_FRAME_LENGTH]

Definition at line 149 of file aersimbufs.c.

tword tempIoBuf[AERSIM_FIO_BUF_SIZE *AERSIM_FIO_SIZEOF_WORD]

Definition at line 150 of file aersimbufs.c.

Referenced by aerSimFread(), and aerSimFwrite().


AER Simulation: aersimbufs.c Source File

  • File List
  • Globals

aersimbufs.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Memory Buffer Definitions and Allocations
00003  ******************************************************************************
00004  * FILE NAME:   aersimbufs.c
00005  *
00006  * DESCRIPTION: Contains definitions and allocations for AER/AGC/DRC buffers.
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #include <ti/mas/types/types.h>
00012 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00013 #include <ti/mas/aer/test/aersim/aerbufst.h>
00014
00015 /* Allocate memory for AER buffers - size and alignment */
00016 #pragma DATA_SECTION(aer_buff0_hf, ".aer_buff0_hf");
00017 #pragma DATA_ALIGN  (aer_buff0_hf, AER_SIM_BUF0_ALGN)
00018 tword aer_buff0_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF0_SIZE];
00019
00020 #pragma DATA_SECTION(aer_buff0_hs, ".aer_buff0_hs");
00021 #pragma DATA_ALIGN  (aer_buff0_hs, AER_SIM_BUF0_ALGN)
00022 tword aer_buff0_hs[AER_SIM_BUF0_SIZE];
00023
00024 #pragma DATA_SECTION(aer_buff1, ".aer_buff1");
00025 #pragma DATA_ALIGN  (aer_buff1, AER_SIM_BUF1_ALGN)
00026 tword aer_buff1[AER_SIM_BUF1_SIZE];
00027
00028 #pragma DATA_SECTION(aer_buff2_hf, ".aer_buff2_hf");
00029 #pragma DATA_ALIGN  (aer_buff2_hf, AER_SIM_BUF2_ALGN)
00030 tword aer_buff2_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF2_SIZE_HF];
00031
00032 #pragma DATA_SECTION(aer_buff2_hs, ".aer_buff2_hs");
00033 #pragma DATA_ALIGN  (aer_buff2_hs, AER_SIM_BUF2_ALGN)
00034 tword aer_buff2_hs[AER_SIM_BUF2_SIZE_HS];
00035
00036 #pragma DATA_SECTION(aer_buff3, ".aer_buff3");
00037 #pragma DATA_ALIGN  (aer_buff3, AER_SIM_BUF3_ALGN)
00038 tword aer_buff3[AER_SIM_BUF3_SIZE_HF];
00039
00040 #pragma DATA_SECTION(aer_buff4_hf, ".aer_buff4_hf");
00041 #pragma DATA_ALIGN  (aer_buff4_hf, AER_SIM_BUF4_ALGN)
00042 tword aer_buff4_hf[AER_SIM_NUM_HF_MIC][AER_SIM_BUF4_SIZE];
00043
00044 #pragma DATA_SECTION(aer_buff4_hs, ".aer_buff4_hs");
00045 #pragma DATA_ALIGN  (aer_buff4_hs, AER_SIM_BUF4_ALGN)
00046 tword aer_buff4_hs[AER_SIM_BUF4_SIZE];
00047
00048 #pragma DATA_SECTION(aer_buff5, ".aer_buff5");
00049 #pragma DATA_ALIGN  (aer_buff5, AER_SIM_BUF5_ALGN)
00050 tword aer_buff5[AER_SIM_BUF5_SIZE];
00051
00052 #pragma DATA_SECTION(aer_buff6, ".aer_buff6");
00053 #pragma DATA_ALIGN  (aer_buff6, AER_SIM_BUF6_ALGN)
00054 tword aer_buff6[AER_SIM_NUM_HF_MIC][AER_SIM_BUF6_SIZE];
00055
00056 #pragma DATA_SECTION(aer_buff7, ".aer_buff7");
00057 #pragma DATA_ALIGN  (aer_buff7, AER_SIM_BUF7_ALGN)
00058 tword aer_buff7[AER_SIM_NUM_HF_MIC][AER_SIM_BUF7_SIZE];
00059
00060 #pragma DATA_SECTION(aer_buff8, ".aer_buff8");
00061 #pragma DATA_ALIGN  (aer_buff8, AER_SIM_BUF8_ALGN)
00062 tword aer_buff8[AER_SIM_BUF8_SIZE];
00063
00064 #pragma DATA_SECTION(aer_buff9, ".aer_buff9");
00065 #pragma DATA_ALIGN  (aer_buff9, AER_SIM_BUF9_ALGN)
00066 tword aer_buff9[AER_SIM_BUF9_SIZE];
00067
00068 #pragma DATA_SECTION(aer_buff10, ".aer_buff10");
00069 #pragma DATA_ALIGN  (aer_buff10, AER_SIM_BUF10_ALGN)
00070 tword aer_buff10[AER_SIM_NUM_HF_MIC][AER_SIM_BUF10_SIZE];
00071
00072 #pragma DATA_SECTION(aer_buff11, ".aer_buff11");
00073 #pragma DATA_ALIGN  (aer_buff11, AER_SIM_BUF11_ALGN)
00074 tword aer_buff11[AER_SIM_BUF11_SIZE];
00075
00076 #pragma DATA_SECTION(aer_buff12, ".aer_buff12");
00077 #pragma DATA_ALIGN  (aer_buff12, AER_SIM_BUF12_ALGN)
00078 tword aer_buff12[AER_SIM_BUF12_SIZE];
00079
00080 #pragma DATA_SECTION(aer_buff13, ".aer_buff13");
00081 #pragma DATA_ALIGN  (aer_buff13, AER_SIM_BUF13_ALGN)
00082 tword aer_buff13[AER_SIM_BUF13_SIZE];
00083
00084 #pragma DATA_SECTION(aer_buff14, ".aer_buff14");
00085 #pragma DATA_ALIGN  (aer_buff14, AER_SIM_BUF14_ALGN)
00086 tword aer_buff14[AER_SIM_BUF14_SIZE];
00087
00088 #pragma DATA_SECTION(aer_buff15, ".aer_buff15");
00089 #pragma DATA_ALIGN  (aer_buff15, AER_SIM_BUF15_ALGN)
00090 tword aer_buff15[AER_SIM_NUM_HF_MIC][AER_SIM_BUF15_SIZE];
00091
00092 #pragma DATA_SECTION(aer_buff16, ".aer_buff16");
00093 #pragma DATA_ALIGN  (aer_buff16, AER_SIM_BUF16_ALGN)
00094 tword aer_buff16[AER_SIM_NUM_HF_MIC][AER_SIM_BUF16_SIZE];
00095
00096 #pragma DATA_SECTION(aer_buff17, ".aer_buff17");
00097 #pragma DATA_ALIGN  (aer_buff17, AER_SIM_BUF17_ALGN)
00098 tword aer_buff17[AER_SIM_NUM_HF_MIC][AER_SIM_BUF17_SIZE];
00099
00100 #pragma DATA_SECTION(aer_buff18, ".aer_buff18");
00101 #pragma DATA_ALIGN  (aer_buff18, AER_SIM_BUF18_ALGN)
00102 tword aer_buff18[AER_SIM_NUM_HF_MIC][AER_SIM_BUF18_SIZE];
00103
00104 #pragma DATA_SECTION(aer_buff19, ".aer_buff19");
00105 #pragma DATA_ALIGN  (aer_buff19, AER_SIM_BUF19_ALGN)
00106 tword aer_buff19[AER_SIM_BUF19_SIZE];
00107
00108 #pragma DATA_SECTION(aer_buff20, ".aer_buff20");
00109 #pragma DATA_ALIGN  (aer_buff20, AER_SIM_BUF20_ALGN)
00110 tword aer_buff20[AER_SIM_NUM_HF_MIC][AER_SIM_BUF20_SIZE];
00111
00112 /* Allocate memory for AGC buffers - size and alignment */
00113 #pragma DATA_SECTION(agc_buff0_hf, ".agc_buff0_hf");
00114 #pragma DATA_ALIGN  (agc_buff0_hf, AGC_SIM_BUF0_ALGN)
00115 tword agc_buff0_hf[AER_SIM_NUM_HF_MIC][AGC_SIM_BUF0_SIZE];
00116
00117 #pragma DATA_SECTION(agc_buff0_hs, ".agc_buff0_hs");
00118 #pragma DATA_ALIGN  (agc_buff0_hs, AGC_SIM_BUF0_ALGN)
00119 tword agc_buff0_hs[AGC_SIM_BUF0_SIZE];
00120
00121 /* Allocate memory for DRC buffers - size and alignment */
00122 #pragma DATA_SECTION(drc_buff0, ".drc_state_buff")
00123 #pragma DATA_ALIGN  (drc_buff0, DRC_SIM_BUF0_ALGN)
00124 tword drc_buff0[DRC_SIM_BUF0_SIZE];
00125
00126 //#pragma DATA_SECTION(drc_buff1, ".drc_scratch_buf")
00127 //#pragma DATA_ALIGN  (drc_buff1, DRC_SIM_BUF1_ALGN)
00128 //tword drc_buff1[DRC_SIM_BUF1_SIZE];
00129
00130 #pragma DATA_SECTION(drc_buff2, ".drc_state_buff")
00131 #pragma DATA_ALIGN  (drc_buff2, DRC_SIM_BUF2_ALGN)
00132 tword drc_buff2[DRC_SIM_BUF2_SIZE];
00133
00134 #pragma DATA_SECTION(drc_buff3, ".drc_state_buff")
00135 #pragma DATA_ALIGN  (drc_buff3, DRC_SIM_BUF3_ALGN)
00136 tword drc_buff3[DRC_SIM_BUF3_SIZE];
00137
00138 #pragma DATA_SECTION(drc_buff4, ".drc_state_buff")
00139 #pragma DATA_ALIGN  (drc_buff4, DRC_SIM_BUF4_ALGN)
00140 tword drc_buff4[DRC_SIM_BUF4_SIZE];
00141
00142 /* Allocate memory for buffers used in simulation */
00143 #pragma DATA_SECTION(siu_rx_del_buf, ".siu_rx_del_buff")
00144 linSample siu_rx_del_buf[SIU_RX_DELAY_LINE_LENGTH];
00145
00146 #pragma DATA_SECTION(aer_in_buffer, ".aer_io_buff")
00147 #pragma DATA_SECTION(aer_out_buffer, ".aer_io_buff")
00148 Fract aer_in_buffer[AER_SIM_MAX_FRAME_LENGTH];
00149 Fract aer_out_buffer[AER_SIM_MAX_FRAME_LENGTH];
00150 tword tempIoBuf[AERSIM_FIO_BUF_SIZE*AERSIM_FIO_SIZEOF_WORD];
00151
00152 /* nothing past this point */


AER Simulation: aersimcfg.h File Reference

  • File List
  • Globals

aersimcfg.h File Reference

#include <ti/mas/aer/aer.h>

Include dependency graph for aersimcfg.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | AER_SIM_SRATE_16000_DIV_8K (1<<aer_SRATE_16K)
#define | AER_SIM_SRATE_8000_DIV_8K (1<<aer_SRATE_8K)
#define | AER_SIM_NUM_HF_MIC 3
#define | AER_SIM_NUM_BF_MIC 4
#define | AER_SIM_NUM_MIC AER_SIM_NUM_BF_MIC
#define | AER_SIM_MIC_TYPE_ARRAY 0
#define | AER_SIM_MIC_TYPE_STAND_ALONE 1
#define | AER_SIM_BF_STEER_ANGLE_0 0
#define | AER_SIM_BF_STEER_ANGLE_45 45
#define | AER_SIM_BF_STEER_ANGLE_90 90
#define | AER_SIM_HF_MAX_NUM_HVEC 10
#define | AER_SIM_HES_MAX_NUM_HVEC 1
#define | AER_SIM_HF_MAX_FILT_LENGTH (AER_SIM_HF_MAX_NUM_HVEC*160)
#define | AER_SIM_HES_MAX_FILT_LENGTH (AER_SIM_HES_MAX_NUM_HVEC*160)
#define | AER_SIM_HES_MAX_Y2X_DELAY 80
#define | AER_SIM_HF_MAX_Y2X_DELAY 80
#define | AER_SIM_AEP_COEF_LEN_8K 320
#define | AER_SIM_AEP_COEF_LEN_16K 640
#define | AER_SIM_MAX_FRAME_LENGTH 160
#define | AER_SIM_MAX_BF_FILT_LEN 32
#define | AER_SIM_MAX_PIU_DEL_RX 3200
#define | AER_SIM_MAX_PIU_DEL_TX 80
#define | AER_SIM_PIU_DEL_RX 20
#define | AER_SIM_PIU_DEL_TX 20
#define | AER_SIM_SIU_Y2X_DEL_ADJ 20
#define | AER_SIM_PIU_DEL_BUF_LEN_RX (AER_SIM_MAX_FRAME_LENGTH+AER_SIM_MAX_PIU_DEL_RX)
#define | AER_SIM_PIU_DEL_BUF_LEN_TX (AER_SIM_MAX_FRAME_LENGTH+AER_SIM_MAX_PIU_DEL_TX)
#define | AER_SIM_TRACE_SIZE_MAX_TX 4096
#define | AER_SIM_TRACE_SIZE_MAX_RX 1024
#define | AER_SIM_HF_SPKGAIN_0dB 0
#define | AER_SIM_HF_MICGAIN_0dB 0
#define | AER_SIM_AGC_SAT_THRESHOLD 32500
#define | AER_SIM_AGC_SAT_HANGOVER 20
#define | AER_SIM_AGC_MICGAIN_MAX (384)
#define | AER_SIM_AGC_MICGAIN_MIN (-384)
#define | AER_SIM_AGC_GAINSWING_MAX (480)
#define | AER_MAX_FRAME_LENGTH 160
#define | AER_LEN_FFT_16K 512
#define | AER_LEN_FFT_8K 256
#define | AER_LEN_FFT_MAX AER_LEN_FFT_16K
#define | AER_NUM_EQ_PARS 64
#define | AER_ORDER_EQIIR 8
#define | AER_LENGTH_EQFIR 19
#define | AER_CORE_MAX_FRAME_LENGTH 80
#define | SIU_AER_MAX_FRAME_LENGTH 160
#define | SIU_MAX_AEP_LENGTH (MAX_AEP_PERIOD_LENGTH*AEP_PARTIAL_ECHO_SIZ)
#define | SIU_MAX_SYS_DELAY 0
#define | SIU_MAX_Y2X_DELAY 2*PIU_MAX_SUBSEGLENGTH
#define | SIU_RX_DELAY_LINE_LENGTH 1600
#define | aersim_chkbit(field, b) (((field) & ( b)) == (b))
#define | aersim_setbit(field, b) ( (field) |= ( b))
#define | aersim_clrbit(field, b) ( (field) &= (~(b)))
#define | SIU_AER_TRACE_SIZE_MAX 4096
#define | AERSIM_FIO_SIZEOF_WORD 2
#define | AERSIM_FIO_BUF_SIZE (SIU_AER_MAX_FRAME_LENGTH)

Define Documentation

#define AER_SIM_SRATE_16000_DIV_8K (1<<aer_SRATE_16K)

Definition at line 15 of file aersimcfg.h.

Referenced by aer_sim_apply_config(), and aer_sim_open_aep().

#define AER_SIM_SRATE_8000_DIV_8K (1<<aer_SRATE_8K)

Definition at line 16 of file aersimcfg.h.

Referenced by aer_sim_apply_config(), and aer_sim_open_aep().

#define AER_SIM_NUM_HF_MIC 3

Definition at line 23 of file aersimcfg.h.

Referenced by aer_sim_read_cfg(), siu_new_mss(), siuInit(), and siuSendIn().

#define AER_SIM_NUM_BF_MIC 4

Definition at line 26 of file aersimcfg.h.

Referenced by aer_sim_read_cfg(), siu_new_bf(), and siuSendIn().

#define AER_SIM_NUM_MIC AER_SIM_NUM_BF_MIC

Definition at line 29 of file aersimcfg.h.

Referenced by piuInit().

#define AER_SIM_MIC_TYPE_ARRAY 0

Definition at line 34 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params(), aer_sim_instantiate_aer(), aer_sim_read_cfg(), main(), and siuSendIn().

#define AER_SIM_MIC_TYPE_STAND_ALONE 1

Definition at line 35 of file aersimcfg.h.

Referenced by aer_sim_read_cfg().

#define AER_SIM_BF_STEER_ANGLE_0 0

Definition at line 36 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_SIM_BF_STEER_ANGLE_45 45

Definition at line 37 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_SIM_BF_STEER_ANGLE_90 90

Definition at line 38 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_SIM_HF_MAX_NUM_HVEC 10

Definition at line 40 of file aersimcfg.h.

#define AER_SIM_HES_MAX_NUM_HVEC 1

Definition at line 41 of file aersimcfg.h.

#define AER_SIM_HF_MAX_FILT_LENGTH (AER_SIM_HF_MAX_NUM_HVEC*160)

Definition at line 42 of file aersimcfg.h.

Referenced by aer_sim_init(), and siu_new_aer().

#define AER_SIM_HES_MAX_FILT_LENGTH (AER_SIM_HES_MAX_NUM_HVEC*160)

Definition at line 43 of file aersimcfg.h.

Referenced by aer_sim_init(), and siu_new_aer().

#define AER_SIM_HES_MAX_Y2X_DELAY 80

Definition at line 44 of file aersimcfg.h.

Referenced by siu_new_aer().

#define AER_SIM_HF_MAX_Y2X_DELAY 80

Definition at line 45 of file aersimcfg.h.

Referenced by siu_new_aer().

#define AER_SIM_AEP_COEF_LEN_8K 320

Definition at line 46 of file aersimcfg.h.

#define AER_SIM_AEP_COEF_LEN_16K 640

Definition at line 47 of file aersimcfg.h.

#define AER_SIM_MAX_FRAME_LENGTH 160

Definition at line 48 of file aersimcfg.h.

#define AER_SIM_MAX_BF_FILT_LEN 32

Definition at line 49 of file aersimcfg.h.

Referenced by siu_new_bf().

#define AER_SIM_MAX_PIU_DEL_RX 3200

Definition at line 52 of file aersimcfg.h.

#define AER_SIM_MAX_PIU_DEL_TX 80

Definition at line 53 of file aersimcfg.h.

#define AER_SIM_PIU_DEL_RX 20

Definition at line 54 of file aersimcfg.h.

Referenced by aer_sim_init(), aer_sim_test_api(), and piuInit().

#define AER_SIM_PIU_DEL_TX 20

Definition at line 55 of file aersimcfg.h.

Referenced by aer_sim_init(), aer_sim_test_api(), and piuInit().

#define AER_SIM_SIU_Y2X_DEL_ADJ 20

Definition at line 56 of file aersimcfg.h.

Referenced by aer_sim_init(), aer_sim_test_api(), and piuInit().

#define AER_SIM_PIU_DEL_BUF_LEN_RX (AER_SIM_MAX_FRAME_LENGTH+AER_SIM_MAX_PIU_DEL_RX)

Definition at line 57 of file aersimcfg.h.

Referenced by piuInit(), and piuReceiveIn().

#define AER_SIM_PIU_DEL_BUF_LEN_TX (AER_SIM_MAX_FRAME_LENGTH+AER_SIM_MAX_PIU_DEL_TX)

Definition at line 58 of file aersimcfg.h.

Referenced by piuInit(), and piuSendIn().

#define AER_SIM_TRACE_SIZE_MAX_TX 4096

Definition at line 59 of file aersimcfg.h.

#define AER_SIM_TRACE_SIZE_MAX_RX 1024

Definition at line 60 of file aersimcfg.h.

#define AER_SIM_HF_SPKGAIN_0dB 0

Definition at line 62 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_test_api().

#define AER_SIM_HF_MICGAIN_0dB 0

Definition at line 63 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_test_api().

#define AER_SIM_AGC_SAT_THRESHOLD 32500

Definition at line 64 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_SIM_AGC_SAT_HANGOVER 20

Definition at line 65 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_SIM_AGC_MICGAIN_MAX (384)

Definition at line 66 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_SIM_AGC_MICGAIN_MIN (-384)

Definition at line 67 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_SIM_AGC_GAINSWING_MAX (480)

Definition at line 68 of file aersimcfg.h.

Referenced by aer_sim_config_aer_params().

#define AER_MAX_FRAME_LENGTH 160

Definition at line 71 of file aersimcfg.h.

#define AER_LEN_FFT_16K 512

Definition at line 72 of file aersimcfg.h.

#define AER_LEN_FFT_8K 256

Definition at line 73 of file aersimcfg.h.

#define AER_LEN_FFT_MAX AER_LEN_FFT_16K

Definition at line 74 of file aersimcfg.h.

#define AER_NUM_EQ_PARS 64

Definition at line 75 of file aersimcfg.h.

#define AER_ORDER_EQIIR 8

Definition at line 76 of file aersimcfg.h.

#define AER_LENGTH_EQFIR 19

Definition at line 77 of file aersimcfg.h.

#define AER_CORE_MAX_FRAME_LENGTH 80

Definition at line 78 of file aersimcfg.h.

#define SIU_AER_MAX_FRAME_LENGTH 160

Definition at line 79 of file aersimcfg.h.

Referenced by main().

#define SIU_MAX_AEP_LENGTH (MAX_AEP_PERIOD_LENGTH*AEP_PARTIAL_ECHO_SIZ)

Definition at line 80 of file aersimcfg.h.

#define SIU_MAX_SYS_DELAY 0

Definition at line 81 of file aersimcfg.h.

#define SIU_MAX_Y2X_DELAY 2*PIU_MAX_SUBSEGLENGTH

Definition at line 82 of file aersimcfg.h.

#define SIU_RX_DELAY_LINE_LENGTH 1600

Definition at line 87 of file aersimcfg.h.

#define aersim_chkbit | ( | field,
 |  | b | ) | (((field) & ( b)) == (b))

Definition at line 89 of file aersimcfg.h.

Referenced by aer_sim_apply_config(), aer_sim_open_aep(), aer_sim_open_txrx_sgns(), siu_open_aer(), siu_open_agc(), and siu_open_mss().

#define aersim_setbit | ( | field,
 |  | b | ) | ( (field) |= ( b))

Definition at line 90 of file aersimcfg.h.

Referenced by siu_new_aer(), and siu_new_agc().

#define aersim_clrbit | ( | field,
 |  | b | ) | ( (field) &= (~(b)))

Definition at line 91 of file aersimcfg.h.

#define SIU_AER_TRACE_SIZE_MAX 4096

Definition at line 93 of file aersimcfg.h.

#define AERSIM_FIO_SIZEOF_WORD 2

Definition at line 96 of file aersimcfg.h.

Referenced by aerSimFread(), and aerSimFwrite().

#define AERSIM_FIO_BUF_SIZE (SIU_AER_MAX_FRAME_LENGTH)

Definition at line 101 of file aersimcfg.h.


AER Simulation: aersimcfg.h Source File

  • File List
  • Globals

aersimcfg.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main program and supporting routines for the simulation of AER.
00003  ******************************************************************************
00004  * FILE NAME:   aersimcfg.h
00005  *
00006  * DESCRIPTION: Contains simulation configurations for the testing of AER
00007  *
00008  * (C) Copyright 2008, Texas Instruments, Inc.
00009  *****************************************************************************/
00010 #ifndef _AERSIMCFG_H
00011 #define _AERSIMCFG_H
00012
00013 #include <ti/mas/aer/aer.h>
00014
00015 #define AER_SIM_SRATE_16000_DIV_8K (1<<aer_SRATE_16K)
00016 #define AER_SIM_SRATE_8000_DIV_8K  (1<<aer_SRATE_8K)
00017
00018 /* System configuration */
00019 #ifdef ti_targets_C55_large
00020 #define AER_SIM_NUM_HF_MIC 2 /* set to 2 for multi-mic test (max number of
00021                                 mic is 2 due to memory limitation */
00022 #else
00023 #define AER_SIM_NUM_HF_MIC 3
00024 #endif
00025
00026 #define AER_SIM_NUM_BF_MIC 4
00027
00028 #if AER_SIM_NUM_BF_MIC > AER_SIM_NUM_HF_MIC
00029 #define AER_SIM_NUM_MIC AER_SIM_NUM_BF_MIC
00030 #else
00031 #define AER_SIM_NUM_MIC AER_SIM_NUM_HF_MIC
00032 #endif
00033
00034 #define AER_SIM_MIC_TYPE_ARRAY  0
00035 #define AER_SIM_MIC_TYPE_STAND_ALONE 1
00036 #define AER_SIM_BF_STEER_ANGLE_0    0
00037 #define AER_SIM_BF_STEER_ANGLE_45  45
00038 #define AER_SIM_BF_STEER_ANGLE_90  90
00039
00040 #define AER_SIM_HF_MAX_NUM_HVEC 10
00041 #define AER_SIM_HES_MAX_NUM_HVEC 1
00042 #define AER_SIM_HF_MAX_FILT_LENGTH (AER_SIM_HF_MAX_NUM_HVEC*160)
00043 #define AER_SIM_HES_MAX_FILT_LENGTH (AER_SIM_HES_MAX_NUM_HVEC*160)
00044 #define AER_SIM_HES_MAX_Y2X_DELAY 80 /* 10 msec */
00045 #define AER_SIM_HF_MAX_Y2X_DELAY  80 /* 10 msec */
00046 #define AER_SIM_AEP_COEF_LEN_8K  320
00047 #define AER_SIM_AEP_COEF_LEN_16K 640
00048 #define AER_SIM_MAX_FRAME_LENGTH 160
00049 #define AER_SIM_MAX_BF_FILT_LEN  32
00050
00051 /* Maximum PIU delay to simulate long y2x delay */
00052 #define AER_SIM_MAX_PIU_DEL_RX 3200  /* 200 msec at 16kHz */
00053 #define AER_SIM_MAX_PIU_DEL_TX 80    /* 5 msec at 16kHz */
00054 #define AER_SIM_PIU_DEL_RX     20
00055 #define AER_SIM_PIU_DEL_TX     20
00056 #define AER_SIM_SIU_Y2X_DEL_ADJ 20
00057 #define AER_SIM_PIU_DEL_BUF_LEN_RX (AER_SIM_MAX_FRAME_LENGTH+AER_SIM_MAX_PIU_DEL_RX)
00058 #define AER_SIM_PIU_DEL_BUF_LEN_TX (AER_SIM_MAX_FRAME_LENGTH+AER_SIM_MAX_PIU_DEL_TX)
00059 #define AER_SIM_TRACE_SIZE_MAX_TX 4096
00060 #define AER_SIM_TRACE_SIZE_MAX_RX 1024
00061
00062 #define AER_SIM_HF_SPKGAIN_0dB      0    /* 0dB */
00063 #define AER_SIM_HF_MICGAIN_0dB      0    /* 0dB */
00064 #define AER_SIM_AGC_SAT_THRESHOLD   32500
00065 #define AER_SIM_AGC_SAT_HANGOVER    20      /* 200msec */
00066 #define AER_SIM_AGC_MICGAIN_MAX     (384)   /* 24dB in S11.4 */
00067 #define AER_SIM_AGC_MICGAIN_MIN     (-384)  /* -24dB in S11.4 */
00068 #define AER_SIM_AGC_GAINSWING_MAX   (480)   /* 30dB */
00069
00070 /* AER internal constants */
00071 #define AER_MAX_FRAME_LENGTH       160 /* to remove */
00072 #define AER_LEN_FFT_16K            512
00073 #define AER_LEN_FFT_8K             256
00074 #define AER_LEN_FFT_MAX            AER_LEN_FFT_16K
00075 #define AER_NUM_EQ_PARS            64//42
00076 #define AER_ORDER_EQIIR            8
00077 #define AER_LENGTH_EQFIR           19
00078 #define AER_CORE_MAX_FRAME_LENGTH  80
00079 #define SIU_AER_MAX_FRAME_LENGTH   160   /* max number of samples/10ms frame */
00080 #define SIU_MAX_AEP_LENGTH (MAX_AEP_PERIOD_LENGTH*AEP_PARTIAL_ECHO_SIZ)
00081 #define SIU_MAX_SYS_DELAY  0
00082 #define SIU_MAX_Y2X_DELAY  2*PIU_MAX_SUBSEGLENGTH  /* delay from PIU Tx & Rx */
00083 /*#define SIU_RX_DELAY_LINE_LENGTH  \
00084     (((2*SIU_MAX_FRAME_LENGTH + SIU_MAX_SYS_DELAY + SIU_MAX_Y2X_DELAY - 1 \
00085        + SIU_MAX_AEP_LENGTH)/SIU_MAX_FRAME_LENGTH)*SIU_MAX_FRAME_LENGTH) */
00086
00087 #define SIU_RX_DELAY_LINE_LENGTH         1600 /* to revisit */
00088
00089 #define aersim_chkbit(field,b) (((field) &  (  b)) == (b))
00090 #define aersim_setbit(field,b) ( (field) |= (  b))
00091 #define aersim_clrbit(field,b) ( (field) &= (~(b)))
00092
00093 #define SIU_AER_TRACE_SIZE_MAX    4096
00094
00095 /* File I/O: buffers */
00096 #define AERSIM_FIO_SIZEOF_WORD        2   /* number of 8 bit bites in a       */
00097                                           /* 16 bit word                      */
00098                                           /* CCS file i/o only does bytes     */
00099                                           /* so we need this temp buffer to   */
00100                                           /* read and write data in words     */
00101 #define AERSIM_FIO_BUF_SIZE (SIU_AER_MAX_FRAME_LENGTH)
00102
00103 #endif
00104
00105 /* nothing past this point */


AER Simulation: aic.c File Reference

  • File List
  • Globals

aic.c File Reference

#include <ti/mas/aer/test/aicsim/aicloc.h>

Include dependency graph for aic.c:

Go to the source code of this file.

Functions

Fract | db2linear (tint gaindB)
Fract | aicMicGain (Fract gain, Fract *analog_micgainlin, Fract *digital_micgainlin)
Fract | aicSpkGain (Fract gain, Fract *spklin_gain)
Fract | db2linear (Fract gaindB)

Variables

const Fract | aic22mic_gain []
const Fract | aic20mic_gain []
const Fract | titanmic_gain []
const Fract | aic10mic_gain []
const Fract | aic22spk_gain []
const Fract | aic20spk_gain []
const Fract | titanspk_gain []
const Fract | aic10spk_gain []
const Fract | pdb2linTable []
const Fract | mdb2linTable []

Function Documentation

Fract db2linear ( tint gaindB )

Referenced by aicMicGain(), and aicSpkGain().

Here is the caller graph for this function:

Fract aicMicGain | ( | Fract | gain,
 |  | Fract * | analog_micgainlin,
 |  | Fract * | digital_micgainlin
 | ) |  |

Definition at line 133 of file aic.c.

References aic10mic_gain, aic20mic_gain, aic22mic_gain, AIC_ADC_GAIN_11PT5dB, AIC_ADC_GAIN_25dB, AIC_ADC_GAIN_M35dB, AIC_ADC_GAIN_M42PT5dB, AIC_ADC_M32dB, AIC_AIC10, AIC_AIC20, AIC_GAINTBL_IDX_M33dB, AIC_TITAN, db2linear(), and titanmic_gain.

Here is the call graph for this function:

Fract aicSpkGain | ( | Fract | gain,
 |  | Fract * | spklin_gain
 | ) |  |

Definition at line 203 of file aic.c.

References aic10spk_gain, aic20spk_gain, aic22spk_gain, AIC_AIC10, AIC_AIC20, AIC_DAC_GAIN_1P5dB, AIC_DAC_GAIN_M54dB, AIC_TITAN, db2linear(), and titanspk_gain.

Here is the call graph for this function:

Fract db2linear ( Fract gaindB )

Definition at line 261 of file aic.c.

References DB2LIN_MAX_22dB, DB2LIN_MIN_M60dB, mdb2linTable, and pdb2linTable.

Variable Documentation

const Fract aic22mic_gain[]

Initial value:

{44,44,44,44,44,44,44,44,41,41,41,38,38,38,35,35,
  35,32,32,32,29,29,29,26,26,26,23,23,23,20,21,18,18,18,15,15,15,12,12,12,9,
   9,9,6,6,6,3,3,3,0,0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,-15,-15,-15,
 -18,-18,-18,-21,-21,-21,-24,-24,-24,-24,-24,-24,-24,-24,-24,-40,-40,-40,-40,
 -40,-40,-40,-40,-40,-40,-43,-43,-43,-46,-46,-46,-49,-49,-49,-52,-52,-52,-55,
 -55,-55,-58,-58,-58,-61,-61,-61,-64,-64,-64,-67,-67,-67,-70,-70 }

Definition at line 22 of file aic.c.

Referenced by aicMicGain().

const Fract aic20mic_gain[]

Initial value:

{44,44,44,44,44,44,44,44,44,44,44,44,44,44,32,32,
 32,32,32,32,32,32,32,32,32,20,20,20,20,20,20,20,17,17,17,14,14,14,11,11,11,
 8,8,8,5,5,5,2,2,2,-1,-1,-1,-4,-4,-4,-7,-7,-7,-10,-10,-10,-13,-13,-13,-16,-16,
 -16,-19,-19,-19,-22,-22,-22,-25,-25,-25,-28,-28,-28,-31,-31,-31,-34,-34,-34,
 -37,-37,-37,-40,-40,-40,-43,-43,-43,-46,-46,-46,-49,-49,-49,-52,-52,-52,-55,
 -55,-55,-58,-58,-58,-61,-61,-61,-64,-64,-64,-64,-64,-64,-64,-64}

Definition at line 30 of file aic.c.

Referenced by aicMicGain().

const Fract titanmic_gain[]

Initial value:

{23,23,23,23,23,23,11,11,11,11,11,11,11,11,
11,11,11,11,-1,-1,-1,-1,-1,-1,-1,-1,-4,-4,-4,-7,-7,-7,-10,-10,-10,-13,-13,-13,
-16,-16,-16,-19,-19,-19,-22,-22,-22,-25,-25,-25,-28,-28,-28,-31,-31,-31,
-34,-34,-34,-37,-37,-37,-40,-40,-40,-43,-43,-43,-46,-46,-46,-49,-49,-49,
-52,-52,-52,-55,-55,-55,-58,-58,-58,-61,-61,-61, -64,-64,-64,-67,-67,-67,
-70,-70,-70,-73,-73,-73,-76,-76,-76,-79,-79,-79,-82,-82,-82,-85,-85}

Definition at line 51 of file aic.c.

Referenced by aicMicGain().

const Fract aic10mic_gain[]

Initial value:

{-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
 -16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
 -16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
 -16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
 -16,-16,-16,-16,-28,-28,-28,-28,-28,-28,-28,-28,-28,-28,-28,-28,-40,-40,-40,
 -40,-40,-40,-40,-40,-40,-46,-46,-46,-46,-46,-46,-52,-52,-52,-52,-52,-52,-58,
 -58,-58,-58,-58,-58,-58,-64,-64,-64,-70,-70,-70,-70,-70}

Definition at line 59 of file aic.c.

Referenced by aicMicGain().

const Fract aic22spk_gain[]

Initial value:

{0,0,0,0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,
 -15,-15,-15,-18,-18,-18,-21,-21,-21,-24,-24,-24,-27,-27,-27,-30,-30,-30,-33,
 -33,-33,-36,-36,-36,-39,-39,-39,-42,-42,-42,-45,-45,-45,-48,-48,-48,-51,-51,
 -51,-54,-54,-54,-57,-57,-57,-60,-60,-60,-63,-63,-63,-66,-66,-66,-69,-69,-69,
 -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,
 -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72}

Definition at line 69 of file aic.c.

Referenced by aicSpkGain().

const Fract aic20spk_gain[]

Initial value:

{0,0,0,0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,
 -15,-15,-15,-18,-18,-18,-21,-21,-21,-24,-24,-24,-27,-27,-27,-30,-30,-30,-33,
 -33,-33,-36,-36,-36,-39,-39,-39,-42,-42,-42,-45,-45,-45,-48,-48,-48,-51,-51,
 -51,-54,-54,-54,-57,-57,-57,-60,-60,-60,-63,-63,-63,-66,-66,-66,-69,-69,-69,
 -72,-72,-72,-75,-75,-75,-78,-78,-78,-81,-81,-81,-84,-84,-84,-84,-84,-84,-84,
 -84,-84,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-108,-108,-108,-108,-108,
 -108 }

Definition at line 78 of file aic.c.

Referenced by aicSpkGain().

const Fract titanspk_gain[]

Initial value:

{0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,
 -15,-15,-15,-18,-18,-18,-21,-21,-21,-24,-24,-24,-27,-27,-27,-30,-30,-30,-33,
 -33,-33,-36,-36,-36,-39,-39,-39,-42,-42,-42,-45,-45,-45,-48,-48,-48,-51,-51,
 -51,-54,-54,-54,-57,-57,-57,-60,-60,-60,-63,-63,-63,-66,-66,-66,-69,-69,-69,
 -72,-72,-72,-75,-75,-75,-78,-78,-78,-81,-81,-81,-84,-84,-84,-84,-84,-84,-84,
 -84,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-108,-108,-108,-108,-108,
 -108 }

Definition at line 87 of file aic.c.

Referenced by aicSpkGain().

const Fract aic10spk_gain[]

Initial value:

{0,0,0,0,0,-6,-6,-6,-6,-6,-6,-6,-6,-12,-12,-12,-12,
 -12, -12,-18,-18,-18,-18,-18,-18,-24,-24,-24,-24,-24,-24,-24,-24,-24,-36,-36,
 -36,-36,-36,-36,-36,-36,-36,-36,-36,-36,-48,-48,-48,-48,-48,-48,-48,-48,-48,
 -48,-48,-48,-60,-60,-60,-60,-60,-60,-60,-60,-60,-60,-60,-60,-72,-72,-72,-72,
 -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,
 -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72}

Definition at line 96 of file aic.c.

Referenced by aicSpkGain().

const Fract pdb2linTable[]

Initial value:

 {
 2048, 2170, 2298, 2435, 2579, 2732, 2893, 3065, 3246, 3439, 3642, 3858, 4087,
 4329, 4585, 4857, 5145, 5450, 5773, 6115, 6477, 6861, 7267, 7698, 8154, 8637,
 9149, 9691, 10265, 10873, 11517, 12200, 12923, 13688, 14499, 15358, 16268, 17232,
 18253, 19335, 20480, 21694, 22979, 24341, 25783}

Definition at line 104 of file aic.c.

Referenced by db2linear().

const Fract mdb2linTable[]

Initial value:

 {
 1934, 1826, 1724, 1627, 1536, 1450, 1369, 1293, 1220, 1152, 1088, 1027, 970,
 915, 864, 816, 770, 727, 687, 648, 612, 578, 545, 515, 486, 459, 433, 409, 386,
 365, 344, 325, 307, 290, 274, 258, 244, 230, 217, 205, 194, 183, 173, 163, 154,
 145, 137, 130, 122, 116, 109, 103, 97, 92, 87, 82, 77, 73, 69, 65, 62, 58, 55,
 52, 49, 46, 44, 41, 39, 37, 35, 33, 31, 29, 28, 26, 25, 23, 22, 21, 20, 19, 18,
 17, 16, 15, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5,
 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3 }

Definition at line 110 of file aic.c.

Referenced by db2linear().


AER Simulation: aic.c Source File

  • File List
  • Globals

aic.c

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * FILE PURPOSE: AIC codecs gain distribution
00003  *****************************************************************************
00004  * FILE NAME: aic.c
00005  *
00006  * DESCRIPTION: AIC codecs gain distribution simulation routines.
00007  *              Supports AIC22/AIC22C, AIC20, AIC10 and Titan codec
00008  * USES: aic.h
00009  *
00010  * TABS: NONE
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * (C) Copyright 2008, Texas Instruments, Inc.
00015  *****************************************************************************/
00016
00017 #include <ti/mas/aer/test/aicsim/aicloc.h>
00018 Fract db2linear (tint gaindB);
00019
00020 /* MIC GAINS */
00021 /* AIC 22 Device */
00022 const Fract aic22mic_gain[]={44,44,44,44,44,44,44,44,41,41,41,38,38,38,35,35,
00023   35,32,32,32,29,29,29,26,26,26,23,23,23,20,21,18,18,18,15,15,15,12,12,12,9,
00024    9,9,6,6,6,3,3,3,0,0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,-15,-15,-15,
00025  -18,-18,-18,-21,-21,-21,-24,-24,-24,-24,-24,-24,-24,-24,-24,-40,-40,-40,-40,
00026  -40,-40,-40,-40,-40,-40,-43,-43,-43,-46,-46,-46,-49,-49,-49,-52,-52,-52,-55,
00027  -55,-55,-58,-58,-58,-61,-61,-61,-64,-64,-64,-67,-67,-67,-70,-70 };
00028
00029 /* AIC20 Device */
00030 const Fract aic20mic_gain[]={44,44,44,44,44,44,44,44,44,44,44,44,44,44,32,32,
00031  32,32,32,32,32,32,32,32,32,20,20,20,20,20,20,20,17,17,17,14,14,14,11,11,11,
00032  8,8,8,5,5,5,2,2,2,-1,-1,-1,-4,-4,-4,-7,-7,-7,-10,-10,-10,-13,-13,-13,-16,-16,
00033  -16,-19,-19,-19,-22,-22,-22,-25,-25,-25,-28,-28,-28,-31,-31,-31,-34,-34,-34,
00034  -37,-37,-37,-40,-40,-40,-43,-43,-43,-46,-46,-46,-49,-49,-49,-52,-52,-52,-55,
00035  -55,-55,-58,-58,-58,-61,-61,-61,-64,-64,-64,-64,-64,-64,-64,-64};
00036
00037 /* Titan Device */
00038 /* Note; Tables are messed up. Current thwport.h THW_HF_MICGAIN_INIT 680*/
00039 /* This indicates in Q4 680/16=42.5 dB but Titan ADCPGA=[0 dB,42.0 dB]  */
00040 /* So THW_HF_MICGAIN_INIT 672 is max allowable initialization value     */
00041 /* Relative to 42.0 dB max_gain= 0.0 dB and min_gain=-42.0 dB,          */
00042 /*                 not max_gain=11.5 dB and min_gain=-42.5 dB as found  */
00043 /* in aicMicGain() below. After correcting max_gain table should read   */
00044 /* [0,0,-3,-3,-3,-6,-6,-6,...-79,-79,-79,-82,-82,-82,-85,-85].          */
00045 /* further correction is needed to treat all gains/tables in Q4, so     */
00046 /* final table would read [0,0,-24,-24,-24,...]                         */
00047 /* Rather than make all these corrections, aicMicGain() converts gain   */
00048 /* to Q1 and non-Titan Q1 gains are used. Note that once AGC changes    */
00049 /* the initial gain, the initial gain can never be recovered because    */
00050 /* there is no zero value in the current titan gain table.              */
00051 const Fract titanmic_gain[]={23,23,23,23,23,23,11,11,11,11,11,11,11,11,
00052 11,11,11,11,-1,-1,-1,-1,-1,-1,-1,-1,-4,-4,-4,-7,-7,-7,-10,-10,-10,-13,-13,-13,
00053 -16,-16,-16,-19,-19,-19,-22,-22,-22,-25,-25,-25,-28,-28,-28,-31,-31,-31,
00054 -34,-34,-34,-37,-37,-37,-40,-40,-40,-43,-43,-43,-46,-46,-46,-49,-49,-49,
00055 -52,-52,-52,-55,-55,-55,-58,-58,-58,-61,-61,-61, -64,-64,-64,-67,-67,-67,
00056 -70,-70,-70,-73,-73,-73,-76,-76,-76,-79,-79,-79,-82,-82,-82,-85,-85};
00057
00058 /* AIC10 Device */
00059 const Fract aic10mic_gain[]={-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
00060  -16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
00061  -16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
00062  -16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,-16,
00063  -16,-16,-16,-16,-28,-28,-28,-28,-28,-28,-28,-28,-28,-28,-28,-28,-40,-40,-40,
00064  -40,-40,-40,-40,-40,-40,-46,-46,-46,-46,-46,-46,-52,-52,-52,-52,-52,-52,-58,
00065  -58,-58,-58,-58,-58,-58,-64,-64,-64,-70,-70,-70,-70,-70};
00066
00067 /* SPEAKER GAINS */
00068 /* AIC22 Device */
00069 const Fract aic22spk_gain[]={0,0,0,0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,
00070  -15,-15,-15,-18,-18,-18,-21,-21,-21,-24,-24,-24,-27,-27,-27,-30,-30,-30,-33,
00071  -33,-33,-36,-36,-36,-39,-39,-39,-42,-42,-42,-45,-45,-45,-48,-48,-48,-51,-51,
00072  -51,-54,-54,-54,-57,-57,-57,-60,-60,-60,-63,-63,-63,-66,-66,-66,-69,-69,-69,
00073  -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,
00074  -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72};
00075
00076
00077 /* AIC20 Device */
00078 const Fract aic20spk_gain[]={0,0,0,0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,
00079  -15,-15,-15,-18,-18,-18,-21,-21,-21,-24,-24,-24,-27,-27,-27,-30,-30,-30,-33,
00080  -33,-33,-36,-36,-36,-39,-39,-39,-42,-42,-42,-45,-45,-45,-48,-48,-48,-51,-51,
00081  -51,-54,-54,-54,-57,-57,-57,-60,-60,-60,-63,-63,-63,-66,-66,-66,-69,-69,-69,
00082  -72,-72,-72,-75,-75,-75,-78,-78,-78,-81,-81,-81,-84,-84,-84,-84,-84,-84,-84,
00083  -84,-84,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-108,-108,-108,-108,-108,
00084  -108 };
00085
00086 /* Titan Device */
00087 const Fract titanspk_gain[]={0,0,-3,-3,-3,-6,-6,-6,-9,-9,-9,-12,-12,-12,
00088  -15,-15,-15,-18,-18,-18,-21,-21,-21,-24,-24,-24,-27,-27,-27,-30,-30,-30,-33,
00089  -33,-33,-36,-36,-36,-39,-39,-39,-42,-42,-42,-45,-45,-45,-48,-48,-48,-51,-51,
00090  -51,-54,-54,-54,-57,-57,-57,-60,-60,-60,-63,-63,-63,-66,-66,-66,-69,-69,-69,
00091  -72,-72,-72,-75,-75,-75,-78,-78,-78,-81,-81,-81,-84,-84,-84,-84,-84,-84,-84,
00092  -84,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-96,-108,-108,-108,-108,-108,
00093  -108 };
00094
00095 /* AIC10 Device */
00096 const Fract aic10spk_gain[]={0,0,0,0,0,-6,-6,-6,-6,-6,-6,-6,-6,-12,-12,-12,-12,
00097  -12, -12,-18,-18,-18,-18,-18,-18,-24,-24,-24,-24,-24,-24,-24,-24,-24,-36,-36,
00098  -36,-36,-36,-36,-36,-36,-36,-36,-36,-36,-48,-48,-48,-48,-48,-48,-48,-48,-48,
00099  -48,-48,-48,-60,-60,-60,-60,-60,-60,-60,-60,-60,-60,-60,-60,-72,-72,-72,-72,
00100  -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,
00101  -72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72,-72};
00102
00103 /* dB to linear conversion Tables */
00104 const Fract pdb2linTable[] = {      /* in Q11 format. covers 0 to +22dB */
00105  2048, 2170, 2298, 2435, 2579, 2732, 2893, 3065, 3246, 3439, 3642, 3858, 4087,
00106  4329, 4585, 4857, 5145, 5450, 5773, 6115, 6477, 6861, 7267, 7698, 8154, 8637,
00107  9149, 9691, 10265, 10873, 11517, 12200, 12923, 13688, 14499, 15358, 16268, 17232,
00108  18253, 19335, 20480, 21694, 22979, 24341, 25783};
00109
00110 const Fract mdb2linTable [] = { /* in Q11 format. covers from -0.5dB to -60dB */
00111  1934, 1826, 1724, 1627, 1536, 1450, 1369, 1293, 1220, 1152, 1088, 1027, 970,
00112  915, 864, 816, 770, 727, 687, 648, 612, 578, 545, 515, 486, 459, 433, 409, 386,
00113  365, 344, 325, 307, 290, 274, 258, 244, 230, 217, 205, 194, 183, 173, 163, 154,
00114  145, 137, 130, 122, 116, 109, 103, 97, 92, 87, 82, 77, 73, 69, 65, 62, 58, 55,
00115  52, 49, 46, 44, 41, 39, 37, 35, 33, 31, 29, 28, 26, 25, 23, 22, 21, 20, 19, 18,
00116  17, 16, 15, 14, 13, 13, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5,
00117  5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3 };
00118
00119
00120 /******************************************************************************
00121  * FUNCTION PURPOSE: Find linear gains for dB input gain as per AIC-ADC.
00122  ******************************************************************************
00123  * DESCRIPTION:  Find linear gain values as per the specific AIC codec Mic gain
00124  *               distribution
00125  *
00126  *  Fract aicMicGain (
00127  *    Fract gain                - new gain in dB (Q.4) referenced to init mic gain
00128  *    Fract *analog_micgainlin  - ptr to analog  gain (lin. Q11 value)
00129  *    Fract *digital_micgainlin - ptr to digital gain (lin. Q11 value)
00130  *
00131  *    return the actual applied gain in dB (Q.4) referenced to initial mic gain
00132  *****************************************************************************/
00133 Fract aicMicGain (Fract gain, Fract *analog_micgainlin,
00134                   Fract *digital_micgainlin)
00135 {
00136   const Fract *gain_ptr;
00137   tint aic_type, gain_idx;
00138   Fract appld_gain, max_gain, min_gain;
00139
00140   /* get the type AIC codec */
00141   aic_type = AIC_TYPE;
00142
00143   /* Initialize the gain_ptr to the specific AIC codec's Mic gain table */
00144   gain_ptr = &aic22mic_gain[0];
00145   if (AIC_TYPE == AIC_AIC20)
00146     gain_ptr = &aic20mic_gain[0];
00147   else if (AIC_TYPE == AIC_AIC10)
00148     gain_ptr = &aic10mic_gain[0];
00149   else if (AIC_TYPE == AIC_TITAN)
00150     gain_ptr = &titanmic_gain[0];
00151
00152   /* at this point "gain" is relative to the initial default gain */
00153   gain = gain >> 3;               /* convert from Q4 to Q1 for old tables */
00154   /* limit the maximum gain above the initial default  */
00155   max_gain = AIC_ADC_GAIN_25dB;
00156   if (AIC_TYPE == AIC_TITAN)  {
00157     max_gain = AIC_ADC_GAIN_11PT5dB;
00158   }
00159   if (gain > max_gain)
00160     gain = max_gain;
00161
00162   /* limit the minimum gain below the initial default */
00163   min_gain = AIC_ADC_GAIN_M35dB;
00164   if (AIC_TYPE == AIC_TITAN)  {
00165     min_gain = AIC_ADC_GAIN_M42PT5dB;
00166   }
00167   if (gain < min_gain)
00168     gain = min_gain;
00169
00170   /* select the nearest ADC gain available from the gain table */
00171   gain_idx = gain - max_gain; /* so that all indices become negative */
00172   if(gain_idx < 0) {
00173     gain_idx = -gain_idx;
00174   }
00175   appld_gain = gain_ptr[gain_idx];
00176
00177   /* Seperate the gain into analog and digital */
00178   if (gain_idx < AIC_GAINTBL_IDX_M33dB | aic_type == AIC_AIC20
00179       | aic_type == AIC_TITAN) {
00180     *analog_micgainlin  = db2linear(appld_gain);
00181     *digital_micgainlin = db2linear(0);
00182   }
00183   else {
00184     *analog_micgainlin  = db2linear(AIC_ADC_M32dB);
00185     *digital_micgainlin = db2linear((appld_gain-AIC_ADC_M32dB));
00186   }
00187   return (appld_gain<<3);    /* Q1->Q4 conversion - return applied gain */
00188
00189 } /* aicMicGain */
00190
00191
00192 /*******************************************************************************
00193  * FUNCTION PURPOSE: Find the linear gain for the dB input as per AIC DAC
00194  *******************************************************************************
00195  * DESCRIPTION:  Find the linear gain as per the AIC codec DAC gain distribution
00196  *
00197  *  void aicSpkGain (
00198  *    Fract gain            - new gain in dB in Q4 format
00199  *    Fract *spklin_gain    - ptr to linear speaker gain(Q11 format)
00200  *
00201  *    return the actual applied gain in dB (Q.4)
00202  ******************************************************************************/
00203 Fract aicSpkGain (Fract gain, Fract *spklin_gain)
00204 {
00205   const Fract *gain_ptr;
00206   tint aic_type, gain_idx;
00207   Fract appld_gain, max_dac_gain;
00208
00209   /* get the type AIC codec */
00210   aic_type = AIC_TYPE;
00211
00212   /* Initialize the gain_ptr to the specific AIC codec's spk gain table */
00213   gain_ptr = &aic22spk_gain[0];
00214   if (aic_type == AIC_AIC20)
00215     gain_ptr = &aic20spk_gain[0];
00216   else if (aic_type == AIC_AIC10)
00217     gain_ptr = &aic10spk_gain[0];
00218   else if (aic_type == AIC_TITAN)
00219     gain_ptr = &titanspk_gain[0];
00220
00221   /* limit the maximum gain to 0dB */
00222   max_dac_gain = AIC_DAC_GAIN_1P5dB;
00223   if(aic_type==AIC_TITAN) {
00224     max_dac_gain = 0;       /* 0dB */
00225   }
00226
00227   gain = gain >> 3;               /* convert from Q4 to Q1 for old tables */
00228
00229   if (gain > max_dac_gain) {
00230     gain = max_dac_gain;
00231   }
00232
00233   /* limit the minimum gain to -54dB */
00234   if (gain < AIC_DAC_GAIN_M54dB) {
00235     gain = AIC_DAC_GAIN_M54dB;
00236   }
00237
00238   /* select the nearest available DAC PGA gain from the gain table */
00239   gain_idx = gain - max_dac_gain;
00240   if(gain_idx < 0) {
00241     gain_idx = -gain_idx;
00242   }
00243   appld_gain   = gain_ptr[gain_idx];
00244   *spklin_gain = db2linear (appld_gain);
00245
00246   return (appld_gain<<3);    /* Q1->Q4 conversion - return applied gain */
00247
00248 } /* aicSpkGain */
00249
00250
00251 /******************************************************************************
00252  * FUNCTION PURPOSE: dB to linear conversion.
00253  ******************************************************************************
00254  * DESCRIPTION: Converts db value in S14.1 format to linear value in Q11 format
00255  *              the resolution is 0.5 dB.
00256  *
00257  *  Fract db2linear (
00258  *    Fract    gaindB)       - gain in dB S14.1 format.
00259  *
00260  *****************************************************************************/
00261 Fract db2linear (Fract gaindB)
00262 {
00263   const Fract *db2lin_ptr;
00264   tint index;
00265
00266   if (gaindB > DB2LIN_MAX_22dB)
00267     gaindB = DB2LIN_MAX_22dB;
00268   else if (gaindB < DB2LIN_MIN_M60dB)
00269     gaindB = DB2LIN_MIN_M60dB;
00270
00271   if (gaindB < 0) {
00272     db2lin_ptr = &mdb2linTable[0];
00273     index      = -gaindB-1;
00274   }
00275   else {
00276     db2lin_ptr = &pdb2linTable[0];
00277     index      = gaindB;
00278   }
00279   return (db2lin_ptr[index]);
00280
00281 } /* db2linear */
00282
00283 /* Nothing past this point */


AER Simulation: aicloc.h File Reference

  • File List
  • Globals

aicloc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>

Include dependency graph for aicloc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | AIC_ADC_GAIN_25dB 50
#define | AIC_ADC_GAIN_M35dB (-70)
#define | AIC_ADC_M32dB (-64)
#define | AIC_DAC_GAIN_1P5dB 3
#define | AIC_DAC_GAIN_M54dB (-108)
#define | AIC_ADC_GAIN_11PT5dB 23
#define | AIC_ADC_GAIN_M42PT5dB (-85)
#define | DB2LIN_MAX_22dB 44
#define | DB2LIN_MIN_M60dB (-120)
#define | AIC_GAINTBL_IDX_M33dB 116

Enumerations

enum {
AIC_AIC22 = 0, AIC_AIC22C = 1, AIC_AIC20 = 2, AIC_AIC10 = 3,
AIC_TITAN = 4
}

Functions

Fract | aicMicGain (Fract gain, Fract *analog_micgainlin, Fract *digital_micgainlin)
Fract | aicSpkGain (Fract gain, Fract *spklin_gain)

Define Documentation

#define AIC_ADC_GAIN_25dB 50

Definition at line 31 of file aicloc.h.

Referenced by aicMicGain().

#define AIC_ADC_GAIN_M35dB (-70)

Definition at line 32 of file aicloc.h.

Referenced by aicMicGain().

#define AIC_ADC_M32dB (-64)

Definition at line 33 of file aicloc.h.

Referenced by aicMicGain().

#define AIC_DAC_GAIN_1P5dB 3

Definition at line 34 of file aicloc.h.

Referenced by aicSpkGain().

#define AIC_DAC_GAIN_M54dB (-108)

Definition at line 35 of file aicloc.h.

Referenced by aicSpkGain().

#define AIC_ADC_GAIN_11PT5dB 23

Definition at line 36 of file aicloc.h.

Referenced by aicMicGain().

#define AIC_ADC_GAIN_M42PT5dB (-85)

Definition at line 37 of file aicloc.h.

Referenced by aicMicGain().

#define DB2LIN_MAX_22dB 44

Definition at line 38 of file aicloc.h.

Referenced by db2linear().

#define DB2LIN_MIN_M60dB (-120)

Definition at line 39 of file aicloc.h.

Referenced by db2linear().

#define AIC_GAINTBL_IDX_M33dB 116

Definition at line 42 of file aicloc.h.

Referenced by aicMicGain().

Enumeration Type Documentation

anonymous enum

Enumerator:
AIC_AIC22
AIC_AIC22C
AIC_AIC20
AIC_AIC10
AIC_TITAN

Definition at line 22 of file aicloc.h.

Function Documentation

Fract aicMicGain | ( | Fract | gain,
 |  | Fract * | analog_micgainlin,
 |  | Fract * | digital_micgainlin
 | ) |  |

Definition at line 133 of file aic.c.

References aic10mic_gain, aic20mic_gain, aic22mic_gain, AIC_ADC_GAIN_11PT5dB, AIC_ADC_GAIN_25dB, AIC_ADC_GAIN_M35dB, AIC_ADC_GAIN_M42PT5dB, AIC_ADC_M32dB, AIC_AIC10, AIC_AIC20, AIC_GAINTBL_IDX_M33dB, AIC_TITAN, db2linear(), and titanmic_gain.

Here is the call graph for this function:

Fract aicSpkGain | ( | Fract | gain,
 |  | Fract * | spklin_gain
 | ) |  |

Definition at line 203 of file aic.c.

References aic10spk_gain, aic20spk_gain, aic22spk_gain, AIC_AIC10, AIC_AIC20, AIC_DAC_GAIN_1P5dB, AIC_DAC_GAIN_M54dB, AIC_TITAN, db2linear(), and titanspk_gain.

Here is the call graph for this function:


AER Simulation: aicloc.h Source File

  • File List
  • Globals

aicloc.h

Go to the documentation of this file.
00001 #ifndef AICLOC_H
00002 #define AICLOC_H
00003 /*****************************************************************************
00004  * FILE PURPOSE: Header file for AIC
00005  *****************************************************************************
00006  * FILENAME: aicloc.h
00007  *
00008  * DESCRIPTION: Defines Constants
00009  *
00010  *
00011  * TABS: NONE
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * (C) Copyright 2008, Texas Instruments, Inc.
00016  *
00017  *****************************************************************************/
00018 /* System definitions and utilities */
00019 #include <ti/mas/types/types.h>                       /* DSP types            */
00020 #include <ti/mas/fract/fract.h>                       /* fractional macros    */
00021
00022 enum {
00023   AIC_AIC22       = 0,
00024   AIC_AIC22C      = 1,
00025   AIC_AIC20       = 2,
00026   AIC_AIC10       = 3,
00027   AIC_TITAN       = 4
00028 };
00029
00030 /* ADC gain settings. */
00031 #define AIC_ADC_GAIN_25dB          50       /* 25dB in Q1 format   */
00032 #define AIC_ADC_GAIN_M35dB       (-70)      /* -35dB in Q1 format  */
00033 #define AIC_ADC_M32dB            (-64)      /* -32dB in Q1 format  */
00034 #define AIC_DAC_GAIN_1P5dB          3       /* 1.5dB  in Q1 format */
00035 #define AIC_DAC_GAIN_M54dB       (-108)     /* -54dB in Q1 format  */
00036 #define AIC_ADC_GAIN_11PT5dB       23       /* max +change for titan ADC gain */
00037 #define AIC_ADC_GAIN_M42PT5dB    (-85)      /* max -change for titan ADC gain */
00038 #define DB2LIN_MAX_22dB            44       /* 22dB in Q1 format   */
00039 #define DB2LIN_MIN_M60dB         (-120)     /* -60 dB in Q1 format */
00040
00041 /* Index to -66dB, calculated as abs(-66-AIC_ADC_GAIN_25dB)*/
00042 #define AIC_GAINTBL_IDX_M33dB     116
00043
00044 /* function prototype */
00045 Fract aicMicGain (Fract gain, Fract *analog_micgainlin,
00046                   Fract *digital_micgainlin);
00047 Fract aicSpkGain (Fract gain, Fract *spklin_gain);
00048
00049 #endif /* AICLOC_H */
00050
00051 /* nothing past this line */
00052
00053


AER Simulation: Data Structures

  • Data Structures
  • Data Fields

AER Simulation Data Structures

Here are the data structures with brief descriptions:
aersimFileIO_s
bfMemConfig_t
bfMemHeap_t
mssbuf_t
mssinstbuf_t
p651Pars_t
piuInst_s
siuAerSysPars_s
siuConfig_t
siuContext_t
siuGainControl_s
siuInst_t
siuPhoneSys_t
siuRxConfig_t
siuRxInst_t
siuSetup_s
siuSysCfg_s
siuTxConfig_t
siuTxInst_t
siuTxSendOut_t
svdinstbuf_t


AER Simulation: doxygen.h File Reference

  • File List
  • Globals

doxygen.h File Reference

Go to the source code of this file.


AER Simulation: doxygen.h Source File

  • File List
  • Globals

doxygen.h

Go to the documentation of this file.
00001 /*
00002  * This is a little header file which Doxygen parses to generate the main
00003  * documentation page.
00004  */
00005


AER Simulation: File Index

  • File List
  • Globals

AER Simulation File List

Here is a list of all files with brief descriptions:
aerbuffs.h [code]
aerbufst.h [code]
aersim.c [code]
aersim.h [code]
aersim_fileIO.c [code]
aersim_fileIO.h [code]
aersim_setup.c [code]
aersimbufs.c [code]
aersimcfg.h [code]
aic.c [code]
aicloc.h [code]
doxygen.h [code]
piu.c [code]
piuloc.h [code]
siu.c [code]
siu.h [code]
siuaer.c [code]
siuaer.h [code]
siuagc.c [code]
siuagc.h [code]
siubf.c [code]
siubf.h [code]
siudrc.c [code]
siudrc.h [code]
siuloc.h [code]
siummic.c [code]
siumss.c [code]
siuport.h [code]
siurx.c [code]
siutx.c [code]


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • active_mic : siuPhoneSys_t
  • AEC_enabled : siuSetup_s
  • aep_gain_adj_exp : siuSetup_s
  • aep_gain_adj_mant : siuSetup_s
  • aep_gain_l2 : siuSetup_s
  • aep_gain_start_exp : siuSetup_s
  • aep_gain_start_mant : siuSetup_s
  • aep_params : siuSetup_s
  • aep_vary_time : siuSetup_s
  • aepCtl : siuSetup_s
  • aer_ctl_bitfield_0 : siuSetup_s
  • aer_ctl_bitfield_1 : siuSetup_s
  • aer_dbgstat_freq : siuSetup_s
  • aer_filter_len_HES : siuAerSysPars_s
  • aer_filter_len_HF : siuAerSysPars_s
  • aer_kernel_srate : siuSetup_s
  • aer_mips_profile : siuSetup_s
  • aer_receive_out_length : siuSetup_s
  • aer_recv_in_buf : siuInst_t
  • aer_reset_bitfield : siuSetup_s
  • aer_rin_frm_size : siuSetup_s
  • aer_rout_frm_size : siuSetup_s
  • aer_sin_frm_size : siuSetup_s
  • aer_sout_frm_size : siuSetup_s
  • aer_sys_params : siuSetup_s
  • aer_trace_cfg : siuSetup_s
  • aer_trace_flag : siuSetup_s
  • aer_trace_size_rx : siuSetup_s
  • aer_trace_size_tx : siuSetup_s
  • aer_valid_bitfield : siuSetup_s
  • aerCtl : siuSetup_s
  • aerHEShandle : siuInst_t
  • aerHESInst : siuInst_t
  • aerHFhandles : siuInst_t
  • aerHFInst : siuInst_t
  • ag_chg_delay_rx : siuAerSysPars_s
  • ag_chg_delay_tx : siuAerSysPars_s
  • ag_chg_interp_samp : siuAerSysPars_s
  • agc_ctl_bitfield : siuSetup_s
  • agcCtl : siuSetup_s
  • agcHEShandle : siuInst_t
  • agcHESInst : siuInst_t
  • agcHFhandles : siuInst_t
  • agcHFInst : siuInst_t
  • analog_micgainlin : siuInst_t
  • asnr_enable : siuSetup_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- m -

  • mclass : bfMemConfig_t
  • mic_active_time : siuPhoneSys_t
  • mic_delay : siuPhoneSys_t
  • mic_gain : siuGainControl_s
  • mic_proc_order : siuPhoneSys_t
  • mic_scale : siuPhoneSys_t
  • mss_inst : mssbuf_t
  • mssInst : siuInst_t
  • mult_mic_type : siuSysCfg_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- n -

  • ne_sgn_flag : siuSetup_s
  • new_phone_mode : siuSetup_s
  • num_BF_mic : siuSysCfg_s
  • num_HF_mic : siuSysCfg_s , siuTxConfig_t , siuPhoneSys_t


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- b -

  • band_split_flag : siuSysCfg_s
  • base : bfMemHeap_t
  • bf_ctl_bitfield : siuSetup_s
  • bf_filter_file_name : aersimFileIO_s
  • bf_mics : siuSetup_s
  • bf_steer_angle : siuSysCfg_s
  • bfCtl : siuSetup_s
  • bfInst : siuInst_t
  • buf : svdinstbuf_t , mssinstbuf_t


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- c -

  • cheap : siuContext_t
  • cheap_used : siuContext_t , siuInst_t
  • cng_enable : siuSetup_s
  • companding_law : siuConfig_t , siuInst_t
  • core_heap : siuConfig_t
  • ctl_code : siuGainControl_s
  • cycles_before_aer : siuSetup_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- d -

  • debug : siuConfig_t , siuContext_t , siuInst_t
  • del_buf_rx : piuInst_s
  • del_buf_rxin_ind : piuInst_s
  • del_buf_rxout_ind : piuInst_s
  • del_buf_rxsync_ind : piuInst_s
  • del_buf_tx : piuInst_s
  • del_buf_txin_ind : piuInst_s
  • del_buf_txout_ind : piuInst_s
  • digital_micgainlin : siuInst_t
  • doCacheEnable : siuSetup_s
  • doCacheFlush : siuSetup_s
  • drc_cfgbits : siuSetup_s
  • drc_mips_profile : siuSetup_s
  • drc_on_flag : siuSetup_s
  • drcCtl : siuSetup_s
  • drcDebugOut : aersimFileIO_s
  • drcGetCode : siuSetup_s
  • drcGetParam : siuSetup_s
  • drcInst : siuInst_t
  • drcReceiveOut : aersimFileIO_s
  • dt_on : siuSetup_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- e -

  • enabled : siuTxInst_t , p651Pars_t
  • eqbq_rx_flag : siuSetup_s
  • eqbq_tx_flag : siuSetup_s
  • exception : siuInst_t , siuConfig_t , siuContext_t


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- f -

  • fcn : siuTxSendOut_t
  • fe_sgn_flag : siuSetup_s
  • flag_rxin_end : aersimFileIO_s
  • flag_rxin_rd : aersimFileIO_s
  • flag_rxout_wr : aersimFileIO_s
  • flag_txin_echo : aersimFileIO_s
  • flag_txin_end : aersimFileIO_s
  • flag_txin_rd : aersimFileIO_s
  • flag_txout_wr : aersimFileIO_s
  • fp_bf_filter : aersimFileIO_s
  • fp_debug_aer : aersimFileIO_s
  • fp_debug_mss : aersimFileIO_s
  • fp_rxin : aersimFileIO_s
  • fp_rxout : aersimFileIO_s
  • fp_trace_rx : aersimFileIO_s
  • fp_trace_tx : aersimFileIO_s
  • fp_txin : aersimFileIO_s
  • fp_txout : aersimFileIO_s
  • frame_size : piuInst_s , siuSysCfg_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- g -

  • g167_power_calc_fnc : siuSetup_s
  • g167_save_sig_flag : siuSetup_s
  • gain_ctl : siuInst_t


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- h -

  • hcoefOut : aersimFileIO_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- i -

  • ID : siuConfig_t , siuContext_t , siuInst_t
  • inactive_highload_mic : siuPhoneSys_t
  • indx : bfMemHeap_t
  • init_pattern : bfMemConfig_t


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- p -

  • p651Pars : siuSetup_s
  • pcm_bits : siuInst_t , siuSysCfg_s , siuConfig_t
  • Pe_high : p651Pars_t
  • Pe_low : p651Pars_t
  • Pe_max : p651Pars_t
  • pending_gain_request : siuInst_t
  • phone_mode : siuPhoneSys_t
  • phone_sys : siuInst_t
  • piu_getlev : siuSetup_s
  • piu_tg_state : siuSetup_s
  • piuInst : siuInst_t
  • pow_track_enabled : siuSetup_s
  • pow_track_file1 : siuSetup_s
  • pow_track_file2 : siuSetup_s
  • pow_track_option : siuSetup_s
  • Pr_high : p651Pars_t
  • Pr_low : p651Pars_t
  • Pr_max : p651Pars_t
  • pre_init_bufs : bfMemConfig_t
  • putflt_flag_last : siuSetup_s
  • Px_high : p651Pars_t
  • Px_low : p651Pars_t
  • Px_max : p651Pars_t
  • Py1_high : p651Pars_t
  • Py1_low : p651Pars_t
  • Py1_max : p651Pars_t
  • Py_high : p651Pars_t
  • Py_low : p651Pars_t
  • Py_max : p651Pars_t


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- r -

  • recv_frame_ptr : siuTxInst_t
  • rin_frm_len : siuRxInst_t , siuRxConfig_t
  • round_robin_cntr : siuPhoneSys_t
  • rout_frm_len : siuRxConfig_t , siuRxInst_t
  • run_time : siuSetup_s
  • rx_ag_chg_delay_cnt : siuInst_t
  • rx_ag_chg_delay_frm : siuInst_t
  • rx_in_file_name : aersimFileIO_s
  • RxCyclesAvg : siuSetup_s
  • RxCyclesMax : siuSetup_s
  • RxInst : siuInst_t
  • rxSGN : siuSetup_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- s -

  • sampling_rates : siuSysCfg_s
  • segment_size : siuSysCfg_s , siuSetup_s
  • send_frame_ptr : siuTxInst_t
  • send_frm_del : siuTxInst_t
  • send_in_frame_length : siuTxConfig_t , siuTxInst_t
  • send_out_frame_length : siuTxConfig_t , siuTxInst_t
  • siuGainCtl : siuSetup_s
  • size : bfMemHeap_t
  • spk_gain : siuGainControl_s
  • spklin_gain : siuInst_t
  • svd_inst : mssbuf_t
  • system_cfg : siuSetup_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- t -

  • targetInst : siuTxSendOut_t
  • test_double_talk : siuSetup_s
  • toggle_aep : siuSetup_s
  • toggle_aer : siuSetup_s
  • toggle_agc : siuSetup_s
  • toggle_bf : siuSetup_s
  • toggle_drcCtrl : siuSetup_s
  • toggle_drcGetParam : siuSetup_s
  • toggle_getflt : siuSetup_s
  • toggle_phone_mode : siuSetup_s
  • toggle_piu_tg : siuSetup_s
  • toggle_putflt : siuSetup_s
  • toggle_rx_sg : siuSetup_s
  • toggle_siugain : siuSetup_s
  • toggle_tx_sg : siuSetup_s
  • toggle_veu : siuSetup_s
  • tx_ag_chg_delay_cnt : siuInst_t
  • tx_ag_chg_delay_frm : siuInst_t
  • tx_in_file_name : aersimFileIO_s
  • TxCyclesAvg : siuSetup_s
  • TxCyclesMax : siuSetup_s
  • txin_file_with_echo : siuSetup_s
  • TxInst : siuInst_t
  • txout_cng_only : siuSetup_s
  • TxSendOut : siuTxInst_t , siuTxConfig_t
  • txSGN : siuSetup_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- u -

  • u : siuGainControl_s
  • ulaw : siuSysCfg_s
  • use_fdnlp : siuSetup_s


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- v -

  • veu_enabled : siuSetup_s
  • veuCtl : siuSetup_s
  • veuInst : siuInst_t
  • vheap : siuContext_t
  • vheap_used : siuInst_t , siuContext_t
  • voice_heap : siuConfig_t


AER Simulation: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

Here is a list of all struct and union fields with links to the structures/unions they belong to:

- y -

  • y2x_delay : siuAerSysPars_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- a -

  • active_mic : siuPhoneSys_t
  • AEC_enabled : siuSetup_s
  • aep_gain_adj_exp : siuSetup_s
  • aep_gain_adj_mant : siuSetup_s
  • aep_gain_l2 : siuSetup_s
  • aep_gain_start_exp : siuSetup_s
  • aep_gain_start_mant : siuSetup_s
  • aep_params : siuSetup_s
  • aep_vary_time : siuSetup_s
  • aepCtl : siuSetup_s
  • aer_ctl_bitfield_0 : siuSetup_s
  • aer_ctl_bitfield_1 : siuSetup_s
  • aer_dbgstat_freq : siuSetup_s
  • aer_filter_len_HES : siuAerSysPars_s
  • aer_filter_len_HF : siuAerSysPars_s
  • aer_kernel_srate : siuSetup_s
  • aer_mips_profile : siuSetup_s
  • aer_receive_out_length : siuSetup_s
  • aer_recv_in_buf : siuInst_t
  • aer_reset_bitfield : siuSetup_s
  • aer_rin_frm_size : siuSetup_s
  • aer_rout_frm_size : siuSetup_s
  • aer_sin_frm_size : siuSetup_s
  • aer_sout_frm_size : siuSetup_s
  • aer_sys_params : siuSetup_s
  • aer_trace_cfg : siuSetup_s
  • aer_trace_flag : siuSetup_s
  • aer_trace_size_rx : siuSetup_s
  • aer_trace_size_tx : siuSetup_s
  • aer_valid_bitfield : siuSetup_s
  • aerCtl : siuSetup_s
  • aerHEShandle : siuInst_t
  • aerHESInst : siuInst_t
  • aerHFhandles : siuInst_t
  • aerHFInst : siuInst_t
  • ag_chg_delay_rx : siuAerSysPars_s
  • ag_chg_delay_tx : siuAerSysPars_s
  • ag_chg_interp_samp : siuAerSysPars_s
  • agc_ctl_bitfield : siuSetup_s
  • agcCtl : siuSetup_s
  • agcHEShandle : siuInst_t
  • agcHESInst : siuInst_t
  • agcHFhandles : siuInst_t
  • agcHFInst : siuInst_t
  • analog_micgainlin : siuInst_t
  • asnr_enable : siuSetup_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- m -

  • mclass : bfMemConfig_t
  • mic_active_time : siuPhoneSys_t
  • mic_delay : siuPhoneSys_t
  • mic_gain : siuGainControl_s
  • mic_proc_order : siuPhoneSys_t
  • mic_scale : siuPhoneSys_t
  • mss_inst : mssbuf_t
  • mssInst : siuInst_t
  • mult_mic_type : siuSysCfg_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- n -

  • ne_sgn_flag : siuSetup_s
  • new_phone_mode : siuSetup_s
  • num_BF_mic : siuSysCfg_s
  • num_HF_mic : siuSysCfg_s , siuTxConfig_t , siuPhoneSys_t


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- b -

  • band_split_flag : siuSysCfg_s
  • base : bfMemHeap_t
  • bf_ctl_bitfield : siuSetup_s
  • bf_filter_file_name : aersimFileIO_s
  • bf_mics : siuSetup_s
  • bf_steer_angle : siuSysCfg_s
  • bfCtl : siuSetup_s
  • bfInst : siuInst_t
  • buf : svdinstbuf_t , mssinstbuf_t


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- c -

  • cheap : siuContext_t
  • cheap_used : siuContext_t , siuInst_t
  • cng_enable : siuSetup_s
  • companding_law : siuConfig_t , siuInst_t
  • core_heap : siuConfig_t
  • ctl_code : siuGainControl_s
  • cycles_before_aer : siuSetup_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- d -

  • debug : siuConfig_t , siuContext_t , siuInst_t
  • del_buf_rx : piuInst_s
  • del_buf_rxin_ind : piuInst_s
  • del_buf_rxout_ind : piuInst_s
  • del_buf_rxsync_ind : piuInst_s
  • del_buf_tx : piuInst_s
  • del_buf_txin_ind : piuInst_s
  • del_buf_txout_ind : piuInst_s
  • digital_micgainlin : siuInst_t
  • doCacheEnable : siuSetup_s
  • doCacheFlush : siuSetup_s
  • drc_cfgbits : siuSetup_s
  • drc_mips_profile : siuSetup_s
  • drc_on_flag : siuSetup_s
  • drcCtl : siuSetup_s
  • drcDebugOut : aersimFileIO_s
  • drcGetCode : siuSetup_s
  • drcGetParam : siuSetup_s
  • drcInst : siuInst_t
  • drcReceiveOut : aersimFileIO_s
  • dt_on : siuSetup_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- e -

  • enabled : siuTxInst_t , p651Pars_t
  • eqbq_rx_flag : siuSetup_s
  • eqbq_tx_flag : siuSetup_s
  • exception : siuInst_t , siuConfig_t , siuContext_t


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- f -

  • fcn : siuTxSendOut_t
  • fe_sgn_flag : siuSetup_s
  • flag_rxin_end : aersimFileIO_s
  • flag_rxin_rd : aersimFileIO_s
  • flag_rxout_wr : aersimFileIO_s
  • flag_txin_echo : aersimFileIO_s
  • flag_txin_end : aersimFileIO_s
  • flag_txin_rd : aersimFileIO_s
  • flag_txout_wr : aersimFileIO_s
  • fp_bf_filter : aersimFileIO_s
  • fp_debug_aer : aersimFileIO_s
  • fp_debug_mss : aersimFileIO_s
  • fp_rxin : aersimFileIO_s
  • fp_rxout : aersimFileIO_s
  • fp_trace_rx : aersimFileIO_s
  • fp_trace_tx : aersimFileIO_s
  • fp_txin : aersimFileIO_s
  • fp_txout : aersimFileIO_s
  • frame_size : piuInst_s , siuSysCfg_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- g -

  • g167_power_calc_fnc : siuSetup_s
  • g167_save_sig_flag : siuSetup_s
  • gain_ctl : siuInst_t


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- h -

  • hcoefOut : aersimFileIO_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- i -

  • ID : siuConfig_t , siuContext_t , siuInst_t
  • inactive_highload_mic : siuPhoneSys_t
  • indx : bfMemHeap_t
  • init_pattern : bfMemConfig_t


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- p -

  • p651Pars : siuSetup_s
  • pcm_bits : siuInst_t , siuSysCfg_s , siuConfig_t
  • Pe_high : p651Pars_t
  • Pe_low : p651Pars_t
  • Pe_max : p651Pars_t
  • pending_gain_request : siuInst_t
  • phone_mode : siuPhoneSys_t
  • phone_sys : siuInst_t
  • piu_getlev : siuSetup_s
  • piu_tg_state : siuSetup_s
  • piuInst : siuInst_t
  • pow_track_enabled : siuSetup_s
  • pow_track_file1 : siuSetup_s
  • pow_track_file2 : siuSetup_s
  • pow_track_option : siuSetup_s
  • Pr_high : p651Pars_t
  • Pr_low : p651Pars_t
  • Pr_max : p651Pars_t
  • pre_init_bufs : bfMemConfig_t
  • putflt_flag_last : siuSetup_s
  • Px_high : p651Pars_t
  • Px_low : p651Pars_t
  • Px_max : p651Pars_t
  • Py1_high : p651Pars_t
  • Py1_low : p651Pars_t
  • Py1_max : p651Pars_t
  • Py_high : p651Pars_t
  • Py_low : p651Pars_t
  • Py_max : p651Pars_t


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- r -

  • recv_frame_ptr : siuTxInst_t
  • rin_frm_len : siuRxInst_t , siuRxConfig_t
  • round_robin_cntr : siuPhoneSys_t
  • rout_frm_len : siuRxConfig_t , siuRxInst_t
  • run_time : siuSetup_s
  • rx_ag_chg_delay_cnt : siuInst_t
  • rx_ag_chg_delay_frm : siuInst_t
  • rx_in_file_name : aersimFileIO_s
  • RxCyclesAvg : siuSetup_s
  • RxCyclesMax : siuSetup_s
  • RxInst : siuInst_t
  • rxSGN : siuSetup_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- s -

  • sampling_rates : siuSysCfg_s
  • segment_size : siuSysCfg_s , siuSetup_s
  • send_frame_ptr : siuTxInst_t
  • send_frm_del : siuTxInst_t
  • send_in_frame_length : siuTxConfig_t , siuTxInst_t
  • send_out_frame_length : siuTxConfig_t , siuTxInst_t
  • siuGainCtl : siuSetup_s
  • size : bfMemHeap_t
  • spk_gain : siuGainControl_s
  • spklin_gain : siuInst_t
  • svd_inst : mssbuf_t
  • system_cfg : siuSetup_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- t -

  • targetInst : siuTxSendOut_t
  • test_double_talk : siuSetup_s
  • toggle_aep : siuSetup_s
  • toggle_aer : siuSetup_s
  • toggle_agc : siuSetup_s
  • toggle_bf : siuSetup_s
  • toggle_drcCtrl : siuSetup_s
  • toggle_drcGetParam : siuSetup_s
  • toggle_getflt : siuSetup_s
  • toggle_phone_mode : siuSetup_s
  • toggle_piu_tg : siuSetup_s
  • toggle_putflt : siuSetup_s
  • toggle_rx_sg : siuSetup_s
  • toggle_siugain : siuSetup_s
  • toggle_tx_sg : siuSetup_s
  • toggle_veu : siuSetup_s
  • tx_ag_chg_delay_cnt : siuInst_t
  • tx_ag_chg_delay_frm : siuInst_t
  • tx_in_file_name : aersimFileIO_s
  • TxCyclesAvg : siuSetup_s
  • TxCyclesMax : siuSetup_s
  • txin_file_with_echo : siuSetup_s
  • TxInst : siuInst_t
  • txout_cng_only : siuSetup_s
  • TxSendOut : siuTxInst_t , siuTxConfig_t
  • txSGN : siuSetup_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- u -

  • u : siuGainControl_s
  • ulaw : siuSysCfg_s
  • use_fdnlp : siuSetup_s


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- v -

  • veu_enabled : siuSetup_s
  • veuCtl : siuSetup_s
  • veuInst : siuInst_t
  • vheap : siuContext_t
  • vheap_used : siuInst_t , siuContext_t
  • voice_heap : siuConfig_t


AER Simulation: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • y

- y -

  • y2x_delay : siuAerSysPars_s


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __SIUSTR : siuloc.h
  • _AERTESTPORT_ARM_GCARMV7A : aerbufst.h
  • _AERTESTPORT_C55L : aerbufst.h
  • _AERTESTPORT_C64P : aerbufst.h
  • _AERTESTPORT_C64P_BIG_ENDIAN : aerbufst.h
  • _AERTESTPORT_C64P_BIG_ENDIAN_ELF : aerbufst.h
  • _AERTESTPORT_C64P_ELF : aerbufst.h
  • _AERTESTPORT_C674 : aerbufst.h
  • _AERTESTPORT_C674_ELF : aerbufst.h
  • _SIUSTR : siuloc.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- l -

  • loop : siu.c , aersim.h
  • LRIN_LOOPCNT : aersim.h
  • LRIN_START : aersim.h
  • LRIN_STEP : aersim.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- m -

  • main() : aersim.c
  • mdb2linTable : aic.c
  • mss_buf : siumss.c
  • multiband_test_w_input1 : siudrc.c
  • multiband_test_w_input2 : siudrc.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- n -

  • NUM_AER_DBG_FILE : siu.c
  • num_frames_converged : aersim.c
  • NUM_H_VEC_GET : aersim.c
  • NUM_H_VEC_PUT : aersim.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- o -

  • openfile : siudrc.c
  • out_file_16k : siudrc.c
  • out_file_8k : siudrc.c
  • out_file_name_16k : siudrc.c
  • out_file_name_8k : siudrc.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

  • AECHO_LOOPCNT : aersim.h
  • aepSimInst : siuagc.c , aersim.c
  • aer_buff0_hf : aerbuffs.h , aersimbufs.c
  • aer_buff0_hs : aerbuffs.h , aersimbufs.c
  • aer_buff1 : aerbuffs.h , aersimbufs.c
  • aer_buff10 : aerbuffs.h , aersimbufs.c
  • aer_buff11 : aerbuffs.h , aersimbufs.c
  • aer_buff12 : aerbuffs.h , aersimbufs.c
  • aer_buff13 : aerbuffs.h , aersimbufs.c
  • aer_buff14 : aerbuffs.h , aersimbufs.c
  • aer_buff15 : aerbuffs.h , aersimbufs.c
  • aer_buff16 : aerbuffs.h , aersimbufs.c
  • aer_buff17 : aerbuffs.h , aersimbufs.c
  • aer_buff18 : aerbuffs.h , aersimbufs.c
  • aer_buff19 : aerbuffs.h , aersimbufs.c
  • aer_buff20 : aersimbufs.c , aerbuffs.h
  • aer_buff2_hf : aerbuffs.h , aersimbufs.c
  • aer_buff2_hs : aerbuffs.h , aersimbufs.c
  • aer_buff3 : aerbuffs.h , aersimbufs.c
  • aer_buff4_hf : aerbuffs.h , aersimbufs.c
  • aer_buff4_hs : aerbuffs.h , aersimbufs.c
  • aer_buff5 : aerbuffs.h , aersimbufs.c
  • aer_buff6 : aerbuffs.h , aersimbufs.c
  • aer_buff7 : aerbuffs.h , aersimbufs.c
  • aer_buff8 : aerbuffs.h , aersimbufs.c
  • aer_buff9 : aerbuffs.h , aersimbufs.c
  • aer_coef_exp : aersim.c
  • aer_coef_mant : aersim.c
  • AER_CORE_MAX_FRAME_LENGTH : aersimcfg.h
  • aer_debug_stat() : aersim_fileIO.c , aersim_fileIO.h
  • AER_HES_ID : siuloc.h
  • AER_HF0_ID : siuloc.h
  • AER_HFMAX_ID : siuloc.h
  • aer_in_buffer : aersimbufs.c , aerbuffs.h
  • AER_LEN_FFT_16K : aersimcfg.h
  • AER_LEN_FFT_8K : aersimcfg.h
  • AER_LEN_FFT_MAX : aersimcfg.h
  • AER_LENGTH_EQFIR : aersimcfg.h
  • AER_MAX_FRAME_LENGTH : aersimcfg.h
  • AER_NUM_EQ_PARS : aersimcfg.h
  • AER_ORDER_EQIIR : aersimcfg.h
  • aer_out_buffer : aersimbufs.c , aerbuffs.h
  • AER_SIM_AEP_COEF_LEN_16K : aersimcfg.h
  • AER_SIM_AEP_COEF_LEN_8K : aersimcfg.h
  • AER_SIM_AGC_GAINSWING_MAX : aersimcfg.h
  • AER_SIM_AGC_MICGAIN_MAX : aersimcfg.h
  • AER_SIM_AGC_MICGAIN_MIN : aersimcfg.h
  • AER_SIM_AGC_SAT_HANGOVER : aersimcfg.h
  • AER_SIM_AGC_SAT_THRESHOLD : aersimcfg.h
  • aer_sim_apply_config() : aersim.h , aersim_setup.c
  • AER_SIM_BF_STEER_ANGLE_0 : aersimcfg.h
  • AER_SIM_BF_STEER_ANGLE_45 : aersimcfg.h
  • AER_SIM_BF_STEER_ANGLE_90 : aersimcfg.h
  • aer_sim_cfg_on_the_fly() : aersim.c
  • aer_sim_close_files() : aersim_fileIO.c , aersim_fileIO.h
  • aer_sim_config_aer_params() : aersim.h , aersim_setup.c
  • AER_SIM_DURATION_CONVERGED : aersim.c
  • aer_sim_fio_read_fe() : aersim.c
  • aer_sim_fio_read_ne() : aersim.c
  • aer_sim_fio_write_data() : aersim.c
  • aer_sim_get_erle() : aersim.c
  • AER_SIM_HES_MAX_FILT_LENGTH : aersimcfg.h
  • AER_SIM_HES_MAX_NUM_HVEC : aersimcfg.h
  • AER_SIM_HES_MAX_Y2X_DELAY : aersimcfg.h
  • AER_SIM_HF_MAX_FILT_LENGTH : aersimcfg.h
  • AER_SIM_HF_MAX_NUM_HVEC : aersimcfg.h
  • AER_SIM_HF_MAX_Y2X_DELAY : aersimcfg.h
  • AER_SIM_HF_MICGAIN_0dB : aersimcfg.h
  • AER_SIM_HF_SPKGAIN_0dB : aersimcfg.h
  • AER_SIM_HIGH_LOAD_MIC_INIT : siummic.c
  • aer_sim_init() : aersim.h , aersim_setup.c
  • aer_sim_init_piu() : aersim.h , aersim_setup.c
  • aer_sim_init_siu() : aersim.h , aersim_setup.c
  • aer_sim_instantiate_aer() : aersim.h , aersim_setup.c
  • AER_SIM_MAX_BF_FILT_LEN : aersimcfg.h
  • AER_SIM_MAX_FRAME_LENGTH : aersimcfg.h
  • AER_SIM_MAX_PIU_DEL_RX : aersimcfg.h
  • AER_SIM_MAX_PIU_DEL_TX : aersimcfg.h
  • AER_SIM_MIC_TYPE_ARRAY : aersimcfg.h
  • AER_SIM_MIC_TYPE_STAND_ALONE : aersimcfg.h
  • AER_SIM_MSS_INST_SIZE : siumss.c
  • AER_SIM_NUM_BF_MIC : aersimcfg.h
  • AER_SIM_NUM_HF_MIC : aersimcfg.h
  • AER_SIM_NUM_MIC : aersimcfg.h
  • aer_sim_open_aep() : aersim.h , aersim_setup.c
  • aer_sim_open_files() : aersim_fileIO.h , aersim_fileIO.c
  • aer_sim_open_txrx_sgns() : aersim_setup.c , aersim.h
  • AER_SIM_PEAK_MIPS_ERLE_THRESH : aersim.c
  • AER_SIM_PIU_DEL_BUF_LEN_RX : aersimcfg.h
  • AER_SIM_PIU_DEL_BUF_LEN_TX : aersimcfg.h
  • AER_SIM_PIU_DEL_RX : aersimcfg.h
  • AER_SIM_PIU_DEL_TX : aersimcfg.h
  • aer_sim_print_version_mips() : aersim.c
  • aer_sim_read_cfg() : aersim.h , aersim_setup.c
  • AER_SIM_ROOT_FOLDER : aersim_fileIO.h
  • aer_sim_setup_aep() : aersim_setup.c
  • aer_sim_setup_sgn() : aersim_setup.c
  • AER_SIM_SIU_DEF_HF_MIC : siummic.c
  • AER_SIM_SIU_Y2X_DEL_ADJ : aersimcfg.h
  • AER_SIM_SRATE_16000_DIV_8K : aersimcfg.h
  • AER_SIM_SRATE_8000_DIV_8K : aersimcfg.h
  • AER_SIM_SVD_INST_SIZE : siumss.c
  • aer_sim_test_api() : aersim_setup.c
  • AER_SIM_TRACE_SIZE_MAX_RX : aersimcfg.h
  • AER_SIM_TRACE_SIZE_MAX_TX : aersimcfg.h
  • aer_tail_model : aersim.c
  • aersim_cacheEnable() : aersim.h , aersim_setup.c
  • aersim_cacheFlush() : aersim.h , aersim_setup.c
  • aersim_chkbit : aersimcfg.h
  • aersim_clrbit : aersimcfg.h
  • aersim_fio : aersim.c
  • AERSIM_FIO_BUF_SIZE : aersimcfg.h
  • AERSIM_FIO_SIZEOF_WORD : aersimcfg.h
  • aersim_initCycleProfiling() : aersim_setup.c , aersim.h
  • aersim_profile_get_cycle_after_aer_receive() : aersim_setup.c , aersim.h
  • aersim_profile_get_cycle_after_aer_send() : aersim.h , aersim_setup.c
  • aersim_profile_get_cycle_before_aer() : aersim.h , aersim_setup.c
  • aersim_setbit : aersimcfg.h
  • aersimFileIO_t : aersim_fileIO.h
  • aerSimFread() : aersim_fileIO.h , aersim_fileIO.c
  • aerSimFwrite() : aersim_fileIO.h , aersim_fileIO.c
  • agc_buff0_hf : aerbuffs.h , aersimbufs.c
  • agc_buff0_hs : aersimbufs.c , aerbuffs.h
  • aic10mic_gain : aic.c
  • aic10spk_gain : aic.c
  • aic20mic_gain : aic.c
  • aic20spk_gain : aic.c
  • aic22mic_gain : aic.c
  • aic22spk_gain : aic.c
  • AIC_ADC_GAIN_11PT5dB : aicloc.h
  • AIC_ADC_GAIN_25dB : aicloc.h
  • AIC_ADC_GAIN_M35dB : aicloc.h
  • AIC_ADC_GAIN_M42PT5dB : aicloc.h
  • AIC_ADC_M32dB : aicloc.h
  • AIC_AIC10 : aicloc.h
  • AIC_AIC20 : aicloc.h
  • AIC_AIC22 : aicloc.h
  • AIC_AIC22C : aicloc.h
  • AIC_DAC_GAIN_1P5dB : aicloc.h
  • AIC_DAC_GAIN_M54dB : aicloc.h
  • AIC_GAINTBL_IDX_M33dB : aicloc.h
  • AIC_TITAN : aicloc.h
  • aicMicGain() : aicloc.h , aic.c
  • aicSpkGain() : aic.c , aicloc.h
  • api_test : siudrc.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- b -

  • bf_coeffs_0 : aersim_setup.c
  • bf_coeffs_45 : aersim_setup.c
  • bf_coeffs_90 : aersim_setup.c
  • bf_EXT_HEAP_SIZE : siubf.c
  • bf_filt_coef : aersim.c
  • bf_filt_len : aersim.c
  • bf_INT_HEAP_SIZE : siubf.c
  • bf_mem_align() : siubf.c , siubf.h
  • bf_mem_alloc_align() : siubf.c , siubf.h
  • bf_MEM_EXT_HEAP : siubf.h
  • bf_mem_heap_alloc() : siubf.c
  • bf_mem_heap_init() : siubf.c
  • bf_mem_init_heap() : siubf.c , siubf.h
  • bf_MEM_INT_HEAP : siubf.h
  • bfExtHeap : siubf.c
  • bfExtMem : siubf.c
  • bfIntHeap : siubf.c
  • bfIntMem : siubf.c
  • bfMem_e : siubf.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- c -

  • close_test : siudrc.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- d -

  • DB2LIN_MAX_22dB : aicloc.h
  • DB2LIN_MIN_M60dB : aicloc.h
  • db2linear() : aic.c
  • dbg_out : siudrc.c
  • drc_api_err : siudrc.c
  • drc_api_err2 : siudrc.c
  • drc_buff0 : aersimbufs.c , aerbuffs.h
  • drc_buff1 : aerbuffs.h
  • drc_buff2 : aersimbufs.c , aerbuffs.h
  • drc_buff3 : aersimbufs.c , aerbuffs.h
  • drc_buff4 : aerbuffs.h , aersimbufs.c
  • drc_buffer : siudrc.c
  • drc_buffer2 : siudrc.c
  • drc_debug_buffer : siudrc.c
  • drc_highband_coef_16k : siudrc.c , siudrc.h
  • drc_highband_coef_8k : siudrc.c , siudrc.h
  • drc_in : siudrc.c
  • drc_lowband_coef_16k : siudrc.h , siudrc.c
  • drc_lowband_coef_8k : siudrc.c , siudrc.h
  • drc_midband_coef_16k : siudrc.c , siudrc.h
  • drc_midband_coef_8k : siudrc.h , siudrc.c
  • drc_out : siudrc.c
  • drc_ref : siudrc.c
  • drc_samp_rate : siudrc.c
  • drc_test : siudrc.c
  • drc_test_cfg : siudrc.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- f -

  • file_name : siudrc.c
  • frm_cnt : aersim.c
  • full_multi_band_test : siudrc.c
  • full_multi_band_test_result : siudrc.c
  • fullband_test_w_input1 : siudrc.c
  • fullband_test_w_input2 : siudrc.c
  • func_blocks_test : siudrc.c
  • func_blocks_test_result : siudrc.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- i -

  • in_file_16k : siudrc.c
  • in_file_8k : siudrc.c
  • in_file_name_16k : siudrc.c
  • in_file_name_8k : siudrc.c
  • input_name_16k : siudrc.c
  • input_name_8k : siudrc.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- p -

  • pdb2linTable : aic.c
  • piu_inst : aersim.c
  • piu_segment_in : aersim_setup.c
  • piu_segment_out : aersim_setup.c
  • piuInit() : piu.c , piuloc.h
  • piuInst_t : piuloc.h
  • piuReceiveIn() : piu.c , piuloc.h
  • piuSendIn() : piuloc.h , piu.c
  • POWER_TRACK_RX_PATH : aersim.h
  • POWER_TRACK_TX_OUT : aersim.h
  • POWER_TRACK_TX_PATH : aersim.h
  • PTABLE_LENGTH : aersim.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- r -

  • ref_file_16k : siudrc.c
  • ref_file_8k : siudrc.c
  • ref_file_name_16k : siudrc.c
  • ref_file_name_8k : siudrc.c
  • rx_segment_out : aersim_setup.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- s -

  • sampleEqBqParamsRx : aersim_setup.c
  • sampleEqBqParamsTx : aersim_setup.c
  • segment_in : aersim_setup.c
  • setup_test : siudrc.c
  • sgnRxInst : aersim.c
  • sgnTxInst : aersim.c
  • sim_data_dac : aersim.c
  • sim_data_mic : aersim.c
  • sim_data_ne_speech : aersim.c
  • sim_data_rx_in : aersim.c
  • sim_data_rx_out : aersim.c
  • sim_data_rx_sync : aersim.c
  • sim_data_tx_in : aersim.c
  • sim_data_tx_out : aersim.c
  • siu_aer_data_file : siu.c
  • SIU_AER_MAX_FRAME_LENGTH : aersimcfg.h
  • SIU_aer_SAMP_RATE_CORE : siuport.h
  • SIU_AER_TRACE_SIZE_MAX : aersimcfg.h
  • siu_AGC_EVENT_MIC_GAIN_CHANGE : siuagc.h
  • siu_alloc_aer_buffs() : siuaer.c
  • siu_alloc_bf_buffs() : siubf.c
  • SIU_BF_FLT_LEN : siubf.h
  • SIU_BF_MAX_NUM_MICS : siubf.h
  • siu_close_aer() : siuaer.c , siuaer.h
  • siu_close_agc() : siuloc.h , siuagc.c
  • siu_close_bf() : siubf.c , siubf.h
  • siu_close_drc() : siudrc.c , siudrc.h
  • siu_config_bf() : siubf.c , siubf.h
  • siu_control_drc() : siudrc.c , siudrc.h
  • siu_dbg_id : siu.c
  • siu_dbg_message : siu.c
  • siu_dbg_out : siuloc.h
  • SIU_DBGMSG_SIZE : siuport.h
  • siu_delete_bf() : siubf.c , siubf.h
  • siu_delete_drc() : siudrc.c
  • siu_drc_process() : siuloc.h , siudrc.c
  • SIU_ERROR : siu.h
  • siu_exc_assert : siuloc.h
  • SIU_GAINR_INIT : siuport.h
  • SIU_GAINS_INIT : siuport.h
  • siu_inst : siuagc.c , aersim.c
  • SIU_MAX_AEP_LENGTH : aersimcfg.h
  • SIU_MAX_AER_FILTER_DURATION : siuport.h
  • SIU_MAX_AER_FILTER_LENGTH : siuport.h
  • SIU_MAX_CHANNELS : siuport.h
  • SIU_MAX_FRAME_DURATION : siuport.h
  • SIU_MAX_FRAME_LENGTH : siuport.h
  • SIU_MAX_GETFLT_CNT : aersim.h
  • SIU_MAX_SYS_DELAY : aersimcfg.h
  • SIU_MAX_Y2X_DELAY : aersimcfg.h
  • SIU_MID_AER : siuport.h
  • SIU_MID_AGC : siuport.h
  • SIU_MID_BF : siuport.h
  • SIU_MID_DRC : siuport.h
  • SIU_MID_MSS : siuport.h
  • SIU_MID_PIU : siuport.h
  • SIU_MID_SIU : siuport.h
  • SIU_MID_VCA : siuport.h
  • SIU_MID_VCU : siuport.h
  • siu_mmic_control() : siuloc.h , siummic.c
  • siu_mmic_init() : siuloc.h , siummic.c
  • siu_mmic_proc_load_control() : siuloc.h , siummic.c
  • siu_mss_buff : siutx.c
  • siu_new_aer() : siuaer.c , siuaer.h
  • siu_new_agc() : siuloc.h , siuagc.c
  • siu_new_bf() : siubf.c , siubf.h
  • siu_new_drc() : siudrc.c , siudrc.h
  • siu_new_mms() : siuloc.h
  • siu_new_mss() : siumss.c , aersim_setup.c
  • siu_new_piu() : siuloc.h
  • SIU_NOERR : siu.h
  • SIU_NUM_AER_BUFFS : siuaer.c
  • SIU_NUM_AGC_BUFFS : siuagc.c
  • SIU_NUM_bf_BUFFS : siubf.c
  • SIU_NUM_DRC_BUFFS : siudrc.c
  • SIU_NUM_MSS_BUFFS : siumss.c
  • siu_open_aer() : siuaer.c , siuaer.h
  • siu_open_agc() : siuloc.h , siuagc.c
  • siu_open_bf() : siubf.c , siubf.h
  • siu_open_drc() : siudrc.c , siudrc.h
  • siu_open_mss() : siumss.c , aersim_setup.c
  • siu_open_piu() : siuloc.h
  • siu_open_rx() : siuloc.h
  • siu_open_tx() : siuloc.h
  • siu_print_buff_usage() : siubf.c , siuloc.h , siuaer.c
  • siu_put_aer_high_load() : siuloc.h , siummic.c
  • siu_put_aer_low_load() : siuloc.h , siummic.c
  • siu_rx_del_buf : aersimbufs.c , aerbuffs.h
  • SIU_RX_DELAY_LINE_LENGTH : aersimcfg.h
  • siu_rxout_temp : siurx.c
  • siu_SET_MIC_GAIN : siuagc.h
  • siu_SET_SPK_GAIN : siuagc.h
  • siuAerSysPars_t : siuaer.h
  • siuAgcAerEvent() : siuagc.h , siuagc.c
  • siuAgcEvent() : siuagc.h , siuagc.c
  • siuContext : siuloc.h , siu.c
  • siuDbgAer() : siu.c , siuloc.h
  • siuDbgAgc() : siu.c , siuloc.h
  • siuDbgDrc() : siu.c , siuloc.h
  • siuDebug() : siuloc.h , siu.c
  • siuDebugInternal() : siu.c
  • siuException() : siuloc.h , siu.c
  • siuExtrChID : siuloc.h
  • siuExtrMicID : siuloc.h
  • siuExtrModID : siuloc.h
  • siuGainControl() : siuagc.c , siuagc.h
  • siuGainControl_t : siuagc.h
  • siuInit() : siu.c , siu.h
  • siuInst : siuloc.h
  • siuMakeID : siuloc.h
  • siuReceiveIn() : siuloc.h , siurx.c
  • siuRxOpen() : siuloc.h , siu.c
  • siuSendIn() : siutx.c , siuloc.h
  • siuSetup : siurx.c , aersim.c , siutx.c
  • siuSetup_t : aersim.h
  • siuSysCfg_t : aersim.h
  • siuTxOpen() : siu.c , siuloc.h
  • siuTxSendIn() : siuloc.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • f
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- t -

  • tempIoBuf : aerbuffs.h , aersimbufs.c
  • test_case : siudrc.c
  • titanmic_gain : aic.c
  • titanspk_gain : aic.c


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • d
  • l
  • n
  • p
  • s

- _ -

  • __SIUSTR : siuloc.h
  • _AERTESTPORT_ARM_GCARMV7A : aerbufst.h
  • _AERTESTPORT_C55L : aerbufst.h
  • _AERTESTPORT_C64P : aerbufst.h
  • _AERTESTPORT_C64P_BIG_ENDIAN : aerbufst.h
  • _AERTESTPORT_C64P_BIG_ENDIAN_ELF : aerbufst.h
  • _AERTESTPORT_C64P_ELF : aerbufst.h
  • _AERTESTPORT_C674 : aerbufst.h
  • _AERTESTPORT_C674_ELF : aerbufst.h
  • _SIUSTR : siuloc.h

- a -

  • AECHO_LOOPCNT : aersim.h
  • AER_CORE_MAX_FRAME_LENGTH : aersimcfg.h
  • AER_HES_ID : siuloc.h
  • AER_HF0_ID : siuloc.h
  • AER_HFMAX_ID : siuloc.h
  • AER_LEN_FFT_16K : aersimcfg.h
  • AER_LEN_FFT_8K : aersimcfg.h
  • AER_LEN_FFT_MAX : aersimcfg.h
  • AER_LENGTH_EQFIR : aersimcfg.h
  • AER_MAX_FRAME_LENGTH : aersimcfg.h
  • AER_NUM_EQ_PARS : aersimcfg.h
  • AER_ORDER_EQIIR : aersimcfg.h
  • AER_SIM_AEP_COEF_LEN_16K : aersimcfg.h
  • AER_SIM_AEP_COEF_LEN_8K : aersimcfg.h
  • AER_SIM_AGC_GAINSWING_MAX : aersimcfg.h
  • AER_SIM_AGC_MICGAIN_MAX : aersimcfg.h
  • AER_SIM_AGC_MICGAIN_MIN : aersimcfg.h
  • AER_SIM_AGC_SAT_HANGOVER : aersimcfg.h
  • AER_SIM_AGC_SAT_THRESHOLD : aersimcfg.h
  • AER_SIM_BF_STEER_ANGLE_0 : aersimcfg.h
  • AER_SIM_BF_STEER_ANGLE_45 : aersimcfg.h
  • AER_SIM_BF_STEER_ANGLE_90 : aersimcfg.h
  • AER_SIM_DURATION_CONVERGED : aersim.c
  • AER_SIM_HES_MAX_FILT_LENGTH : aersimcfg.h
  • AER_SIM_HES_MAX_NUM_HVEC : aersimcfg.h
  • AER_SIM_HES_MAX_Y2X_DELAY : aersimcfg.h
  • AER_SIM_HF_MAX_FILT_LENGTH : aersimcfg.h
  • AER_SIM_HF_MAX_NUM_HVEC : aersimcfg.h
  • AER_SIM_HF_MAX_Y2X_DELAY : aersimcfg.h
  • AER_SIM_HF_MICGAIN_0dB : aersimcfg.h
  • AER_SIM_HF_SPKGAIN_0dB : aersimcfg.h
  • AER_SIM_HIGH_LOAD_MIC_INIT : siummic.c
  • AER_SIM_MAX_BF_FILT_LEN : aersimcfg.h
  • AER_SIM_MAX_FRAME_LENGTH : aersimcfg.h
  • AER_SIM_MAX_PIU_DEL_RX : aersimcfg.h
  • AER_SIM_MAX_PIU_DEL_TX : aersimcfg.h
  • AER_SIM_MIC_TYPE_ARRAY : aersimcfg.h
  • AER_SIM_MIC_TYPE_STAND_ALONE : aersimcfg.h
  • AER_SIM_MSS_INST_SIZE : siumss.c
  • AER_SIM_NUM_BF_MIC : aersimcfg.h
  • AER_SIM_NUM_HF_MIC : aersimcfg.h
  • AER_SIM_NUM_MIC : aersimcfg.h
  • AER_SIM_PEAK_MIPS_ERLE_THRESH : aersim.c
  • AER_SIM_PIU_DEL_BUF_LEN_RX : aersimcfg.h
  • AER_SIM_PIU_DEL_BUF_LEN_TX : aersimcfg.h
  • AER_SIM_PIU_DEL_RX : aersimcfg.h
  • AER_SIM_PIU_DEL_TX : aersimcfg.h
  • AER_SIM_ROOT_FOLDER : aersim_fileIO.h
  • AER_SIM_SIU_DEF_HF_MIC : siummic.c
  • AER_SIM_SIU_Y2X_DEL_ADJ : aersimcfg.h
  • AER_SIM_SRATE_16000_DIV_8K : aersimcfg.h
  • AER_SIM_SRATE_8000_DIV_8K : aersimcfg.h
  • AER_SIM_SVD_INST_SIZE : siumss.c
  • AER_SIM_TRACE_SIZE_MAX_RX : aersimcfg.h
  • AER_SIM_TRACE_SIZE_MAX_TX : aersimcfg.h
  • aersim_chkbit : aersimcfg.h
  • aersim_clrbit : aersimcfg.h
  • AERSIM_FIO_BUF_SIZE : aersimcfg.h
  • AERSIM_FIO_SIZEOF_WORD : aersimcfg.h
  • aersim_setbit : aersimcfg.h
  • AIC_ADC_GAIN_11PT5dB : aicloc.h
  • AIC_ADC_GAIN_25dB : aicloc.h
  • AIC_ADC_GAIN_M35dB : aicloc.h
  • AIC_ADC_GAIN_M42PT5dB : aicloc.h
  • AIC_ADC_M32dB : aicloc.h
  • AIC_DAC_GAIN_1P5dB : aicloc.h
  • AIC_DAC_GAIN_M54dB : aicloc.h
  • AIC_GAINTBL_IDX_M33dB : aicloc.h

- b -

  • bf_EXT_HEAP_SIZE : siubf.c
  • bf_INT_HEAP_SIZE : siubf.c

- d -

  • DB2LIN_MAX_22dB : aicloc.h
  • DB2LIN_MIN_M60dB : aicloc.h

- l -

  • loop : siu.c , aersim.h
  • LRIN_LOOPCNT : aersim.h
  • LRIN_START : aersim.h
  • LRIN_STEP : aersim.h

- n -

  • NUM_AER_DBG_FILE : siu.c
  • NUM_H_VEC_GET : aersim.c
  • NUM_H_VEC_PUT : aersim.c

- p -

  • POWER_TRACK_RX_PATH : aersim.h
  • POWER_TRACK_TX_OUT : aersim.h
  • POWER_TRACK_TX_PATH : aersim.h
  • PTABLE_LENGTH : aersim.h

- s -

  • SIU_AER_MAX_FRAME_LENGTH : aersimcfg.h
  • SIU_aer_SAMP_RATE_CORE : siuport.h
  • SIU_AER_TRACE_SIZE_MAX : aersimcfg.h
  • SIU_BF_FLT_LEN : siubf.h
  • SIU_BF_MAX_NUM_MICS : siubf.h
  • siu_dbg_out : siuloc.h
  • SIU_DBGMSG_SIZE : siuport.h
  • siu_exc_assert : siuloc.h
  • SIU_GAINR_INIT : siuport.h
  • SIU_GAINS_INIT : siuport.h
  • SIU_MAX_AEP_LENGTH : aersimcfg.h
  • SIU_MAX_AER_FILTER_DURATION : siuport.h
  • SIU_MAX_AER_FILTER_LENGTH : siuport.h
  • SIU_MAX_CHANNELS : siuport.h
  • SIU_MAX_FRAME_DURATION : siuport.h
  • SIU_MAX_FRAME_LENGTH : siuport.h
  • SIU_MAX_GETFLT_CNT : aersim.h
  • SIU_MAX_SYS_DELAY : aersimcfg.h
  • SIU_MAX_Y2X_DELAY : aersimcfg.h
  • SIU_MID_AER : siuport.h
  • SIU_MID_AGC : siuport.h
  • SIU_MID_BF : siuport.h
  • SIU_MID_DRC : siuport.h
  • SIU_MID_MSS : siuport.h
  • SIU_MID_PIU : siuport.h
  • SIU_MID_SIU : siuport.h
  • SIU_MID_VCA : siuport.h
  • SIU_MID_VCU : siuport.h
  • SIU_NUM_AER_BUFFS : siuaer.c
  • SIU_NUM_AGC_BUFFS : siuagc.c
  • SIU_NUM_bf_BUFFS : siubf.c
  • SIU_NUM_DRC_BUFFS : siudrc.c
  • SIU_NUM_MSS_BUFFS : siumss.c
  • SIU_RX_DELAY_LINE_LENGTH : aersimcfg.h
  • siuExtrChID : siuloc.h
  • siuExtrMicID : siuloc.h
  • siuExtrModID : siuloc.h
  • siuMakeID : siuloc.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • bfMem_e : siubf.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • AIC_AIC10 : aicloc.h
  • AIC_AIC20 : aicloc.h
  • AIC_AIC22 : aicloc.h
  • AIC_AIC22C : aicloc.h
  • AIC_TITAN : aicloc.h
  • api_test : siudrc.c
  • bf_MEM_EXT_HEAP : siubf.h
  • bf_MEM_INT_HEAP : siubf.h
  • close_test : siudrc.c
  • full_multi_band_test : siudrc.c
  • fullband_test_w_input1 : siudrc.c
  • fullband_test_w_input2 : siudrc.c
  • func_blocks_test : siudrc.c
  • multiband_test_w_input1 : siudrc.c
  • multiband_test_w_input2 : siudrc.c
  • setup_test : siudrc.c
  • siu_AGC_EVENT_MIC_GAIN_CHANGE : siuagc.h
  • SIU_ERROR : siu.h
  • SIU_NOERR : siu.h
  • siu_SET_MIC_GAIN : siuagc.h
  • siu_SET_SPK_GAIN : siuagc.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • d
  • m
  • p
  • s

- a -

  • aer_debug_stat() : aersim_fileIO.c , aersim_fileIO.h
  • aer_sim_apply_config() : aersim_setup.c , aersim.h
  • aer_sim_cfg_on_the_fly() : aersim.c
  • aer_sim_close_files() : aersim_fileIO.c , aersim_fileIO.h
  • aer_sim_config_aer_params() : aersim_setup.c , aersim.h
  • aer_sim_fio_read_fe() : aersim.c
  • aer_sim_fio_read_ne() : aersim.c
  • aer_sim_fio_write_data() : aersim.c
  • aer_sim_get_erle() : aersim.c
  • aer_sim_init() : aersim_setup.c , aersim.h
  • aer_sim_init_piu() : aersim_setup.c , aersim.h
  • aer_sim_init_siu() : aersim_setup.c , aersim.h
  • aer_sim_instantiate_aer() : aersim_setup.c , aersim.h
  • aer_sim_open_aep() : aersim.h , aersim_setup.c
  • aer_sim_open_files() : aersim_fileIO.c , aersim_fileIO.h
  • aer_sim_open_txrx_sgns() : aersim_setup.c , aersim.h
  • aer_sim_print_version_mips() : aersim.c
  • aer_sim_read_cfg() : aersim.h , aersim_setup.c
  • aer_sim_setup_aep() : aersim_setup.c
  • aer_sim_setup_sgn() : aersim_setup.c
  • aer_sim_test_api() : aersim_setup.c
  • aersim_cacheEnable() : aersim.h , aersim_setup.c
  • aersim_cacheFlush() : aersim_setup.c , aersim.h
  • aersim_initCycleProfiling() : aersim_setup.c , aersim.h
  • aersim_profile_get_cycle_after_aer_receive() : aersim.h , aersim_setup.c
  • aersim_profile_get_cycle_after_aer_send() : aersim_setup.c , aersim.h
  • aersim_profile_get_cycle_before_aer() : aersim_setup.c , aersim.h
  • aerSimFread() : aersim_fileIO.c , aersim_fileIO.h
  • aerSimFwrite() : aersim_fileIO.c , aersim_fileIO.h
  • aicMicGain() : aic.c , aicloc.h
  • aicSpkGain() : aic.c , aicloc.h

- b -

  • bf_mem_align() : siubf.c , siubf.h
  • bf_mem_alloc_align() : siubf.c , siubf.h
  • bf_mem_heap_alloc() : siubf.c
  • bf_mem_heap_init() : siubf.c
  • bf_mem_init_heap() : siubf.h , siubf.c

- d -

  • db2linear() : aic.c

- m -

  • main() : aersim.c

- p -

  • piuInit() : piu.c , piuloc.h
  • piuReceiveIn() : piuloc.h , piu.c
  • piuSendIn() : piu.c , piuloc.h

- s -

  • siu_alloc_aer_buffs() : siuaer.c
  • siu_alloc_bf_buffs() : siubf.c
  • siu_close_aer() : siuaer.h , siuaer.c
  • siu_close_agc() : siuloc.h , siuagc.c
  • siu_close_bf() : siubf.c , siubf.h
  • siu_close_drc() : siudrc.c , siudrc.h
  • siu_config_bf() : siubf.c , siubf.h
  • siu_control_drc() : siudrc.c , siudrc.h
  • siu_delete_bf() : siubf.c , siubf.h
  • siu_delete_drc() : siudrc.c
  • siu_drc_process() : siudrc.c , siuloc.h
  • siu_mmic_control() : siuloc.h , siummic.c
  • siu_mmic_init() : siuloc.h , siummic.c
  • siu_mmic_proc_load_control() : siuloc.h , siummic.c
  • siu_new_aer() : siuaer.h , siuaer.c
  • siu_new_agc() : siuloc.h , siuagc.c
  • siu_new_bf() : siubf.h , siubf.c
  • siu_new_drc() : siudrc.c , siudrc.h
  • siu_new_mms() : siuloc.h
  • siu_new_mss() : siumss.c , aersim_setup.c
  • siu_new_piu() : siuloc.h
  • siu_open_aer() : siuaer.h , siuaer.c
  • siu_open_agc() : siuloc.h , siuagc.c
  • siu_open_bf() : siubf.h , siubf.c
  • siu_open_drc() : siudrc.c , siudrc.h
  • siu_open_mss() : siumss.c , aersim_setup.c
  • siu_open_piu() : siuloc.h
  • siu_open_rx() : siuloc.h
  • siu_open_tx() : siuloc.h
  • siu_print_buff_usage() : siubf.c , siuloc.h , siuaer.c
  • siu_put_aer_high_load() : siuloc.h , siummic.c
  • siu_put_aer_low_load() : siuloc.h , siummic.c
  • siuAgcAerEvent() : siuagc.c , siuagc.h
  • siuAgcEvent() : siuagc.c , siuagc.h
  • siuDbgAer() : siu.c , siuloc.h
  • siuDbgAgc() : siu.c , siuloc.h
  • siuDbgDrc() : siuloc.h , siu.c
  • siuDebug() : siu.c , siuloc.h
  • siuDebugInternal() : siu.c
  • siuException() : siuloc.h , siu.c
  • siuGainControl() : siuagc.c , siuagc.h
  • siuInit() : siu.h , siu.c
  • siuReceiveIn() : siuloc.h , siurx.c
  • siuRxOpen() : siu.c , siuloc.h
  • siuSendIn() : siutx.c , siuloc.h
  • siuTxOpen() : siu.c , siuloc.h
  • siuTxSendIn() : siuloc.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • aersimFileIO_t : aersim_fileIO.h
  • piuInst_t : piuloc.h
  • siuAerSysPars_t : siuaer.h
  • siuGainControl_t : siuagc.h
  • siuSetup_t : aersim.h
  • siuSysCfg_t : aersim.h


AER Simulation: Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • d
  • f
  • i
  • m
  • n
  • o
  • p
  • r
  • s
  • t

- a -

  • aepSimInst : siuagc.c , aersim.c
  • aer_buff0_hf : aerbuffs.h , aersimbufs.c
  • aer_buff0_hs : aersimbufs.c , aerbuffs.h
  • aer_buff1 : aerbuffs.h , aersimbufs.c
  • aer_buff10 : aersimbufs.c , aerbuffs.h
  • aer_buff11 : aerbuffs.h , aersimbufs.c
  • aer_buff12 : aerbuffs.h , aersimbufs.c
  • aer_buff13 : aerbuffs.h , aersimbufs.c
  • aer_buff14 : aerbuffs.h , aersimbufs.c
  • aer_buff15 : aerbuffs.h , aersimbufs.c
  • aer_buff16 : aerbuffs.h , aersimbufs.c
  • aer_buff17 : aersimbufs.c , aerbuffs.h
  • aer_buff18 : aerbuffs.h , aersimbufs.c
  • aer_buff19 : aerbuffs.h , aersimbufs.c
  • aer_buff20 : aerbuffs.h , aersimbufs.c
  • aer_buff2_hf : aersimbufs.c , aerbuffs.h
  • aer_buff2_hs : aersimbufs.c , aerbuffs.h
  • aer_buff3 : aersimbufs.c , aerbuffs.h
  • aer_buff4_hf : aerbuffs.h , aersimbufs.c
  • aer_buff4_hs : aerbuffs.h , aersimbufs.c
  • aer_buff5 : aerbuffs.h , aersimbufs.c
  • aer_buff6 : aerbuffs.h , aersimbufs.c
  • aer_buff7 : aersimbufs.c , aerbuffs.h
  • aer_buff8 : aersimbufs.c , aerbuffs.h
  • aer_buff9 : aersimbufs.c , aerbuffs.h
  • aer_coef_exp : aersim.c
  • aer_coef_mant : aersim.c
  • aer_in_buffer : aerbuffs.h , aersimbufs.c
  • aer_out_buffer : aerbuffs.h , aersimbufs.c
  • aer_tail_model : aersim.c
  • aersim_fio : aersim.c
  • agc_buff0_hf : aersimbufs.c , aerbuffs.h
  • agc_buff0_hs : aerbuffs.h , aersimbufs.c
  • aic10mic_gain : aic.c
  • aic10spk_gain : aic.c
  • aic20mic_gain : aic.c
  • aic20spk_gain : aic.c
  • aic22mic_gain : aic.c
  • aic22spk_gain : aic.c

- b -

  • bf_coeffs_0 : aersim_setup.c
  • bf_coeffs_45 : aersim_setup.c
  • bf_coeffs_90 : aersim_setup.c
  • bf_filt_coef : aersim.c
  • bf_filt_len : aersim.c
  • bfExtHeap : siubf.c
  • bfExtMem : siubf.c
  • bfIntHeap : siubf.c
  • bfIntMem : siubf.c

- d -

  • dbg_out : siudrc.c
  • drc_api_err : siudrc.c
  • drc_api_err2 : siudrc.c
  • drc_buff0 : aerbuffs.h , aersimbufs.c
  • drc_buff1 : aerbuffs.h
  • drc_buff2 : aerbuffs.h , aersimbufs.c
  • drc_buff3 : aersimbufs.c , aerbuffs.h
  • drc_buff4 : aersimbufs.c , aerbuffs.h
  • drc_buffer : siudrc.c
  • drc_buffer2 : siudrc.c
  • drc_debug_buffer : siudrc.c
  • drc_highband_coef_16k : siudrc.c , siudrc.h
  • drc_highband_coef_8k : siudrc.h , siudrc.c
  • drc_in : siudrc.c
  • drc_lowband_coef_16k : siudrc.h , siudrc.c
  • drc_lowband_coef_8k : siudrc.c , siudrc.h
  • drc_midband_coef_16k : siudrc.h , siudrc.c
  • drc_midband_coef_8k : siudrc.c , siudrc.h
  • drc_out : siudrc.c
  • drc_ref : siudrc.c
  • drc_samp_rate : siudrc.c
  • drc_test : siudrc.c
  • drc_test_cfg : siudrc.c

- f -

  • file_name : siudrc.c
  • frm_cnt : aersim.c
  • full_multi_band_test_result : siudrc.c
  • func_blocks_test_result : siudrc.c

- i -

  • in_file_16k : siudrc.c
  • in_file_8k : siudrc.c
  • in_file_name_16k : siudrc.c
  • in_file_name_8k : siudrc.c
  • input_name_16k : siudrc.c
  • input_name_8k : siudrc.c

- m -

  • mdb2linTable : aic.c
  • mss_buf : siumss.c

- n -

  • num_frames_converged : aersim.c

- o -

  • openfile : siudrc.c
  • out_file_16k : siudrc.c
  • out_file_8k : siudrc.c
  • out_file_name_16k : siudrc.c
  • out_file_name_8k : siudrc.c

- p -

  • pdb2linTable : aic.c
  • piu_inst : aersim.c
  • piu_segment_in : aersim_setup.c
  • piu_segment_out : aersim_setup.c

- r -

  • ref_file_16k : siudrc.c
  • ref_file_8k : siudrc.c
  • ref_file_name_16k : siudrc.c
  • ref_file_name_8k : siudrc.c
  • rx_segment_out : aersim_setup.c

- s -

  • sampleEqBqParamsRx : aersim_setup.c
  • sampleEqBqParamsTx : aersim_setup.c
  • segment_in : aersim_setup.c
  • sgnRxInst : aersim.c
  • sgnTxInst : aersim.c
  • sim_data_dac : aersim.c
  • sim_data_mic : aersim.c
  • sim_data_ne_speech : aersim.c
  • sim_data_rx_in : aersim.c
  • sim_data_rx_out : aersim.c
  • sim_data_rx_sync : aersim.c
  • sim_data_tx_in : aersim.c
  • sim_data_tx_out : aersim.c
  • siu_aer_data_file : siu.c
  • siu_dbg_id : siu.c
  • siu_dbg_message : siu.c
  • siu_inst : siuagc.c , aersim.c
  • siu_mss_buff : siutx.c
  • siu_rx_del_buf : aerbuffs.h , aersimbufs.c
  • siu_rxout_temp : siurx.c
  • siuContext : siu.c , siuloc.h
  • siuInst : siuloc.h
  • siuSetup : aersim.c , siutx.c , siurx.c

- t -

  • tempIoBuf : aerbuffs.h , aersimbufs.c
  • test_case : siudrc.c
  • titanmic_gain : aic.c
  • titanspk_gain : aic.c


AER Simulation: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


AER Simulation: AER (Acoustic Echo Removal) Simulation Package

AER (Acoustic Echo Removal) Simulation Package

Release 17.0.0.x

Description

Acoustic Echo Removal (AER) simulation is designed to verify the functionality of the AER component (including AER, AGC, DRC, MSS and BF modules). It also provides examples of using AER/AGC/DRC/MSS/BF's external API. Below is a block diagram of the simulation implementation:

AER Simulation Features

  • Users may select built in signal generators or file I/O for simulation stimulus signals.
  • MCPS can be measured using profiling utilities.
  • AER/AGC/DRC/MSS/BF parameters may be changed on-the-fly during simulation.

AER Simulation Modules

  • AER/AGC/DRC/MSS/BF functionality simulator.
  • AIC simulator.
  • SIU and PIU simulators.
  • Signal generators.

AER Component Profiling

Refer to AER Integration Guide for MIPS and memory usage.

Release Notes

Refer to AER component release notes.


AER Simulation: Page Index

AER Simulation Related Pages

Here is a list of all related documentation pages:
  • MCPS Usage of AER Component
  • Memory Usage of AER Component


AER Simulation: piu.c File Reference

  • File List
  • Globals

piu.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>
#include <ti/mas/aer/test/piusim/piuloc.h>

Include dependency graph for piu.c:

Go to the source code of this file.

Functions

void | piuInit (piuInst_t *inst, tint frm_size)
void | piuReceiveIn (piuInst_t *inst, linSample *data_in, linSample *data_dac, linSample *data_rx_sync)
void | piuSendIn (piuInst_t *inst, linSample data_adc[][AER_SIM_MAX_FRAME_LENGTH], linSample data_out[][AER_SIM_MAX_FRAME_LENGTH], tint num_mic)

Function Documentation

void piuInit | ( | piuInst_t * | inst,
 |  | tint | frm_size
 | ) |  |

Definition at line 25 of file piu.c.

References AER_SIM_NUM_MIC, AER_SIM_PIU_DEL_BUF_LEN_RX, AER_SIM_PIU_DEL_BUF_LEN_TX, AER_SIM_PIU_DEL_RX, AER_SIM_PIU_DEL_TX, AER_SIM_SIU_Y2X_DEL_ADJ, piuInst_s::del_buf_rx, piuInst_s::del_buf_rxin_ind, piuInst_s::del_buf_rxout_ind, piuInst_s::del_buf_rxsync_ind, piuInst_s::del_buf_tx, piuInst_s::del_buf_txin_ind, piuInst_s::del_buf_txout_ind, and piuInst_s::frame_size.

Referenced by aer_sim_init_piu().

Here is the caller graph for this function:

void piuReceiveIn | ( | piuInst_t * | inst,
 |  | linSample * | data_in,
 |  | linSample * | data_dac,
 |  | linSample * | data_rx_sync
 | ) |  |

Definition at line 44 of file piu.c.

References AER_SIM_PIU_DEL_BUF_LEN_RX, piuInst_s::del_buf_rx, piuInst_s::del_buf_rxin_ind, piuInst_s::del_buf_rxout_ind, piuInst_s::del_buf_rxsync_ind, and piuInst_s::frame_size.

Referenced by main().

Here is the caller graph for this function:

void piuSendIn | ( | piuInst_t * | inst,
 |  | linSample | data_adc[][AER_SIM_MAX_FRAME_LENGTH],
 |  | linSample | data_out[][AER_SIM_MAX_FRAME_LENGTH],
 |  | tint | num_mic
 | ) |  |

Definition at line 71 of file piu.c.

References AER_SIM_PIU_DEL_BUF_LEN_TX, piuInst_s::del_buf_tx, piuInst_s::del_buf_txin_ind, piuInst_s::del_buf_txout_ind, and piuInst_s::frame_size.

Referenced by main().

Here is the caller graph for this function:


AER Simulation: piu.c Source File

  • File List
  • Globals

piu.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * PURPOSE : Main source file for the PCM Interface Unit (PIU).
00003  ******************************************************************************
00004  * FILE NAME:   piu.c
00005  *
00006  * DESCRIPTION: Contains main PIU functions.
00007  *
00008  *
00009  * (C) Copyright 2008 Texas Instruments, Inc.
00010  *****************************************************************************/
00011
00012 /* Ansi C header files */
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015 #include <string.h>
00016
00017 /* System Level header files and Utilities' API's */
00018 #include <ti/mas/types/types.h>                       /* DSP types            */
00019 #include <ti/mas/fract/fract.h>                       /* fractional macros    */
00020 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00021
00022 /* PIU related header files */
00023 #include <ti/mas/aer/test/piusim/piuloc.h>
00024
00025 void piuInit(piuInst_t *inst, tint frm_size)
00026 {
00027   memset(&inst->del_buf_rx[0], 0, sizeof(linSample)*AER_SIM_PIU_DEL_BUF_LEN_RX);
00028   memset(&inst->del_buf_tx[0][0], 0,
00029          sizeof(linSample)*AER_SIM_NUM_MIC*AER_SIM_PIU_DEL_BUF_LEN_TX);
00030
00031   inst->del_buf_rxin_ind = AER_SIM_PIU_DEL_RX;
00032   inst->del_buf_txin_ind = AER_SIM_PIU_DEL_TX;
00033   inst->del_buf_rxout_ind = 0;
00034   inst->del_buf_txout_ind = 0;
00035
00036   inst->del_buf_rxsync_ind = inst->del_buf_rxin_ind - AER_SIM_SIU_Y2X_DEL_ADJ;
00037   if(inst->del_buf_rxsync_ind < 0) {
00038     inst->del_buf_rxsync_ind += AER_SIM_PIU_DEL_BUF_LEN_RX;
00039   }
00040
00041   inst->frame_size = frm_size;
00042 }
00043
00044 void piuReceiveIn(piuInst_t *inst, linSample *data_in, linSample *data_dac,
00045                   linSample *data_rx_sync)
00046 {
00047   int i;
00048
00049   /* Copy input samples into PIU delay buffer.
00050      Copy samples from delay buffer to output buffer to go to DAC.
00051      Copy samples from delay buffer to Rx sync buffer for AER Tx processing. */
00052   for (i=0; i<inst->frame_size; i++) {
00053     /* copy samples */
00054     inst->del_buf_rx[inst->del_buf_rxin_ind++] = data_in[i];
00055     data_dac[i] = inst->del_buf_rx[inst->del_buf_rxout_ind++];
00056     data_rx_sync[i] = inst->del_buf_rx[inst->del_buf_rxsync_ind++];
00057
00058     /* adjust circular buffer pointers */
00059     if(inst->del_buf_rxin_ind == AER_SIM_PIU_DEL_BUF_LEN_RX) {
00060       inst->del_buf_rxin_ind = 0;
00061     }
00062     if(inst->del_buf_rxout_ind == AER_SIM_PIU_DEL_BUF_LEN_RX) {
00063       inst->del_buf_rxout_ind = 0;
00064     }
00065     if(inst->del_buf_rxsync_ind == AER_SIM_PIU_DEL_BUF_LEN_RX) {
00066       inst->del_buf_rxsync_ind = 0;
00067     }
00068   } /* for (i=0; i<inst->frame_size; i++) */
00069 } /* piuReceiveIn */
00070
00071 void piuSendIn(piuInst_t *inst, linSample data_adc[][AER_SIM_MAX_FRAME_LENGTH],
00072                                 linSample data_out[][AER_SIM_MAX_FRAME_LENGTH],
00073                                 tint num_mic)
00074 {
00075   int i, j;
00076
00077   /* Copy input samples into PIU delay buffer.
00078      Copy samples from delay buffer to output buffer for AER processing.    */
00079   for (i=0; i<inst->frame_size; i++) {
00080     /* copy samples for all mics */
00081     for (j=0; j<num_mic; j++) {
00082       inst->del_buf_tx[j][inst->del_buf_txin_ind] = data_adc[j][i];
00083       data_out[j][i] = inst->del_buf_tx[j][inst->del_buf_txout_ind];
00084     }
00085
00086     /* adjust circular buffer pointers */
00087     inst->del_buf_txin_ind++;
00088     if(inst->del_buf_txin_ind == AER_SIM_PIU_DEL_BUF_LEN_TX) {
00089       inst->del_buf_txin_ind = 0;
00090     }
00091
00092     inst->del_buf_txout_ind++;
00093     if(inst->del_buf_txout_ind == AER_SIM_PIU_DEL_BUF_LEN_TX) {
00094       inst->del_buf_txout_ind = 0;
00095     }
00096   } /* for (i=0; i<inst->frame_size; i++) */
00097 } /* piuSendIn */
00098
00099 /* nothing past this point */


AER Simulation: piuloc.h File Reference

  • File List
  • Globals

piuloc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>

Include dependency graph for piuloc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | piuInst_s

Typedefs

typedef piuInst_s | piuInst_t

Functions

void | piuInit (piuInst_t *inst, tint frm_size)
void | piuReceiveIn (piuInst_t *inst, linSample *data_in, linSample *data_dac, linSample *data_rx_sync)
void | piuSendIn (piuInst_t *inst, linSample data_adc[][AER_SIM_MAX_FRAME_LENGTH], linSample data_out[][AER_SIM_MAX_FRAME_LENGTH], tint num_mic)

Typedef Documentation

typedef struct piuInst_s piuInst_t

Function Documentation

void piuInit | ( | piuInst_t * | inst,
 |  | tint | frm_size
 | ) |  |

Definition at line 25 of file piu.c.

References AER_SIM_NUM_MIC, AER_SIM_PIU_DEL_BUF_LEN_RX, AER_SIM_PIU_DEL_BUF_LEN_TX, AER_SIM_PIU_DEL_RX, AER_SIM_PIU_DEL_TX, AER_SIM_SIU_Y2X_DEL_ADJ, piuInst_s::del_buf_rx, piuInst_s::del_buf_rxin_ind, piuInst_s::del_buf_rxout_ind, piuInst_s::del_buf_rxsync_ind, piuInst_s::del_buf_tx, piuInst_s::del_buf_txin_ind, piuInst_s::del_buf_txout_ind, and piuInst_s::frame_size.

Referenced by aer_sim_init_piu().

Here is the caller graph for this function:

void piuReceiveIn | ( | piuInst_t * | inst,
 |  | linSample * | data_in,
 |  | linSample * | data_dac,
 |  | linSample * | data_rx_sync
 | ) |  |

Definition at line 44 of file piu.c.

References AER_SIM_PIU_DEL_BUF_LEN_RX, piuInst_s::del_buf_rx, piuInst_s::del_buf_rxin_ind, piuInst_s::del_buf_rxout_ind, piuInst_s::del_buf_rxsync_ind, and piuInst_s::frame_size.

Referenced by main().

Here is the caller graph for this function:

void piuSendIn | ( | piuInst_t * | inst,
 |  | linSample | data_adc[][AER_SIM_MAX_FRAME_LENGTH],
 |  | linSample | data_out[][AER_SIM_MAX_FRAME_LENGTH],
 |  | tint | num_mic
 | ) |  |

Definition at line 71 of file piu.c.

References AER_SIM_PIU_DEL_BUF_LEN_TX, piuInst_s::del_buf_tx, piuInst_s::del_buf_txin_ind, piuInst_s::del_buf_txout_ind, and piuInst_s::frame_size.

Referenced by main().

Here is the caller graph for this function:


AER Simulation: piuloc.h Source File

  • File List
  • Globals

piuloc.h

Go to the documentation of this file.
00001 #ifndef _PIULOC_H
00002 #define _PIULOC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Definitions local to the PCM Interface Unit (PIU)
00005  ******************************************************************************
00006  * FILE NAME:   piuloc.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions that are local to
00009  *              the PIU module.
00010  *
00011  * $Id: piuloc.h 1.19 1998/01/29 15:53:49 BOGDANK Exp $
00012  *
00013  * (C) Copyright 2008, 1997, 1998, Texas Instruments, Inc.
00014  *****************************************************************************/
00015
00016 /* System level header files and utilities' API's */
00017 #include <ti/mas/types/types.h>                      /* DSP types            */
00018 #include <ti/mas/fract/fract.h>                      /* fractional macros    */
00019 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00020
00021
00022 /******************************************************************************
00023  * DATA DEFINITION: PIU instance data structure
00024  ******************************************************************************
00025  * DESCRIPTION: This structure specifies the state of an instance of a PIU.
00026  *
00027  *****************************************************************************/
00028 typedef struct piuInst_s {
00029   linSample del_buf_rx[AER_SIM_PIU_DEL_BUF_LEN_RX];
00030   linSample del_buf_tx[AER_SIM_NUM_BF_MIC][AER_SIM_PIU_DEL_BUF_LEN_TX];
00031   tint frame_size;
00032   tint del_buf_rxin_ind;
00033   tint del_buf_rxout_ind;
00034   tint del_buf_rxsync_ind;
00035   tint del_buf_txin_ind;
00036   tint del_buf_txout_ind;
00037 } piuInst_t;
00038
00039 void piuInit(piuInst_t *inst, tint frm_size);
00040 void piuReceiveIn(piuInst_t *inst, linSample *data_in, linSample *data_dac,
00041                   linSample *data_rx_sync);
00042 void piuSendIn(piuInst_t *inst, linSample data_adc[][AER_SIM_MAX_FRAME_LENGTH],
00043                                 linSample data_out[][AER_SIM_MAX_FRAME_LENGTH],
00044                                 tint num_mic);
00045
00046 #endif /* _PIULOC_H */
00047 /* nothing past this point */


AER Simulation: siu.c File Reference

  • File List
  • Globals

siu.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuport.h>

Include dependency graph for siu.c:

Go to the source code of this file.

Defines

#define | loop for(;;)
#define | NUM_AER_DBG_FILE 3

Functions

static void | siuDebugInternal (tuint id, char *str)
void | siuDebug (tuint id, char *s)
void | siuException (tuint id, char *s)
tint | siuInit (void *inst, siuConfig_t *cfg)
void | siuRxOpen (siuInst_t *inst, siuRxConfig_t *cfg)
void | siuTxOpen (siuInst_t *inst, siuTxConfig_t *cfg)
void | siuDbgAer (void *handle, tuint msg, tuint code, tuint size, tuint *buf)
void | siuDbgAgc (void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2)
void | siuDbgDrc (void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2)

Variables

siuContext_t siuContext
tuint | siu_dbg_id
char | siu_dbg_message [SIU_DBGMSG_SIZE]
FILE * | siu_aer_data_file [NUM_AER_DBG_FILE]

Define Documentation

#define loop for(;;)

Definition at line 28 of file siu.c.

Referenced by main(), siuDbgAgc(), siuDbgDrc(), and siuException().

#define NUM_AER_DBG_FILE 3

Definition at line 35 of file siu.c.

Function Documentation

static void siuDebugInternal | ( | tuint | id,
 |  | char * | str |
 | ) |  |  | [inline, static]

Definition at line 46 of file siu.c.

References siu_dbg_id, siu_dbg_message, and SIU_DBGMSG_SIZE.

Referenced by siuDebug(), and siuException().

Here is the caller graph for this function:

void siuDebug | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 58 of file siu.c.

References siuDebugInternal().

Here is the call graph for this function:

void siuException | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 63 of file siu.c.

References loop, and siuDebugInternal().

Here is the call graph for this function:

tint siuInit | ( | void * | inst,
 |  | siuConfig_t * | cfg
 | ) |  |

Definition at line 76 of file siu.c.

References siuInst_t::aer_recv_in_buf, AER_SIM_NUM_HF_MIC, siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuInst_t::agcHESInst, siuInst_t::agcHFInst, siuInst_t::bfInst, siuContext_t::cheap, siuContext_t::cheap_used, siuInst_t::cheap_used, siuInst_t::companding_law, siuConfig_t::companding_law, siuConfig_t::core_heap, siuContext_t::debug, siuConfig_t::debug, siuInst_t::debug, siuInst_t::drcInst, siuTxInst_t::enabled, siuContext_t::exception, siuConfig_t::exception, siuInst_t::exception, siuTxSendOut_t::fcn, siuContext_t::ID, siuConfig_t::ID, siuInst_t::ID, siuInst_t::mssInst, siuInst_t::pcm_bits, siuConfig_t::pcm_bits, siuInst_t::pending_gain_request, siuInst_t::piuInst, siuTxInst_t::recv_frame_ptr, siuTxInst_t::send_frame_ptr, siuTxInst_t::send_in_frame_length, siuTxInst_t::send_out_frame_length, siu_inst, SIU_MID_SIU, SIU_NOERR, siuContext, siuMakeID, siuTxSendOut_t::targetInst, siuInst_t::TxInst, siuTxInst_t::TxSendOut, siuInst_t::veuInst, siuContext_t::vheap, siuContext_t::vheap_used, siuInst_t::vheap_used, and siuConfig_t::voice_heap.

Referenced by aer_sim_init_siu().

Here is the caller graph for this function:

void siuRxOpen | ( | siuInst_t * | inst,
 |  | siuRxConfig_t * | cfg
 | ) |  |

Definition at line 134 of file siu.c.

References siuRxInst_t::rin_frm_len, siuRxConfig_t::rin_frm_len, siuRxInst_t::rout_frm_len, siuRxConfig_t::rout_frm_len, and siuInst_t::RxInst.

Referenced by aer_sim_init_siu().

Here is the caller graph for this function:

void siuTxOpen | ( | siuInst_t * | inst,
 |  | siuTxConfig_t * | cfg
 | ) |  |

Definition at line 147 of file siu.c.

References siuPhoneSys_t::active_mic, siuTxInst_t::enabled, siuPhoneSys_t::mic_active_time, siuPhoneSys_t::mic_delay, siuPhoneSys_t::mic_proc_order, siuPhoneSys_t::mic_scale, siuPhoneSys_t::num_HF_mic, siuTxConfig_t::num_HF_mic, siuPhoneSys_t::phone_mode, siuInst_t::phone_sys, siuTxInst_t::recv_frame_ptr, siuPhoneSys_t::round_robin_cntr, siuTxInst_t::send_frame_ptr, siuTxInst_t::send_frm_del, siuTxInst_t::send_in_frame_length, siuTxConfig_t::send_in_frame_length, siuTxInst_t::send_out_frame_length, siuTxConfig_t::send_out_frame_length, siuInst_t::TxInst, siuTxInst_t::TxSendOut, and siuTxConfig_t::TxSendOut.

Referenced by aer_sim_init_siu().

Here is the caller graph for this function:

void siuDbgAer | ( | void * | handle,
 |  | tuint | msg,
 |  | tuint | code,
 |  | tuint | size,
 |  | tuint * | buf
 | ) |  |

Definition at line 198 of file siu.c.

References siu_aer_data_file, siuExtrMicID, and siuExtrModID.

Referenced by siu_new_aer().

Here is the caller graph for this function:

void siuDbgAgc | ( | void * | handle,
 |  | tuint | msg,
 |  | tuint | code,
 |  | tuint | unused1,
 |  | tuint * | unused2
 | ) |  |

Definition at line 237 of file siu.c.

References loop, siuExtrMicID, and siuExtrModID.

void siuDbgDrc | ( | void * | handle,
 |  | tuint | msg,
 |  | tuint | code,
 |  | tuint | unused1,
 |  | tuint * | unused2
 | ) |  |

Definition at line 255 of file siu.c.

References loop, siuExtrMicID, and siuExtrModID.

Referenced by siu_new_agc(), and siu_new_drc().

Here is the caller graph for this function:

Variable Documentation

siuContext_t siuContext

Definition at line 30 of file siu.c.

Referenced by siuInit().

tuint siu_dbg_id

Definition at line 32 of file siu.c.

Referenced by siuDebugInternal().

char siu_dbg_message[SIU_DBGMSG_SIZE]

Definition at line 33 of file siu.c.

Referenced by siuDebugInternal().

FILE* siu_aer_data_file[NUM_AER_DBG_FILE]

Definition at line 36 of file siu.c.

Referenced by siuDbgAer().


AER Simulation: siu.c Source File

  • File List
  • Globals

siu.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Software Integration Unit.
00003  ******************************************************************************
00004  * FILE NAME:   siu.c
00005  *
00006  * DESCRIPTION: Contains routines necessary for integrating DSP software.
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 /*#include <math.h> */         /* used for cosine initialization only */
00014 #include <stdlib.h>
00015 #include <stdio.h>
00016 #include <string.h>
00017
00018 /* System definitions and utilities */
00019 #include <ti/mas/types/types.h>                      /* DSP types            */
00020 #include <ti/mas/fract/fract.h>                      /* fractional macros    */
00021 #include <ti/mas/util/debug.h>                       /* debuging utility     */
00022
00023 #include <ti/mas/aer/test/siusim/siu.h>
00024 #include <ti/mas/aer/test/siusim/siuloc.h>
00025 #include <ti/mas/aer/test/siusim/siuport.h>
00026
00027 /* Nice way for doing endless loop */
00028 #define loop      for(;;)
00029
00030 siuContext_t  siuContext;                 /* SIU Global Context */
00031
00032 tuint siu_dbg_id;     /* debug ID used in debug and exception functions */
00033 char siu_dbg_message[SIU_DBGMSG_SIZE];    /* debug message */
00034
00035 #define NUM_AER_DBG_FILE 3
00036 FILE * siu_aer_data_file[NUM_AER_DBG_FILE];
00037
00038
00039 /******************************************************************************
00040  * FUNCTION PURPOSE: Debug & exception functions.
00041  ******************************************************************************
00042  * DESCRIPTION: Debug & exception functions.
00043  *
00044  *****************************************************************************/
00045
00046 static inline void siuDebugInternal (tuint id, char *str)
00047 {
00048   int i;
00049   char *src, *dst;
00050
00051   /* Copy id and message in a safe place */
00052   siu_dbg_id = id;
00053   src = str; dst = (char*)&siu_dbg_message[0];
00054   for (i = 0; i < SIU_DBGMSG_SIZE; i++)
00055     *dst++ = *src++;
00056 } /* siuDebugInternal */
00057
00058 void siuDebug (tuint id, char *s)
00059 {
00060   siuDebugInternal (id, s);
00061 } /* siuDebug */
00062
00063 void siuException (tuint id, char *s)
00064 {
00065   siuDebugInternal (id, s);
00066
00067   loop;     /* loop forever */
00068 } /* siuException */
00069
00070 /******************************************************************************
00071  * FUNCTION PURPOSE: SIU Initialization Function.
00072  ******************************************************************************
00073  * DESCRIPTION: Initializes SIU Global Context and all SIU channel instances.
00074  *
00075  *****************************************************************************/
00076 tint siuInit (void *inst, siuConfig_t *cfg)
00077 {
00078   siuInst_t * siu_inst;
00079   int j;
00080
00081   siu_inst = (siuInst_t *)inst;
00082
00083   /* Initialize global context */
00084   siuContext.ID           = cfg->ID;        /* has SIU MID and 0 for chnum */
00085   siuContext.exception    = cfg->exception;
00086   siuContext.debug        = cfg->debug;
00087   siuContext.cheap        = cfg->core_heap;
00088   siuContext.cheap_used   = 0;
00089   siuContext.vheap        = cfg->voice_heap;
00090   siuContext.vheap_used   = 0;
00091
00092   /* Initialize SIU instance */
00093   siu_inst->ID              = siuMakeID (SIU_MID_SIU, 1);
00094   siu_inst->exception       = siuContext.exception;
00095   siu_inst->debug           = siuContext.debug;
00096   siu_inst->cheap_used      = 0;
00097   siu_inst->vheap_used      = 0;
00098   siu_inst->companding_law  = cfg->companding_law;  /* default companding */
00099   siu_inst->pcm_bits        = cfg->pcm_bits;
00100   siu_inst->aer_recv_in_buf = NULL;
00101   siu_inst->piuInst         = NULL;
00102   siu_inst->aerHESInst      = NULL;
00103   siu_inst->agcHESInst      = NULL;
00104   siu_inst->drcInst         = NULL;
00105   siu_inst->veuInst         = NULL;
00106   siu_inst->mssInst         = NULL;
00107   siu_inst->bfInst          = NULL;
00108
00109   for(j=0; j<AER_SIM_NUM_HF_MIC; j++) {
00110     siu_inst->aerHFInst[j]  = NULL;
00111     siu_inst->agcHFInst[j]  = NULL;
00112     siu_inst->pending_gain_request[j] = FALSE;
00113   }
00114
00115   /* Tx Task Part */
00116   siu_inst->TxInst.enabled               = FALSE;
00117   siu_inst->TxInst.send_out_frame_length = 0;
00118   siu_inst->TxInst.send_in_frame_length  = 0;
00119   siu_inst->TxInst.send_frame_ptr        = NULL;
00120   siu_inst->TxInst.recv_frame_ptr        = NULL;
00121   siu_inst->TxInst.TxSendOut.fcn         = NULL;
00122   siu_inst->TxInst.TxSendOut.targetInst  = NULL;
00123
00124   return(SIU_NOERR);
00125 } /* siuInit */
00126
00127 /******************************************************************************
00128  * FUNCTION PURPOSE: SIU Rx Task configuration.
00129  ******************************************************************************
00130  * DESCRIPTION: Configures and enables SIU Rx task.
00131  *
00132  *****************************************************************************/
00133
00134 void siuRxOpen (siuInst_t *inst, siuRxConfig_t *cfg)
00135 {
00136   inst->RxInst.rin_frm_len  = cfg->rin_frm_len;
00137   inst->RxInst.rout_frm_len  = cfg->rout_frm_len;
00138 } /* siuRxOpen */
00139
00140 /******************************************************************************
00141  * FUNCTION PURPOSE: SIU Tx Task configuration.
00142  ******************************************************************************
00143  * DESCRIPTION: Configures and enables SIU Tx task.
00144  *
00145  *****************************************************************************/
00146
00147 void siuTxOpen (siuInst_t *inst, siuTxConfig_t *cfg)
00148 {
00149   int i;
00150   Fract mic_scl[3] = {32767, 29204, 26028};
00151
00152   inst->TxInst.send_out_frame_length = cfg->send_out_frame_length;
00153   inst->TxInst.send_in_frame_length  = cfg->send_in_frame_length;
00154   inst->TxInst.send_frame_ptr        = NULL;
00155   inst->TxInst.recv_frame_ptr        = NULL;
00156   inst->TxInst.TxSendOut             = cfg->TxSendOut;
00157   inst->TxInst.enabled               = TRUE;
00158   memset(inst->TxInst.send_frm_del, 0, sizeof(linSample)*cfg->send_in_frame_length);
00159
00160   /* phone system information */
00161   inst->phone_sys.active_mic = 0;  /* microhpone 0 */
00162   inst->phone_sys.mic_active_time = 100;  /* 100 frames, or 1sec */
00163
00164   for(i=0; i<inst->phone_sys.num_HF_mic; i++) {
00165     /* 0, 1, or 2 msec delay in units of samples */
00166     inst->phone_sys.mic_delay[i] = i * cfg->send_in_frame_length/10; /* i msec */
00167
00168     /* initial mic processing order mic 0 first, mic 1 second, mic 3 third */
00169     inst->phone_sys.mic_proc_order[i] = i;
00170
00171     /* mic scaling:
00172        mic 0: referemce mic, 0dB scaling,
00173        mic 1: -1dB from mic 0,
00174        mic 2: -2dB from mic 0. */
00175     inst->phone_sys.mic_scale[i] = mic_scl[i];
00176   }
00177   inst->phone_sys.num_HF_mic = cfg->num_HF_mic;
00178   inst->phone_sys.phone_mode = aer_PHM_HF;
00179   inst->phone_sys.round_robin_cntr = 0;
00180
00181 } /* siuTxOpen */
00182
00183 /******************************************************************************
00184  * FUNCTION PURPOSE: AER data tracing.
00185  ******************************************************************************
00186  * DESCRIPTION:
00187  *
00188  *   tuint msg             - tells what kind of information AER is reporting:
00189  *                           0 - warning message
00190  *                           1 - debug data
00191  *   tuint code            - tells what kind of debug data AER is reporting
00192  *                           and for each value, AER data should be saved to a
00193  *                           separate file. There are totally 3 kinds of data.
00194  *   tuint size            - size of AER data in number of tint elements.
00195  *   tuint * buf           - points to the memory where AER data is stored.
00196  *
00197  *****************************************************************************/
00198 void siuDbgAer(void *handle, tuint msg, tuint code, tuint size, tuint *buf)
00199 {
00200   tuint id, mic, mod;
00201   int i;
00202
00203   id = (tuint)handle;
00204   mic = siuExtrMicID(id);
00205   mod = siuExtrModID(id);
00206
00207   switch (msg) {
00208     case dbg_TRACE_INFO:
00209     /* For some reason, binary file I/O is not working properly. This needs
00210        some investigation!
00211        aerSimFwrite(buf, size, siu_aer_data_file[code]);
00212     */
00213       for(i=0; i<size; i++) {
00214         fprintf(siu_aer_data_file[code], "%d\n", (tint)buf[i]);
00215       }
00216     break;
00217
00218     case dbg_WARNING:
00219       printf("mod %d has warning with mic %d. Exception msg is %d, code is %d\n",
00220               mod, mic, msg, code);
00221     break;
00222
00223     case dbg_EXCEPTION_FATAL:
00224       printf("mod %d has exception with mic %d. Exception msg is %d, code is %d\n",
00225               mod, mic, msg, code);
00226     break;
00227
00228     default:
00229     break;
00230   }
00231 }
00232
00233
00234 /******************************************************************************
00235  * FUNCTION PURPOSE: AGC data tracing.
00236  ******************************************************************************/
00237 void siuDbgAgc(void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2)
00238 {
00239   tuint id, mic, mod;
00240
00241   id = (tuint)handle;
00242
00243   mic = siuExtrMicID(id);
00244   mod = siuExtrModID(id);
00245   printf("mod %d has exception with mic %d. Exception msg is %d, code is %d\n",
00246          mod, mic, msg, code);
00247
00248   loop;
00249 }
00250
00251
00252 /******************************************************************************
00253  * FUNCTION PURPOSE: DRC data tracing.
00254  ******************************************************************************/
00255 void siuDbgDrc(void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2)
00256 {
00257   tuint id, mic, mod;
00258
00259   id = (tuint)handle;
00260
00261   mic = siuExtrMicID(id);
00262   mod = siuExtrModID(id);
00263   printf("mod %d has exception with mic %d. Exception msg is %d, code is %d\n",
00264          mod, mic, msg, code);
00265
00266   loop;
00267 }
00268
00269 /* nothing past this point */


AER Simulation: siu.h File Reference

  • File List
  • Globals

siu.h File Reference

#include <ti/mas/types/types.h>

Include dependency graph for siu.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuConfig_t
struct | siuTxSendOut_t
struct | siuTxConfig_t
struct | siuRxConfig_t

Enumerations

enum | { SIU_NOERR = 0, SIU_ERROR = -1 }

Functions

tint | siuInit (void *siu_inst, siuConfig_t *cfg)

Enumeration Type Documentation

anonymous enum

Enumerator:
SIU_NOERR
SIU_ERROR

Definition at line 14 of file siu.h.

Function Documentation

tint siuInit | ( | void * | siu_inst,
 |  | siuConfig_t * | cfg
 | ) |  |

Definition at line 76 of file siu.c.

References siuInst_t::aer_recv_in_buf, AER_SIM_NUM_HF_MIC, siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuInst_t::agcHESInst, siuInst_t::agcHFInst, siuInst_t::bfInst, siuContext_t::cheap, siuInst_t::cheap_used, siuContext_t::cheap_used, siuConfig_t::companding_law, siuInst_t::companding_law, siuConfig_t::core_heap, siuInst_t::debug, siuConfig_t::debug, siuContext_t::debug, siuInst_t::drcInst, siuTxInst_t::enabled, siuInst_t::exception, siuConfig_t::exception, siuContext_t::exception, siuTxSendOut_t::fcn, siuInst_t::ID, siuConfig_t::ID, siuContext_t::ID, siuInst_t::mssInst, siuConfig_t::pcm_bits, siuInst_t::pcm_bits, siuInst_t::pending_gain_request, siuInst_t::piuInst, siuTxInst_t::recv_frame_ptr, siuTxInst_t::send_frame_ptr, siuTxInst_t::send_in_frame_length, siuTxInst_t::send_out_frame_length, siu_inst, SIU_MID_SIU, SIU_NOERR, siuContext, siuMakeID, siuTxSendOut_t::targetInst, siuInst_t::TxInst, siuTxInst_t::TxSendOut, siuInst_t::veuInst, siuContext_t::vheap, siuInst_t::vheap_used, siuContext_t::vheap_used, and siuConfig_t::voice_heap.

Referenced by aer_sim_init_siu().

Here is the caller graph for this function:


AER Simulation: siu.h Source File

  • File List
  • Globals

siu.h

Go to the documentation of this file.
00001 #ifndef _SIU_H
00002 #define _SIU_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Software Integration Unit Definitions.
00005  *
00006  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00007  *                     ALL RIGHTS RESERVED
00008  *
00009  *****************************************************************************/
00010
00011 #include <ti/mas/types/types.h>                      /* DSP types            */
00012
00013 /* SIU Error codes */
00014 enum {
00015   SIU_NOERR = 0,
00016   SIU_ERROR = -1
00017 };
00018
00019 /******************************************************************************
00020  * DATA DEFINITION: SIU Configuration Structure.
00021  ******************************************************************************
00022  * DESCRIPTION: Used when configuring SIU module.
00023  *
00024  *****************************************************************************/
00025
00026 typedef struct {
00027   tuint ID;                                 /* Module ID with chnum = 0 */
00028   void  (*exception)(tuint id, char *str);  /* master exception function */
00029   void  (*debug)(tuint id, char *str);      /* master debug function */
00030   tint  companding_law;   /* Provides information on which type of companding
00031                            *  is used before linear samples are obtained. Valid
00032                            *  values are const_COMP_ALAW_8, const_COMP_MULAW_8,
00033                            *  const_COMP_LINEAR (no companding). Invalid value
00034                            *  indicates 8-bit transparent mode. */
00035   tint  pcm_bits;         /* # bits in a PCM sample (8 for u-law, A-law, and
00036                            *  transparent mode, [1,16] range for linear). */
00037   void  *core_heap;       /* Core heap handle */
00038   void  *voice_heap;      /* Voice heap handle */
00039 } siuConfig_t;
00040
00041 /******************************************************************************
00042  * DATA DEFINITION: SIU Tx Task Send Out Object.
00043  ******************************************************************************
00044  * DESCRIPTION: Transmit task send-out object description. Current
00045  *              implementation takes send-in and receive-in frame like in
00046  *              the case of ECU.
00047  *
00048  *****************************************************************************/
00049
00050 typedef struct {
00051   tint (*fcn) (void *targetInst, void *send_in_frame, void *send_out_frame,
00052                void *send_out_8kHz, void *recv_frame, void *sout_pnlp_8kHz,
00053                void *trace_buf);
00054   void *targetInst;   /* instance of the target object which owns the fcn */
00055 } siuTxSendOut_t;
00056
00057 /******************************************************************************
00058  * DATA DEFINITION: SIU Tx Task Configuration Structure.
00059  ******************************************************************************
00060  * DESCRIPTION: Used when configuring SIU Tx Task with siuTxOpen().
00061  *
00062  *****************************************************************************/
00063
00064 typedef struct {
00065   siuTxSendOut_t  TxSendOut;            /* Tx Send-out object description    */
00066   tint            send_out_frame_length;/* send out frame length in samples  */
00067   tint            send_in_frame_length; /* send in frame length in samples   */
00068   tint            num_HF_mic;
00069 } siuTxConfig_t;
00070
00071 /******************************************************************************
00072  * DATA DEFINITION: SIU Rx Task Configuration Structure.
00073  ******************************************************************************
00074  * DESCRIPTION: Used when configuring SIU Rx Task with siuRxOpen().
00075  *
00076  *****************************************************************************/
00077
00078 typedef struct {
00079   tint            rin_frm_len;    /* receive in frame length in samples   */
00080   tint            rout_frm_len;    /* receive out frame length in samples   */
00081 } siuRxConfig_t;
00082
00083 /* External function prototypes */
00084 /* siu.c */
00085 tint siuInit (void *siu_inst, siuConfig_t *cfg);
00086
00087
00088
00089 #endif /* _SIU_H */
00090 /* nothing past this point */


AER Simulation: siuaer.c File Reference

  • File List
  • Globals

siuaer.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/vpe/svd.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuaer.h>
#include <ti/mas/aer/test/siusim/siuport.h>
#include <ti/mas/aer/test/aersim/aersim.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>
#include <ti/mas/aer/test/aersim/aerbuffs.h>

Include dependency graph for siuaer.c:

Go to the source code of this file.

Defines

#define | SIU_NUM_AER_BUFFS 21

Functions

tint | siu_alloc_aer_buffs (const ecomemBuffer_t *bufs_req, ecomemBuffer_t *bufs_aloc, tint num_bufs, tuint phone_mode, tint mic_num, tbool multi_mic_flag)
void | siu_print_buff_usage (const ecomemBuffer_t *bufs, tint num_bufs)
void | siu_new_aer (siuInst_t *inst, tint num_HF_mic, tbool band_split_flag)
void | siu_open_aer (siuInst_t *inst, siuAerSysPars_t *aer_pars, tint samp_rates, tint num_mic)
void | siu_close_aer (siuInst_t *inst)

Define Documentation

#define SIU_NUM_AER_BUFFS 21

Definition at line 34 of file siuaer.c.

Referenced by siu_new_aer().

Function Documentation

tint siu_alloc_aer_buffs | ( | const ecomemBuffer_t * | bufs_req,
 |  | ecomemBuffer_t * | bufs_aloc,
 |  | tint | num_bufs,
 |  | tuint | phone_mode,
 |  | tint | mic_num,
 |  | tbool | multi_mic_flag
 | ) |  |

Definition at line 258 of file siuaer.c.

References aer_buff0_hf, aer_buff0_hs, aer_buff1, aer_buff10, aer_buff11, aer_buff12, aer_buff13, aer_buff14, aer_buff15, aer_buff16, aer_buff17, aer_buff18, aer_buff19, aer_buff20, aer_buff2_hf, aer_buff2_hs, aer_buff3, aer_buff4_hf, aer_buff4_hs, aer_buff5, aer_buff6, aer_buff7, aer_buff8, and aer_buff9.

Referenced by siu_new_aer().

Here is the caller graph for this function:

void siu_print_buff_usage | ( | const ecomemBuffer_t * | bufs,
 |  | tint | num_bufs
 | ) |  |

Definition at line 406 of file siuaer.c.

Referenced by siu_new_aer(), siu_new_agc(), siu_new_bf(), siu_new_drc(), and siu_new_mss().

Here is the caller graph for this function:

void siu_new_aer | ( | siuInst_t * | inst,
 |  | tint | num_HF_mic,
 |  | tbool | band_split_flag
 | ) |  |

Definition at line 58 of file siuaer.c.

References AER_HES_ID, AER_HF0_ID, AER_SIM_HES_MAX_FILT_LENGTH, AER_SIM_HES_MAX_Y2X_DELAY, AER_SIM_HF_MAX_FILT_LENGTH, AER_SIM_HF_MAX_Y2X_DELAY, siuInst_t::aerHEShandle, siuInst_t::aerHESInst, siuInst_t::aerHFhandles, siuInst_t::aerHFInst, aersim_setbit, siuPhoneSys_t::num_HF_mic, siuInst_t::phone_sys, siu_alloc_aer_buffs(), SIU_MID_AER, SIU_NUM_AER_BUFFS, siu_print_buff_usage(), siuAgcAerEvent(), siuDbgAer(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_aer | ( | siuInst_t * | inst,
 |  | siuAerSysPars_t * | aer_pars,
 |  | tint | samp_rates,
 |  | tint | num_mic
 | ) |  |

Definition at line 200 of file siuaer.c.

References siuAerSysPars_s::aer_filter_len_HES, siuAerSysPars_s::aer_filter_len_HF, siuInst_t::aerHESInst, siuInst_t::aerHFInst, aersim_chkbit, siuAerSysPars_s::ag_chg_delay_rx, siuAerSysPars_s::ag_chg_delay_tx, siuAerSysPars_s::ag_chg_interp_samp, and siuAerSysPars_s::y2x_delay.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_close_aer ( siuInst_t * inst )

Definition at line 242 of file siuaer.c.

References siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuPhoneSys_t::num_HF_mic, and siuInst_t::phone_sys.


AER Simulation: siuaer.c Source File

  • File List
  • Globals

siuaer.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: SIU functions to support simulation testing of AER
00003  ******************************************************************************
00004  * FILE NAME:   siuaer.c
00005  *
00006  * DESCRIPTION: Contains routines for simulation testing of AER
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015 #include <string.h>
00016
00017 /* System definitions and utilities */
00018 #include <ti/mas/types/types.h>                      /* DSP types            */
00019 #include <ti/mas/fract/fract.h>
00020 #include <ti/mas/aer/aer.h>
00021 #include <ti/mas/vpe/svd.h>
00022
00023 /* Signal generator and AEP header files */
00024 #include <ti/mas/aer/test/siusim/siu.h>
00025 #include <ti/mas/aer/test/siusim/siuloc.h>
00026 #include <ti/mas/aer/test/siusim/siuaer.h>
00027 #include <ti/mas/aer/test/siusim/siuport.h>
00028
00029 #include <ti/mas/aer/test/aersim/aersim.h>
00030 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00031 #include <ti/mas/aer/test/aersim/aerbuffs.h>
00032
00033
00034 #define SIU_NUM_AER_BUFFS 21        /* static buffer allocation */
00035
00036 tint siu_alloc_aer_buffs(const ecomemBuffer_t *bufs_req, ecomemBuffer_t *bufs_aloc,
00037                          tint num_bufs, tuint phone_mode, tint mic_num, tbool multi_mic_flag);
00038 void siu_print_buff_usage(const ecomemBuffer_t *bufs, tint num_bufs);
00039
00040
00041 /******************************************************************************
00042  * FUNCTION PURPOSE: Create AER module.
00043  ******************************************************************************
00044  * DESCRIPTION: Obtains info on AER buffers, and creates one instance of AER.
00045  *
00046  *              NOTE: Should save number of buffers and buffer descriptors
00047  *                    in order to make delete possible.
00048  *
00049  *                    Allocates AER receive-in buffer that is used in PIU.
00050  *                    Assumes receive-in buffer is offset 5.
00051  *
00052  *  void siu_new_aer (
00053  *    (siuInst_t *)siu_inst,  - SIU instance pointer
00054  *    tint num_HF_mic         - number of hands-free mics
00055  *    tbool band_split_flag)  - band split option flag
00056  *
00057  *****************************************************************************/
00058 void siu_new_aer(siuInst_t *inst, tint num_HF_mic, tbool band_split_flag)
00059 {
00060   tint err_code, num_bufs_req_by_aer, mic_num;
00061   const ecomemBuffer_t *bufs_req_by_aer;
00062   ecomemBuffer_t        bufs_aloc_by_siu[SIU_NUM_AER_BUFFS];
00063   aerCreateConfig_t aer_create_cfg;
00064   aerSizeConfig_t   aer_size_cfg;
00065   aerNewConfig_t    aer_new_cfg;
00066
00067   inst->phone_sys.num_HF_mic = num_HF_mic; /* number of HF microphones */
00068
00069   /*
00070    * Call aerCreate() to pass system information that is shared with all
00071    * AER instances.
00072    */
00073   /* check if there are multiple hands free microphones */
00074   aer_create_cfg.config_bitfield  = 0x0;
00075   if(num_HF_mic > 1) {
00076     aersim_setbit(aer_create_cfg.config_bitfield, aer_CRT_MULT_MIC_MODE);
00077   }
00078
00079   /* pass debug and call out functions */
00080   aer_create_cfg.debugInfo = siuDbgAer;
00081   aer_create_cfg.eventOut  = siuAgcAerEvent; /* call out function pointer to relay
00082                                             * AER information to other modules */
00083   /* pass maximum sampling rate supported by AER */
00084   aer_create_cfg.max_sampling_rate = aer_SRATE_16K;  /* defined in aer.h */
00085
00086   /* call AER API function aerCreate() */
00087   err_code = aerCreate(&aer_create_cfg);
00088   if(err_code != aer_NOERR) {
00089     printf("Error when calling aerCreate() with error code %d!\n", err_code);
00090     exit(1);
00091   }
00092
00093   /*
00094    * Create AER instance shared by Handset and Headset
00095    */
00096   /* set up configurations for aerGetSizes() */
00097   aer_size_cfg.max_tail_length = AER_SIM_HES_MAX_FILT_LENGTH;
00098   aer_size_cfg.max_y2x_delay = AER_SIM_HES_MAX_Y2X_DELAY;
00099   aer_size_cfg.config_bitfield = 0;  /* use TDNLP for HS and HES */
00100
00101   /* Call API function aerGetSizes() to get memory requirements:
00102      - num_bufs_req_by_aer: number of buffers required by AER
00103      - bufs_req_by_aer:   pointer to buffer descriptors defined inside AER */
00104   err_code = aerGetSizes(&num_bufs_req_by_aer, &bufs_req_by_aer, &aer_size_cfg);
00105   if (err_code != aer_NOERR) {
00106     printf("Error when calling aerGetSizes() for HES with error code %d!\n", err_code);
00107     exit(1);
00108   }
00109
00110   /* check if enough memory is allocated for SIU buffer descriptors */
00111   if (num_bufs_req_by_aer > SIU_NUM_AER_BUFFS) {
00112     printf("No enough memory allocated by SIU for AER buffer descriptors!\n");
00113         exit(1);
00114   }
00115
00116   printf("AER required buffers for hand set/head set :\n");
00117   siu_print_buff_usage(bufs_req_by_aer, num_bufs_req_by_aer);
00118
00119   /* allocate memory according to the requirements returned by aerGetSizes():
00120      - single mic for HES/HS.  */
00121   err_code = siu_alloc_aer_buffs(bufs_req_by_aer, bufs_aloc_by_siu,
00122                                  num_bufs_req_by_aer, aer_PHM_HES, 0, (num_HF_mic > 1));
00123   if (err_code != aer_NOERR) {
00124     printf("Error when allocating buffers for HES with error code %d!\n", err_code);
00125     exit(1);
00126   }
00127
00128   printf("Buffers allocated by SIU for hand set/head set AER:\n");
00129   siu_print_buff_usage(bufs_aloc_by_siu, num_bufs_req_by_aer);
00130
00131   /* set up configurations for aerNew() */
00132   aer_new_cfg.handle  = (void *) siuMakeID( (SIU_MID_AER|AER_HES_ID), 0);
00133   aer_new_cfg.sizeCfg = aer_size_cfg;
00134   inst->aerHEShandle  = aer_new_cfg.handle;
00135
00136   /* Call API function aerNew() to create an instance for HS/HES:
00137      - pass buffer descriptors that are set by SIU
00138      - pass number of buffer descriptors   */
00139   err_code = aerNew (&inst->aerHESInst, num_bufs_req_by_aer, bufs_aloc_by_siu, &aer_new_cfg);
00140   if (err_code != aer_NOERR) {
00141     printf("Error when calling aerNew() for HES with error code %d!\n", err_code);
00142     exit(1);
00143   }
00144
00145   /*
00146    * Create AER instances for handsfree - one instance per handsfree mic
00147    */
00148   /* Call aerGetSizes() to get memory requirements. */
00149   aer_size_cfg.max_tail_length = AER_SIM_HF_MAX_FILT_LENGTH;
00150   aer_size_cfg.max_y2x_delay   = AER_SIM_HF_MAX_Y2X_DELAY;
00151   aer_size_cfg.config_bitfield = aer_SIZE_FDNLP_REQ;      /* use FDNLP for HF */
00152   if(band_split_flag) {
00153     aer_size_cfg.config_bitfield |= aer_SIZE_USE_BANDSPLIT; /* bandsplit option */
00154   }
00155
00156   err_code = aerGetSizes(&num_bufs_req_by_aer, &bufs_req_by_aer, &aer_size_cfg);
00157   if (err_code != aer_NOERR) {
00158     printf("Error when calling aerGetSizes() for HF with error code %d!\n", err_code);
00159     exit(1);
00160   }
00161
00162   printf("AER required buffers for hands free:\n");
00163   siu_print_buff_usage(bufs_req_by_aer, num_bufs_req_by_aer);
00164
00165   /* Create instances for handsfree - one per mic */
00166   for(mic_num = 0; mic_num < num_HF_mic; mic_num++) {
00167     /* allocate memory according to the requirements returned by aerGetSizes():
00168        - multi-mic or single-mic for HF depends on AER sim configuration.     */
00169     err_code = siu_alloc_aer_buffs(bufs_req_by_aer, bufs_aloc_by_siu,
00170                                    num_bufs_req_by_aer, aer_PHM_HF, mic_num,
00171                                                                    (num_HF_mic > 1));
00172
00173     if (err_code != aer_NOERR) {
00174       printf("Error when allocating buffers for HF with error code %d!\n", err_code);
00175       exit(1);
00176     }
00177
00178     printf("Buffers allocated by SIU for hands-free AER:\n");
00179     siu_print_buff_usage(bufs_aloc_by_siu, num_bufs_req_by_aer);
00180
00181     /* Call aerNew() to create one instance per mic */
00182     aer_new_cfg.handle = (void *)siuMakeID((SIU_MID_AER|(AER_HF0_ID+mic_num)), 0);
00183     aer_new_cfg.sizeCfg = aer_size_cfg;
00184     inst->aerHFhandles[mic_num] = aer_new_cfg.handle;
00185     err_code = aerNew(&inst->aerHFInst[mic_num], num_bufs_req_by_aer,
00186                           bufs_aloc_by_siu, &aer_new_cfg);
00187     if (err_code != aer_NOERR) {
00188       printf("Error when calling aerNew() for HF with error code %d!\n", err_code);
00189       exit(1);
00190     }
00191   }
00192 } /* siu_new_aer */
00193
00194
00195
00196 /******************************************************************************
00197  * FUNCTION PURPOSE: Open AER instances.
00198  *
00199  *****************************************************************************/
00200 void siu_open_aer(siuInst_t *inst, siuAerSysPars_t *aer_pars,
00201                   tint samp_rates, tint num_mic)
00202 {
00203   aerConfig_t aerCfg;
00204   tint err_code, mic_num, srate_rxout_txin;
00205
00206   /* Open the AER instance shared by headset and handset */
00207   /* parameter y2x_delay is in units of 125-usec */
00208   srate_rxout_txin = aersim_chkbit(samp_rates, aer_SRATE_RXOUT_TXIN_16K);
00209   aerCfg.y2x_delay        = aer_pars->y2x_delay >> srate_rxout_txin;
00210   aerCfg.srate_bitfield   = samp_rates;
00211   aerCfg.tail_length      = aer_pars->aer_filter_len_HES;
00212   aerCfg.delay_tx_ag_chg  = aer_pars->ag_chg_delay_tx >> srate_rxout_txin;
00213   aerCfg.delay_rx_ag_chg  = aer_pars->ag_chg_delay_rx >> srate_rxout_txin;
00214   aerCfg.num_samp_interp  = aer_pars->ag_chg_interp_samp;
00215   aerCfg.phone_mode       = aer_PHM_HES;
00216   aerCfg.reset_bitfield   = 0xffff;
00217   aerCfg.valid_bitfield   = 0x007f;
00218
00219   /* Call AER API to open the HS/HES instance */
00220   err_code = aerOpen (inst->aerHESInst, &aerCfg);
00221   if (err_code != aer_NOERR) {
00222     printf("Error when calling aerOpen() for HES with error code %d!\n", err_code);
00223     exit(1);
00224   }
00225
00226   /* Open multiple hands free instances - one per mic */
00227   aerCfg.tail_length = aer_pars->aer_filter_len_HF;
00228   aerCfg.phone_mode  = aer_PHM_HF;
00229   for(mic_num = 0; mic_num < num_mic; mic_num++) {
00230     err_code = aerOpen (inst->aerHFInst[mic_num], &aerCfg);
00231     if (err_code != aer_NOERR) {
00232       printf("Error when calling aerOpen() for HF with error code %d!\n", err_code);
00233       exit(1);
00234     }
00235   }
00236 } /* siu_open_aer */
00237
00238 /******************************************************************************
00239  * FUNCTION PURPOSE: Close AER instances.
00240  *
00241  *****************************************************************************/
00242 void siu_close_aer(siuInst_t *inst)
00243 {
00244   int i;
00245
00246   aerClose(inst->aerHESInst);
00247
00248   for(i=0; i<inst->phone_sys.num_HF_mic; i++) {
00249     aerClose(inst->aerHFInst[i]);
00250   }
00251 }
00252
00253
00254 /******************************************************************************
00255  * FUNCTION PURPOSE: Allocate buffers for AER instance
00256  *
00257  *****************************************************************************/
00258 tint siu_alloc_aer_buffs(const ecomemBuffer_t *bufs_req, ecomemBuffer_t *bufs_aloc,
00259                          tint num_bufs, tuint phone_mode, tint mic_num,
00260                                                  tbool multi_mic_flag)
00261 {
00262   tint stat;
00263   int i;
00264
00265   stat = aer_NOERR;
00266   for (i = 0; i < num_bufs; i++) {
00267     bufs_aloc[i].mclass = ecomem_CLASS_INTERNAL; /* internal memory for all  */
00268     bufs_aloc[i].volat  = FALSE;                 /* initialized to permanent */
00269   }
00270
00271   /* buffer 0 - permanent, per HF mic, not shared by HF and HS */
00272   if (bufs_req[0].size <= AER_SIM_BUF0_SIZE) {
00273     if(phone_mode == aer_PHM_HF) {
00274       bufs_aloc[0].base  = &(aer_buff0_hf[mic_num][0]);  /* one per HF mic */
00275       bufs_aloc[0].size  = AER_SIM_BUF0_SIZE;
00276     }
00277     else {
00278       bufs_aloc[0].base  = &(aer_buff0_hs[0]);           /* one for HS */
00279       bufs_aloc[0].size  = AER_SIM_BUF0_SIZE;
00280     }
00281     bufs_aloc[0].log2align = AER_SIM_BUF0_ALGN_LOG2;
00282   }
00283   else {
00284     stat = !aer_NOERR;
00285   }
00286
00287   /* buffer 1 - volatile scratch */
00288   bufs_aloc[1].volat = TRUE;
00289   bufs_aloc[1].base  = &(aer_buff1[0]);
00290   bufs_aloc[1].size  = AER_SIM_BUF1_SIZE;
00291   bufs_aloc[1].log2align = AER_SIM_BUF1_ALGN_LOG2;
00292
00293   /* buffer 2 and buffer 4, per HF mic, not shared by HF and HS */
00294   if(phone_mode == aer_PHM_HF) {
00295     bufs_aloc[2].base  = &(aer_buff2_hf[mic_num][0]);
00296     bufs_aloc[2].size  = AER_SIM_BUF2_SIZE_HF;
00297     bufs_aloc[4].base  = &(aer_buff4_hf[mic_num][0]);
00298     bufs_aloc[4].size  = AER_SIM_BUF4_SIZE;
00299   }
00300   else {
00301     bufs_aloc[2].base  = &(aer_buff2_hs[0]);
00302     bufs_aloc[2].size  = AER_SIM_BUF2_SIZE_HS;
00303     bufs_aloc[4].base  = &(aer_buff4_hs[0]);
00304     bufs_aloc[4].size  = AER_SIM_BUF4_SIZE;
00305   }
00306   bufs_aloc[2].log2align = AER_SIM_BUF2_ALGN_LOG2;
00307   bufs_aloc[4].log2align = AER_SIM_BUF4_ALGN_LOG2;
00308
00309   /* buffer 3, permanent, shared by HS and all HF mics */
00310   bufs_aloc[3].base  = &(aer_buff3[0]);
00311   bufs_aloc[3].size  = AER_SIM_BUF3_SIZE_HF;
00312   bufs_aloc[3].log2align = AER_SIM_BUF3_ALGN_LOG2;
00313
00314   /* buffer 5, permanent, shared by HS and all HF mics */
00315   bufs_aloc[5].base  = &(aer_buff5[0]);
00316   bufs_aloc[5].size  = AER_SIM_BUF5_SIZE;
00317   bufs_aloc[5].log2align = AER_SIM_BUF5_ALGN_LOG2;
00318
00319   /* buffer 6, permanent, per HF mic. HS and HF 1st mic overlay */
00320   bufs_aloc[6].base  = &(aer_buff6[mic_num][0]);
00321   bufs_aloc[6].size  = AER_SIM_BUF6_SIZE;
00322   bufs_aloc[6].log2align = AER_SIM_BUF6_ALGN_LOG2;
00323
00324   /* buffer 7, permanent, per HF mic. HS and HF 1st mic overlay */
00325   bufs_aloc[7].base  = &(aer_buff7[mic_num][0]);
00326   bufs_aloc[7].size  = AER_SIM_BUF7_SIZE;
00327   bufs_aloc[7].log2align = AER_SIM_BUF7_ALGN_LOG2;
00328
00329   /* buffer 8 - volatile scratch */
00330   bufs_aloc[8].base  = &(aer_buff8[0]);
00331   bufs_aloc[8].size  = AER_SIM_BUF8_SIZE;
00332   bufs_aloc[8].volat = TRUE;
00333   bufs_aloc[8].log2align = AER_SIM_BUF8_ALGN_LOG2;
00334
00335   /* buffer 9 - volatile scratch */
00336   bufs_aloc[9].base  = &(aer_buff9[0]);
00337   bufs_aloc[9].size  = AER_SIM_BUF9_SIZE;
00338   bufs_aloc[9].volat = TRUE;
00339   bufs_aloc[9].log2align = AER_SIM_BUF9_ALGN_LOG2;
00340
00341   /* buffer 10, permanent, per HF mic. HS and HF 1st mic overlay */
00342   bufs_aloc[10].base  = &(aer_buff10[mic_num][0]);
00343   bufs_aloc[10].size  = AER_SIM_BUF10_SIZE;
00344   bufs_aloc[10].log2align = AER_SIM_BUF10_ALGN_LOG2;
00345
00346   /* buffer 11, permanent, shared by HS and all HF mics */
00347   bufs_aloc[11].base  = &(aer_buff11[0]);
00348   bufs_aloc[11].size  = AER_SIM_BUF11_SIZE;
00349   bufs_aloc[11].log2align = AER_SIM_BUF11_ALGN_LOG2;
00350
00351   /* buffer 12, permanent, shared by HS and all HF mics */
00352   bufs_aloc[12].base  = &(aer_buff12[0]);
00353   bufs_aloc[12].size  = AER_SIM_BUF12_SIZE;
00354   bufs_aloc[12].log2align = AER_SIM_BUF12_ALGN_LOG2;
00355
00356   /* buffer 13 - volatile scratch */
00357   bufs_aloc[13].volat = TRUE;
00358   bufs_aloc[13].base  = &(aer_buff13[0]);
00359   bufs_aloc[13].size  = AER_SIM_BUF13_SIZE;
00360   bufs_aloc[13].log2align = AER_SIM_BUF13_ALGN_LOG2;
00361
00362   /* buffer 14, permanent, shared by all HF mics */
00363   if(multi_mic_flag) { /* this buffer is only used for multi-mics */
00364     bufs_aloc[14].base  = &(aer_buff14[0]);
00365     bufs_aloc[14].size  = AER_SIM_BUF14_SIZE;
00366   }
00367   else {
00368     bufs_aloc[14].base  = NULL;
00369     bufs_aloc[14].size  = 0;
00370   }
00371   bufs_aloc[14].log2align = AER_SIM_BUF14_ALGN_LOG2;
00372
00373   /* buffer 15, permanent, per HF mic. HS and HF 1st mic overlay */
00374   bufs_aloc[15].base  = &(aer_buff15[mic_num][0]);
00375   bufs_aloc[15].size  = AER_SIM_BUF15_SIZE;
00376   bufs_aloc[15].log2align = AER_SIM_BUF15_ALGN_LOG2;
00377
00378   /* buffer 16, permanent, per HF mic. HS and HF 1st mic overlay */
00379   bufs_aloc[16].base  = &aer_buff16[mic_num][0];
00380   bufs_aloc[16].size  = AER_SIM_BUF16_SIZE;
00381   bufs_aloc[16].log2align = AER_SIM_BUF16_ALGN_LOG2;
00382
00383   /* buffer 17, permanent, per HF mic. HS and HF 1st mic overlay */
00384   bufs_aloc[17].base  = &aer_buff17[mic_num][0];
00385   bufs_aloc[17].size  = AER_SIM_BUF17_SIZE;
00386   bufs_aloc[17].log2align = AER_SIM_BUF17_ALGN_LOG2;
00387
00388   /* buffer 18, permanent, per HF mic. HS and HF 1st mic overlay */
00389   bufs_aloc[18].base  = &aer_buff18[mic_num][0];
00390   bufs_aloc[18].size  = AER_SIM_BUF18_SIZE;
00391   bufs_aloc[18].log2align = AER_SIM_BUF18_ALGN_LOG2;
00392
00393   /* buffer 19, permanent, shared by HS and all HF mics */
00394   bufs_aloc[19].base  = &aer_buff19[0];
00395   bufs_aloc[19].size  = AER_SIM_BUF19_SIZE;
00396   bufs_aloc[19].log2align = AER_SIM_BUF19_ALGN_LOG2;
00397
00398   /* buffer 20, permanent, per HF mic. HS and HF 1st mic overlay */
00399   bufs_aloc[20].base  = &aer_buff20[mic_num][0];
00400   bufs_aloc[20].size  = AER_SIM_BUF20_SIZE;
00401   bufs_aloc[20].log2align = AER_SIM_BUF20_ALGN_LOG2;
00402
00403   return(stat);
00404 } /* siu_alloc_aer_buffs */
00405
00406 void siu_print_buff_usage(const ecomemBuffer_t *bufs, tint num_bufs)
00407 {
00408   int i;
00409
00410   printf("    Buffer    Size(twords)    Alignment    Volatile   address\n");
00411   for(i=0; i<num_bufs; i++) {
00412     printf("     %3d       %7d         %4d       ",
00413                  i, (int)bufs[i].size, (int)bufs[i].log2align);
00414     if(bufs[i].volat)
00415       printf("    yes");
00416     else
00417       printf("    no ");
00418
00419         printf("    0x%x\n", bufs[i].base);
00420   }
00421 }
00422
00423 /* nothing past this point */


AER Simulation: siuaer.h File Reference

  • File List
  • Globals

siuaer.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/aer/test/siusim/siuloc.h>

Include dependency graph for siuaer.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuAerSysPars_s

Typedefs

typedef siuAerSysPars_s | siuAerSysPars_t

Functions

void | siu_new_aer (siuInst_t *inst, tint num_HF_mic, tbool band_split_flag)
void | siu_open_aer (siuInst_t *inst, siuAerSysPars_t *aer_pars, tint samp_rates, tint num_mic)
void | siu_close_aer (siuInst_t *inst)

Typedef Documentation

typedef struct siuAerSysPars_s siuAerSysPars_t

Function Documentation

void siu_new_aer | ( | siuInst_t * | inst,
 |  | tint | num_HF_mic,
 |  | tbool | band_split_flag
 | ) |  |

Definition at line 58 of file siuaer.c.

References AER_HES_ID, AER_HF0_ID, AER_SIM_HES_MAX_FILT_LENGTH, AER_SIM_HES_MAX_Y2X_DELAY, AER_SIM_HF_MAX_FILT_LENGTH, AER_SIM_HF_MAX_Y2X_DELAY, siuInst_t::aerHEShandle, siuInst_t::aerHESInst, siuInst_t::aerHFhandles, siuInst_t::aerHFInst, aersim_setbit, siuPhoneSys_t::num_HF_mic, siuInst_t::phone_sys, siu_alloc_aer_buffs(), SIU_MID_AER, SIU_NUM_AER_BUFFS, siu_print_buff_usage(), siuAgcAerEvent(), siuDbgAer(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_aer | ( | siuInst_t * | inst,
 |  | siuAerSysPars_t * | aer_pars,
 |  | tint | samp_rates,
 |  | tint | num_mic
 | ) |  |

Definition at line 200 of file siuaer.c.

References siuAerSysPars_s::aer_filter_len_HES, siuAerSysPars_s::aer_filter_len_HF, siuInst_t::aerHESInst, siuInst_t::aerHFInst, aersim_chkbit, siuAerSysPars_s::ag_chg_delay_rx, siuAerSysPars_s::ag_chg_delay_tx, siuAerSysPars_s::ag_chg_interp_samp, and siuAerSysPars_s::y2x_delay.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_close_aer ( siuInst_t * inst )

Definition at line 242 of file siuaer.c.

References siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuPhoneSys_t::num_HF_mic, and siuInst_t::phone_sys.


AER Simulation: siuaer.h Source File

  • File List
  • Globals

siuaer.h

Go to the documentation of this file.
00001 #ifndef _SIUAER_H
00002 #define _SIUAER_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE: SIU functions to support simulation testing of AER
00006  ******************************************************************************
00007  * FILE NAME:   siuaer.h
00008  *
00009  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00010  *                     ALL RIGHTS RESERVED
00011  *
00012  *****************************************************************************/
00013
00014
00015 #include <ti/mas/types/types.h>
00016 #include <ti/mas/aer/test/siusim/siuloc.h>
00017
00018 typedef struct siuAerSysPars_s {
00019   tint aer_filter_len_HF;  /* # taps @8kHz in AER filter model for hands free */
00020   tint aer_filter_len_HES; /* # taps @8kHz in AER filter model for HS/HES     */
00021   tint y2x_delay;
00022   tint ag_chg_delay_tx;
00023   tint ag_chg_delay_rx;
00024   tint ag_chg_interp_samp;
00025 } siuAerSysPars_t;
00026
00027 void siu_new_aer(siuInst_t *inst, tint num_HF_mic, tbool band_split_flag);
00028 void siu_open_aer(siuInst_t *inst, siuAerSysPars_t *aer_pars,
00029                   tint samp_rates, tint num_mic);
00030 void siu_close_aer(siuInst_t *inst);
00031
00032 #endif /* _SIUAER_H */
00033
00034 /* nothing past this point */


AER Simulation: siuagc.c File Reference

  • File List
  • Globals

siuagc.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/agc.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuagc.h>
#include <ti/mas/aer/test/siusim/siuport.h>
#include <ti/mas/aer/test/aersim/aerbuffs.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>
#include <ti/mas/aer/test/aersim/aersim.h>

Include dependency graph for siuagc.c:

Go to the source code of this file.

Defines

#define | SIU_NUM_AGC_BUFFS 1

Functions

void | siuAgcAerEvent (void *handle, aerInfo_t *event)
void | siuAgcEvent (void *handle, agcEvent_t *event)
void | siuGainControl (void *handle, siuGainControl_t *siu_gain_ctl)
void | siu_new_agc (siuInst_t *inst, tint num_HF_mic)
void | siu_open_agc (siuInst_t *inst, tint sampling_rates, tint num_mic)
void | siu_close_agc (siuInst_t *inst)

Variables

siuInst_t siu_inst
aepSimInst_t | aepSimInst

Define Documentation

#define SIU_NUM_AGC_BUFFS 1

Definition at line 28 of file siuagc.c.

Referenced by siu_new_agc().

Function Documentation

void siuAgcAerEvent | ( | void * | handle,
 |  | aerInfo_t * | event
 | ) |  |

Definition at line 50 of file siuagc.c.

References siuInst_t::agcHESInst, siuInst_t::agcHFInst, siu_inst, and siuExtrMicID.

Referenced by siu_new_aer().

Here is the caller graph for this function:

void siuAgcEvent | ( | void * | handle,
 |  | agcEvent_t * | event
 | ) |  |

Definition at line 106 of file siuagc.c.

References siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuGainControl_s::ctl_code, siuInst_t::gain_ctl, siuGainControl_s::mic_gain, siuInst_t::pending_gain_request, siu_AGC_EVENT_MIC_GAIN_CHANGE, siu_inst, siuExtrMicID, and siuGainControl_s::u.

Referenced by siu_new_agc().

Here is the caller graph for this function:

void siuGainControl | ( | void * | handle,
 |  | siuGainControl_t * | siu_gain_ctl
 | ) |  |

Definition at line 183 of file siuagc.c.

References aepSimInst, siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuInst_t::agcHESInst, siuInst_t::agcHFInst, siuGainControl_s::ctl_code, siuGainControl_s::mic_gain, siu_AGC_EVENT_MIC_GAIN_CHANGE, siu_inst, siu_SET_MIC_GAIN, siu_SET_SPK_GAIN, siuExtrMicID, siuGainControl_s::spk_gain, and siuGainControl_s::u.

Referenced by aer_sim_config_aer_params(), and siuSendIn().

Here is the caller graph for this function:

void siu_new_agc | ( | siuInst_t * | inst,
 |  | tint | num_HF_mic
 | ) |  |

Definition at line 305 of file siuagc.c.

References AER_HES_ID, AER_HF0_ID, aersim_setbit, agc_buff0_hf, agc_buff0_hs, siuInst_t::agcHEShandle, siuInst_t::agcHESInst, siuInst_t::agcHFhandles, siuInst_t::agcHFInst, SIU_MID_AGC, SIU_NUM_AGC_BUFFS, siu_print_buff_usage(), siuAgcEvent(), siuDbgDrc(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_agc | ( | siuInst_t * | inst,
 |  | tint | sampling_rates,
 |  | tint | num_mic
 | ) |  |

Definition at line 402 of file siuagc.c.

References aersim_chkbit, siuInst_t::agcHESInst, and siuInst_t::agcHFInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_close_agc ( siuInst_t * inst )

Definition at line 431 of file siuagc.c.

References siuInst_t::agcHESInst, siuInst_t::agcHFInst, siuPhoneSys_t::num_HF_mic, and siuInst_t::phone_sys.

Variable Documentation

siuInst_t siu_inst

Definition at line 41 of file aersim.c.

Referenced by aer_sim_fio_write_data(), aer_sim_instantiate_aer(), main(), siuAgcAerEvent(), siuAgcEvent(), siuGainControl(), and siuInit().

aepSimInst_t aepSimInst

Definition at line 43 of file aersim.c.

Referenced by main(), and siuGainControl().


AER Simulation: siuagc.c Source File

  • File List
  • Globals

siuagc.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: SIU functions to support simulation testing of AER
00003  ******************************************************************************
00004  * FILE NAME:   siuagc.c
00005  *
00006  * DESCRIPTION: Contains constants and arrays for simulation testing of AER
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *****************************************************************************/
00011
00012 #include <stdio.h>
00013 #include <stdlib.h>
00014 #include <string.h>
00015
00016 #include <ti/mas/types/types.h>                      /* DSP types            */
00017 #include <ti/mas/aer/aer.h>
00018 #include <ti/mas/aer/agc.h>
00019
00020 #include <ti/mas/aer/test/siusim/siuloc.h>
00021 #include <ti/mas/aer/test/siusim/siuagc.h>
00022 #include <ti/mas/aer/test/siusim/siuport.h>
00023
00024 #include <ti/mas/aer/test/aersim/aerbuffs.h>
00025 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00026 #include <ti/mas/aer/test/aersim/aersim.h>
00027
00028 #define SIU_NUM_AGC_BUFFS 1
00029
00030 extern siuInst_t siu_inst;
00031 extern aepSimInst_t aepSimInst;
00032
00033
00034 /******************************************************************************
00035  * FUNCTION PURPOSE: AER Information relayed to AGC through SIU
00036  ******************************************************************************
00037  * DESCRIPTION: Informs AGC about the AER parameters.
00038  *
00039  *
00040  *  void siuAgcAerEvent (
00041  *    tuint id,                   - ID of AER instance
00042  *    aerInfo_t *event)           - pointer to siuEvent structure which reports
00043  *                                  SIU of gain change data.
00044  *
00045  * NOTE: Here we are not using the AER ID to get the channel number for SIU
00046  *       Once multiple instances are implemented correctly, we can change the
00047  *       logic here
00048  *
00049  *****************************************************************************/
00050 void siuAgcAerEvent (void *handle, aerInfo_t *event)
00051 {
00052   void *agcInst;
00053   agcControl_t   agcCtl;
00054   tulong aer_id;
00055   tuint mic_id;
00056   siuInst_t *inst;
00057
00058   aer_id = (tulong)handle;     /* not use void * handle yet */
00059   mic_id = siuExtrMicID(aer_id);
00060
00061   inst = &siu_inst;
00062
00063   /* find the instance pointer according to mic id */
00064   if(mic_id == 0)   /* HES/HS instance */
00065     agcInst = inst->agcHESInst;
00066   else  /* HF instance */
00067     agcInst = inst->agcHFInst[mic_id-1];
00068
00069   if (agcInst==NULL) {
00070
00071     return;
00072   }
00073
00074   agcCtl.valid_bitfield          = agc_CTL_VALID_AERDATA;
00075   agcCtl.aer_data.maxabs_pecho   = event->maxabs_pred_echo;
00076   agcCtl.aer_data.nlp_on         = event->nlp_on;
00077   agcCtl.aer_data.log2_attn      = event->max_canc_l2;
00078   agcCtl.aer_data.SWR            = event->rx_to_tx_hangover;
00079   agcCtl.aer_data.SWS            = event->tx_to_rx_hangover;
00080   agcCtl.aer_data.TS             = event->active_path;
00081   agcCtl.aer_data.XS             = event->switch2tx_period;
00082   agcCtl.aer_data.XR             = event->switch2rx_period;
00083   agcCtl.aer_data.pecho_pwr      = event->pred_echo_pwr;
00084   agcCtl.aer_data.Si_with_echo   = event->tx_mic_pwr;
00085   agcCtl.aer_data.Si_minus_echo  = event->tx_mic_pwr_minus_echo;
00086
00087   agcControl (agcInst, &agcCtl);
00088
00089 }  /* siuAgcAerEvent */
00090
00091 /******************************************************************************
00092  * FUNCTION PURPOSE: SIU AGC Event function.
00093  ******************************************************************************
00094  * DESCRIPTION: Processes event out (call out) request from AGC.
00095  *              Possible events are:
00096  *                 - agc_EVC_SAT_FALSE:    mic saturation ends
00097  *                 - agc_EVC_SAT_DETECTED: mic saturation starts
00098  *                 - agc_EVC_MGAIN_CHANGE: mic gain needs to be adjusted
00099  *                 - agc_EVC_GET_PRENLP_GAIN: please give me AER pre-NLP gain
00100  *
00101  *  void siuAgcEvent (
00102  *    void *handle,               - channel ID and AER/AGC ID
00103  *    agcEvent_t *event)          - AGC event structure
00104  *
00105  *****************************************************************************/
00106 void siuAgcEvent(void *handle, agcEvent_t *event)
00107 {
00108   siuInst_t *inst;
00109   void *aerInst;
00110   aerControl_t aerCtl;
00111   tulong agc_id;
00112   tuint mic_id;
00113   tint tx_dgain, rx_dgain;
00114   tint event_code;
00115
00116   agc_id = (tulong)handle;     /* not use void * handle yet */
00117   mic_id = siuExtrMicID(agc_id);
00118
00119   inst = &siu_inst;
00120
00121   /* find the AGC instance pointer according to mic id */
00122   if(mic_id == 0) {   /* HES/HS instance */
00123     aerInst = inst->aerHESInst;
00124   }
00125   else {  /* HF instance */
00126     aerInst = inst->aerHFInst[mic_id-1];
00127   }
00128
00129   aerCtl.valid_bitfield_0 = 0x0;
00130   aerCtl.valid_bitfield_1 = 0x0;
00131   aerCtl.valid_bitfield_2 = 0x0;
00132   aerCtl.valid_bitfield_3 = 0x0;
00133   aerCtl.valid_bitfield_4 = 0x0;
00134
00135   event_code = event->event_code;
00136
00137   switch (event_code) {
00138   case agc_EVC_SAT_FALSE:
00139     /* Inform AER of the ending of mic saturation */
00140     aerCtl.valid_bitfield_0 = aer_CTL_VALID0_MODES_CTL2;
00141     aerCtl.modes_2.mask = aer_CTL2_MICSAT;
00142     aerCtl.modes_2.value = 0;
00143     aerControl (aerInst, &aerCtl);
00144     break;
00145
00146   case agc_EVC_SAT_DETECTED:
00147     /* Inform AER of the mic saturation */
00148     aerCtl.valid_bitfield_0 = aer_CTL_VALID0_MODES_CTL2;
00149     aerCtl.modes_2.mask = aerCtl.modes_2.value = aer_CTL2_MICSAT;
00150     aerControl (aerInst, &aerCtl);
00151     break;
00152
00153   case agc_EVC_MGAIN_CHANGE:
00154     /* Indicate to change microphone gain as requested by AGC */
00155     inst->gain_ctl.ctl_code    = siu_AGC_EVENT_MIC_GAIN_CHANGE;
00156     inst->gain_ctl.u.mic_gain  = event->u.analog_gain;
00157     inst->pending_gain_request[mic_id-1] = TRUE; /* to call siuGainControl */
00158     break;
00159
00160   case agc_EVC_GET_PRENLP_GAIN:
00161     /* Get the existing pre-NLP gain from AER */
00162     aerGetGains (aerInst, &tx_dgain, &rx_dgain);
00163     event->u.pNLPgain = tx_dgain;
00164     break;
00165
00166   default:
00167     break;
00168   }
00169
00170 } /* siuAgcEvent */
00171
00172
00173 /******************************************************************************
00174  * FUNCTION PURPOSE: SIU gain control function.
00175  ******************************************************************************
00176  * DESCRIPTION: Process gain change request and inform AER and AGC of new gain.
00177  *
00178  *  void siuGainControl (
00179  *    void *handle,                   - channel ID and AER/AGC ID
00180  *    siuGainControl_t *siu_gain_ctl) - SIU gain control structure
00181  *
00182  *****************************************************************************/
00183 void siuGainControl(void *handle, siuGainControl_t *siu_gain_ctl)
00184 {
00185   siuInst_t *inst;
00186   aerControl_t aerCtl;
00187   agcControl_t agcCtl;
00188   void *aerInst;
00189   void *agcInst;
00190   tulong agc_id;
00191   tuint mic_id;
00192   tint tx_dgain, rx_dgain;
00193   tint control_code;
00194
00195   agc_id = (tulong)handle;     /* not use void * handle yet */
00196   mic_id = siuExtrMicID(agc_id);
00197
00198   inst = &siu_inst;
00199
00200   /* find the AER/AGC instance pointer according to mic id */
00201   if(mic_id == 0) {   /* HES/HS instance */
00202     agcInst = inst->agcHESInst;
00203     aerInst = inst->aerHESInst;
00204   }
00205   else {  /* HF instance */
00206     agcInst = inst->agcHFInst[mic_id-1];
00207     aerInst = inst->aerHFInst[mic_id-1];
00208   }
00209
00210   aerCtl.valid_bitfield_0 = 0x0;
00211   aerCtl.valid_bitfield_1 = 0x0;
00212   aerCtl.valid_bitfield_2 = 0x0;
00213   aerCtl.valid_bitfield_3 = 0x0;
00214   aerCtl.valid_bitfield_4 = 0x0;
00215
00216   control_code = siu_gain_ctl->ctl_code;
00217
00218   switch (control_code) {
00219
00220   case siu_SET_MIC_GAIN:
00221
00222     /* External request to change the programmable analog mic gain */
00223     aer_sim_aep_mic_gain_adj(&aepSimInst, siu_gain_ctl->u.mic_gain);
00224
00225     /* Inform AER of new mic analog gain */
00226     aerCtl.valid_bitfield_0 = aer_CTL_VALID0_TX_ANALOG;
00227     aerCtl.gain_tx_analog   = siu_gain_ctl->u.mic_gain;
00228     aerControl (aerInst, &aerCtl);
00229
00230     /* Inform AGC of new mic analog gain and inform AGC that this gain change
00231        is initiated externally */
00232     agcCtl.valid_bitfield = agc_CTL_VALID_MICGAIN;     /* gain set by system */
00233     agcCtl.mic_gain       = siu_gain_ctl->u.mic_gain;
00234     agcControl (agcInst, &agcCtl);
00235
00236     break;
00237
00238   case siu_SET_SPK_GAIN:
00239
00240     /* Change the programmable analog speaker gain */
00241     aer_sim_aep_spk_gain_adj(&aepSimInst, siu_gain_ctl->u.spk_gain);
00242
00243     /* Inform AGC of new speaker gain */
00244     agcCtl.valid_bitfield = agc_CTL_VALID_SPKGAIN;
00245     agcCtl.spk_gain       = siu_gain_ctl->u.spk_gain;
00246     agcControl (agcInst, &agcCtl);
00247
00248     /* Inform AER of new speaker gain */
00249     aerCtl.valid_bitfield_0 = aer_CTL_VALID0_RX_ANALOG;
00250     aerCtl.gain_rx_analog   = siu_gain_ctl->u.spk_gain;
00251     aerControl (aerInst, &aerCtl);
00252     break;
00253
00254   case siu_AGC_EVENT_MIC_GAIN_CHANGE:
00255
00256     /* Change the programmable analog mic gain as requested by AGC */
00257     aer_sim_aep_mic_gain_adj(&aepSimInst, siu_gain_ctl->u.mic_gain);
00258
00259     /* Get AER pre-NLP (Tx digital) gain to be updated by AGC */
00260     aerGetGains (aerInst, &tx_dgain, &rx_dgain);
00261
00262     /* Inform AGC of new mic analog gain and inform AGC that this gain change
00263        is initiated by adaptive AGC. Also ask for new AER pre-NLP gain which is
00264        returned in agcCtl.preNLP_gain.  */
00265     agcCtl.valid_bitfield = agc_CTL_VALID_MICGAIN_ADAPT;
00266     agcCtl.mic_gain       = siu_gain_ctl->u.mic_gain; /* gain asked by adaptive AGC */
00267     agcCtl.preNLP_gain    = tx_dgain;
00268     agcControl (agcInst, &agcCtl);
00269
00270     /* Inform AER of new mic gain and set new AER pre-NLP gain returned by AGC */
00271     aerCtl.valid_bitfield_0 = aer_CTL_VALID0_TX_ANALOG;
00272     aerCtl.gain_tx_analog   = siu_gain_ctl->u.mic_gain;
00273     if(agcCtl.preNLP_enable) {
00274       aerCtl.valid_bitfield_0 |= aer_CTL_VALID0_TX_DIGITAL;
00275       aerCtl.gain_tx_digital = agcCtl.preNLP_gain;
00276     }
00277     aerControl(aerInst, &aerCtl);
00278
00279     break;
00280
00281   default:
00282     break;
00283   }
00284 } /* siuGainControl */
00285
00286
00287
00288 /******************************************************************************
00289  * FUNCTION PURPOSE: Create AGC module.
00290  ******************************************************************************
00291  * DESCRIPTION: Obtains info on AGC buffers, and creates one instance of AGC.
00292  *
00293  *              NOTE: Should save number of buffers and buffer descriptors
00294  *                    in order to make delete possible.
00295  *                    Allocates AGC instance buffer.
00296  *
00297  *  void siu_new_agc (
00298  *    tint chnum,              - channel number (1 to SIU_MAX_CHANNELS)
00299  *    tint max_frame_length,   - maximum # samples in the frame (must be
00300  *                               greater than or equal to maximum sub-segment
00301  *                               size)
00302  *    tint max_sampling_rate)  - maximum sampling rate
00303  *
00304  *****************************************************************************/
00305 void siu_new_agc (siuInst_t *inst, tint num_HF_mic)
00306 {
00307   const ecomemBuffer_t *bufs_dscrp_by_agc;
00308   ecomemBuffer_t        bufs_dscrp_by_siu[SIU_NUM_AGC_BUFFS];
00309   agcCreateConfig_t agcCreateCfg;
00310   agcSizeConfig_t   agcCfgSize;
00311   agcNewConfig_t    agcCfgNew;
00312   tint              agcNbufs, mic_num, err_code;
00313
00314   /* AGC create */
00315   agcCreateCfg.config_bitfield  = 0x0;
00316   if(num_HF_mic > 1) {
00317     aersim_setbit(agcCreateCfg.config_bitfield, agc_CRT_MULT_MIC_MODE);
00318   }
00319   agcCreateCfg.debugInfo = siuDbgDrc;
00320   agcCreateCfg.eventOut  = siuAgcEvent;
00321   agcCreateCfg.max_sampling_rate = agc_SRATE_16K;
00322
00323   err_code = agcCreate(&agcCreateCfg);
00324   if(err_code != agc_NOERR) {
00325     printf("Error when calling agcCreate() with error code %d!\n", err_code);
00326     exit(1);
00327   }
00328
00329   /* AGC get sizes */
00330   err_code = agcGetSizes (&agcNbufs, &bufs_dscrp_by_agc, &agcCfgSize);
00331   if (err_code != agc_NOERR) {
00332     printf("Error when calling agcGetSizes() with error code %d!\n", err_code);
00333     exit(1);
00334   }
00335
00336   /* check if enough memory is allocated for SIU buffer descriptors */
00337   if (agcNbufs > SIU_NUM_AGC_BUFFS) {
00338     printf("No enough memory allocated by SIU for AGC buffer descriptors!\n");
00339         exit(1);
00340   }
00341
00342   printf("AGC required buffers:\n");
00343   siu_print_buff_usage(bufs_dscrp_by_agc, agcNbufs);
00344
00345   /* create new AGC instances */
00346   if (bufs_dscrp_by_agc[0].size <= AGC_SIM_BUF0_SIZE) {
00347     /* create one HS/HES instance */
00348     bufs_dscrp_by_siu[0].base = &(agc_buff0_hs[0]);
00349     bufs_dscrp_by_siu[0].size = AGC_SIM_BUF0_SIZE;
00350     bufs_dscrp_by_siu[0].log2align = AGC_SIM_BUF0_ALGN_LOG2;
00351     bufs_dscrp_by_siu[0].volat = FALSE;
00352
00353     printf("Buffers allocated by SIU for AGC:\n");
00354     siu_print_buff_usage(bufs_dscrp_by_siu, agcNbufs);
00355
00356     /* agcNew */
00357     agcCfgNew.handle = (void *)siuMakeID((SIU_MID_AGC|AER_HES_ID), 0);
00358     agcCfgNew.sizeCfg = agcCfgSize;
00359     inst->agcHEShandle = agcCfgNew.handle;
00360     err_code = agcNew (&inst->agcHESInst, agcNbufs, bufs_dscrp_by_siu, &agcCfgNew);
00361     if (err_code != agc_NOERR) {
00362       printf("Error when calling agcNew() for HES with error code %d!\n", err_code);
00363       exit(1);
00364     }
00365
00366     /* create multiple HF instances */
00367     for(mic_num = 0; mic_num < num_HF_mic; mic_num++) {
00368       bufs_dscrp_by_siu[0].base = &(agc_buff0_hf[mic_num][0]);
00369       bufs_dscrp_by_siu[0].size = AGC_SIM_BUF0_SIZE;
00370       bufs_dscrp_by_siu[0].log2align = AGC_SIM_BUF0_ALGN_LOG2;
00371       bufs_dscrp_by_siu[0].volat = FALSE;
00372
00373       agcCfgNew.handle = (void *)siuMakeID((SIU_MID_AGC|(AER_HF0_ID+mic_num)), 0);
00374       agcCfgNew.sizeCfg = agcCfgSize;
00375       inst->agcHFhandles[mic_num] = agcCfgNew.handle;
00376       err_code = agcNew (&inst->agcHFInst[mic_num], agcNbufs, bufs_dscrp_by_siu, &agcCfgNew);
00377       if (err_code != agc_NOERR) {
00378         printf("Error when calling agcNew() for HF with error code %d!\n", err_code);
00379         exit(1);
00380       }
00381     }
00382   }
00383   else {
00384     printf("No enough memory allocated for AGC!\n");
00385         exit(1);
00386   }
00387
00388 } /* siu_new_agc */
00389
00390
00391 /******************************************************************************
00392  * FUNCTION PURPOSE: Open AGC module.
00393  ******************************************************************************
00394  * DESCRIPTION: Opens one instance of AGC module.
00395  *
00396  *  void siu_open_agc (
00397  *    tint chnum,                    - channel number (1 to SIU_MAX_CHANNELS)
00398  *    tint frame_size,               - # samples in the frame
00399  *    tint sampling_rate,            - sampling rate
00400  *    tint gain_init)                - initial gain value in DB
00401  *****************************************************************************/
00402 void siu_open_agc(siuInst_t *inst, tint sampling_rates, tint num_mic)
00403 {
00404   agcConfig_t agcCfg;
00405   tint err_code;
00406   int mic_num;
00407
00408   if(aersim_chkbit(sampling_rates, aer_SRATE_RXOUT_TXIN_16K)) {
00409     agcCfg.sampling_rate = agc_SRATE_16K;
00410   }
00411   else {
00412     agcCfg.sampling_rate = agc_SRATE_8K;
00413   }
00414   agcCfg.reset_bitfield = 0xffff;
00415   agcCfg.valid_bitfield = 0x0001;
00416
00417   agcOpen (inst->agcHESInst, &agcCfg);
00418
00419   for(mic_num = 0; mic_num < num_mic; mic_num++) {
00420     err_code = agcOpen (inst->agcHFInst[mic_num], &agcCfg);
00421     if (err_code != agc_NOERR) {
00422       printf("Error when calling agcOpen() for HF with error code %d!\n", err_code);
00423       exit(1);
00424     }
00425   }
00426 } /* siu_open_agc */
00427
00428 /******************************************************************************
00429  * FUNCTION PURPOSE: Close AGC module.
00430  ******************************************************************************/
00431 void siu_close_agc(siuInst_t *inst)
00432 {
00433   int i;
00434
00435   agcClose(inst->agcHESInst);
00436
00437   for(i=0; i<inst->phone_sys.num_HF_mic; i++)
00438   {
00439     agcClose(inst->agcHFInst[i]);
00440   }
00441 } /* siu_close_agc */
00442
00443 /* nothing past this point */


AER Simulation: siuagc.h File Reference

  • File List
  • Globals

siuagc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/agc.h>

Include dependency graph for siuagc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuGainControl_s

Typedefs

typedef siuGainControl_s | siuGainControl_t

Enumerations

enum | { siu_SET_MIC_GAIN = 0, siu_SET_SPK_GAIN = 1, siu_AGC_EVENT_MIC_GAIN_CHANGE = 2 }

Functions

void | siuAgcAerEvent (void *handle, aerInfo_t *event)
void | siuAgcEvent (void *handle, agcEvent_t *event)
void | siuGainControl (void *handle, siuGainControl_t *siu_agc_ctl)

Typedef Documentation

typedef struct siuGainControl_s siuGainControl_t

Enumeration Type Documentation

anonymous enum

Enumerator:
siu_SET_MIC_GAIN
siu_SET_SPK_GAIN
siu_AGC_EVENT_MIC_GAIN_CHANGE

Definition at line 28 of file siuagc.h.

Function Documentation

void siuAgcAerEvent | ( | void * | handle,
 |  | aerInfo_t * | event
 | ) |  |

Definition at line 50 of file siuagc.c.

References siuInst_t::agcHESInst, siuInst_t::agcHFInst, siu_inst, and siuExtrMicID.

Referenced by siu_new_aer().

Here is the caller graph for this function:

void siuAgcEvent | ( | void * | handle,
 |  | agcEvent_t * | event
 | ) |  |

Definition at line 106 of file siuagc.c.

References siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuGainControl_s::ctl_code, siuInst_t::gain_ctl, siuGainControl_s::mic_gain, siuInst_t::pending_gain_request, siu_AGC_EVENT_MIC_GAIN_CHANGE, siu_inst, siuExtrMicID, and siuGainControl_s::u.

Referenced by siu_new_agc().

Here is the caller graph for this function:

void siuGainControl | ( | void * | handle,
 |  | siuGainControl_t * | siu_agc_ctl
 | ) |  |

Definition at line 183 of file siuagc.c.

References aepSimInst, siuInst_t::aerHESInst, siuInst_t::aerHFInst, siuInst_t::agcHESInst, siuInst_t::agcHFInst, siuGainControl_s::ctl_code, siuGainControl_s::mic_gain, siu_AGC_EVENT_MIC_GAIN_CHANGE, siu_inst, siu_SET_MIC_GAIN, siu_SET_SPK_GAIN, siuExtrMicID, siuGainControl_s::spk_gain, and siuGainControl_s::u.

Referenced by aer_sim_config_aer_params(), and siuSendIn().

Here is the caller graph for this function:


AER Simulation: siuagc.h Source File

  • File List
  • Globals

siuagc.h

Go to the documentation of this file.
00001 #ifndef _SIUAGC_H
00002 #define _SIUAGC_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE: SIU functions to support simulation testing of AER
00006  ******************************************************************************
00007  * FILE NAME:   siuagc.h
00008  *
00009  * DESCRIPTION: Contains constants and arrays for simulation testing of AER
00010  *
00011  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *                     ALL RIGHTS RESERVED
00013  *
00014  *****************************************************************************/
00015 #include <ti/mas/types/types.h>                      /* DSP types            */
00016 #include <ti/mas/aer/aer.h>
00017 #include <ti/mas/aer/agc.h>
00018
00019 /* used for gain control through SIU */
00020 typedef struct siuGainControl_s {
00021   tint    ctl_code;
00022   union {
00023     Fract mic_gain;  /* microphone gain */
00024         Fract spk_gain;  /* speaker gain */
00025   }u;
00026 }siuGainControl_t;
00027
00028 enum {
00029   siu_SET_MIC_GAIN              = 0,  /* to set microphone gain as requested
00030                                          from outside of AGC */
00031   siu_SET_SPK_GAIN              = 1,  /* to set speaker gain */
00032   siu_AGC_EVENT_MIC_GAIN_CHANGE = 2   /* to set microphone gain as requested by AGC */
00033 };
00034
00035 void siuAgcAerEvent (void *handle, aerInfo_t *event);
00036 void siuAgcEvent    (void *handle, agcEvent_t *event);
00037 void siuGainControl (void *handle, siuGainControl_t *siu_agc_ctl);
00038
00039 #endif /* _SIUAGC_H */
00040
00041 /* nothing past this point */


AER Simulation: siubf.c File Reference

  • File List
  • Globals

siubf.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/aer/bf.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuport.h>
#include <ti/mas/aer/test/siusim/siubf.h>
#include <ti/mas/aer/test/aersim/aersim.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>

Include dependency graph for siubf.c:

Go to the source code of this file.

Defines

#define | SIU_NUM_bf_BUFFS 5
#define | bf_INT_HEAP_SIZE 0x600
#define | bf_EXT_HEAP_SIZE 0x600

Functions

tint | siu_alloc_bf_buffs (const ecomemBuffer_t *bufs_req, ecomemBuffer_t *bufs_aloc, tint num_bufs)
void | siu_print_buff_usage (const ecomemBuffer_t *bufs, tint num_bufs)
void | siu_new_bf (siuInst_t *inst, tint samp_rates)
void | siu_open_bf (siuInst_t *inst, tint samp_rates, tint num_mic)
void | siu_config_bf (siuInst_t *inst, bfControl_t *ctl, Fract coeffs[][SIU_BF_FLT_LEN], tint sampling_rates, tint num_mics)
void | siu_close_bf (siuInst_t *inst)
void | siu_delete_bf (siuInst_t *inst)
void | bf_mem_heap_init (bfMemHeap_t *ptr, tword *heapBase, tulong size)
void | bf_mem_init_heap (void)
void * | bf_mem_align (void *addr, tuint lin_align)
tword * | bf_mem_heap_alloc (bfMemHeap_t *ptr, tint size)
void * | bf_mem_alloc_align (tint size, tint mclass, tint linAlign)

Variables

tword | bfIntMem [bf_INT_HEAP_SIZE]
tword | bfExtMem [bf_EXT_HEAP_SIZE]
bfMemHeap_t bfIntHeap
bfMemHeap_t bfExtHeap

Define Documentation

#define SIU_NUM_bf_BUFFS 5

Definition at line 33 of file siubf.c.

Referenced by siu_delete_bf(), and siu_new_bf().

#define bf_INT_HEAP_SIZE 0x600

Definition at line 38 of file siubf.c.

Referenced by bf_mem_init_heap().

#define bf_EXT_HEAP_SIZE 0x600

Definition at line 39 of file siubf.c.

Referenced by bf_mem_init_heap().

Function Documentation

tint siu_alloc_bf_buffs | ( | const ecomemBuffer_t * | bufs_req,
 |  | ecomemBuffer_t * | bufs_aloc,
 |  | tint | num_bufs
 | ) |  |

Definition at line 352 of file siubf.c.

References bf_mem_alloc_align().

Referenced by siu_new_bf().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_print_buff_usage | ( | const ecomemBuffer_t * | bufs,
 |  | tint | num_bufs
 | ) |  |

void siu_new_bf | ( | siuInst_t * | inst,
 |  | tint | samp_rates
 | ) |  |

Definition at line 68 of file siubf.c.

References AER_SIM_MAX_BF_FILT_LEN, AER_SIM_NUM_BF_MIC, bf_mem_init_heap(), siuInst_t::bfInst, siu_alloc_bf_buffs(), SIU_MID_BF, SIU_NUM_bf_BUFFS, siu_print_buff_usage(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_bf | ( | siuInst_t * | inst,
 |  | tint | samp_rates,
 |  | tint | num_mic
 | ) |  |

Definition at line 132 of file siubf.c.

References siuInst_t::bfInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_config_bf | ( | siuInst_t * | inst,
 |  | bfControl_t * | ctl,
 |  | Fract | coeffs[][SIU_BF_FLT_LEN],
 |  | tint | sampling_rates,
 |  | tint | num_mics
 | ) |  |

Definition at line 180 of file siubf.c.

References siuInst_t::bfInst.

Referenced by aer_sim_config_aer_params().

Here is the caller graph for this function:

void siu_close_bf ( siuInst_t * inst )

Definition at line 213 of file siubf.c.

References siuInst_t::bfInst.

void siu_delete_bf ( siuInst_t * inst )

Definition at line 235 of file siubf.c.

References siuInst_t::bfInst, and SIU_NUM_bf_BUFFS.

void bf_mem_heap_init | ( | bfMemHeap_t * | ptr,
 |  | tword * | heapBase,
 |  | tulong | size
 | ) |  |

Definition at line 265 of file siubf.c.

References bfMemHeap_t::base, bfMemHeap_t::indx, and bfMemHeap_t::size.

Referenced by bf_mem_init_heap().

Here is the caller graph for this function:

void bf_mem_init_heap ( void )

Definition at line 274 of file siubf.c.

References bf_EXT_HEAP_SIZE, bf_INT_HEAP_SIZE, bf_mem_heap_init(), bfExtHeap, bfExtMem, bfIntHeap, and bfIntMem.

Referenced by siu_new_bf().

Here is the call graph for this function:

Here is the caller graph for this function:

void* bf_mem_align | ( | void * | addr,
 |  | tuint | lin_align
 | ) |  |

Definition at line 293 of file siubf.c.

Referenced by bf_mem_alloc_align().

Here is the caller graph for this function:

tword* bf_mem_heap_alloc | ( | bfMemHeap_t * | ptr,
 |  | tint | size
 | ) |  |

Definition at line 312 of file siubf.c.

References bfMemHeap_t::base, bfMemHeap_t::indx, and bfMemHeap_t::size.

Referenced by bf_mem_alloc_align().

Here is the caller graph for this function:

void* bf_mem_alloc_align | ( | tint | size,
 |  | tint | mclass,
 |  | tint | linAlign
 | ) |  |

Definition at line 323 of file siubf.c.

References bf_mem_align(), bf_mem_heap_alloc(), bfExtHeap, and bfIntHeap.

Referenced by siu_alloc_bf_buffs().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

tword bfIntMem[bf_INT_HEAP_SIZE]

Definition at line 42 of file siubf.c.

Referenced by bf_mem_init_heap().

tword bfExtMem[bf_EXT_HEAP_SIZE]

Definition at line 44 of file siubf.c.

Referenced by bf_mem_init_heap().

bfMemHeap_t bfIntHeap

Definition at line 45 of file siubf.c.

Referenced by bf_mem_alloc_align(), and bf_mem_init_heap().

bfMemHeap_t bfExtHeap

Definition at line 46 of file siubf.c.

Referenced by bf_mem_alloc_align(), and bf_mem_init_heap().


AER Simulation: siubf.c Source File

  • File List
  • Globals

siubf.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: SIU functions to support simulation testing of BF
00003  ******************************************************************************
00004  * FILE NAME:   siubf.c
00005  *
00006  * DESCRIPTION: Contains constants and arrays for simulation testing of bf
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015 #include <string.h>
00016
00017 /* System definitions and utilities */
00018 #include <ti/mas/types/types.h>                      /* DSP types            */
00019 #include <ti/mas/fract/fract.h>
00020 #include <ti/mas/util/ecomem.h>
00021 #include <ti/mas/aer/bf.h>
00022
00023 /* Signal generator and AEP header files */
00024 #include <ti/mas/aer/test/siusim/siu.h>
00025 #include <ti/mas/aer/test/siusim/siuloc.h>
00026 #include <ti/mas/aer/test/siusim/siuport.h>
00027 #include <ti/mas/aer/test/siusim/siubf.h>
00028
00029 #include <ti/mas/aer/test/aersim/aersim.h>
00030 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00031
00032
00033 #define SIU_NUM_bf_BUFFS              5        /* buffer allocation */
00034
00035 /************************************************************
00036  * Memory heap sizes
00037  ************************************************************/
00038 #define bf_INT_HEAP_SIZE 0x600
00039 #define bf_EXT_HEAP_SIZE 0x600
00040
00041 //#pragma DATA_SECTION (bfIntMem, "int_heap");
00042 tword bfIntMem[bf_INT_HEAP_SIZE];
00043 //#pragma DATA_SECTION (bfExtMem, "ext_heap");
00044 tword bfExtMem[bf_EXT_HEAP_SIZE];
00045 bfMemHeap_t bfIntHeap;
00046 bfMemHeap_t bfExtHeap;
00047
00048 tint siu_alloc_bf_buffs(const ecomemBuffer_t *bufs_req, ecomemBuffer_t *bufs_aloc,
00049                          tint num_bufs);
00050 void siu_print_buff_usage(const ecomemBuffer_t *bufs, tint num_bufs);
00051
00052
00053 /******************************************************************************
00054  * FUNCTION PURPOSE: Create bf module.
00055  ******************************************************************************
00056  * DESCRIPTION: Obtains info on bf buffers, and creates one instance of bf.
00057  *
00058  *              NOTE: Should save number of buffers and buffer descriptors
00059  *                    in order to make delete possible.
00060  *
00061  *                    Allocates bf receive-in buffer that is used in PIU.
00062  *                    Assumes receive-in buffer is offset 5.
00063  *
00064  *  void siu_new_bf (
00065  *    (siuInst_t *)siu_inst)  - SIU instance pointer
00066  *
00067  *****************************************************************************/
00068 void siu_new_bf(siuInst_t *inst, tint samp_rates)
00069 {
00070   tint err_code, num_bufs_req_by_bf;
00071   const ecomemBuffer_t *bufs_req_by_bf;
00072   ecomemBuffer_t        bufs_aloc_by_siu[SIU_NUM_bf_BUFFS];
00073   bfSizeConfig_t        bf_size_cfg;
00074   bfNewConfig_t         bf_new_cfg;
00075
00076   /* Set up configurations for bfGetSizes() */
00077   bf_size_cfg.max_sampling_rate  = bf_SAMP_RATE_16K;
00078   bf_size_cfg.max_num_mics       = AER_SIM_NUM_BF_MIC;
00079   bf_size_cfg.max_filter_length  = AER_SIM_MAX_BF_FILT_LEN;
00080   bf_size_cfg.bf_type            = bf_TYPE_FIXED;
00081
00082   /* Call API function bfGetSizes() to get memory requirements:
00083      - num_bufs_req_by_bf: number of buffers required by bf
00084      - bufs_req_by_bf:   pointer to buffer descriptors defined inside bf */
00085   err_code = bfGetSizes(&num_bufs_req_by_bf, &bufs_req_by_bf, &bf_size_cfg);
00086   if (err_code != bf_NOERR) {
00087     printf("Error when calling bfGetSizes() with error code %d!\n", err_code);
00088     exit(1);
00089   }
00090
00091   printf("bf required buffers:\n");
00092   siu_print_buff_usage(bufs_req_by_bf, num_bufs_req_by_bf);
00093
00094   /* Check if there is enough memory allocated for bf */
00095   if(   num_bufs_req_by_bf > SIU_NUM_bf_BUFFS ) {
00096     printf("Memory allocated by SIU is not enough for bf!\n");
00097     exit(0);
00098   }
00099
00100   /* Provide memory to bf through bfNew() */
00101   bf_mem_init_heap ();
00102   err_code = siu_alloc_bf_buffs(bufs_req_by_bf, bufs_aloc_by_siu,
00103                                  num_bufs_req_by_bf);
00104   if (err_code != bf_NOERR) {
00105     printf("Error when allocating buffers for bf with error code %d!\n", err_code);
00106     exit(1);
00107   }
00108   printf("Buffers allocated by SIU for bf:\n");
00109   siu_print_buff_usage(bufs_aloc_by_siu, num_bufs_req_by_bf);
00110
00111   /* Set up configurations for bfNew() */
00112   bf_new_cfg.handle  = (void *) siuMakeID(SIU_MID_BF, 0);
00113   bf_new_cfg.sizeCfg = bf_size_cfg;
00114
00115   /* Call API function bfNew() to create an bf instance:
00116      - pass buffer descriptors that are set by SIU
00117      - pass number of buffer descriptors   */
00118   err_code = bfNew (&inst->bfInst, num_bufs_req_by_bf, bufs_aloc_by_siu, &bf_new_cfg);
00119   if (err_code != bf_NOERR) {
00120     printf("Error when calling bfNew() with error code %d!\n", err_code);
00121     exit(1);
00122   }
00123
00124 } /* siu_new_bf */
00125
00126
00127
00128 /******************************************************************************
00129  * FUNCTION PURPOSE: Open bf instances.
00130  *
00131  *****************************************************************************/
00132 void siu_open_bf(siuInst_t *inst, tint samp_rates, tint num_mic)
00133 {
00134   /*ecomemBuffer_t bufs[SIU_NUM_bf_BUFFS];*/
00135   bfConfig_t bfCfg;
00136   tint err_code;
00137
00138   /* Open the bf instance */
00139   if ((samp_rates & 0x04) == 0) {
00140     bfCfg.sampling_rate    = bf_SAMP_RATE_8K;
00141   }
00142   else {
00143     bfCfg.sampling_rate    = bf_SAMP_RATE_16K;
00144   }
00145   bfCfg.num_mics = num_mic;
00146
00147   /* Call bf API to open the bf instance */
00148   err_code = bfOpen (inst->bfInst, &bfCfg);
00149   if (err_code != bf_NOERR) {
00150     printf("Error when calling bfOpen()with error code %d!\n", err_code);
00151     exit(1);
00152   }
00153
00154   /* Temporary code to test bfClose() and bfDelete() */
00155 /*
00156   err_code = bfClose(inst->bfInst);
00157   if (err_code != bf_NOERR) {
00158     printf("Error when calling bfClose() with error code %d!\n", err_code);
00159     exit(1);
00160   }
00161
00162   err_code = bfDelete (&inst->bfInst, SIU_NUM_bf_BUFFS, bufs);
00163   if (err_code != bf_NOERR) {
00164     printf("Error when calling bfDelete() with error code %d!\n", err_code);
00165     exit(1);
00166   }
00167 */
00168 } /* siu_open_bf */
00169
00170 /******************************************************************************
00171  * FUNCTION PURPOSE: Set the operating mode of a bf
00172  ******************************************************************************
00173  * DESCRIPTION: Controls the operating mode and internal parameters of the bf.
00174  *
00175  *  void siu_config_bf (
00176  *    siuInst_t *inst,
00177  *    tint sampling_rate)  - 1 or 2 indicate 8 or 16 kHz sampling rate
00178  *
00179  *****************************************************************************/
00180 void siu_config_bf (siuInst_t *inst, bfControl_t *ctl, Fract coeffs[][SIU_BF_FLT_LEN],
00181                     tint sampling_rates, tint num_mics)
00182 {
00183   tint err_code, i;
00184
00185   if (inst->bfInst == NULL) {
00186     printf("Error when config BF with NULL pointer!\n");
00187     exit(1);
00188   }
00189
00190   /* put in filter coefficients for BF */
00191   for (i=0; i<num_mics; i++)
00192   {
00193     bfPutFilter (inst->bfInst, &coeffs[i][0], bf_FG_BF, i, SIU_BF_FLT_LEN);
00194   }
00195
00196   err_code = bfControl(inst->bfInst, ctl);
00197   if (err_code != bf_NOERR) {
00198     printf("Error when configure BF with error code %d!\n", err_code);
00199     exit(1);
00200   }
00201 } /* siu_config_bf */
00202
00203
00204 /******************************************************************************
00205  * FUNCTION PURPOSE: Close BF module.
00206  ******************************************************************************
00207  * DESCRIPTION: Close one instance of BF module.
00208  *
00209  *  void siu_close_bf (
00210  *    siuInst_t *inst)          - siu instance
00211  *
00212  *****************************************************************************/
00213 void siu_close_bf(siuInst_t *inst)
00214 {
00215   tint err_code;
00216
00217   err_code = bfClose(inst->bfInst); /* the instance state is set to bf_CLOSED */
00218
00219   if (err_code != bf_NOERR) {
00220     printf("Error when calling bfClose() with error code %d!\n", err_code);
00221     exit(1);
00222   }
00223
00224 } /* siu_close_bf */
00225
00226 /******************************************************************************
00227  * FUNCTION PURPOSE: Delete BF module.
00228  ******************************************************************************
00229  * DESCRIPTION: Delete one instance of BF module.
00230  *
00231  *  void siu_delete_bf (
00232  *    siuInst_t *inst)          - siu instance
00233  *
00234  *****************************************************************************/
00235 void siu_delete_bf(siuInst_t *inst)
00236 {
00237   tint err_code,i;
00238   ecomemBuffer_t bufs[SIU_NUM_bf_BUFFS];
00239
00240   err_code = bfDelete (&inst->bfInst, SIU_NUM_bf_BUFFS, bufs);
00241   if (err_code != bf_NOERR) {
00242     printf("Error when calling bfDelete() with error code %d!\n", err_code);
00243     exit(1);
00244   }
00245
00246   for(i=0;i<SIU_NUM_bf_BUFFS;i++)
00247   {
00248      free(bufs[i].base);
00249   }
00250
00251 } /* siu_delete_bf */
00252
00253 /******************************************************************************
00254  * FUNCTION PURPOSE: Init heap memory.
00255  ******************************************************************************
00256  * DESCRIPTION:
00257  *
00258  *  void bf_mem_heap_init (
00259  *    bfMemHeap_t *ptr,
00260  *    tword *heapBase,
00261  *    tulong size)          - channel number (1 to SIU_MAX_CHANNELS)
00262  *
00263  *****************************************************************************/
00264
00265 void bf_mem_heap_init (bfMemHeap_t *ptr, tword *heapBase, tulong size)
00266 {
00267   ptr->base = heapBase;
00268   ptr->size = size;
00269   ptr->indx = 0;
00270   /* Note : memory is not initialized deliberately to expose
00271             uninitialized memory read problems */
00272 }
00273
00274 void bf_mem_init_heap (void)
00275 {
00276   /* Internal heap */
00277   bf_mem_heap_init (&bfIntHeap, bfIntMem, bf_INT_HEAP_SIZE);
00278   /* External heap */
00279   bf_mem_heap_init (&bfExtHeap, bfExtMem, bf_EXT_HEAP_SIZE);
00280 }
00281
00282 /******************************************************************************
00283  * FUNCTION PURPOSE: align memory
00284  ******************************************************************************
00285  * DESCRIPTION:
00286  *
00287  *  void *bf_mem_align (
00288  *    void *addr,
00289  *    tuint lin_align)          - channel number (1 to SIU_MAX_CHANNELS)
00290  *
00291  *****************************************************************************/
00292
00293 void *bf_mem_align (void *addr, tuint lin_align)
00294 {
00295   tulong align_addr;
00296
00297   align_addr = ((tulong) addr + lin_align - 1UL) & (0xFFFFFFFFUL - lin_align + 1UL);
00298   return ((void *) align_addr);
00299 }
00300
00301 /******************************************************************************
00302  * FUNCTION PURPOSE: allocate heap memory
00303  ******************************************************************************
00304  * DESCRIPTION:
00305  *
00306  *  tword *bf_mem_heap_alloc (
00307  *    bfMemHeap_t *ptr,
00308  *    tint size)          - channel number (1 to SIU_MAX_CHANNELS)
00309  *
00310  *****************************************************************************/
00311
00312 tword *bf_mem_heap_alloc (bfMemHeap_t *ptr, tint size)
00313 {
00314   tword *alloc = NULL;
00315
00316   if ((ptr->indx + size) <= ptr->size) {
00317     alloc = &ptr->base[ptr->indx];
00318     ptr->indx += size;
00319   }
00320   return (alloc);
00321 }
00322
00323 void *bf_mem_alloc_align (tint size, tint mclass, tint linAlign)
00324 {
00325   void *allocPtr;
00326   bfMemHeap_t *ptr;
00327
00328   if (mclass == ecomem_CLASS_INTERNAL) {
00329     ptr = &bfIntHeap;
00330   }
00331   else if (mclass == ecomem_CLASS_EXTERNAL) {
00332     ptr = &bfExtHeap;
00333   }
00334   else {
00335     printf("Unrecognized memory class, exiting\n");
00336     exit (0);
00337   }
00338
00339   if ((allocPtr = (void *) bf_mem_heap_alloc (ptr, size + linAlign - 1)) == NULL) {
00340     printf("Not enough heap, exiting\n");
00341     exit (0);
00342   }
00343
00344   return (bf_mem_align (allocPtr, linAlign));
00345 }
00346
00347
00348 /******************************************************************************
00349  * FUNCTION PURPOSE: Allocate buffers for bf instance
00350  *
00351  *****************************************************************************/
00352 tint siu_alloc_bf_buffs(const ecomemBuffer_t *bufs_req, ecomemBuffer_t *bufs_aloc,
00353                          tint num_bufs)
00354 {
00355   tint err_code;
00356   tint i;
00357   tuint  linAlign, log2align;
00358
00359   err_code = bf_NOERR;
00360   for (i = 0; i < num_bufs; i++) {
00361     log2align = bufs_req[i].log2align;
00362     linAlign = (tuint) 1 << log2align;
00363
00364     bufs_aloc[i].mclass    = bufs_req[i].mclass;   /* internal memory for all  */
00365     bufs_aloc[i].log2align = bufs_req[i].log2align;/* meet alignment requirement */
00366     bufs_aloc[i].volat     = FALSE;                /* initialized to permanent */
00367     bufs_aloc[i].size      = bufs_req[i].size;     /* size of the buffer */
00368     bufs_aloc[i].base      = bf_mem_alloc_align (bufs_aloc[i].size, bufs_aloc[i].mclass, linAlign);
00369   }
00370
00371   bufs_aloc[3].volat     = TRUE;                /* initialized to permanent */
00372   bufs_aloc[4].volat     = TRUE;                /* initialized to permanent */
00373
00374   return(err_code);
00375 } /* siu_alloc_bf_buffs */
00376
00377 /* nothing past this point */


AER Simulation: siubf.h File Reference

  • File List
  • Globals

siubf.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/aer/test/siusim/siuloc.h>

Include dependency graph for siubf.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | bfMemHeap_t
struct | bfMemConfig_t

Defines

#define | SIU_BF_MAX_NUM_MICS 4
#define | SIU_BF_FLT_LEN 24

Enumerations

enum | bfMem_e { bf_MEM_INT_HEAP = ecomem_CLASS_INTERNAL, bf_MEM_EXT_HEAP = ecomem_CLASS_EXTERNAL }

Functions

void * | bf_mem_align (void *addr, tuint lin_align)
void | bf_mem_init_heap (void)
void * | bf_mem_alloc_align (tint size, tint mclass, tint linAlign)
void | siu_new_bf (siuInst_t *inst, tint samp_rates)
void | siu_open_bf (siuInst_t *inst, tint samp_rates, tint num_mic)
void | siu_config_bf (siuInst_t *inst, bfControl_t *ctl, Fract coeffs[][SIU_BF_FLT_LEN], tint sampling_rates, tint num_mics)
void | siu_close_bf (siuInst_t *inst)
void | siu_delete_bf (siuInst_t *inst)

Define Documentation

#define SIU_BF_MAX_NUM_MICS 4

Definition at line 38 of file siubf.h.

#define SIU_BF_FLT_LEN 24

Definition at line 39 of file siubf.h.

Enumeration Type Documentation

enum bfMem_e

Enumerator:
bf_MEM_INT_HEAP
bf_MEM_EXT_HEAP

Definition at line 33 of file siubf.h.

Function Documentation

void* bf_mem_align | ( | void * | addr,
 |  | tuint | lin_align
 | ) |  |

Definition at line 293 of file siubf.c.

Referenced by bf_mem_alloc_align().

Here is the caller graph for this function:

void bf_mem_init_heap ( void )

Definition at line 274 of file siubf.c.

References bf_EXT_HEAP_SIZE, bf_INT_HEAP_SIZE, bf_mem_heap_init(), bfExtHeap, bfExtMem, bfIntHeap, and bfIntMem.

Referenced by siu_new_bf().

Here is the call graph for this function:

Here is the caller graph for this function:

void* bf_mem_alloc_align | ( | tint | size,
 |  | tint | mclass,
 |  | tint | linAlign
 | ) |  |

Definition at line 323 of file siubf.c.

References bf_mem_align(), bf_mem_heap_alloc(), bfExtHeap, and bfIntHeap.

Referenced by siu_alloc_bf_buffs().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_new_bf | ( | siuInst_t * | inst,
 |  | tint | samp_rates
 | ) |  |

Definition at line 68 of file siubf.c.

References AER_SIM_MAX_BF_FILT_LEN, AER_SIM_NUM_BF_MIC, bf_mem_init_heap(), siuInst_t::bfInst, siu_alloc_bf_buffs(), SIU_MID_BF, SIU_NUM_bf_BUFFS, siu_print_buff_usage(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_bf | ( | siuInst_t * | inst,
 |  | tint | samp_rates,
 |  | tint | num_mic
 | ) |  |

Definition at line 132 of file siubf.c.

References siuInst_t::bfInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_config_bf | ( | siuInst_t * | inst,
 |  | bfControl_t * | ctl,
 |  | Fract | coeffs[][SIU_BF_FLT_LEN],
 |  | tint | sampling_rates,
 |  | tint | num_mics
 | ) |  |

Definition at line 180 of file siubf.c.

References siuInst_t::bfInst.

Referenced by aer_sim_config_aer_params().

Here is the caller graph for this function:

void siu_close_bf ( siuInst_t * inst )

Definition at line 213 of file siubf.c.

References siuInst_t::bfInst.

void siu_delete_bf ( siuInst_t * inst )

Definition at line 235 of file siubf.c.

References siuInst_t::bfInst, and SIU_NUM_bf_BUFFS.


AER Simulation: siubf.h Source File

  • File List
  • Globals

siubf.h

Go to the documentation of this file.
00001 #ifndef _SIUBF_H
00002 #define _SIUBF_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE: SIU functions to support simulation testing of BF
00006  ******************************************************************************
00007  * FILE NAME:   siubf.h
00008  *
00009  * DESCRIPTION: Contains constants and arrays for simulation testing of BF
00010  *
00011  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *                     ALL RIGHTS RESERVED
00013  *
00014  *****************************************************************************/
00015
00016
00017 #include <ti/mas/types/types.h>
00018 #include <ti/mas/util/ecomem.h>
00019 #include <ti/mas/aer/test/siusim/siuloc.h>
00020
00021 typedef struct {
00022   tword *base;
00023   tulong indx;
00024   tulong size;
00025 } bfMemHeap_t;
00026
00027 typedef struct {
00028   tbool pre_init_bufs;
00029   tword init_pattern;
00030   tuint mclass;
00031 } bfMemConfig_t;
00032
00033 typedef enum {
00034   bf_MEM_INT_HEAP = ecomem_CLASS_INTERNAL,
00035   bf_MEM_EXT_HEAP = ecomem_CLASS_EXTERNAL
00036 } bfMem_e;
00037
00038 #define SIU_BF_MAX_NUM_MICS           4
00039 #define SIU_BF_FLT_LEN               24
00040
00041 void *bf_mem_align       (void *addr, tuint lin_align);
00042 void  bf_mem_init_heap   (void);
00043 void *bf_mem_alloc_align (tint size, tint mclass, tint linAlign);
00044
00045 void siu_new_bf(siuInst_t *inst, tint samp_rates);
00046 void siu_open_bf(siuInst_t *inst, tint samp_rates, tint num_mic);
00047 void siu_config_bf (siuInst_t *inst, bfControl_t *ctl, Fract coeffs[][SIU_BF_FLT_LEN],
00048                     tint sampling_rates, tint num_mics);
00049 void siu_close_bf(siuInst_t *inst);
00050 void siu_delete_bf(siuInst_t *inst);
00051
00052 #endif /* _SIUBF_H */
00053
00054 /* nothing past this point */


AER Simulation: siudrc.c File Reference

  • File List
  • Globals

siudrc.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/drc.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuport.h>
#include <ti/mas/aer/test/siusim/siudrc.h>
#include <ti/mas/aer/test/aersim/aerbuffs.h>
#include <ti/mas/aer/test/aersim/aersim.h>
#include <ti/mas/aer/test/aersim/aersim_fileIO.h>

Include dependency graph for siudrc.c:

Go to the source code of this file.

Defines

#define | SIU_NUM_DRC_BUFFS 5

Enumerations

enum {
setup_test = 1, full_multi_band_test, func_blocks_test, api_test,
close_test
}
enum | { fullband_test_w_input1 = 1, multiband_test_w_input1 = 2, fullband_test_w_input2 = 3, multiband_test_w_input2 = 4 }

Functions

void | siu_new_drc (siuInst_t *inst)
void | siu_open_drc (siuInst_t *inst, tuint cfg_bits, tint sampling_rates)
void | siu_close_drc (siuInst_t *inst)
void | siu_delete_drc (siuInst_t *inst)
void | siu_control_drc (siuInst_t *inst, tint sampling_rates, tint drc_on_flag)
void | siu_drc_process (void *inst, void *sin, void *sout)

Variables

const Fract | drc_lowband_coef_8k [drc_FIR_HALF_COEF_8KHZ]
const Fract | drc_midband_coef_8k [drc_FIR_HALF_COEF_8KHZ]
const Fract | drc_highband_coef_8k [drc_FIR_HALF_COEF_8KHZ]
const Fract | drc_lowband_coef_16k [drc_FIR_HALF_COEF_16KHZ]
const Fract | drc_midband_coef_16k [drc_FIR_HALF_COEF_16KHZ]
const Fract | drc_highband_coef_16k [drc_FIR_HALF_COEF_16KHZ]
FILE * | drc_test_cfg
FILE * | drc_in = NULL
FILE * | drc_out = NULL
FILE * | dbg_out = NULL
FILE * | drc_ref = NULL
char * | file_name
char * | in_file_16k = NULL
char * | in_file_8k = NULL
char * | out_file_16k = NULL
char * | out_file_8k = NULL
char * | ref_file_16k = NULL
char * | ref_file_8k = NULL
char | input_name_16k [40]
char | input_name_8k [40]
char | in_file_name_16k [40]
char | in_file_name_8k [40]
char | out_file_name_16k [40]
char | out_file_name_8k [40]
char | ref_file_name_16k [40]
char | ref_file_name_8k [40]
tbool | openfile = TRUE
Fract | drc_buffer [160]
Fract | drc_buffer2 [160]
tint | drc_samp_rate
tuint | full_multi_band_test_result = 0
tuint | func_blocks_test_result = 0
tuint | drc_api_err = 0
tuint | drc_api_err2 = 0
tint | drc_test = 0
tint | test_case = 0
Fract | drc_debug_buffer []

Define Documentation

#define SIU_NUM_DRC_BUFFS 5

Definition at line 29 of file siudrc.c.

Referenced by siu_new_drc().

Enumeration Type Documentation

anonymous enum

Enumerator:
setup_test
full_multi_band_test
func_blocks_test
api_test
close_test

Definition at line 68 of file siudrc.c.

anonymous enum

Enumerator:
fullband_test_w_input1
multiband_test_w_input1
fullband_test_w_input2
multiband_test_w_input2

Definition at line 89 of file siudrc.c.

Function Documentation

void siu_new_drc ( siuInst_t * inst )

Definition at line 148 of file siudrc.c.

References aer_buff1, drc_buff0, drc_buff2, drc_buff3, drc_buff4, siuInst_t::drcInst, SIU_MID_DRC, SIU_NUM_DRC_BUFFS, siu_print_buff_usage(), siuDbgDrc(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_drc | ( | siuInst_t * | inst,
 |  | tuint | cfg_bits,
 |  | tint | sampling_rates
 | ) |  |

Definition at line 229 of file siudrc.c.

References drc_samp_rate, and siuInst_t::drcInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_close_drc ( siuInst_t * inst )

Definition at line 255 of file siudrc.c.

References siuInst_t::drcInst, and siu_exc_assert.

void siu_delete_drc ( siuInst_t * inst )

Definition at line 273 of file siudrc.c.

References siuInst_t::drcInst, and siu_exc_assert.

void siu_control_drc | ( | siuInst_t * | inst,
 |  | tint | sampling_rates,
 |  | tint | drc_on_flag
 | ) |  |

Definition at line 293 of file siudrc.c.

References drc_highband_coef_16k, drc_highband_coef_8k, drc_lowband_coef_16k, drc_lowband_coef_8k, drc_midband_coef_16k, drc_midband_coef_8k, and siuInst_t::drcInst.

Referenced by aer_sim_config_aer_params().

Here is the caller graph for this function:

void siu_drc_process | ( | void * | inst,
 |  | void * | sin,
 |  | void * | sout
 | ) |  |

Definition at line 389 of file siudrc.c.

References aerSimFread(), aerSimFwrite(), api_test, dbg_out, drc_api_err, drc_api_err2, drc_buffer, drc_buffer2, drc_debug_buffer, drc_in, drc_out, drc_ref, drc_samp_rate, drc_test, drc_test_cfg, file_name, full_multi_band_test, full_multi_band_test_result, fullband_test_w_input1, fullband_test_w_input2, func_blocks_test, func_blocks_test_result, in_file_16k, in_file_8k, in_file_name_16k, in_file_name_8k, input_name_16k, input_name_8k, multiband_test_w_input1, multiband_test_w_input2, openfile, out_file_16k, out_file_8k, out_file_name_16k, out_file_name_8k, ref_file_16k, ref_file_8k, ref_file_name_16k, ref_file_name_8k, setup_test, and test_case.

Here is the call graph for this function:

Variable Documentation

const Fract drc_lowband_coef_8k[drc_FIR_HALF_COEF_8KHZ]

Initial value:

 {
  -103, -115, -61, 301, 1182, 2575, 4172, 5457, 5950
}

Definition at line 41 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_midband_coef_8k[drc_FIR_HALF_COEF_8KHZ]

Initial value:

 {
  3, 129, 430, -10, -2324, -4473, -2118, 4356, 8013
}

Definition at line 45 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_highband_coef_8k[drc_FIR_HALF_COEF_8KHZ]

Initial value:

 {
  99, -13, -370, -291, 1142, 1898, -2054, -9813, 18804
}

Definition at line 49 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_lowband_coef_16k[drc_FIR_HALF_COEF_16KHZ]

Initial value:

 {
  -51, -53, -58, -55, -30, 33, 151,  335, 590, 912, 1286,
  1686, 2083,  2440, 2724, 2907, 2970
}

Definition at line 53 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_midband_coef_16k[drc_FIR_HALF_COEF_16KHZ]

Initial value:

 {
  2, 19, 64, 141, 215, 203, -5, -476, -1160, -1851, -2233,
  -2010, -1057, 476, 2174, 3500, 4000
}

Definition at line 58 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_highband_coef_16k[drc_FIR_HALF_COEF_16KHZ]

Initial value:

 {
  50, 34, -7,  -86, -185, -236, -145, 142, 570, 939, 948,
  324, -1025, -2916, -4899, -6407, 25797
}

Definition at line 63 of file siudrc.c.

Referenced by siu_control_drc().

FILE* drc_test_cfg

Definition at line 96 of file siudrc.c.

Referenced by siu_drc_process().

FILE* drc_in = NULL

Definition at line 97 of file siudrc.c.

Referenced by siu_drc_process().

FILE* drc_out = NULL

Definition at line 98 of file siudrc.c.

Referenced by siu_drc_process().

FILE* dbg_out = NULL

Definition at line 99 of file siudrc.c.

Referenced by siu_drc_process().

FILE* drc_ref = NULL

Definition at line 100 of file siudrc.c.

Referenced by siu_drc_process().

char* file_name

Definition at line 102 of file siudrc.c.

Referenced by siu_drc_process().

char* in_file_16k = NULL

Definition at line 103 of file siudrc.c.

Referenced by siu_drc_process().

char* in_file_8k = NULL

Definition at line 104 of file siudrc.c.

Referenced by siu_drc_process().

char* out_file_16k = NULL

Definition at line 105 of file siudrc.c.

Referenced by siu_drc_process().

char* out_file_8k = NULL

Definition at line 106 of file siudrc.c.

Referenced by siu_drc_process().

char* ref_file_16k = NULL

Definition at line 107 of file siudrc.c.

Referenced by siu_drc_process().

char* ref_file_8k = NULL

Definition at line 108 of file siudrc.c.

Referenced by siu_drc_process().

char input_name_16k[40]

Definition at line 109 of file siudrc.c.

Referenced by siu_drc_process().

char input_name_8k[40]

Definition at line 110 of file siudrc.c.

Referenced by siu_drc_process().

char in_file_name_16k[40]

Definition at line 111 of file siudrc.c.

Referenced by siu_drc_process().

char in_file_name_8k[40]

Definition at line 112 of file siudrc.c.

Referenced by siu_drc_process().

char out_file_name_16k[40]

Definition at line 113 of file siudrc.c.

Referenced by siu_drc_process().

char out_file_name_8k[40]

Definition at line 114 of file siudrc.c.

Referenced by siu_drc_process().

char ref_file_name_16k[40]

Definition at line 115 of file siudrc.c.

Referenced by siu_drc_process().

char ref_file_name_8k[40]

Definition at line 116 of file siudrc.c.

Referenced by siu_drc_process().

tbool openfile = TRUE

Definition at line 118 of file siudrc.c.

Referenced by siu_drc_process().

Fract drc_buffer[160]

Definition at line 119 of file siudrc.c.

Referenced by siu_drc_process().

Fract drc_buffer2[160]

Definition at line 120 of file siudrc.c.

Referenced by siu_drc_process().

tint drc_samp_rate

Definition at line 121 of file siudrc.c.

Referenced by siu_drc_process(), and siu_open_drc().

tuint full_multi_band_test_result = 0

Definition at line 122 of file siudrc.c.

Referenced by siu_drc_process().

tuint func_blocks_test_result = 0

Definition at line 123 of file siudrc.c.

Referenced by siu_drc_process().

tuint drc_api_err = 0

Definition at line 124 of file siudrc.c.

Referenced by siu_drc_process().

tuint drc_api_err2 = 0

Definition at line 125 of file siudrc.c.

Referenced by siu_drc_process().

tint drc_test = 0

Definition at line 126 of file siudrc.c.

Referenced by siu_drc_process().

tint test_case = 0

Definition at line 127 of file siudrc.c.

Referenced by siu_drc_process().

Fract drc_debug_buffer[]

Referenced by siu_drc_process().


AER Simulation: siudrc.c Source File

  • File List
  • Globals

siudrc.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: SIU functions to support simulation testing of DRC
00003  ******************************************************************************
00004  * FILE NAME:   siudrcsim.c
00005  *
00006  * DESCRIPTION: Contains constants and arrays for simulation testing of DRC
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012 /* System definitions and utilities */
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015 #include <string.h>
00016
00017 #include <ti/mas/types/types.h>
00018 #include <ti/mas/aer/aer.h>
00019 #include <ti/mas/aer/drc.h>
00020
00021 #include <ti/mas/aer/test/siusim/siu.h>
00022 #include <ti/mas/aer/test/siusim/siuloc.h>
00023 #include <ti/mas/aer/test/siusim/siuport.h>
00024 #include <ti/mas/aer/test/siusim/siudrc.h>
00025 #include <ti/mas/aer/test/aersim/aerbuffs.h>
00026 #include <ti/mas/aer/test/aersim/aersim.h>
00027 #include <ti/mas/aer/test/aersim/aersim_fileIO.h>
00028
00029 #define SIU_NUM_DRC_BUFFS 5
00030
00031 /* DRC filter coefficients:
00032
00033    Filter Coefficients are in Q15 format. Since symmetric FIR is used,
00034    only half plus 1 of the filter coefficients are specified in tables.
00035    The lowband FIR is a low pass filter with cutoff frequency at 700Hz.
00036    The midband FIR is a band pass filter with frequency range 700Hz - 1700Hz.
00037    The highband FIR is a high pass filter with frequency above 1700Hz.
00038
00039    The coefs in tables are from h[0] to h[half+1] for low, mid and highband.
00040 */
00041 const Fract drc_lowband_coef_8k[drc_FIR_HALF_COEF_8KHZ] = {
00042   -103, -115, -61, 301, 1182, 2575, 4172, 5457, 5950
00043 };
00044
00045 const Fract drc_midband_coef_8k[drc_FIR_HALF_COEF_8KHZ] = {
00046   3, 129, 430, -10, -2324, -4473, -2118, 4356, 8013
00047 };
00048
00049 const Fract drc_highband_coef_8k[drc_FIR_HALF_COEF_8KHZ] = {
00050   99, -13, -370, -291, 1142, 1898, -2054, -9813, 18804
00051 };
00052
00053 const Fract drc_lowband_coef_16k[drc_FIR_HALF_COEF_16KHZ] = {
00054   -51, -53, -58, -55, -30, 33, 151,  335, 590, 912, 1286,
00055   1686, 2083,  2440, 2724, 2907, 2970
00056 };
00057
00058 const Fract drc_midband_coef_16k[drc_FIR_HALF_COEF_16KHZ] = {
00059   2, 19, 64, 141, 215, 203, -5, -476, -1160, -1851, -2233,
00060   -2010, -1057, 476, 2174, 3500, 4000
00061 };
00062
00063 const Fract drc_highband_coef_16k[drc_FIR_HALF_COEF_16KHZ] = {
00064   50, 34, -7,  -86, -185, -236, -145, 142, 570, 939, 948,
00065   324, -1025, -2916, -4899, -6407, 25797
00066 };
00067
00068 enum {
00069   setup_test =1,        /* test initialization  */
00070   full_multi_band_test, /* system tests which include:
00071                            Full Band tests with two inputs(speech & sine ramp up
00072                            Multi Band tests with two inputs(speech & sine ramp up */
00073
00074   func_blocks_test,     /* Functional block verification tests which include:
00075                            1 - verify compressor signal power (in dBm0) estimation
00076                            2 - verify compressor gain (in dB) estimation
00077                            3 - verify exponential average of compressor gain (dB)
00078                            4 - verify limiter signal power (in dBm0) estimation
00079                            5 - verify limiter gain (in dB) estimation
00080                            6 - verify exponential average of limiter gain (linear)
00081                            7 - verify voice activity indication
00082                            8 - verify output of low band filter
00083                            9 - verify output of mid band filter
00084                            10- verify output of high band filter            */
00085   api_test,             /* DRC API of control and getParameter verification  */
00086   close_test            /* Save the results        */
00087 };
00088
00089 enum {
00090   fullband_test_w_input1  = 1,
00091   multiband_test_w_input1 = 2,
00092   fullband_test_w_input2  = 3,
00093   multiband_test_w_input2 = 4
00094 };
00095
00096 FILE *drc_test_cfg;
00097 FILE *drc_in = NULL;
00098 FILE *drc_out= NULL;
00099 FILE *dbg_out= NULL;
00100 FILE *drc_ref= NULL;
00101
00102 char *file_name;
00103 char *in_file_16k = NULL;
00104 char *in_file_8k = NULL;
00105 char *out_file_16k = NULL;
00106 char *out_file_8k = NULL;
00107 char *ref_file_16k = NULL;
00108 char *ref_file_8k = NULL;
00109 char input_name_16k[40];
00110 char input_name_8k[40];
00111 char in_file_name_16k[40];
00112 char in_file_name_8k[40];
00113 char out_file_name_16k[40];
00114 char out_file_name_8k[40];
00115 char ref_file_name_16k[40];
00116 char ref_file_name_8k[40];
00117
00118 tbool openfile = TRUE;
00119 Fract drc_buffer[160];
00120 Fract drc_buffer2[160];
00121 tint  drc_samp_rate;
00122 tuint full_multi_band_test_result = 0;
00123 tuint func_blocks_test_result = 0;
00124 tuint drc_api_err = 0;
00125 tuint drc_api_err2 = 0;
00126 tint  drc_test = 0;
00127 tint  test_case = 0;
00128 extern Fract drc_debug_buffer[];
00129
00130 #ifdef drc_DEBUG
00131 extern tint drc_dbg_flag;
00132 #endif
00133
00134 /******************************************************************************
00135  * FUNCTION PURPOSE: Create DRC module.
00136  ******************************************************************************
00137  * DESCRIPTION: Obtains info on DRC buffers, and creates one instance of DRC.
00138  *
00139  *              NOTE: Should save number of buffers and buffer descriptors
00140  *                    in order to make delete possible.
00141  *
00142  *
00143  *  void siu_new_drc (
00144  *    tint chnum,              - channel number (1 to SIU_MAX_CHANNELS)
00145  *    tint max_sampling_rate)  - maximum sampling rate
00146  *
00147  *****************************************************************************/
00148 void siu_new_drc(siuInst_t * inst)
00149 {
00150   tint err_code, drcNbufs;
00151   const ecomemBuffer_t *bufs_dscrp_by_drc;
00152   ecomemBuffer_t        bufs_dscrp_by_siu[SIU_NUM_DRC_BUFFS];
00153   drcCreateConfig_t    drcCreateCfg;
00154   drcSizeConfig_t      drcCfgSize;
00155   drcNewConfig_t       drcCfgNew;
00156
00157   memset(&drcCreateCfg, 0, sizeof(drcCreateConfig_t));
00158   drcCreateCfg.debugInfo = siuDbgDrc;
00159   drcCreate(&drcCreateCfg);
00160
00161   /* DRC get sizes. Memory requirement are calculated based on max. sampling rate
00162      and max. limiter delay length.  */
00163   drcCfgSize.samp_rate = drc_SAMP_RATE_16K;
00164   drcCfgSize.max_delay_len = drcCfgSize.samp_rate*8*2; /* 2ms delay */
00165
00166   err_code = drcGetSizes (&drcNbufs, &bufs_dscrp_by_drc, &drcCfgSize);
00167   if (err_code != drc_NOERR) {
00168     printf("Error when calling drcGetSizes() for with error code %d!\n", err_code);
00169     exit(1);
00170   }
00171
00172   printf("DRC required buffers:\n");
00173   siu_print_buff_usage(bufs_dscrp_by_drc, drcNbufs);
00174
00175   /* check if enough memory is allocated for SIU buffer descriptors */
00176   if (drcNbufs > SIU_NUM_DRC_BUFFS) {
00177     printf("No enough memory allocated by SIU for DRC buffer descriptors!\n");
00178         exit(1);
00179   }
00180
00181   bufs_dscrp_by_siu[0].base = &drc_buff0[0];
00182   bufs_dscrp_by_siu[0].size = DRC_SIM_BUF0_SIZE;
00183   bufs_dscrp_by_siu[0].log2align = DRC_SIM_BUF0_ALGN_LOG2;
00184   bufs_dscrp_by_siu[0].volat = FALSE;
00185
00186   bufs_dscrp_by_siu[1].base = &aer_buff1[0];   /* overlap with AER volatile buffers */
00187   bufs_dscrp_by_siu[1].size = AER_SIM_BUF1_SIZE;
00188   bufs_dscrp_by_siu[1].log2align = AER_SIM_BUF1_ALGN_LOG2;
00189   bufs_dscrp_by_siu[1].volat = TRUE;
00190
00191   bufs_dscrp_by_siu[2].base = &drc_buff2[0];
00192   bufs_dscrp_by_siu[2].size = DRC_SIM_BUF2_SIZE;
00193   bufs_dscrp_by_siu[2].log2align = DRC_SIM_BUF2_ALGN_LOG2;
00194   bufs_dscrp_by_siu[2].volat = FALSE;
00195
00196   bufs_dscrp_by_siu[3].base = &drc_buff3[0];
00197   bufs_dscrp_by_siu[3].size = DRC_SIM_BUF3_SIZE;
00198   bufs_dscrp_by_siu[3].log2align = DRC_SIM_BUF3_ALGN_LOG2;
00199   bufs_dscrp_by_siu[3].volat = FALSE;
00200
00201   bufs_dscrp_by_siu[4].base = &drc_buff4[0];
00202   bufs_dscrp_by_siu[4].size = DRC_SIM_BUF4_SIZE;
00203   bufs_dscrp_by_siu[4].log2align = DRC_SIM_BUF4_ALGN_LOG2;
00204   bufs_dscrp_by_siu[4].volat = FALSE;
00205
00206   printf("Buffers allocated by SIU for DRC:\n");
00207   siu_print_buff_usage(bufs_dscrp_by_siu, drcNbufs);
00208
00209   /* drcNew */
00210   drcCfgNew.handle  = (void *) siuMakeID(SIU_MID_DRC, 0);
00211   drcCfgNew.sizeCfg = drcCfgSize;
00212   err_code = drcNew (&inst->drcInst, drcNbufs, bufs_dscrp_by_siu, &drcCfgNew);
00213   if (err_code != drc_NOERR) {
00214     printf("Error when calling drcNew() for with error code %d!\n", err_code);
00215     exit(1);
00216   }
00217 } /* siu_new_drc */
00218
00219 /******************************************************************************
00220  * FUNCTION PURPOSE: Open DRC module.
00221  ******************************************************************************
00222  * DESCRIPTION: Opens one instance of DRC module.
00223  *
00224  *  void siu_open_drc (
00225  *    tint chnum,          - channel number (1 to SIU_MAX_CHANNELS)
00226  *    tint sampling_rate)  - 1 or 2 indicate 8 or 16 kHz sampling rate
00227  *
00228  *****************************************************************************/
00229 void siu_open_drc(siuInst_t *inst, tuint cfg_bits, tint sampling_rates)
00230 {
00231   tint err_code;
00232   drcOpenConfig_t drcCfg;
00233
00234   /* Open the DRC instance with certain sampling rate and operation mode. */
00235   drcCfg.samp_rate  = (sampling_rates & drc_SAMP_RATE_8K)+drc_SAMP_RATE_8K;
00236   drcCfg.cfgbits    = cfg_bits;
00237   err_code = drcOpen (inst->drcInst, &drcCfg);
00238   if (err_code != drc_NOERR) {
00239     printf("Error when calling drcOpen() with error code %d!\n", err_code);
00240     exit(1);
00241   }
00242
00243   drc_samp_rate     =  drcCfg.samp_rate; /* for unit test */
00244 } /* siu_open_drc */
00245
00246 /******************************************************************************
00247  * FUNCTION PURPOSE: Close DRC module.
00248  ******************************************************************************
00249  * DESCRIPTION: Close one instance of DRC module.
00250  *
00251  *  void siu_close_drc (
00252  *    tint chnum)          - channel number (1 to SIU_MAX_CHANNELS)
00253  *
00254  *****************************************************************************/
00255 void siu_close_drc(siuInst_t *inst)
00256 {
00257   tint stat;
00258
00259   stat = drcClose(inst->drcInst);  /* the instance state is set to drc_CLOSED */
00260   siu_exc_assert (stat == drc_NOERR, inst);
00261
00262 }
00263
00264 /******************************************************************************
00265  * FUNCTION PURPOSE: Close DRC module.
00266  ******************************************************************************
00267  * DESCRIPTION: Close one instance of DRC module.
00268  *
00269  *  void siu_close_drc (
00270  *    tint chnum)          - channel number (1 to SIU_MAX_CHANNELS)
00271  *
00272  *****************************************************************************/
00273 void siu_delete_drc(siuInst_t *inst)
00274 {
00275   tint stat;
00276   ecomemBuffer_t bufs_dscrp_by_drc;
00277
00278   stat = drcDelete (&inst->drcInst, 5, &bufs_dscrp_by_drc);
00279   siu_exc_assert (stat == drc_NOERR, inst);
00280
00281 }
00282
00283 /******************************************************************************
00284  * FUNCTION PURPOSE: Set the operating mode of an DRC
00285  ******************************************************************************
00286  * DESCRIPTION: Controls the operating mode and internal parameters of the DRC.
00287  *
00288  *  void drcControl (
00289  *    tint chnum,          - channel number (1 to SIU_MAX_CHANNELS)
00290  *    tint sampling_rate)  - 1 or 2 indicate 8 or 16 kHz sampling rate
00291  *
00292  *****************************************************************************/
00293 void siu_control_drc (siuInst_t *inst, tint sampling_rates, tint drc_on_flag)
00294 {
00295   tint stat, samp_rate;
00296   drcControl_t ctl;
00297
00298   samp_rate  = (sampling_rates & drc_SAMP_RATE_8K)+drc_SAMP_RATE_8K;
00299
00300   /* filter coefficients are configured here */
00301   ctl.ctl_code = drc_CTL_SET_FIR_LBAND;
00302   if (samp_rate == drc_SAMP_RATE_8K ) {
00303     memcpy(&ctl.u.coef[0], drc_lowband_coef_8k, drc_FIR_HALF_COEF_8KHZ*sizeof(Fract));
00304   }
00305   else {
00306     memcpy(&ctl.u.coef[0], drc_lowband_coef_16k, drc_FIR_HALF_COEF_16KHZ*sizeof(Fract));
00307   }
00308   stat = drcControl(inst->drcInst, &ctl);
00309   if (stat != drc_NOERR) {
00310     printf("Error when configuring DRC low band filter with error code %d!\n", stat);
00311     exit(1);
00312   }
00313
00314   ctl.ctl_code = drc_CTL_SET_FIR_MBAND;
00315   if (samp_rate == drc_SAMP_RATE_8K ) {
00316     memcpy(&ctl.u.coef[0], drc_midband_coef_8k, drc_FIR_HALF_COEF_8KHZ*sizeof(Fract));
00317   }
00318   else {
00319     memcpy(&ctl.u.coef[0], drc_midband_coef_16k, drc_FIR_HALF_COEF_16KHZ*sizeof(Fract));
00320   }
00321   stat = drcControl(inst->drcInst, &ctl);
00322   if (stat != drc_NOERR) {
00323     printf("Error when configuring DRC middle band filter with error code %d!\n", stat);
00324     exit(1);
00325   }
00326
00327   ctl.ctl_code = drc_CTL_SET_FIR_HBAND;
00328   if (samp_rate == drc_SAMP_RATE_8K ) {
00329     memcpy(&ctl.u.coef[0], drc_highband_coef_8k, drc_FIR_HALF_COEF_8KHZ*sizeof(Fract));
00330   }
00331   else {
00332     memcpy(&ctl.u.coef[0], drc_highband_coef_16k, drc_FIR_HALF_COEF_16KHZ*sizeof(Fract));
00333   }
00334   stat = drcControl(inst->drcInst, &ctl);
00335   if (stat != drc_NOERR) {
00336     printf("Error when configuring DRC high band filter with error code %d!\n", stat);
00337     exit(1);
00338   }
00339
00340   /* hard coded parameters for full band configuration */
00341   ctl.ctl_code = drc_CTL_SET_FBAND;
00342   ctl.u.band.valid_bitfield = 1<<drc_BAND_CFG_VALID_CURVE_PARAM_BIT;
00343   ctl.u.band.curve.ratios = 0x2020;
00344   ctl.u.band.curve.exp_knee = -50;
00345   ctl.u.band.curve.max_amp  = 6;
00346   ctl.u.band.curve.com_knee = -15;
00347   ctl.u.band.curve.energy_lim = -3;
00348   stat = drcControl(inst->drcInst, &ctl);
00349   if (stat != drc_NOERR) {
00350     printf("Error when configuring DRC full band with error code %d!\n", stat);
00351     exit(1);
00352   }
00353
00354   /* hard coded parameters for limiter configuration */
00355   ctl.ctl_code = drc_CTL_SET_LIM;
00356   ctl.u.limiter.valid_bitfield = 1<<drc_LIM_CFG_VALID_THRESH_BIT;
00357   ctl.u.limiter.thresh_dBm = -3;
00358   stat = drcControl(inst->drcInst, &ctl);
00359   if (stat != drc_NOERR) {
00360     printf("Error when configuring DRC limiter with error code %d!\n", stat);
00361     exit(1);
00362   }
00363
00364   /* DRC is enabled based on the configuration defined in siuSetup */
00365   if (drc_on_flag) {
00366     ctl.ctl_code = drc_CTL_DRC_ON;
00367   }
00368   else {
00369     ctl.ctl_code = drc_CTL_DRC_OFF;
00370   }
00371   stat = drcControl(inst->drcInst, &ctl);
00372   if (stat != drc_NOERR) {
00373     printf("Error when enabling DRC with error code %d!\n", stat);
00374     exit(1);
00375   }
00376 } /* siu_control_drc */
00377
00378 /******************************************************************************
00379  * FUNCTION PURPOSE: DRC process and tests
00380  ******************************************************************************
00381  * DESCRIPTION: Performs DRC process and tests.
00382  *
00383  *  void drcProcess (
00384  *    void *drcInst,     - a pointer to instance data
00385  *    void *sin,         - a pointer to input receive frame samples
00386  *    void *sout)        - a pointer to output receive frame samples
00387  *
00388  *****************************************************************************/
00389 void siu_drc_process (void *inst, void *sin, void *sout)
00390 {
00391   tint            i, frame_len;
00392   drcOpenConfig_t drcCfg;
00393   drcControl_t    ctl;
00394   drcReportParam_t param;
00395 #ifdef drc_DEBUG
00396   char *c_ptr;
00397 #endif
00398
00399   switch (drc_test) {
00400
00401     case setup_test:
00402       file_name = strtok(".\\drctest\\drcsimcfg.txt", "\n");
00403       drc_test_cfg = fopen(file_name, "r");
00404
00405       file_name = strtok(".\\drctest\\drc_test_result.txt", "\n");
00406       dbg_out = fopen(file_name, "w");
00407       fprintf(dbg_out, "Sampling rate (Hz)= %d\n\n", (drc_samp_rate*8000));
00408
00409       drc_test  = full_multi_band_test;
00410       test_case = fullband_test_w_input1;
00411
00412       break;
00413
00414     case full_multi_band_test: /*  Full Band and Multi Band Test */
00415
00416           if(openfile) {
00417
00418         ctl.ctl_code = drc_CTL_DRC_OFF;
00419         drcControl(inst, &ctl);
00420
00421         switch (test_case) {
00422           case fullband_test_w_input1:
00423           case fullband_test_w_input2:
00424             ctl.u.cfgbits    = 0x31;
00425
00426             fscanf(drc_test_cfg, "%s\n", input_name_16k);
00427             fscanf(drc_test_cfg, "%s\n", input_name_8k);
00428
00429             strcpy (in_file_name_16k, ".\\drctest\\in\\");
00430             strcpy (in_file_name_8k, ".\\drctest\\in\\");
00431
00432             strcat(in_file_name_16k, input_name_16k);
00433             strcat(in_file_name_8k, input_name_8k);
00434             strcat(in_file_name_16k, ".pcm");
00435             strcat(in_file_name_8k, ".pcm");
00436
00437             strcpy (out_file_name_16k, ".\\drctest\\out\\");
00438             strcpy (out_file_name_8k, ".\\drctest\\out\\");
00439
00440             strcat(out_file_name_16k, input_name_16k);
00441             strcat(out_file_name_8k, input_name_8k);
00442             strcat(out_file_name_16k, "_out_fb.pcm");
00443             strcat(out_file_name_8k, "_out_fb.pcm");
00444
00445             strcpy (ref_file_name_16k, ".\\drctest\\ref\\");
00446             strcpy (ref_file_name_8k, ".\\drctest\\ref\\");
00447
00448             strcat(ref_file_name_16k, input_name_16k);
00449             strcat(ref_file_name_8k, input_name_8k);
00450             strcat(ref_file_name_16k, "_ref_fb.pcm");
00451             strcat(ref_file_name_8k, "_ref_fb.pcm");
00452
00453           break;
00454
00455           case multiband_test_w_input1:
00456           case multiband_test_w_input2:
00457             ctl.u.cfgbits    = 0x3E;
00458
00459             strcpy (in_file_name_16k, ".\\drctest\\in\\");
00460             strcpy (in_file_name_8k, ".\\drctest\\in\\");
00461
00462             strcat(in_file_name_16k, input_name_16k);
00463             strcat(in_file_name_8k, input_name_8k);
00464             strcat(in_file_name_16k, ".pcm");
00465             strcat(in_file_name_8k, ".pcm");
00466
00467             strcpy (out_file_name_16k, ".\\drctest\\out\\");
00468             strcpy (out_file_name_8k, ".\\drctest\\out\\");
00469
00470             strcat(out_file_name_16k, input_name_16k);
00471             strcat(out_file_name_8k, input_name_8k);
00472             strcat(out_file_name_16k, "_out_mb.pcm");
00473             strcat(out_file_name_8k, "_out_mb.pcm");
00474
00475             strcpy (ref_file_name_16k, ".\\drctest\\ref\\");
00476             strcpy (ref_file_name_8k, ".\\drctest\\ref\\");
00477
00478             strcat(ref_file_name_16k, input_name_16k);
00479             strcat(ref_file_name_8k, input_name_8k);
00480             strcat(ref_file_name_16k, "_ref_mb.pcm");
00481             strcat(ref_file_name_8k, "_ref_mb.pcm");
00482
00483           break;
00484         }
00485
00486         ctl.ctl_code = drc_CTL_SET_BITS;
00487         drcControl(inst, &ctl);
00488
00489         ctl.ctl_code = drc_CTL_DRC_ON;
00490         drcControl(inst, &ctl);
00491
00492         openfile = FALSE;
00493
00494         in_file_16k = strtok(in_file_name_16k, "\n");
00495         in_file_8k  = strtok(in_file_name_8k, "\n");
00496
00497         out_file_16k = strtok(out_file_name_16k, "\n");
00498         out_file_8k = strtok(out_file_name_8k, "\n");
00499
00500         ref_file_16k = strtok(ref_file_name_16k, "\n");
00501         ref_file_8k = strtok(ref_file_name_8k, "\n");
00502
00503         printf("Test %d\n", test_case);
00504         if (drc_samp_rate == drc_SAMP_RATE_16K) {
00505           drc_in  = fopen(in_file_16k, "rb");
00506           printf("input: %s\n", in_file_16k);
00507           drc_out = fopen(out_file_16k, "wb");
00508           printf("output: %s\n", out_file_16k);
00509
00510           fprintf(dbg_out, "Input signal file: %s\n", in_file_16k);
00511           fprintf(dbg_out, "Output signal file: %s\n", out_file_16k);
00512
00513           frame_len = 160;
00514         }
00515         else {
00516           drc_in  = fopen(in_file_8k, "rb");
00517           printf("input: %s\n", in_file_8k);
00518           drc_out = fopen(out_file_8k, "wb");
00519           printf("output: %s\n", out_file_8k);
00520
00521           fprintf(dbg_out, "Input signal file: %s\n", in_file_8k);
00522           fprintf(dbg_out, "Output signal file: %s\n", out_file_8k);
00523
00524           frame_len = 80;
00525         }
00526       }
00527
00528       if (aerSimFread(&drc_buffer[0], frame_len, drc_in)) {
00529
00530         drcProcess (inst, drc_buffer, sout);
00531
00532         aerSimFwrite(sout, frame_len, drc_out);
00533
00534       }
00535                   else {
00536         fclose(drc_in);
00537         fclose(drc_out);
00538
00539         if (drc_samp_rate == drc_SAMP_RATE_16K) {
00540           drc_ref = fopen(ref_file_16k, "rb");
00541           drc_out = fopen(out_file_16k, "rb");
00542           fprintf(dbg_out, "Reference signal file: %s\n", ref_file_16k);
00543
00544           frame_len = 160;
00545         }
00546         else {
00547           drc_ref = fopen(ref_file_8k, "rb");
00548           drc_out = fopen(out_file_8k, "rb");
00549           fprintf(dbg_out, "Reference signal file: %s\n", ref_file_8k);
00550
00551           frame_len = 80;
00552         }
00553
00554         while (aerSimFread(&drc_buffer[0], frame_len, drc_ref)) {
00555
00556           aerSimFread(&drc_buffer2[0], frame_len, drc_out);
00557
00558           for (i=0; i<frame_len; i++) {
00559             if (drc_buffer[i] !=  drc_buffer2[i]) {
00560               full_multi_band_test_result |= (1<<test_case);
00561             }
00562           }
00563         }
00564         fclose(drc_ref);
00565         fclose(drc_out);
00566
00567         if (full_multi_band_test_result & (1<<test_case)) {
00568           printf("Test Failed! \n");
00569           fprintf(dbg_out, "Test Failed! \n\n");
00570         }
00571         else {
00572           printf("Test Passed! \n");
00573           fprintf(dbg_out, "Test Passed! \n\n");
00574         }
00575         openfile = TRUE;
00576         test_case++;
00577
00578         if ( test_case > 4) {
00579
00580           fclose(drc_test_cfg);
00581
00582 #ifdef    drc_DEBUG
00583           drc_test = func_blocks_test;
00584           test_case    = 0;
00585
00586           drc_dbg_flag = 1;
00587 #else
00588           drc_test = api_test;
00589 #endif
00590         }
00591       }
00592
00593       break;
00594
00595     case func_blocks_test:
00596       /* Functional block tests which includes:
00597           1 - verify compressor signal power (in dBm0) estimation
00598           2 - verify compressor gain (in dB) estimation
00599           3 - verify exponential average of compressor gain (dB)
00600           4 - verify limiter signal power (in dBm0) estimation
00601           5 - verify limiter gain (in dB) estimation
00602           6 - verify exponential average of limiter gain (linear)
00603           7 - verify voice activity indication
00604           8 - verify output of low band filter
00605           9 - verify output of mid band filter
00606           10- verify output of high band filter
00607       */
00608
00609 #ifdef drc_DEBUG
00610           if(openfile && (drc_dbg_flag==1)) {
00611         fprintf(dbg_out, "Functional block tests which includes: \n");
00612         fprintf(dbg_out, "1 - verify compressor signal power (in dBm0) estimation. \n");
00613         fprintf(dbg_out, "2 - verify compressor gain (in dB) estimation. \n");
00614         fprintf(dbg_out, "3 - verify exponential average of compressor gain (dB). \n");
00615         fprintf(dbg_out, "4 - verify limiter signal power (in dBm0) estimation. \n");
00616         fprintf(dbg_out, "5 - verify limiter gain (in dB) estimation. \n");
00617         fprintf(dbg_out, "6 - verify exponential average of limiter gain (linear). \n");
00618         fprintf(dbg_out, "7 - verify voice activity indication. \n");
00619         fprintf(dbg_out, "8 - verify output of low band filter. \n");
00620         fprintf(dbg_out, "9 - verify output of mid band filter. \n");
00621         fprintf(dbg_out, "10- verify output of high band filter. \n\n");
00622       }
00623
00624           if(openfile) {
00625
00626         ctl.ctl_code = drc_CTL_DRC_OFF;
00627         drcControl(inst, &ctl);
00628
00629         if (drc_dbg_flag > 7)
00630           ctl.u.cfgbits    = 0x3E;
00631         else
00632           ctl.u.cfgbits    = 0x31;
00633
00634         ctl.ctl_code = drc_CTL_SET_BITS;
00635         drcControl(inst, &ctl);
00636
00637         ctl.ctl_code = drc_CTL_DRC_ON;
00638         drcControl(inst, &ctl);
00639
00640         openfile = FALSE;
00641
00642         if (drc_samp_rate == drc_SAMP_RATE_16K) {
00643
00644           if (drc_dbg_flag == 7)
00645             drc_in  = fopen(".\\drctest\\in\\speech_16k.pcm", "rb");
00646           else
00647             drc_in  = fopen(".\\drctest\\in\\sinramp_16k.pcm", "rb");
00648
00649           strcpy(out_file_name_16k, ".\\drctest\\out\\drc_debug_16k_n.pcm");
00650           c_ptr = strchr(out_file_name_16k, 'n');
00651           *c_ptr = test_case+'0';
00652
00653           out_file_16k = strtok(out_file_name_16k, "\n");
00654           drc_out = fopen(out_file_16k, "wb");
00655
00656           frame_len = 160;
00657         }
00658         else {
00659           if (drc_dbg_flag == 7)
00660             drc_in  = fopen(".\\drctest\\in\\speech_8k.pcm", "rb");
00661           else
00662             drc_in  = fopen(".\\drctest\\in\\sinramp_8k.pcm", "rb");
00663
00664           strcpy(out_file_name_8k, ".\\drctest\\out\\drc_debug_8k_n.pcm");
00665           c_ptr = strchr(out_file_name_8k, 'n');
00666           *c_ptr = test_case+'0';
00667
00668           out_file_8k = strtok(out_file_name_8k, "\n");
00669           drc_out = fopen(out_file_8k, "wb");
00670
00671           frame_len = 80;
00672         }
00673
00674       }
00675       if (aerSimFread(&drc_buffer[0], frame_len, drc_in)) {
00676
00677         drcProcess (inst, drc_buffer, sout);
00678
00679         aerSimFwrite(drc_debug_buffer, frame_len, drc_out);
00680
00681       }
00682                   else {
00683         fclose(drc_in);
00684         fclose(drc_out);
00685
00686         if (drc_samp_rate == drc_SAMP_RATE_16K) {
00687           drc_out = fopen(out_file_16k, "rb");
00688
00689           strcpy(ref_file_name_16k, ".\\drctest\\ref\\drc_ref_16k_n.pcm");
00690           c_ptr = strchr(ref_file_name_16k, 'n');
00691           *c_ptr = test_case+'0';
00692
00693           ref_file_16k = strtok(ref_file_name_16k, "\n");
00694           drc_ref  = fopen(ref_file_16k, "rb");
00695
00696           frame_len = 160;
00697         }
00698         else {
00699           drc_out = fopen(out_file_8k, "rb");
00700
00701           strcpy(ref_file_name_8k, ".\\drctest\\ref\\drc_ref_8k_n.pcm");
00702           c_ptr = strchr(ref_file_name_8k, 'n');
00703           *c_ptr = test_case+'0';
00704
00705           ref_file_8k = strtok(ref_file_name_8k, "\n");
00706           drc_ref  = fopen(ref_file_8k, "rb");
00707
00708           frame_len = 80;
00709         }
00710         while (aerSimFread(&drc_buffer[0], frame_len, drc_ref)) {
00711           aerSimFread(&drc_buffer2[0], frame_len, drc_out);
00712           for (i=0; i<frame_len; i++) {
00713             if (drc_buffer[i] !=  drc_buffer2[i]) {
00714               func_blocks_test_result |= (1<<test_case);
00715             }
00716           }
00717         }
00718         fclose(drc_ref);
00719         fclose(drc_out);
00720
00721         openfile = TRUE;
00722
00723         if ( func_blocks_test_result & (1<<test_case)) {
00724           printf("DRC Functional Block Test %d failed. \n", drc_dbg_flag);
00725           fprintf(dbg_out, "DRC Functional Block Test %d failed. \n", drc_dbg_flag);
00726         }
00727         else {
00728           printf("DRC Functional Block Test %d passed. \n", drc_dbg_flag);
00729           fprintf(dbg_out, "DRC Functional Block Test %d passed. \n", drc_dbg_flag);
00730         }
00731         test_case++;
00732         drc_dbg_flag++;
00733
00734         if ( drc_dbg_flag > 10) {
00735           drc_test = api_test;
00736         }
00737                   }
00738 #     endif
00739       break;
00740
00741     case api_test:
00742         fprintf(dbg_out, "\n");
00743         fprintf(dbg_out, "DRC API Test : \n\n");
00744
00745         /* verify
00746            drc_CTL_DRC_ON   - ENABLE DRC
00747            drc_CTL_DRC_OFF  - DISABLE DRC
00748            drc_GET_CFGBITS  - GET: Operation mode configuration       */
00749
00750         ctl.ctl_code = drc_CTL_DRC_OFF;
00751         drcControl(inst, &ctl);
00752
00753         fprintf(dbg_out, "Test Control Code - drc_CTL_DRC_OFF \n");
00754         drcGetParameter (inst, drc_GET_CFGBITS, &param);
00755
00756         if (param.u.bits & (0x1<<6)) {
00757           drc_api_err |= 0x1;
00758           fprintf(dbg_out, "Test Failed. \n\n");
00759         }
00760         else {
00761           fprintf(dbg_out, "Test Passed. \n\n");
00762         }
00763         ctl.ctl_code = drc_CTL_DRC_ON;
00764         drcControl(inst, &ctl);
00765
00766         fprintf(dbg_out, "Test Control Code - drc_CTL_DRC_ON \n");
00767
00768         drcGetParameter (inst, drc_GET_CFGBITS, &param);
00769         if (!(param.u.bits & (0x1<<6))) {
00770           drc_api_err |= 0x2;
00771           fprintf(dbg_out, "Test Failed. \n\n");
00772         }
00773         else {
00774           fprintf(dbg_out, "Test Passed. \n\n");
00775         }
00776
00777
00778         /* verify  drc_CTL_SET_BITS - ENABLE: DRC configuration bitfield change*/
00779         ctl.ctl_code = drc_CTL_SET_BITS;
00780         fprintf(dbg_out, "Test Control Code - drc_CTL_SET_BITS \n");
00781
00782         ctl.u.cfgbits= 0;
00783         drcControl(inst, &ctl);
00784         drcGetParameter (inst, drc_GET_CFGBITS, &param);
00785         if ((param.u.bits & 0x003F)!=0) {
00786           drc_api_err |= 0x4;
00787         }
00788
00789         ctl.u.cfgbits= 0x3F;
00790         drcControl(inst, &ctl);
00791         drcGetParameter (inst, drc_GET_CFGBITS, &param);
00792         if ((param.u.bits & 0x003F)!=0x003F) {
00793           drc_api_err |= 0x8;
00794         }
00795         if (drc_api_err & 0x000C) {
00796           fprintf(dbg_out, "Test Failed. \n\n");
00797         }
00798         else {
00799           fprintf(dbg_out, "Test Passed. \n\n");
00800         }
00801
00802         /* verify  drc_CTL_SET_FBAND- ENABLE: full band param configuration
00803                    drc_GET_FBAND_PARAM - GET: full band configuration parameters */
00804
00805         fprintf(dbg_out, "Test Control Code - drc_CTL_SET_FBAND \n");
00806
00807         ctl.ctl_code = drc_CTL_SET_FBAND;
00808         ctl.u.band.valid_bitfield = 0x7;
00809         ctl.u.band.tc_log2        = 0x789A;
00810         ctl.u.band.curve.exp_knee = -80;     /* should be set to -78 by DRC boundary check */
00811         ctl.u.band.curve.ratios   = 0x0102;  /* should be set to 0x1010 by DRC boundary check */
00812         ctl.u.band.curve.max_amp  = 3;       /* should be set to 0 since exp_ratio =1 */
00813         ctl.u.band.curve.com_knee = -15;
00814         ctl.u.band.curve.energy_lim = 4;     /* should be set to 3 by DRC boundary check */
00815
00816         drcControl(inst, &ctl);
00817
00818         drcGetParameter (inst, drc_GET_FBAND_PARAM, &param);
00819         if (param.u.bandParam.tc_log2 != 0x789A)
00820           drc_api_err |= 0x10;
00821         if (param.u.bandParam.curve.exp_knee != (-78))
00822           drc_api_err |= 0x20;
00823         if (param.u.bandParam.curve.ratios != (0x1010))
00824           drc_api_err |= 0x40;
00825         if (param.u.bandParam.curve.max_amp != (0))
00826           drc_api_err |= 0x80;
00827         if (param.u.bandParam.curve.com_knee != (-15))
00828           drc_api_err |= 0x100;
00829         if (param.u.bandParam.curve.energy_lim != (3))
00830           drc_api_err |= 0x200;
00831
00832         if (drc_api_err & 0x03F0) {
00833           fprintf(dbg_out, "Test Failed. \n\n");
00834         }
00835         else {
00836           fprintf(dbg_out, "Test Passed. \n\n");
00837         }
00838
00839         /* verify  drc_CTL_SET_LBAND- ENABLE: low band param configuration
00840                    drc_GET_LBAND_PARAM - GET: low band configuration parameters  */
00841
00842         fprintf(dbg_out, "Test Control Code - drc_CTL_SET_LBAND \n");
00843
00844         ctl.ctl_code = drc_CTL_SET_LBAND;
00845         ctl.u.band.valid_bitfield = 0x7;
00846         ctl.u.band.tc_log2        = 0x89AB;
00847         ctl.u.band.curve.exp_knee = -55;
00848         ctl.u.band.curve.ratios   = 0x2020;  /* should be set to 0x1020 since energy_lim < com_knee+max_amp */
00849         ctl.u.band.curve.max_amp  = 20;      /* should be set to 18 by DRC boundary check */
00850         ctl.u.band.curve.com_knee = -15;     /* should be set to 3 since energy_lim < com_knee+max_amp */
00851         ctl.u.band.curve.energy_lim = -20;
00852
00853         drcControl(inst, &ctl);
00854
00855         drcGetParameter (inst, drc_GET_LBAND_PARAM, &param);
00856         if (param.u.bandParam.tc_log2 != 0x89AB)
00857           drc_api_err |= 0x400;
00858         if (param.u.bandParam.curve.ratios != (0x1020))
00859           drc_api_err |= 0x800;
00860         if (param.u.bandParam.curve.max_amp != (18))
00861           drc_api_err |= 0x1000;
00862         if (param.u.bandParam.curve.com_knee != (3))
00863           drc_api_err |= 0x2000;
00864
00865         if (drc_api_err & 0x3C00) {
00866           fprintf(dbg_out, "Test Failed. \n\n");
00867         }
00868         else {
00869           fprintf(dbg_out, "Test Passed. \n\n");
00870         }
00871
00872         /* verify  drc_CTL_SET_MBAND - ENABLE: mid band param configuration
00873                    drc_GET_MBAND_PARAM - GET: mid band configuration parameters  */
00874
00875         fprintf(dbg_out, "Test Control Code - drc_CTL_SET_MBAND \n");
00876
00877         ctl.ctl_code = drc_CTL_SET_MBAND;
00878         ctl.u.band.valid_bitfield = 0x5;
00879         ctl.u.band.tc_log2        = 0x1234;  /* only power TC will be changed */
00880         ctl.u.band.curve.exp_knee = -15;     /* should be set to -20 since energy_lim < exp_knee */
00881         ctl.u.band.curve.ratios   = 0x2020;  /* should be set to 0x1010 since energy_lim < exp_knee */
00882         ctl.u.band.curve.max_amp  = 20;      /* should be set to 0 since energy_lim < exp_knee */
00883         ctl.u.band.curve.com_knee = -15;     /* should be set to 3 since energy_lim < com_knee+max_amp */
00884         ctl.u.band.curve.energy_lim = -20;
00885
00886         drcControl(inst, &ctl);
00887
00888         drcGetParameter (inst, drc_GET_MBAND_PARAM, &param);
00889         if (param.u.bandParam.tc_log2 != 0x9934)
00890           drc_api_err |= 0x4000;
00891         if (param.u.bandParam.curve.ratios != (0x1010))
00892           drc_api_err |= 0x8000;
00893         if (param.u.bandParam.curve.max_amp != (0))
00894           drc_api_err2 |= 0x1;
00895         if (param.u.bandParam.curve.exp_knee != (-20))
00896           drc_api_err2 |= 0x2;
00897         if (param.u.bandParam.curve.com_knee != (3))
00898           drc_api_err2 |= 0x4;
00899         if (param.u.bandParam.curve.energy_lim != (-20))
00900           drc_api_err2 |= 0x8;
00901
00902         if ((drc_api_err & 0xC000) || (drc_api_err2 & 0x000F) ){
00903           fprintf(dbg_out, "Test Failed. \n\n");
00904         }
00905         else {
00906           fprintf(dbg_out, "Test Passed. \n\n");
00907         }
00908
00909         /* verify  drc_CTL_SET_HBAND- ENABLE: high band param configuration
00910                    drc_GET_HBAND_PARAM - GET: high band configuration parameters */
00911
00912         fprintf(dbg_out, "Test control code - drc_CTL_SET_HBAND \n");
00913
00914         ctl.ctl_code = drc_CTL_SET_HBAND;
00915         ctl.u.band.valid_bitfield = 0x6;
00916         ctl.u.band.tc_log2        = 0x1234;  /* only gain TC will be changed */
00917         ctl.u.band.curve.exp_knee = -15;     /* should be set to -20 exp_knee > com_knee */
00918         ctl.u.band.curve.ratios   = 0x2020;  /* should be set to 0x2010 since exp_knee > com_knee */
00919         ctl.u.band.curve.max_amp  = 3;       /* should be set to 0 since exp_knee > com_knee */
00920         ctl.u.band.curve.com_knee = -20;
00921         ctl.u.band.curve.energy_lim = -10;
00922
00923         drcControl(inst, &ctl);
00924
00925         drcGetParameter (inst, drc_GET_HBAND_PARAM, &param);
00926         if (param.u.bandParam.tc_log2 != 0x1299)
00927           drc_api_err2 |= 0x10;
00928         if (param.u.bandParam.curve.ratios != (0x2010))
00929           drc_api_err2 |= 0x20;
00930         if (param.u.bandParam.curve.max_amp != (0))
00931           drc_api_err2 |= 0x40;
00932         if (param.u.bandParam.curve.exp_knee != (-20))
00933           drc_api_err2 |= 0x80;
00934
00935         if (drc_api_err2 & 0x00F0) {
00936           fprintf(dbg_out, "Test Failed. \n\n");
00937         }
00938         else {
00939           fprintf(dbg_out, "Test Passed. \n\n");
00940         }
00941
00942         /* verify  drc_CTL_SET_LIM -  ENABLE: limiter param configuration
00943                    drc_GET_LIM_PARAM - GET: limiter parameters in an instance  */
00944
00945         fprintf(dbg_out, "Test Control Ccode - drc_CTL_SET_LIM \n");
00946
00947         ctl.ctl_code = drc_CTL_SET_LIM;
00948         ctl.u.limiter.valid_bitfield = 0xF;
00949         ctl.u.limiter.tc_log2        = 0x1234; /* should be 0x1230 */
00950         ctl.u.limiter.thresh_dBm     = 4;      /* should be 3*16   */
00951         ctl.u.limiter.delay_len      = 5;
00952
00953         drcControl(inst, &ctl);
00954         drcGetParameter (inst, drc_GET_LIM_PARAM, &param);
00955         if (param.u.limParam.tc_log2 != 0x1230)
00956           drc_api_err2 |= 0x100;
00957         if (param.u.limParam.thresh_dBm != (3*16))
00958           drc_api_err2 |= 0x200;
00959         if (param.u.limParam.delay_len != 0x2005)
00960           drc_api_err2 |= 0x400;
00961
00962         if (drc_api_err2 & 0x0700) {
00963           fprintf(dbg_out, "Test Failed. \n\n");
00964         }
00965         else {
00966           fprintf(dbg_out, "Test Passed. \n\n");
00967         }
00968
00969         /* verify  drc_SET_LBAND_FIR_COEF - GET: low band filter coefficients  */
00970         /* verify  drc_SET_MBAND_FIR_COEF - GET: mid band filter coefficients  */
00971         /* verify  drc_SET_HBAND_FIR_COEF - GET: high band filter coefficients */
00972
00973         fprintf(dbg_out, "Test Control Code - drc_SET_LBAND_FIR_COEF, ");
00974         fprintf(dbg_out, "drc_SET_MBAND_FIR_COEF and ");
00975         fprintf(dbg_out, "drc_SET_HBAND_FIR_COEF \n");
00976
00977         for (i=0;i<drc_FIR_HALF_COEF_16KHZ;i++) {
00978           ctl.u.coef[i] = i;
00979         }
00980
00981         ctl.ctl_code = drc_CTL_SET_FIR_LBAND;
00982         drcControl(inst, &ctl);
00983
00984         ctl.ctl_code = drc_CTL_SET_FIR_MBAND;
00985         drcControl(inst, &ctl);
00986
00987         ctl.ctl_code = drc_CTL_SET_FIR_HBAND;
00988         drcControl(inst, &ctl);
00989
00990         drcGetParameter (inst, drc_GET_LBAND_FIR_COEF, &param);
00991         for (i=0;i<drc_FIR_HALF_COEF_16KHZ/2;i++) {
00992           if (param.u.coef[i] != i)
00993             drc_api_err2 |= 0x800;
00994         }
00995
00996         drcGetParameter (inst, drc_GET_MBAND_FIR_COEF, &param);
00997         for (i=0;i<drc_FIR_HALF_COEF_16KHZ/2;i++) {
00998           if (param.u.coef[i] != i)
00999             drc_api_err2 |= 0x1000;
01000         }
01001
01002         drcGetParameter (inst, drc_GET_HBAND_FIR_COEF, &param);
01003         for (i=0;i<drc_FIR_HALF_COEF_16KHZ/2;i++) {
01004           if (param.u.coef[i] != i)
01005             drc_api_err2 |= 0x2000;
01006         }
01007
01008         if (drc_api_err2 & 0x3800) {
01009           fprintf(dbg_out, "Test Failed. \n\n");
01010         }
01011         else {
01012           fprintf(dbg_out, "Test Passed. \n\n");
01013         }
01014
01015         printf("DRC API test is completed. Error Bitmap: 0x%x and 0x%x\n", drc_api_err, drc_api_err2);
01016
01017         fprintf(dbg_out, "End of The Test! \n");
01018         fclose(dbg_out);
01019
01020         drcClose(inst);  /* the instance state is set to drc_CLOSED */
01021
01022         drcCfg.samp_rate  = drc_samp_rate;
01023         drcCfg.cfgbits    = 0x31;
01024         drcOpen (inst, &drcCfg);
01025
01026         ctl.ctl_code = drc_CTL_DRC_ON;
01027         drcControl(inst, &ctl);
01028
01029                     drc_test = 0;
01030
01031       break;
01032
01033     default:
01034       drcProcess (inst, sin, sout);
01035       break;
01036   }
01037
01038 } /* siu_drc_process */
01039
01040 /* nothing past this point */


AER Simulation: siudrc.h File Reference

  • File List
  • Globals

siudrc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/aer/drc.h>

Include dependency graph for siudrc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void | siu_new_drc (siuInst_t *inst)
void | siu_open_drc (siuInst_t *inst, tuint cfg_bits, tint sampling_rates)
void | siu_close_drc (siuInst_t *inst)
void | siu_control_drc (siuInst_t *inst, tint sampling_rates, tint drc_on_flag)

Variables

const Fract | drc_lowband_coef_8k []
const Fract | drc_midband_coef_8k []
const Fract | drc_highband_coef_8k []
const Fract | drc_lowband_coef_16k []
const Fract | drc_midband_coef_16k []
const Fract | drc_highband_coef_16k []

Function Documentation

void siu_new_drc ( siuInst_t * inst )

Definition at line 148 of file siudrc.c.

References aer_buff1, drc_buff0, drc_buff2, drc_buff3, drc_buff4, siuInst_t::drcInst, SIU_MID_DRC, SIU_NUM_DRC_BUFFS, siu_print_buff_usage(), siuDbgDrc(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_drc | ( | siuInst_t * | inst,
 |  | tuint | cfg_bits,
 |  | tint | sampling_rates
 | ) |  |

Definition at line 229 of file siudrc.c.

References drc_samp_rate, and siuInst_t::drcInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_close_drc ( siuInst_t * inst )

Definition at line 255 of file siudrc.c.

References siuInst_t::drcInst, and siu_exc_assert.

void siu_control_drc | ( | siuInst_t * | inst,
 |  | tint | sampling_rates,
 |  | tint | drc_on_flag
 | ) |  |

Definition at line 293 of file siudrc.c.

References drc_highband_coef_16k, drc_highband_coef_8k, drc_lowband_coef_16k, drc_lowband_coef_8k, drc_midband_coef_16k, drc_midband_coef_8k, and siuInst_t::drcInst.

Referenced by aer_sim_config_aer_params().

Here is the caller graph for this function:

Variable Documentation

const Fract drc_lowband_coef_8k[]

Definition at line 41 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_midband_coef_8k[]

Definition at line 45 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_highband_coef_8k[]

Definition at line 49 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_lowband_coef_16k[]

Definition at line 53 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_midband_coef_16k[]

Definition at line 58 of file siudrc.c.

Referenced by siu_control_drc().

const Fract drc_highband_coef_16k[]

Definition at line 63 of file siudrc.c.

Referenced by siu_control_drc().


AER Simulation: siudrc.h Source File

  • File List
  • Globals

siudrc.h

Go to the documentation of this file.
00001 #ifndef _SIUDRC_H
00002 #define _SIUDRC_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE: SIU functions to support simulation testing of DRC
00006  ******************************************************************************
00007  * FILE NAME:   siudrc.h
00008  *
00009  * DESCRIPTION: Contains constants and arrays for simulation testing of DRC
00010  *
00011  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00012  *                     ALL RIGHTS RESERVED
00013  *
00014  *****************************************************************************/
00015 #include <ti/mas/types/types.h>                      /* DSP types            */
00016 #include <ti/mas/aer/drc.h>
00017
00018 extern const Fract drc_lowband_coef_8k[];
00019 extern const Fract drc_midband_coef_8k[];
00020 extern const Fract drc_highband_coef_8k[];
00021 extern const Fract drc_lowband_coef_16k[];
00022 extern const Fract drc_midband_coef_16k[];
00023 extern const Fract drc_highband_coef_16k[];
00024
00025 void siu_new_drc    (siuInst_t * inst);
00026 void siu_open_drc   (siuInst_t *inst, tuint cfg_bits, tint sampling_rates);
00027 void siu_close_drc  (siuInst_t *inst);
00028 void siu_control_drc(siuInst_t *inst, tint sampling_rates, tint drc_on_flag);
00029
00030 #endif /* _SIUDRC_H */
00031
00032 /* nothing past this point */


AER Simulation: siuloc.h File Reference

  • File List
  • Globals

siuloc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/siusim/siuagc.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>

Include dependency graph for siuloc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | siuContext_t
struct | siuTxInst_t
struct | siuRxInst_t
struct | siuPhoneSys_t
struct | siuInst_t

Defines

#define | AER_HES_ID 0
#define | AER_HF0_ID 1
#define | AER_HFMAX_ID 15
#define | siuMakeID(mid, chnum) ((tuint)(mid)<<8|(tuint)(chnum))
#define | siuExtrModID(id) ((tuint)(((id)>>8) & 0xf0))
#define | siuExtrMicID(id) ((tuint)(((id)>>8) & 0xf))
#define | siuExtrChID(id) ((id) & 0xff)
#define | _SIUSTR(x) __SIUSTR(x)
#define | __SIUSTR(x) #x
#define | siu_exc_assert(expr, inst)
#define | siu_dbg_out(inst, s) { (*(inst)->debug)((inst)->ID,(s)); }

Functions

void | siuDebug (tuint id, char *s)
void | siuException (tuint id, char *s)
void | siuDbgAer (void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2)
void | siuDbgAgc (void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2)
void | siuDbgDrc (void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2)
void | siu_drc_process (void *drcInst, void *sin, void *sout)
void | siu_new_piu (tint chnum, tint max_frame_length)
void | siu_open_piu (tint chnum, tint segment_size, tint frame_size, tint recv_out_length, tint samp_rate)
void | siu_open_tx (tint chnum, tint num_HF_mic, tint frame_in_size, tint frame_out_size)
void | siu_open_rx (tint chnum, tint frame_size_in, tint frame_size_out)
void | siuRxOpen (siuInst_t *siuInst, siuRxConfig_t *cfg)
void | siuTxOpen (siuInst_t *siuInst, siuTxConfig_t *cfg)
void | siuTxSendIn (siuInst_t *siuInst, linSample *send_frame, linSample *recv_frame)
void | siuReceiveIn (siuInst_t *inst, linSample *rxin, linSample *rxout, tuint *trace, tint num_mic)
void | siuSendIn (siuInst_t *siuInst, linSample *rx_sync, linSample txin[][AER_SIM_MAX_FRAME_LENGTH], linSample *txout, tuint *trace, tint num_mic, tint mic_type, tint frm_len)
void | siu_new_agc (siuInst_t *inst, tint num_HF_mic)
void | siu_open_agc (siuInst_t *inst, tint sampling_rates, tint num_mic)
void | siu_close_agc (siuInst_t *inst)
void | siu_new_mms (siuInst_t *inst, tint num_mic, tint samp_rates)
void | siu_mmic_control (siuInst_t *inst)
void | siu_mmic_init (siuInst_t *inst)
void | siu_print_buff_usage (const ecomemBuffer_t *bufs, tint num_bufs)
void | siu_mmic_proc_load_control (siuInst_t *inst, tint num_mic)
void | siu_put_aer_low_load (void *aer_inst)
void | siu_put_aer_high_load (void *aer_inst)

Variables

siuContext_t siuContext
siuInst_t siuInst []

Define Documentation

#define AER_HES_ID 0

Definition at line 22 of file siuloc.h.

Referenced by siu_new_aer(), and siu_new_agc().

#define AER_HF0_ID 1

Definition at line 23 of file siuloc.h.

Referenced by siu_new_aer(), and siu_new_agc().

#define AER_HFMAX_ID 15

Definition at line 24 of file siuloc.h.

#define siuMakeID | ( | mid,
 |  | chnum | ) | ((tuint)(mid)<<8|(tuint)(chnum))

Definition at line 27 of file siuloc.h.

Referenced by aer_sim_init_siu(), siu_new_aer(), siu_new_agc(), siu_new_bf(), siu_new_drc(), siu_new_mss(), and siuInit().

#define siuExtrModID ( id ) ((tuint)(((id)>>8) & 0xf0))

Definition at line 28 of file siuloc.h.

Referenced by siuDbgAer(), siuDbgAgc(), and siuDbgDrc().

#define siuExtrMicID ( id ) ((tuint)(((id)>>8) & 0xf))

Definition at line 29 of file siuloc.h.

Referenced by siuAgcAerEvent(), siuAgcEvent(), siuDbgAer(), siuDbgAgc(), siuDbgDrc(), and siuGainControl().

#define siuExtrChID ( id ) ((id) & 0xff)

Definition at line 30 of file siuloc.h.

#define _SIUSTR ( x ) __SIUSTR(x)

Definition at line 36 of file siuloc.h.

#define __SIUSTR ( x ) #x

Definition at line 37 of file siuloc.h.

#define siu_exc_assert | ( | expr,
 |  | inst | )

Value:

{                     \
  ((expr) ? ((void)0) :                             \
            (*(inst)->exception)((inst)->ID,        \
              __FILE__ "(" _SIUSTR(__LINE__) ")")); \
}

Definition at line 39 of file siuloc.h.

Referenced by siu_close_drc(), and siu_delete_drc().

#define siu_dbg_out | ( | inst,
 |  | s | ) | { (*(inst)->debug)((inst)->ID,(s)); }

Definition at line 46 of file siuloc.h.

Function Documentation

void siuDebug | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 58 of file siu.c.

References siuDebugInternal().

Here is the call graph for this function:

void siuException | ( | tuint | id,
 |  | char * | s
 | ) |  |

Definition at line 63 of file siu.c.

References loop, and siuDebugInternal().

Here is the call graph for this function:

void siuDbgAer | ( | void * | handle,
 |  | tuint | msg,
 |  | tuint | code,
 |  | tuint | unused1,
 |  | tuint * | unused2
 | ) |  |

Definition at line 198 of file siu.c.

References siu_aer_data_file, siuExtrMicID, and siuExtrModID.

Referenced by siu_new_aer().

Here is the caller graph for this function:

void siuDbgAgc | ( | void * | handle,
 |  | tuint | msg,
 |  | tuint | code,
 |  | tuint | unused1,
 |  | tuint * | unused2
 | ) |  |

Definition at line 237 of file siu.c.

References loop, siuExtrMicID, and siuExtrModID.

void siuDbgDrc | ( | void * | handle,
 |  | tuint | msg,
 |  | tuint | code,
 |  | tuint | unused1,
 |  | tuint * | unused2
 | ) |  |

Definition at line 255 of file siu.c.

References loop, siuExtrMicID, and siuExtrModID.

Referenced by siu_new_agc(), and siu_new_drc().

Here is the caller graph for this function:

void siu_drc_process | ( | void * | drcInst,
 |  | void * | sin,
 |  | void * | sout
 | ) |  |

Definition at line 389 of file siudrc.c.

References aerSimFread(), aerSimFwrite(), api_test, dbg_out, drc_api_err, drc_api_err2, drc_buffer, drc_buffer2, drc_debug_buffer, drc_in, drc_out, drc_ref, drc_samp_rate, drc_test, drc_test_cfg, file_name, full_multi_band_test, full_multi_band_test_result, fullband_test_w_input1, fullband_test_w_input2, func_blocks_test, func_blocks_test_result, in_file_16k, in_file_8k, in_file_name_16k, in_file_name_8k, input_name_16k, input_name_8k, multiband_test_w_input1, multiband_test_w_input2, openfile, out_file_16k, out_file_8k, out_file_name_16k, out_file_name_8k, ref_file_16k, ref_file_8k, ref_file_name_16k, ref_file_name_8k, setup_test, and test_case.

Here is the call graph for this function:

void siu_new_piu | ( | tint | chnum,
 |  | tint | max_frame_length
 | ) |  |

void siu_open_piu | ( | tint | chnum,
 |  | tint | segment_size,
 |  | tint | frame_size,
 |  | tint | recv_out_length,
 |  | tint | samp_rate
 | ) |  |

void siu_open_tx | ( | tint | chnum,
 |  | tint | num_HF_mic,
 |  | tint | frame_in_size,
 |  | tint | frame_out_size
 | ) |  |

void siu_open_rx | ( | tint | chnum,
 |  | tint | frame_size_in,
 |  | tint | frame_size_out
 | ) |  |

void siuRxOpen | ( | siuInst_t * | siuInst,
 |  | siuRxConfig_t * | cfg
 | ) |  |

Definition at line 134 of file siu.c.

References siuRxConfig_t::rin_frm_len, siuRxInst_t::rin_frm_len, siuRxConfig_t::rout_frm_len, siuRxInst_t::rout_frm_len, and siuInst_t::RxInst.

Referenced by aer_sim_init_siu().

Here is the caller graph for this function:

void siuTxOpen | ( | siuInst_t * | siuInst,
 |  | siuTxConfig_t * | cfg
 | ) |  |

Definition at line 147 of file siu.c.

References siuPhoneSys_t::active_mic, siuTxInst_t::enabled, siuPhoneSys_t::mic_active_time, siuPhoneSys_t::mic_delay, siuPhoneSys_t::mic_proc_order, siuPhoneSys_t::mic_scale, siuTxConfig_t::num_HF_mic, siuPhoneSys_t::num_HF_mic, siuPhoneSys_t::phone_mode, siuInst_t::phone_sys, siuTxInst_t::recv_frame_ptr, siuPhoneSys_t::round_robin_cntr, siuTxInst_t::send_frame_ptr, siuTxInst_t::send_frm_del, siuTxConfig_t::send_in_frame_length, siuTxInst_t::send_in_frame_length, siuTxConfig_t::send_out_frame_length, siuTxInst_t::send_out_frame_length, siuInst_t::TxInst, siuTxConfig_t::TxSendOut, and siuTxInst_t::TxSendOut.

Referenced by aer_sim_init_siu().

Here is the caller graph for this function:

void siuTxSendIn | ( | siuInst_t * | siuInst,
 |  | linSample * | send_frame,
 |  | linSample * | recv_frame
 | ) |  |

void siuReceiveIn | ( | siuInst_t * | inst,
 |  | linSample * | rxin,
 |  | linSample * | rxout,
 |  | tuint * | trace,
 |  | tint | num_mic
 | ) |  |

Definition at line 33 of file siurx.c.

References siuSetup_s::aer_mips_profile, siuInst_t::aerHFInst, aersim_cacheFlush(), aersim_profile_get_cycle_after_aer_receive(), aersim_profile_get_cycle_before_aer(), siuInst_t::drcInst, siu_rxout_temp, and siuSetup.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void siuSendIn | ( | siuInst_t * | siuInst,
 |  | linSample * | rx_sync,
 |  | linSample | txin[][AER_SIM_MAX_FRAME_LENGTH],
 |  | linSample * | txout,
 |  | tuint * | trace,
 |  | tint | num_mic,
 |  | tint | mic_type,
 |  | tint | frm_len
 | ) |  |

Definition at line 41 of file siutx.c.

References siuPhoneSys_t::active_mic, siuSetup_s::aer_mips_profile, AER_SIM_MIC_TYPE_ARRAY, AER_SIM_NUM_BF_MIC, AER_SIM_NUM_HF_MIC, siuInst_t::aerHFInst, aersim_cacheFlush(), aersim_profile_get_cycle_before_aer(), siuInst_t::agcHFhandles, siuInst_t::agcHFInst, siuInst_t::bfInst, siuInst_t::gain_ctl, siuInst_t::mssInst, siuInst_t::pending_gain_request, siuInst_t::phone_sys, siu_mmic_control(), siu_mmic_proc_load_control(), siu_mss_buff, siuGainControl(), and siuSetup.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_new_agc | ( | siuInst_t * | inst,
 |  | tint | num_HF_mic
 | ) |  |

Definition at line 305 of file siuagc.c.

References AER_HES_ID, AER_HF0_ID, aersim_setbit, agc_buff0_hf, agc_buff0_hs, siuInst_t::agcHEShandle, siuInst_t::agcHESInst, siuInst_t::agcHFhandles, siuInst_t::agcHFInst, SIU_MID_AGC, SIU_NUM_AGC_BUFFS, siu_print_buff_usage(), siuAgcEvent(), siuDbgDrc(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_agc | ( | siuInst_t * | inst,
 |  | tint | sampling_rates,
 |  | tint | num_mic
 | ) |  |

Definition at line 402 of file siuagc.c.

References aersim_chkbit, siuInst_t::agcHESInst, and siuInst_t::agcHFInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_close_agc ( siuInst_t * inst )

Definition at line 431 of file siuagc.c.

References siuInst_t::agcHESInst, siuInst_t::agcHFInst, siuPhoneSys_t::num_HF_mic, and siuInst_t::phone_sys.

void siu_new_mms | ( | siuInst_t * | inst,
 |  | tint | num_mic,
 |  | tint | samp_rates
 | ) |  |

void siu_mmic_control ( siuInst_t * inst )

Definition at line 62 of file siummic.c.

References siuPhoneSys_t::active_mic, siuInst_t::aerHFInst, siuInst_t::mssInst, and siuInst_t::phone_sys.

Referenced by siuSendIn().

Here is the caller graph for this function:

void siu_mmic_init ( siuInst_t * inst )

Definition at line 34 of file siummic.c.

References siuPhoneSys_t::active_mic, AER_SIM_HIGH_LOAD_MIC_INIT, AER_SIM_SIU_DEF_HF_MIC, siuInst_t::aerHFInst, siuPhoneSys_t::inactive_highload_mic, siuInst_t::mssInst, and siuInst_t::phone_sys.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_print_buff_usage | ( | const ecomemBuffer_t * | bufs,
 |  | tint | num_bufs
 | ) |  |

void siu_mmic_proc_load_control | ( | siuInst_t * | inst,
 |  | tint | num_mic
 | ) |  |

Definition at line 81 of file siummic.c.

References siuPhoneSys_t::active_mic, siuInst_t::aerHFInst, siuPhoneSys_t::inactive_highload_mic, siuInst_t::phone_sys, siu_put_aer_high_load(), and siu_put_aer_low_load().

Referenced by siuSendIn().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_put_aer_low_load ( void * aer_inst )

Definition at line 113 of file siummic.c.

Referenced by siu_mmic_proc_load_control().

Here is the caller graph for this function:

void siu_put_aer_high_load ( void * aer_inst )

Definition at line 137 of file siummic.c.

Referenced by siu_mmic_proc_load_control().

Here is the caller graph for this function:

Variable Documentation

siuContext_t siuContext

Definition at line 30 of file siu.c.

Referenced by siuInit().


AER Simulation: siuloc.h Source File

  • File List
  • Globals

siuloc.h

Go to the documentation of this file.
00001 #ifndef _SIULOC_H
00002 #define _SIULOC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Local definitions and API for SIU.
00005  ******************************************************************************
00006  * FILE NAME:   siuloc.h
00007  *
00008  * DESCRIPTION: Contains local SIU definitions and API.
00009  *
00010  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00011  *                     ALL RIGHTS RESERVED
00012  *
00013  *****************************************************************************/
00014
00015 /* System definitions and utilities */
00016 #include <ti/mas/types/types.h>                       /* DSP types            */
00017
00018 #include <ti/mas/aer/test/siusim/siu.h>        /* required for siuTxSendOut_t */
00019 #include <ti/mas/aer/test/siusim/siuagc.h>
00020 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00021
00022 #define AER_HES_ID 0   /* for handset/headset instance */
00023 #define AER_HF0_ID 1   /* for handsfree instance 0, and add x for instance x  */
00024 #define AER_HFMAX_ID 15 /* maximum ID for 4 bits */
00025
00026 /* Useful macros */
00027 #define siuMakeID(mid,chnum)    ((tuint)(mid)<<8|(tuint)(chnum))
00028 #define siuExtrModID(id)        ((tuint)(((id)>>8) & 0xf0))
00029 #define siuExtrMicID(id)        ((tuint)(((id)>>8) & 0xf))
00030 #define siuExtrChID(id)         ((id) & 0xff)
00031
00032 /*----------------------------*/
00033 /* Exception and Debug Macros */
00034 /*----------------------------*/
00035
00036 #define _SIUSTR(x)   __SIUSTR(x)
00037 #define __SIUSTR(x)  #x
00038 /* Assert macro for the exceptions */
00039 #define siu_exc_assert(expr,inst) {                     \
00040   ((expr) ? ((void)0) :                             \
00041             (*(inst)->exception)((inst)->ID,        \
00042               __FILE__ "(" _SIUSTR(__LINE__) ")")); \
00043 }
00044
00045 /* Debug macro  */
00046 #define siu_dbg_out(inst,s) {  (*(inst)->debug)((inst)->ID,(s));  }
00047
00048 /******************************************************************************
00049  * DATA DEFINITION: SIU Global Context.
00050  ******************************************************************************
00051  * DESCRIPTION: Contains state information for SIU module.
00052  *
00053  *****************************************************************************/
00054
00055 typedef struct {
00056   tuint   ID;                                 /* SIU Module ID (initialized in
00057                                                *  siuInit() */
00058   void    (*exception)(tuint id, char *str);  /* master exception function
00059                                                *  (initialized in siuInit() */
00060   void    (*debug)(tuint id, char *str);      /* master debug function
00061                                                *  (initialized in siuInit() */
00062   tuint    cheap_used;   /* # words of core heap used outside siuInst_t */
00063   void    *cheap;       /* core heap handle */
00064   tuint    vheap_used;   /* # words of voice heap used outside siuInst_t */
00065   void    *vheap;       /* voice heap handle */
00066 } siuContext_t;
00067
00068 /******************************************************************************
00069  * DATA DEFINITION: SIU Tx Task Instance.
00070  ******************************************************************************
00071  * DESCRIPTION: Transmit task instance.
00072  *
00073  *****************************************************************************/
00074
00075 typedef struct {
00076   siuTxSendOut_t  TxSendOut;            /* send-out object                   */
00077   linSample       *send_frame_ptr;      /* a pointer to send frame           */
00078   linSample       *recv_frame_ptr;      /* a pointer to receive frame        */
00079   tint            send_out_frame_length;/* # samples in send out frame       */
00080   tint            send_in_frame_length; /* # samples in send in frame        */
00081   linSample       send_frm_del[AER_MAX_FRAME_LENGTH];
00082   tbool           enabled;              /* TRUE: task works, FALSE: doesn't  */
00083 } siuTxInst_t;
00084
00085 typedef struct {
00086   tint            rin_frm_len;    /* # samples in receive frame        */
00087   tint            rout_frm_len;    /* # samples in receive frame        */
00088 } siuRxInst_t;
00089
00090 typedef struct {
00091   tuint           phone_mode;
00092   tint            mic_proc_order[AER_SIM_NUM_HF_MIC];
00093   tint            mic_delay[AER_SIM_NUM_HF_MIC];
00094   tint            mic_scale[AER_SIM_NUM_HF_MIC];
00095   tint            num_HF_mic;
00096   tint            active_mic;
00097   tint            mic_active_time;  /* simulate switching HF microphones */
00098   tint            round_robin_cntr;
00099   tint            inactive_highload_mic;
00100 }siuPhoneSys_t;
00101
00102 /******************************************************************************
00103  * DATA DEFINITION: SIU Instance.
00104  ******************************************************************************
00105  * DESCRIPTION: Contains state information for one SIU channel.
00106  *
00107  *****************************************************************************/
00108
00109 typedef struct {
00110   tuint ID;                                 /* instance ID (initialized in
00111                                              *  siuInit() */
00112   void  (*exception)(tuint id, char *str);  /* exception function (initialized
00113                                              *  in siuInit() */
00114   void  (*debug)(tuint id, char *str);      /* debug function (initialized
00115                                              *  in siuInit() */
00116   /* Channel information */
00117   siuTxInst_t TxInst;      /* Tx Task Instance */
00118   siuRxInst_t RxInst;      /* Rx task instance */
00119   siuPhoneSys_t phone_sys; /* system information of the phone */
00120   tuint  cheap_used;       /* # words allocated from core heap on this channel */
00121   tuint  vheap_used;       /* # words allocated from voice heap on this channel */
00122   tint  companding_law;   /* Provides information on which type of companding
00123                            *  is used before linear samples are obtained. Valid
00124                            *  values are const_COMP_ALAW_8, const_COMP_MULAW_8,
00125                            *  const_COMP_LINEAR (no companding, the number of
00126                            *  bits in a linear sample has to be provided
00127                            *  somewhere.) Refers to physical I/O used. */
00128   tint  pcm_bits;         /* # of bits in a PCM sample. (8 for u-law, A-law,
00129                            *  and transparent mode, [1,16] range for linear) */
00130   linSample *aer_recv_in_buf;   /* Receive-in buffer for AER (receive-out for
00131                                  * PIU. Should be part of PIU, not SIU!!! */
00132   tint  tx_ag_chg_delay_frm;
00133   tint  rx_ag_chg_delay_frm;
00134   tint  tx_ag_chg_delay_cnt;
00135   tint  rx_ag_chg_delay_cnt;
00136   Fract spklin_gain;
00137   Fract analog_micgainlin;            /* dB in Q4 */
00138   Fract digital_micgainlin;           /* dB in Q4 */
00139   tbool pending_gain_request[AER_SIM_NUM_HF_MIC];
00140   siuGainControl_t gain_ctl;
00141   void  *piuInst;         /* a pointer to PIU instance */
00142   void  *aerHESInst;      /* a pointer to AER HES/HS instance */
00143   void  *agcHESInst;      /* a pointer to AGC HES/HS instance */
00144   void  *aerHFInst[AER_SIM_NUM_HF_MIC]; /* AER HF instances */
00145   void  *agcHFInst[AER_SIM_NUM_HF_MIC];   /* a pointer to AGC instance */
00146   void  *aerHEShandle;
00147   void  *aerHFhandles[AER_SIM_NUM_HF_MIC];
00148   void  *agcHEShandle;
00149   void  *agcHFhandles[AER_SIM_NUM_HF_MIC];
00150   void  *drcInst;
00151   void  *veuInst;
00152   void  *mssInst;
00153   void  *bfInst;
00154 } siuInst_t;
00155
00156
00157 /* External references local to SIU */
00158 extern siuContext_t siuContext;         /* SIU Global Context (siu.c) */
00159 extern siuInst_t    siuInst[];          /* SIU instances (siu.c) */
00160
00161 /* External functions local to SIU (siu.c) */
00162 void  siuDebug      (tuint id, char *s);
00163 void  siuException  (tuint id, char *s);
00164 void siuDbgAer(void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2);
00165 void siuDbgAgc(void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2);
00166 void siuDbgDrc(void *handle, tuint msg, tuint code, tuint unused1, tuint *unused2);
00167 void siu_drc_process (void *drcInst, void *sin, void *sout);
00168
00169 /* siumgr.c */
00170 void siu_new_piu  (tint chnum, tint max_frame_length);
00171 void siu_open_piu (tint chnum, tint segment_size, tint frame_size,
00172                    tint recv_out_length, tint samp_rate);
00173 void siu_open_tx  (tint chnum, tint num_HF_mic, tint frame_in_size, tint frame_out_size);
00174 void siu_open_rx (tint chnum, tint frame_size_in, tint frame_size_out);
00175 void siuRxOpen    (siuInst_t *siuInst, siuRxConfig_t *cfg);
00176 void siuTxOpen    (siuInst_t *siuInst, siuTxConfig_t *cfg);
00177 void siuTxSendIn  (siuInst_t *siuInst, linSample *send_frame, linSample *recv_frame);
00178 void siuReceiveIn(siuInst_t *inst, linSample *rxin, linSample *rxout,
00179                   tuint *trace, tint num_mic);
00180 void siuSendIn    (siuInst_t *siuInst, linSample *rx_sync,
00181                    linSample txin[][AER_SIM_MAX_FRAME_LENGTH], linSample *txout,
00182                                    tuint *trace, tint num_mic, tint mic_type, tint frm_len);
00183 void siu_new_agc    (siuInst_t *inst, tint num_HF_mic);
00184 void siu_open_agc   (siuInst_t *inst, tint sampling_rates, tint num_mic);
00185 void siu_close_agc  (siuInst_t *inst);
00186 void siu_new_mms(siuInst_t *inst, tint num_mic, tint samp_rates);
00187 void siu_mmic_control(siuInst_t *inst);
00188 void siu_mmic_init(siuInst_t *inst);
00189 void siu_print_buff_usage(const ecomemBuffer_t *bufs, tint num_bufs);
00190 void siu_mmic_proc_load_control(siuInst_t *inst, tint num_mic);
00191 void siu_put_aer_low_load(void *aer_inst);
00192 void siu_put_aer_high_load(void *aer_inst);
00193
00194
00195 #endif  /* _SIULOC_H */
00196 /* nothing past this point */


AER Simulation: siummic.c File Reference

  • File List
  • Globals

siummic.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/mss.h>
#include <ti/mas/aer/test/siusim/siuloc.h>

Include dependency graph for siummic.c:

Go to the source code of this file.

Defines

#define | AER_SIM_SIU_DEF_HF_MIC 0
#define | AER_SIM_HIGH_LOAD_MIC_INIT 1

Functions

void | siu_mmic_init (siuInst_t *inst)
void | siu_mmic_control (siuInst_t *inst)
void | siu_mmic_proc_load_control (siuInst_t *inst, tint num_mic)
void | siu_put_aer_low_load (void *aer_inst)
void | siu_put_aer_high_load (void *aer_inst)

Define Documentation

#define AER_SIM_SIU_DEF_HF_MIC 0

Definition at line 28 of file siummic.c.

Referenced by siu_mmic_init().

#define AER_SIM_HIGH_LOAD_MIC_INIT 1

Definition at line 29 of file siummic.c.

Referenced by siu_mmic_init().

Function Documentation

void siu_mmic_init ( siuInst_t * inst )

Definition at line 34 of file siummic.c.

References siuPhoneSys_t::active_mic, AER_SIM_HIGH_LOAD_MIC_INIT, AER_SIM_SIU_DEF_HF_MIC, siuInst_t::aerHFInst, siuPhoneSys_t::inactive_highload_mic, siuInst_t::mssInst, and siuInst_t::phone_sys.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

void siu_mmic_control ( siuInst_t * inst )

Definition at line 62 of file siummic.c.

References siuPhoneSys_t::active_mic, siuInst_t::aerHFInst, siuInst_t::mssInst, and siuInst_t::phone_sys.

Referenced by siuSendIn().

Here is the caller graph for this function:

void siu_mmic_proc_load_control | ( | siuInst_t * | inst,
 |  | tint | num_mic
 | ) |  |

Definition at line 81 of file siummic.c.

References siuPhoneSys_t::active_mic, siuInst_t::aerHFInst, siuPhoneSys_t::inactive_highload_mic, siuInst_t::phone_sys, siu_put_aer_high_load(), and siu_put_aer_low_load().

Referenced by siuSendIn().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_put_aer_low_load ( void * aer_inst )

Definition at line 113 of file siummic.c.

Referenced by siu_mmic_proc_load_control().

Here is the caller graph for this function:

void siu_put_aer_high_load ( void * aer_inst )

Definition at line 137 of file siummic.c.

Referenced by siu_mmic_proc_load_control().

Here is the caller graph for this function:


AER Simulation: siummic.c Source File

  • File List
  • Globals

siummic.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Multi-mic control routines
00003  ******************************************************************************
00004  * FILE NAME:   siummic.c
00005  *
00006  * DESCRIPTION: Contains routines that implement SIU multi-mic control.
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 /* Ansi C header files */
00014 #include <stdio.h>
00015 #include <stdlib.h>
00016 #include <string.h>
00017
00018 /* System definitions and utilities */
00019 #include <ti/mas/types/types.h>
00020 #include <ti/mas/fract/fract.h>
00021
00022 /* AER, AGC, MSS and SVD header files */
00023 #include <ti/mas/aer/aer.h>
00024 #include <ti/mas/aer/mss.h>
00025
00026 #include <ti/mas/aer/test/siusim/siuloc.h>
00027
00028 #define AER_SIM_SIU_DEF_HF_MIC 0
00029 #define AER_SIM_HIGH_LOAD_MIC_INIT 1
00030
00031 /******************************************************************************
00032  * FUNCTION PURPOSE: Initialize multi-mic control.
00033  ******************************************************************************/
00034 void siu_mmic_init(siuInst_t *inst)
00035 {
00036   mssControl_t      mss_ctl_cfg;
00037   tint err_code;
00038
00039   /* Set the 1st hands-free mic instance as the active instance for AER */
00040   err_code = aerActivate (inst->aerHFInst[AER_SIM_SIU_DEF_HF_MIC], NULL);
00041   if(err_code != aer_NOERR) {
00042     printf("Error when calling aerActivate() with error code %d!\n", err_code);
00043     exit(1);
00044   }
00045
00046   /* Set 1st hands-free mic as the selected source for MSS */
00047   mss_ctl_cfg.valid_bitfield = mss_CTL_SELECT_SRC;
00048   mss_ctl_cfg.source.group   = mss_SRC_MIC_FIXED;
00049   mss_ctl_cfg.source.index   = AER_SIM_SIU_DEF_HF_MIC;
00050   err_code = mssControl (inst->mssInst, &mss_ctl_cfg);
00051
00052   /* Keep record of the selected hands-free mic */
00053   inst->phone_sys.active_mic = AER_SIM_SIU_DEF_HF_MIC;
00054
00055   inst->phone_sys.inactive_highload_mic = AER_SIM_HIGH_LOAD_MIC_INIT;
00056
00057 } /* siu_mmic_init */
00058
00059 /******************************************************************************
00060  * FUNCTION PURPOSE: Multi-mic control - activates/deactivates mic instances.
00061  ******************************************************************************/
00062 void siu_mmic_control(siuInst_t *inst)
00063 {
00064   mssDebugStat_t mss_dbg;
00065
00066   /* Get selected mic information from MSS */
00067   mssDebugStat(inst->mssInst, &mss_dbg);
00068
00069   /* Check if a different mic has just been selected */
00070   if(mss_dbg.cur_src.index != inst->phone_sys.active_mic) {
00071     /* Activate the AER instance for the newly selected mic */
00072     aerActivate(inst->aerHFInst[mss_dbg.cur_src.index],
00073                 inst->aerHFInst[inst->phone_sys.active_mic]);
00074     inst->phone_sys.active_mic = mss_dbg.cur_src.index;
00075   }
00076 } /* siu_mmic_control */
00077
00078 /******************************************************************************
00079  * FUNCTION PURPOSE: Multi-mic processing load control
00080  ******************************************************************************/
00081 void siu_mmic_proc_load_control(siuInst_t *inst, tint num_mic)
00082 {
00083   tint highload_mic_old, highload_mic_new;
00084
00085   /* put the inactive AER instance with high processing load (normal operation)
00086      to low processing load mode */
00087   highload_mic_old = inst->phone_sys.inactive_highload_mic;
00088
00089   /* put next inactive AER instance to high processing load mode */
00090   highload_mic_new = highload_mic_old + 1;
00091   if(highload_mic_new == num_mic) {
00092     highload_mic_new = 0;  /* wrap around */
00093   }
00094
00095   /* don't put active AER instance to low processing load mode */
00096   if(highload_mic_new == inst->phone_sys.active_mic) {
00097     highload_mic_new += 1;
00098     if(highload_mic_new == num_mic) {
00099       highload_mic_new = 0; /* wrap around */
00100         }
00101   }
00102
00103   if(highload_mic_old != highload_mic_new) {
00104     siu_put_aer_low_load(inst->aerHFInst[highload_mic_old]);
00105     siu_put_aer_high_load(inst->aerHFInst[highload_mic_new]);
00106     inst->phone_sys.inactive_highload_mic = highload_mic_new;
00107   }
00108 } /* siu_mmic_proc_load_control */
00109
00110 /******************************************************************************
00111  * FUNCTION PURPOSE: Put inactive AER instance to low processing mode
00112  ******************************************************************************/
00113 void siu_put_aer_low_load(void *aer_inst)
00114 {
00115   aerControl_t aer_ctl;
00116
00117   /* low processing load: freeze tail update, skip coherence detection, freeze
00118                           noise estimate */
00119   aer_ctl.valid_bitfield_0 =   aer_CTL_VALID0_MODES_CTL1
00120                              | aer_CTL_VALID0_MODES_CTL2;
00121   aer_ctl.modes_1.mask  = aer_CTL1_FREEZE_TAIL_UPDATE;
00122   aer_ctl.modes_1.value = aer_CTL1_FREEZE_TAIL_UPDATE;
00123   aer_ctl.modes_2.mask  = aer_CTL2_SKIP_COHERENCE | aer_CTL2_FREEZE_NOISE_EST;
00124   aer_ctl.modes_2.value = aer_CTL2_SKIP_COHERENCE | aer_CTL2_FREEZE_NOISE_EST;
00125
00126   aer_ctl.valid_bitfield_1 = 0x0;
00127   aer_ctl.valid_bitfield_2 = 0x0;
00128   aer_ctl.valid_bitfield_3 = 0x0;
00129   aer_ctl.valid_bitfield_4 = 0x0;
00130
00131   aerControl(aer_inst, &aer_ctl);
00132 } /* siu_put_aer_low_load */
00133
00134 /******************************************************************************
00135  * FUNCTION PURPOSE: Put active AER instance to normal (high) processing mode
00136  ******************************************************************************/
00137 void siu_put_aer_high_load(void *aer_inst)
00138 {
00139   aerControl_t aer_ctl;
00140
00141   /* high processing load (normal operation): enable tail update, run coherence
00142                                               detection, update noise estimate */
00143   aer_ctl.valid_bitfield_0 =   aer_CTL_VALID0_MODES_CTL1
00144                              | aer_CTL_VALID0_MODES_CTL2;
00145   aer_ctl.modes_1.mask  = aer_CTL1_FREEZE_TAIL_UPDATE;
00146   aer_ctl.modes_1.value = 0;
00147   aer_ctl.modes_2.mask  = aer_CTL2_SKIP_COHERENCE | aer_CTL2_FREEZE_NOISE_EST;
00148   aer_ctl.modes_2.value = 0;
00149
00150   aer_ctl.valid_bitfield_1 = 0x0;
00151   aer_ctl.valid_bitfield_2 = 0x0;
00152   aer_ctl.valid_bitfield_3 = 0x0;
00153   aer_ctl.valid_bitfield_4 = 0x0;
00154   aerControl(aer_inst, &aer_ctl);
00155 } /* siu_put_aer_high_load */
00156
00157 /* Nothing past this point */


AER Simulation: siumss.c File Reference

  • File List
  • Globals

siumss.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <ti/mas/types/types.h>
#include <ti/mas/aer/mss.h>
#include <ti/mas/aer/test/siusim/siu.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/siusim/siuport.h>

Include dependency graph for siumss.c:

Go to the source code of this file.

Data Structures

struct | mssinstbuf_t
struct | svdinstbuf_t
struct | mssbuf_t

Defines

#define | AER_SIM_MSS_INST_SIZE 50
#define | AER_SIM_SVD_INST_SIZE 10
#define | SIU_NUM_MSS_BUFFS 1

Functions

void | siu_new_mss (siuInst_t *inst, tint num_mic, tint samp_rates)
void | siu_open_mss (siuInst_t *inst, tint num_mic, tint samp_rates)

Variables

mssbuf_t mss_buf

Define Documentation

#define AER_SIM_MSS_INST_SIZE 50

Definition at line 24 of file siumss.c.

#define AER_SIM_SVD_INST_SIZE 10

Definition at line 25 of file siumss.c.

#define SIU_NUM_MSS_BUFFS 1

Definition at line 26 of file siumss.c.

Referenced by siu_new_mss().

Function Documentation

void siu_new_mss | ( | siuInst_t * | inst,
 |  | tint | num_mic,
 |  | tint | samp_rates
 | ) |  |

Definition at line 59 of file siumss.c.

References AER_SIM_NUM_HF_MIC, mss_buf, siuInst_t::mssInst, SIU_MID_MSS, SIU_NUM_MSS_BUFFS, siu_print_buff_usage(), and siuMakeID.

Referenced by aer_sim_instantiate_aer().

Here is the call graph for this function:

Here is the caller graph for this function:

void siu_open_mss | ( | siuInst_t * | inst,
 |  | tint | num_mic,
 |  | tint | samp_rates
 | ) |  |

Definition at line 118 of file siumss.c.

References aersim_chkbit, and siuInst_t::mssInst.

Referenced by aer_sim_instantiate_aer().

Here is the caller graph for this function:

Variable Documentation

mssbuf_t mss_buf

Definition at line 49 of file siumss.c.

Referenced by siu_new_mss().


AER Simulation: siumss.c Source File

  • File List
  • Globals

siumss.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Multi-Source Selection (MSS) Module API Simulation
00003  ******************************************************************************
00004  * FILE NAME:   siumms.c
00005  *
00006  * DESCRIPTION: Contains routines that use MSS API.
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 #include <stdlib.h>
00014 #include <stdio.h>
00015
00016 /* System definitions and utilities */
00017 #include <ti/mas/types/types.h>
00018 #include <ti/mas/aer/mss.h>
00019
00020 #include <ti/mas/aer/test/siusim/siu.h>
00021 #include <ti/mas/aer/test/siusim/siuloc.h>
00022 #include <ti/mas/aer/test/siusim/siuport.h>
00023
00024 #define AER_SIM_MSS_INST_SIZE 50
00025 #define AER_SIM_SVD_INST_SIZE 10
00026 #define SIU_NUM_MSS_BUFFS 1        /* static buffer allocation */
00027
00028
00029 typedef struct {
00030   LFract buf[AER_SIM_MSS_INST_SIZE];
00031 } mssinstbuf_t;
00032
00033 typedef struct {
00034   LFract buf[AER_SIM_SVD_INST_SIZE];
00035 } svdinstbuf_t;
00036
00037 typedef struct {
00038   mssinstbuf_t mss_inst;
00039   svdinstbuf_t svd_inst[AER_SIM_NUM_HF_MIC];
00040 } mssbuf_t;
00041
00042 #ifdef gnu_targets_arm_GCArmv7A
00043 mssbuf_t mss_buf __attribute__ ((aligned (8)));
00044 #else
00045 #ifdef ti_targets_C55_large
00046 mssbuf_t mss_buf;
00047 #else
00048 #pragma DATA_ALIGN(mss_buf, 8);
00049 mssbuf_t mss_buf;
00050 #endif
00051 #endif
00052
00053 /******************************************************************************
00054  * FUNCTION PURPOSE: Create MSS module.
00055  ******************************************************************************
00056  * DESCRIPTION: Obtains info MSS AER buffers and creates one instance of MSS.
00057  *
00058  *****************************************************************************/
00059 void siu_new_mss(siuInst_t *inst, tint num_mic, tint samp_rates)
00060 {
00061   const ecomemBuffer_t *bufs_req_by_mss;
00062   ecomemBuffer_t        bufs_aloc_by_siu[SIU_NUM_MSS_BUFFS];
00063   mssSizeConfig_t   mss_size_cfg;
00064   mssNewConfig_t    mss_new_cfg;
00065   tint err_code, num_bufs_req_by_mss;
00066
00067   /* Set up configurations for mssGetSizes() */
00068   mss_size_cfg.max_sampling_rate  = mss_SAMP_RATE_16K;
00069   mss_size_cfg.max_num_mic_fixed  = AER_SIM_NUM_HF_MIC;
00070   mss_size_cfg.max_num_mic_remote = 0;
00071   mss_size_cfg.max_num_mic_clean  = 0;
00072   mss_size_cfg.max_num_beam       = 0;
00073
00074   /* Call API function mssGetSizes() to get memory requirements:
00075      - num_bufs_req_by_mss: number of buffers required by MSS
00076      - bufs_req_by_mss:   pointer to buffer descriptors defined inside MSS */
00077   err_code = mssGetSizes(&num_bufs_req_by_mss, &bufs_req_by_mss, &mss_size_cfg);
00078
00079   printf("MSS required buffers:\n");
00080   siu_print_buff_usage(bufs_req_by_mss, num_bufs_req_by_mss);
00081
00082   /* Check if there is enough memory allocated for MSS */
00083   if(   num_bufs_req_by_mss > SIU_NUM_MSS_BUFFS
00084      || bufs_req_by_mss[0].size > sizeof(mssbuf_t)) {
00085     printf("Memory allocated by SIU is not enough for MSS!\n");
00086     exit(0);
00087   }
00088
00089   /* Provide memory to MSS through mssNew() */
00090   bufs_aloc_by_siu[0].mclass    = ecomem_CLASS_INTERNAL;
00091   bufs_aloc_by_siu[0].log2align = bufs_req_by_mss[0].log2align;
00092   bufs_aloc_by_siu[0].volat     = FALSE;
00093   bufs_aloc_by_siu[0].size      = sizeof(mssbuf_t);
00094   bufs_aloc_by_siu[0].base      = &mss_buf;
00095
00096   printf("Buffers allocated by SIU for MSS:\n");
00097   siu_print_buff_usage(bufs_aloc_by_siu, num_bufs_req_by_mss);
00098
00099   /* Set up configurations for mssNew() */
00100   mss_new_cfg.handle  = (void *) siuMakeID(SIU_MID_MSS, 0);
00101   mss_new_cfg.sizeCfg = mss_size_cfg;
00102
00103   /* Call API function mssNew() to create an MSS instance:
00104      - pass buffer descriptors that are set by SIU
00105      - pass number of buffer descriptors   */
00106   err_code = mssNew (&inst->mssInst, num_bufs_req_by_mss, bufs_aloc_by_siu, &mss_new_cfg);
00107   if (err_code != mss_NOERR) {
00108     printf("Error when calling mssNew() with error code %d!\n", err_code);
00109     exit(1);
00110   }
00111
00112 } /* siu_new_mss */
00113
00114 /******************************************************************************
00115  * FUNCTION PURPOSE: Open and configure MSS module.
00116  *
00117  *****************************************************************************/
00118 void siu_open_mss(siuInst_t *inst, tint num_mic, tint samp_rates)
00119 {
00120   mssControl_t  mss_ctl_cfg;
00121   mssConfig_t   mss_open_cfg;
00122   tint err_code;
00123
00124   /* Set up configuration for mssOpen() */
00125   mss_open_cfg.sampling_rate  = aersim_chkbit(samp_rates, aer_SRATE_TXOUT_16K)
00126                                 ? mss_SAMP_RATE_16K : mss_SAMP_RATE_8K;
00127   mss_open_cfg.num_mic_fixed  = num_mic;
00128   mss_open_cfg.num_mic_remote = 0;
00129   mss_open_cfg.num_mic_clean  = 0;
00130   mss_open_cfg.num_mic_array  = 0;
00131   mss_open_cfg.num_beam       = 0;
00132
00133   err_code = mssOpen (inst->mssInst, &mss_open_cfg);
00134   if (err_code != mss_NOERR) {
00135     printf("Error when calling mssOpen() with error code %d!\n", err_code);
00136     exit(1);
00137   }
00138
00139   mss_ctl_cfg.valid_bitfield =  mss_CTL_SWITCH_THRESH
00140                               | mss_CTL_SWITCH_DURATION
00141                               | mss_CTL_SWITCH_HNAGOVER;
00142
00143   mss_ctl_cfg.switch_thresh   = 250;
00144   mss_ctl_cfg.switch_duration = 300;
00145   mss_ctl_cfg.switch_hangover = 1000;
00146   err_code = mssControl (inst->mssInst, &mss_ctl_cfg);
00147
00148   if (err_code != mss_NOERR) {
00149     printf("Error when calling mssControl() to configure MSS with error code %d!\n",
00150            err_code);
00151     exit(1);
00152   }
00153 } /* siu_open_mss */
00154
00155 /* nothing past this point */


AER Simulation: siuport.h File Reference

  • File List
  • Globals

siuport.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/types/const.h>

Include dependency graph for siuport.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | SIU_MAX_CHANNELS 1
#define | SIU_MAX_FRAME_DURATION 10
#define | SIU_MAX_FRAME_LENGTH
#define | SIU_MAX_AER_FILTER_DURATION 200
#define | SIU_aer_SAMP_RATE_CORE 8000
#define | SIU_MAX_AER_FILTER_LENGTH (1UL*SIU_MAX_AER_FILTER_DURATION*SIU_aer_SAMP_RATE_CORE/1000)
#define | SIU_GAINR_INIT 0x207
#define | SIU_GAINS_INIT 0x207
#define | SIU_MID_SIU 0x01
#define | SIU_MID_VCU 0x02
#define | SIU_MID_VCA 0x03
#define | SIU_MID_PIU 0x04
#define | SIU_MID_AER 0x10
#define | SIU_MID_AGC 0x20
#define | SIU_MID_DRC 0x40
#define | SIU_MID_MSS 0x80
#define | SIU_MID_BF 0x100
#define | SIU_DBGMSG_SIZE 256

Define Documentation

#define SIU_MAX_CHANNELS 1

Definition at line 20 of file siuport.h.

#define SIU_MAX_FRAME_DURATION 10

Definition at line 24 of file siuport.h.

#define SIU_MAX_FRAME_LENGTH

Value:

(1UL*SIU_MAX_FRAME_DURATION*              \
                                 const_MAX_VOX_SAMPLING_RATE/1000)

Definition at line 28 of file siuport.h.

#define SIU_MAX_AER_FILTER_DURATION 200

Definition at line 36 of file siuport.h.

#define SIU_aer_SAMP_RATE_CORE 8000

Definition at line 39 of file siuport.h.

#define SIU_MAX_AER_FILTER_LENGTH (1UL*SIU_MAX_AER_FILTER_DURATION*SIU_aer_SAMP_RATE_CORE/1000)

Definition at line 42 of file siuport.h.

#define SIU_GAINR_INIT 0x207

Definition at line 51 of file siuport.h.

#define SIU_GAINS_INIT 0x207

Definition at line 54 of file siuport.h.

#define SIU_MID_SIU 0x01

Definition at line 59 of file siuport.h.

Referenced by aer_sim_init_siu(), and siuInit().

#define SIU_MID_VCU 0x02

Definition at line 60 of file siuport.h.

#define SIU_MID_VCA 0x03

Definition at line 61 of file siuport.h.

#define SIU_MID_PIU 0x04

Definition at line 62 of file siuport.h.

#define SIU_MID_AER 0x10

Definition at line 63 of file siuport.h.

Referenced by siu_new_aer().

#define SIU_MID_AGC 0x20

Definition at line 64 of file siuport.h.

Referenced by siu_new_agc().

#define SIU_MID_DRC 0x40

Definition at line 65 of file siuport.h.

Referenced by siu_new_drc().

#define SIU_MID_MSS 0x80

Definition at line 66 of file siuport.h.

Referenced by siu_new_mss().

#define SIU_MID_BF 0x100

Definition at line 67 of file siuport.h.

Referenced by siu_new_bf().

#define SIU_DBGMSG_SIZE 256

Definition at line 69 of file siuport.h.

Referenced by siuDebugInternal().


AER Simulation: siuport.h Source File

  • File List
  • Globals

siuport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: To include the header file specific to platforms for AEC.
00003  ******************************************************************************
00004  * FILE NAME:   siuport.h
00005  *
00006  * DESCRIPTION: Based on compiler switch, include platform specific header file.
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 #ifndef _SIUSIMPORT_H
00014 #define _SIUSIMPORT_H
00015
00016 /* System definitions and utilities */
00017 #include <ti/mas/types/types.h>                      /* DSP types            */
00018 #include <ti/mas/types/const.h>
00019
00020 #define SIU_MAX_CHANNELS      1         /* Maximum number of SIU channels */
00021
00022 /* Maximum PCM/linear sample frame duration and length */
00023
00024 #define SIU_MAX_FRAME_DURATION  10      /* 10ms @8 kHz or 20 ms at 16kHz, ie */
00025                                         /*   const.h const_VOX_SAMPLING_RATE */
00026                                                                                 /*   fixed, so lie about duration    */
00027 /* Maximum frame length in samples */
00028 #define SIU_MAX_FRAME_LENGTH    (1UL*SIU_MAX_FRAME_DURATION*              \
00029                                  const_MAX_VOX_SAMPLING_RATE/1000)
00030 #if (SIU_MAX_FRAME_LENGTH*1000UL != 1UL*SIU_MAX_FRAME_DURATION*           \
00031                                     const_MAX_VOX_SAMPLING_RATE)
00032 # error invalid SIU maximum frame duration/length
00033 #endif
00034
00035 /* Maximum AER tail duration and length */
00036 #define SIU_MAX_AER_FILTER_DURATION   200      /* max tail length = 200msec */
00037
00038 /* AER core sampling rate */
00039 #define SIU_aer_SAMP_RATE_CORE        8000     /* AER Core runs at 8kHz      */
00040
00041 /* Maximum tail length in samples */
00042 #define SIU_MAX_AER_FILTER_LENGTH     \
00043        (1UL*SIU_MAX_AER_FILTER_DURATION*SIU_aer_SAMP_RATE_CORE/1000)
00044 #if (SIU_MAX_AER_FILTER_LENGTH*1000UL != 1UL*SIU_MAX_AER_FILTER_DURATION*  \
00045                                          SIU_aer_SAMP_RATE_CORE)
00046 # error invalid SIU maximum AER tail duration/length
00047 #endif
00048
00049 /* programmable gain initialization - normalization hardware codec dependent */
00050 /* for +36 dB maximum gain, linear gain = 10^((gain in dB - 36 dB)/20)       */
00051 #define SIU_GAINR_INIT 0x207  /* Q15 receive path mechanical speaker volume  */
00052                               /* 0 dB gain for [-12,36] dB hardware codec    */
00053                               /* with max programmable gain scaled to unity  */
00054 #define SIU_GAINS_INIT 0x207  /* Q15 send path microphone gain               */
00055                               /* 0 dB gain for [-12,36] dB hardware codec    */
00056                                                           /* with max programmable gain scaled to unity  */
00057
00058 /* Module ID's */
00059 #define SIU_MID_SIU     0x01      /* SIU module */
00060 #define SIU_MID_VCU     0x02      /* VCU module */
00061 #define SIU_MID_VCA     0x03      /* VCA modules */
00062 #define SIU_MID_PIU     0x04      /* PIU module */
00063 #define SIU_MID_AER     0x10      /* AER module */
00064 #define SIU_MID_AGC     0x20      /* AGC module */
00065 #define SIU_MID_DRC     0x40      /* DRC module */
00066 #define SIU_MID_MSS     0x80      /* MSS module */
00067 #define SIU_MID_BF      0x100     /* BF  module */
00068
00069 #define SIU_DBGMSG_SIZE   256     /* Size of debug message buffer */
00070
00071 #endif /* _SIUSIMPORT_H */
00072
00073 /* Nothing past this point */
00074
00075


AER Simulation: siurx.c File Reference

  • File List
  • Globals

siurx.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/drc.h>
#include <ti/mas/aer/test/siusim/siuloc.h>
#include <ti/mas/aer/test/aersim/aersim.h>

Include dependency graph for siurx.c:

Go to the source code of this file.

Functions

void | siuReceiveIn (siuInst_t *inst, linSample *rxin, linSample *rxout, tuint *trace, tint num_mic)

Variables

siuSetup_t siuSetup
linSample | siu_rxout_temp [SIU_AER_MAX_FRAME_LENGTH]

Function Documentation

void siuReceiveIn | ( | siuInst_t * | inst,
 |  | linSample * | rxin,
 |  | linSample * | rxout,
 |  | tuint * | trace,
 |  | tint | num_mic
 | ) |  |

Definition at line 33 of file siurx.c.

References siuSetup_s::aer_mips_profile, siuInst_t::aerHFInst, aersim_cacheFlush(), aersim_profile_get_cycle_after_aer_receive(), aersim_profile_get_cycle_before_aer(), siuInst_t::drcInst, siu_rxout_temp, and siuSetup.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

siuSetup_t siuSetup

Definition at line 40 of file aersim.c.

Referenced by aer_sim_cfg_on_the_fly(), aer_sim_fio_read_fe(), aer_sim_fio_read_ne(), aer_sim_fio_write_data(), aer_sim_print_version_mips(), main(), siuReceiveIn(), and siuSendIn().

linSample siu_rxout_temp[SIU_AER_MAX_FRAME_LENGTH]

Definition at line 27 of file siurx.c.

Referenced by siuReceiveIn().


AER Simulation: siurx.c Source File

  • File List
  • Globals

siurx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Software Integration Unit Receive Task.
00003  ******************************************************************************
00004  * FILE NAME:   siurx.c
00005  *
00006  * DESCRIPTION: Contains routines that implement SIU Receive Task.
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 /* System definitions and utilities */
00014 #include <ti/mas/types/types.h>                      /* DSP types            */
00015
00016 /* AER and AEP header files */
00017 #include <ti/mas/aer/aer.h>
00018 #include <ti/mas/aer/drc.h>
00019 #ifdef TEST_VEU
00020 #include <ti/mas/veu/veu.h>
00021 #endif
00022
00023 #include <ti/mas/aer/test/siusim/siuloc.h>
00024 #include <ti/mas/aer/test/aersim/aersim.h>
00025
00026 extern siuSetup_t siuSetup;
00027 linSample siu_rxout_temp[SIU_AER_MAX_FRAME_LENGTH];
00028
00029 /******************************************************************************
00030  * FUNCTION PURPOSE: Receive path processing main routine.
00031  *   Description: Call AER receive path functions: DRC, AER Rx
00032  ******************************************************************************/
00033 void siuReceiveIn(siuInst_t *inst, linSample *rxin, linSample *rxout,
00034                   tuint *trace, tint num_mic)
00035 {
00036   int i;
00037
00038   if(siuSetup.aer_mips_profile) {
00039     /* flush cache for profiling */
00040     aersim_cacheFlush();
00041
00042     /* read CPU cycle count before AER processing */
00043     aersim_profile_get_cycle_before_aer(&siuSetup);
00044   }
00045
00046   /* DRC processing: input and output buffers MUST be different */
00047   drcProcess (inst->drcInst, rxin, siu_rxout_temp);
00048
00049   /* AER processing: only active instance writes to buffer rxout */
00050   for(i=0; i<num_mic; i++) {
00051     aerReceiveIn (inst->aerHFInst[i], siu_rxout_temp, rxout, trace);
00052   }
00053
00054   /* read CPU cycle count after AER processing and update average and max */
00055   if(siuSetup.aer_mips_profile) {
00056     aersim_profile_get_cycle_after_aer_receive(&siuSetup);
00057   }
00058
00059 } /* siuReceiveIn */
00060
00061
00062 /* nothing past this line */


AER Simulation: siutx.c File Reference

  • File List
  • Globals

siutx.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/aer/aer.h>
#include <ti/mas/aer/agc.h>
#include <ti/mas/aer/bf.h>
#include <ti/mas/aer/mss.h>
#include <ti/mas/vpe/svd.h>
#include <ti/mas/aer/test/aersim/aersimcfg.h>
#include <ti/mas/aer/test/aersim/aersim.h>
#include <ti/mas/aer/test/siusim/siuloc.h>

Include dependency graph for siutx.c:

Go to the source code of this file.

Functions

void | siuSendIn (siuInst_t *inst, linSample *rx_sync, linSample txin[][AER_SIM_MAX_FRAME_LENGTH], linSample *txout, tuint *trace, tint num_mic, tint mic_type, tint frm_len)

Variables

siuSetup_t siuSetup
linSample | siu_mss_buff [AER_SIM_NUM_HF_MIC][SIU_AER_MAX_FRAME_LENGTH]

Function Documentation

void siuSendIn | ( | siuInst_t * | inst,
 |  | linSample * | rx_sync,
 |  | linSample | txin[][AER_SIM_MAX_FRAME_LENGTH],
 |  | linSample * | txout,
 |  | tuint * | trace,
 |  | tint | num_mic,
 |  | tint | mic_type,
 |  | tint | frm_len
 | ) |  |

Definition at line 41 of file siutx.c.

References siuPhoneSys_t::active_mic, siuSetup_s::aer_mips_profile, AER_SIM_MIC_TYPE_ARRAY, AER_SIM_NUM_BF_MIC, AER_SIM_NUM_HF_MIC, siuInst_t::aerHFInst, aersim_cacheFlush(), aersim_profile_get_cycle_before_aer(), siuInst_t::agcHFhandles, siuInst_t::agcHFInst, siuInst_t::bfInst, siuInst_t::gain_ctl, siuInst_t::mssInst, siuInst_t::pending_gain_request, siuInst_t::phone_sys, siu_mmic_control(), siu_mmic_proc_load_control(), siu_mss_buff, siuGainControl(), and siuSetup.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

siuSetup_t siuSetup

Definition at line 40 of file aersim.c.

linSample siu_mss_buff[AER_SIM_NUM_HF_MIC][SIU_AER_MAX_FRAME_LENGTH]

Definition at line 33 of file siutx.c.

Referenced by siuSendIn().


AER Simulation: siutx.c Source File

  • File List
  • Globals

siutx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Software Integration Unit Transmit Task.
00003  ******************************************************************************
00004  * FILE NAME:   siutx.c
00005  *
00006  * DESCRIPTION: Contains routines that implement SIU Transmit Task.
00007  *
00008  *        Copyright (c) 2007 – 2013 Texas Instruments Incorporated
00009  *                     ALL RIGHTS RESERVED
00010  *
00011  *****************************************************************************/
00012
00013 /* System definitions and utilities */
00014 #include <ti/mas/types/types.h>
00015 #include <ti/mas/fract/fract.h>
00016
00017 /* AER, AGC, MSS and SVD header files */
00018 #include <ti/mas/aer/aer.h>
00019 #include <ti/mas/aer/agc.h>
00020 #include <ti/mas/aer/bf.h>
00021 #include <ti/mas/aer/mss.h>
00022 #include <ti/mas/vpe/svd.h>
00023 #ifdef TEST_VEU
00024 #include <ti/mas/veu/veu.h>
00025 #endif
00026
00027 #include <ti/mas/aer/test/aersim/aersimcfg.h>
00028 #include <ti/mas/aer/test/aersim/aersim.h>
00029 #include <ti/mas/aer/test/siusim/siuloc.h>
00030
00031 extern siuSetup_t siuSetup;
00032
00033 linSample siu_mss_buff[AER_SIM_NUM_HF_MIC][SIU_AER_MAX_FRAME_LENGTH];
00034
00035 /******************************************************************************
00036  * FUNCTION PURPOSE: Send path processing main routine.
00037  *   Description: Call AER send path functions according to configuration:
00038  *                Microphone array:  BF, AGC, AER TX
00039  *                Multi remote mics: AGC, AER Tx, MSS
00040  ******************************************************************************/
00041 void siuSendIn(siuInst_t *inst, linSample *rx_sync,
00042                linSample txin[][AER_SIM_MAX_FRAME_LENGTH], linSample *txout,
00043                tuint *trace, tint num_mic, tint mic_type, tint frm_len)
00044 {
00045   void *bf_micin[AER_SIM_NUM_BF_MIC];
00046   void *fixed_mics[AER_SIM_NUM_HF_MIC];
00047   int i;
00048   tint mic_selected;
00049
00050   if(siuSetup.aer_mips_profile) {
00051     /* flush cache for profiling */
00052     aersim_cacheFlush();
00053
00054     /* read CPU cycle count before AER processing */
00055     aersim_profile_get_cycle_before_aer(&siuSetup);
00056   }
00057
00058   /* Run beamforming and then AER if multi-mic is a mic array */
00059   if(mic_type == AER_SIM_MIC_TYPE_ARRAY) {
00060     for (i=0; i<num_mic; i++) {
00061       bf_micin[i] = (void *)&txin[i][0];
00062     }
00063     bfProcess(inst->bfInst, bf_micin, txout);
00064
00065     aerSendIn(inst->aerHFInst[0], txout, txout, NULL, rx_sync, NULL, trace);
00066   } /* mic array */
00067   else {
00068     /* Run AER and then MSS for multiple remote mics */
00069     mic_selected = inst->phone_sys.active_mic;
00070
00071     /* First process the instance of selected/active mic */
00072     agcSendIn(inst->agcHFInst[mic_selected], &txin[mic_selected][0]);
00073     aerSendIn(inst->aerHFInst[mic_selected], &txin[mic_selected][0],
00074               &siu_mss_buff[mic_selected][0], NULL, rx_sync, NULL, trace);
00075
00076     /* Then process all other instances */
00077     for (i=0; i<num_mic; i++) {
00078       if(i != mic_selected ) {
00079         agcSendIn(inst->agcHFInst[i], &txin[i][0]);
00080         aerSendIn(inst->aerHFInst[i], &txin[i][0], &siu_mss_buff[i][0], NULL,
00081                   rx_sync, NULL, trace);
00082       }
00083     }
00084
00085     /* check if there are pending gain requests from AGC */
00086     for (i=0; i<num_mic; i++) {
00087       if(inst->pending_gain_request[i]) {
00088         siuGainControl(inst->agcHFhandles[i], &inst->gain_ctl);
00089         inst->pending_gain_request[i] = FALSE;
00090       }
00091
00092       /* prepare for MSS processing - only one soure for the case of mic-array */
00093       fixed_mics[i] = (void *)&siu_mss_buff[i][0];
00094     }
00095
00096     /* multi-source selection module to select the optimum source (mic) */
00097     mssProcess(inst->mssInst, txout, rx_sync, fixed_mics, NULL, NULL, NULL, NULL);
00098
00099     /* If necessary, activate newly selected mic instance and deactivate old instance */
00100     siu_mmic_control(inst);
00101
00102     if(num_mic > 1) {
00103       /* rotate inactive mic to low processing load mode */
00104       siu_mmic_proc_load_control(inst, num_mic);
00105     }
00106
00107   } /* multiple remote mics */
00108
00109   /* read CPU cycle count after AER processing and update average and max */
00110   if(siuSetup.aer_mips_profile) {
00111     aersim_profile_get_cycle_after_aer_send(&siuSetup);
00112   }
00113
00114 } /* siuSendIn */
00115
00116 /* Nothing past this point */
00117


AER Simulation: aersimFileIO_s Struct Reference

  • Data Structures
  • Data Fields

aersimFileIO_s Struct Reference

#include <aersim_fileIO.h>

Data Fields

tbool | flag_rxin_rd
tbool | flag_rxout_wr
tbool | flag_rxin_end
tbool | flag_txin_rd
tbool | flag_txout_wr
tbool | flag_txin_end
tbool | flag_txin_echo
char | rx_in_file_name [50]
char | tx_in_file_name [AER_SIM_NUM_BF_MIC][50]
char | bf_filter_file_name [AER_SIM_NUM_BF_MIC][50]
FILE * | fp_rxin
FILE * | fp_rxout
FILE * | fp_txin [AER_SIM_NUM_BF_MIC]
FILE * | fp_bf_filter [AER_SIM_NUM_BF_MIC]
FILE * | fp_txout
FILE * | drcReceiveOut
FILE * | drcDebugOut
FILE * | fp_debug_aer
FILE * | fp_debug_mss
FILE * | hcoefOut
FILE * | fp_trace_tx
FILE * | fp_trace_rx

Detailed Description

Definition at line 32 of file aersim_fileIO.h.

Field Documentation

tbool aersimFileIO_s::flag_rxin_rd

Definition at line 33 of file aersim_fileIO.h.

Referenced by aer_sim_read_cfg(), and main().

tbool aersimFileIO_s::flag_rxout_wr

Definition at line 34 of file aersim_fileIO.h.

Referenced by aer_sim_fio_write_data(), and aer_sim_read_cfg().

tbool aersimFileIO_s::flag_rxin_end

Definition at line 35 of file aersim_fileIO.h.

tbool aersimFileIO_s::flag_txin_rd

Definition at line 37 of file aersim_fileIO.h.

Referenced by aer_sim_open_files(), aer_sim_read_cfg(), and main().

tbool aersimFileIO_s::flag_txout_wr

Definition at line 38 of file aersim_fileIO.h.

Referenced by aer_sim_fio_write_data(), and aer_sim_read_cfg().

tbool aersimFileIO_s::flag_txin_end

Definition at line 39 of file aersim_fileIO.h.

tbool aersimFileIO_s::flag_txin_echo

Definition at line 40 of file aersim_fileIO.h.

Referenced by aer_sim_read_cfg(), and main().

char aersimFileIO_s::rx_in_file_name[50]

Definition at line 42 of file aersim_fileIO.h.

Referenced by aer_sim_read_cfg().

char aersimFileIO_s::tx_in_file_name[AER_SIM_NUM_BF_MIC][50]

Definition at line 43 of file aersim_fileIO.h.

Referenced by aer_sim_open_files(), and aer_sim_read_cfg().

char aersimFileIO_s::bf_filter_file_name[AER_SIM_NUM_BF_MIC][50]

Definition at line 44 of file aersim_fileIO.h.

FILE* aersimFileIO_s::fp_rxin

Definition at line 46 of file aersim_fileIO.h.

Referenced by aer_sim_close_files(), aer_sim_fio_read_fe(), and aer_sim_open_files().

FILE* aersimFileIO_s::fp_rxout

Definition at line 47 of file aersim_fileIO.h.

Referenced by aer_sim_close_files(), aer_sim_fio_write_data(), and aer_sim_open_files().

FILE* aersimFileIO_s::fp_txin[AER_SIM_NUM_BF_MIC]

Definition at line 48 of file aersim_fileIO.h.

Referenced by aer_sim_close_files(), aer_sim_fio_read_ne(), and aer_sim_open_files().

FILE* aersimFileIO_s::fp_bf_filter[AER_SIM_NUM_BF_MIC]

Definition at line 49 of file aersim_fileIO.h.

FILE* aersimFileIO_s::fp_txout

Definition at line 50 of file aersim_fileIO.h.

Referenced by aer_sim_fio_write_data(), and aer_sim_open_files().

FILE* aersimFileIO_s::drcReceiveOut

Definition at line 51 of file aersim_fileIO.h.

FILE* aersimFileIO_s::drcDebugOut

Definition at line 52 of file aersim_fileIO.h.

FILE* aersimFileIO_s::fp_debug_aer

Definition at line 53 of file aersim_fileIO.h.

Referenced by aer_sim_fio_write_data(), and aer_sim_open_files().

FILE* aersimFileIO_s::fp_debug_mss

Definition at line 54 of file aersim_fileIO.h.

Referenced by aer_sim_open_files().

FILE* aersimFileIO_s::hcoefOut

Definition at line 55 of file aersim_fileIO.h.

FILE* aersimFileIO_s::fp_trace_tx

Definition at line 56 of file aersim_fileIO.h.

Referenced by aer_sim_open_files().

FILE* aersimFileIO_s::fp_trace_rx

Definition at line 57 of file aersim_fileIO.h.

Referenced by aer_sim_open_files().

The documentation for this struct was generated from the following file:
  • aersim_fileIO.h


AER Simulation: bfMemConfig_t Struct Reference

  • Data Structures
  • Data Fields

bfMemConfig_t Struct Reference

#include <siubf.h>

Data Fields

tbool | pre_init_bufs
tword | init_pattern
tuint | mclass

Detailed Description

Definition at line 27 of file siubf.h.

Field Documentation

tbool bfMemConfig_t::pre_init_bufs

Definition at line 28 of file siubf.h.

tword bfMemConfig_t::init_pattern

Definition at line 29 of file siubf.h.

tuint bfMemConfig_t::mclass

Definition at line 30 of file siubf.h.

The documentation for this struct was generated from the following file:
  • siubf.h


AER Simulation: bfMemHeap_t Struct Reference

  • Data Structures
  • Data Fields

bfMemHeap_t Struct Reference

#include <siubf.h>

Data Fields

tword * | base
tulong | indx
tulong | size

Detailed Description

Definition at line 21 of file siubf.h.

Field Documentation

tword* bfMemHeap_t::base

Definition at line 22 of file siubf.h.

Referenced by bf_mem_heap_alloc(), and bf_mem_heap_init().

tulong bfMemHeap_t::indx

Definition at line 23 of file siubf.h.

Referenced by bf_mem_heap_alloc(), and bf_mem_heap_init().

tulong bfMemHeap_t::size

Definition at line 24 of file siubf.h.

Referenced by bf_mem_heap_alloc(), and bf_mem_heap_init().

The documentation for this struct was generated from the following file:
  • siubf.h


AER Simulation: mssbuf_t Struct Reference

  • Data Structures
  • Data Fields

mssbuf_t Struct Reference

Collaboration diagram for mssbuf_t:

[legend]

Data Fields

mssinstbuf_t mss_inst
svdinstbuf_t svd_inst [AER_SIM_NUM_HF_MIC]

Detailed Description

Definition at line 37 of file siumss.c.

Field Documentation

mssinstbuf_t mssbuf_t::mss_inst

Definition at line 38 of file siumss.c.

svdinstbuf_t mssbuf_t::svd_inst[AER_SIM_NUM_HF_MIC]

Definition at line 39 of file siumss.c.

The documentation for this struct was generated from the following file:
  • siumss.c


AER Simulation: mssinstbuf_t Struct Reference

  • Data Structures
  • Data Fields

mssinstbuf_t Struct Reference

Data Fields

LFract buf [AER_SIM_MSS_INST_SIZE]

Detailed Description

Definition at line 29 of file siumss.c.

Field Documentation

LFract mssinstbuf_t::buf[AER_SIM_MSS_INST_SIZE]

Definition at line 30 of file siumss.c.

The documentation for this struct was generated from the following file:
  • siumss.c


AER Simulation: p651Pars_t Struct Reference

  • Data Structures
  • Data Fields

p651Pars_t Struct Reference

#include <aersim.h>

Data Fields

tbool | enabled
Fract | Px_high
ULFract | Px_low
LFract | Px_max
Fract | Py1_high
ULFract | Py1_low
LFract | Py1_max
Fract | Py_high
ULFract | Py_low
LFract | Py_max
Fract | Pe_high
ULFract | Pe_low
LFract | Pe_max
Fract | Pr_high
ULFract | Pr_low
LFract | Pr_max

Detailed Description

Definition at line 74 of file aersim.h.

Field Documentation

tbool p651Pars_t::enabled

Definition at line 75 of file aersim.h.

Referenced by aer_sim_init().

Fract p651Pars_t::Px_high

Definition at line 76 of file aersim.h.

ULFract p651Pars_t::Px_low

Definition at line 77 of file aersim.h.

LFract p651Pars_t::Px_max

Definition at line 78 of file aersim.h.

Fract p651Pars_t::Py1_high

Definition at line 79 of file aersim.h.

ULFract p651Pars_t::Py1_low

Definition at line 80 of file aersim.h.

LFract p651Pars_t::Py1_max

Definition at line 81 of file aersim.h.

Fract p651Pars_t::Py_high

Definition at line 82 of file aersim.h.

ULFract p651Pars_t::Py_low

Definition at line 83 of file aersim.h.

LFract p651Pars_t::Py_max

Definition at line 84 of file aersim.h.

Fract p651Pars_t::Pe_high

Definition at line 85 of file aersim.h.

ULFract p651Pars_t::Pe_low

Definition at line 86 of file aersim.h.

LFract p651Pars_t::Pe_max

Definition at line 87 of file aersim.h.

Fract p651Pars_t::Pr_high

Definition at line 88 of file aersim.h.

ULFract p651Pars_t::Pr_low

Definition at line 89 of file aersim.h.

LFract p651Pars_t::Pr_max

Definition at line 90 of file aersim.h.

The documentation for this struct was generated from the following file:
  • aersim.h


AER Simulation: piuInst_s Struct Reference

  • Data Structures
  • Data Fields

piuInst_s Struct Reference

#include <piuloc.h>

Data Fields

linSample | del_buf_rx [AER_SIM_PIU_DEL_BUF_LEN_RX]
linSample | del_buf_tx [AER_SIM_NUM_BF_MIC][AER_SIM_PIU_DEL_BUF_LEN_TX]
tint | frame_size
tint | del_buf_rxin_ind
tint | del_buf_rxout_ind
tint | del_buf_rxsync_ind
tint | del_buf_txin_ind
tint | del_buf_txout_ind

Detailed Description

Definition at line 28 of file piuloc.h.

Field Documentation

linSample piuInst_s::del_buf_rx[AER_SIM_PIU_DEL_BUF_LEN_RX]

Definition at line 29 of file piuloc.h.

Referenced by piuInit(), and piuReceiveIn().

linSample piuInst_s::del_buf_tx[AER_SIM_NUM_BF_MIC][AER_SIM_PIU_DEL_BUF_LEN_TX]

Definition at line 30 of file piuloc.h.

Referenced by piuInit(), and piuSendIn().

tint piuInst_s::frame_size

Definition at line 31 of file piuloc.h.

Referenced by piuInit(), piuReceiveIn(), and piuSendIn().

tint piuInst_s::del_buf_rxin_ind

Definition at line 32 of file piuloc.h.

Referenced by piuInit(), and piuReceiveIn().

tint piuInst_s::del_buf_rxout_ind

Definition at line 33 of file piuloc.h.

Referenced by piuInit(), and piuReceiveIn().

tint piuInst_s::del_buf_rxsync_ind

Definition at line 34 of file piuloc.h.

Referenced by piuInit(), and piuReceiveIn().

tint piuInst_s::del_buf_txin_ind

Definition at line 35 of file piuloc.h.

Referenced by piuInit(), and piuSendIn().

tint piuInst_s::del_buf_txout_ind

Definition at line 36 of file piuloc.h.

Referenced by piuInit(), and piuSendIn().

The documentation for this struct was generated from the following file:
  • piuloc.h


AER Simulation: siuAerSysPars_s Struct Reference

  • Data Structures
  • Data Fields

siuAerSysPars_s Struct Reference

#include <siuaer.h>

Data Fields

tint | aer_filter_len_HF
tint | aer_filter_len_HES
tint | y2x_delay
tint | ag_chg_delay_tx
tint | ag_chg_delay_rx
tint | ag_chg_interp_samp

Detailed Description

Definition at line 18 of file siuaer.h.

Field Documentation

tint siuAerSysPars_s::aer_filter_len_HF

Definition at line 19 of file siuaer.h.

Referenced by aer_sim_init(), and siu_open_aer().

tint siuAerSysPars_s::aer_filter_len_HES

Definition at line 20 of file siuaer.h.

Referenced by aer_sim_init(), and siu_open_aer().

tint siuAerSysPars_s::y2x_delay

Definition at line 21 of file siuaer.h.

Referenced by aer_sim_init(), and siu_open_aer().

tint siuAerSysPars_s::ag_chg_delay_tx

Definition at line 22 of file siuaer.h.

Referenced by aer_sim_init(), and siu_open_aer().

tint siuAerSysPars_s::ag_chg_delay_rx

Definition at line 23 of file siuaer.h.

Referenced by aer_sim_init(), and siu_open_aer().

tint siuAerSysPars_s::ag_chg_interp_samp

Definition at line 24 of file siuaer.h.

Referenced by aer_sim_init(), and siu_open_aer().

The documentation for this struct was generated from the following file:
  • siuaer.h


AER Simulation: siuConfig_t Struct Reference

  • Data Structures
  • Data Fields

siuConfig_t Struct Reference

#include <siu.h>

Data Fields

tuint | ID
void(* | exception )(tuint id, char *str)
void(* | debug )(tuint id, char *str)
tint | companding_law
tint | pcm_bits
void * | core_heap
void * | voice_heap

Detailed Description

Definition at line 26 of file siu.h.

Field Documentation

tuint siuConfig_t::ID

Definition at line 27 of file siu.h.

Referenced by aer_sim_init_siu(), and siuInit().

void(* siuConfig_t::exception)(tuint id, char *str)

Referenced by aer_sim_init_siu(), and siuInit().

void(* siuConfig_t::debug)(tuint id, char *str)

Referenced by aer_sim_init_siu(), and siuInit().

tint siuConfig_t::companding_law

Definition at line 30 of file siu.h.

Referenced by aer_sim_init_siu(), and siuInit().

tint siuConfig_t::pcm_bits

Definition at line 35 of file siu.h.

Referenced by aer_sim_init_siu(), and siuInit().

void* siuConfig_t::core_heap

Definition at line 37 of file siu.h.

Referenced by aer_sim_init_siu(), and siuInit().

void* siuConfig_t::voice_heap

Definition at line 38 of file siu.h.

Referenced by aer_sim_init_siu(), and siuInit().

The documentation for this struct was generated from the following file:
  • siu.h


AER Simulation: siuContext_t Struct Reference

  • Data Structures
  • Data Fields

siuContext_t Struct Reference

#include <siuloc.h>

Data Fields

tuint | ID
void(* | exception )(tuint id, char *str)
void(* | debug )(tuint id, char *str)
tuint | cheap_used
void * | cheap
tuint | vheap_used
void * | vheap

Detailed Description

Definition at line 55 of file siuloc.h.

Field Documentation

tuint siuContext_t::ID

Definition at line 56 of file siuloc.h.

Referenced by siuInit().

void(* siuContext_t::exception)(tuint id, char *str)

Referenced by siuInit().

void(* siuContext_t::debug)(tuint id, char *str)

Referenced by siuInit().

tuint siuContext_t::cheap_used

Definition at line 62 of file siuloc.h.

Referenced by siuInit().

void* siuContext_t::cheap

Definition at line 63 of file siuloc.h.

Referenced by siuInit().

tuint siuContext_t::vheap_used

Definition at line 64 of file siuloc.h.

Referenced by siuInit().

void* siuContext_t::vheap

Definition at line 65 of file siuloc.h.

Referenced by siuInit().

The documentation for this struct was generated from the following file:
  • siuloc.h


AER Simulation: siuGainControl_s Struct Reference

  • Data Structures
  • Data Fields

siuGainControl_s Struct Reference

#include <siuagc.h>

Data Fields

tint ctl_code
union {
Fract mic_gain
Fract spk_gain
} u

Detailed Description

Definition at line 20 of file siuagc.h.

Field Documentation

tint siuGainControl_s::ctl_code

Definition at line 21 of file siuagc.h.

Referenced by aer_sim_config_aer_params(), aer_sim_init(), siuAgcEvent(), and siuGainControl().

Fract siuGainControl_s::mic_gain

Definition at line 23 of file siuagc.h.

Referenced by aer_sim_config_aer_params(), aer_sim_init(), siuAgcEvent(), and siuGainControl().

Fract siuGainControl_s::spk_gain

Definition at line 24 of file siuagc.h.

Referenced by aer_sim_config_aer_params(), and siuGainControl().

union { ... } siuGainControl_s::u

Referenced by aer_sim_config_aer_params(), aer_sim_init(), siuAgcEvent(), and siuGainControl().

The documentation for this struct was generated from the following file:
  • siuagc.h


AER Simulation: siuInst_t Struct Reference

  • Data Structures
  • Data Fields

siuInst_t Struct Reference

#include <siuloc.h>

Collaboration diagram for siuInst_t:

[legend]

Data Fields

tuint | ID
void(* | exception )(tuint id, char *str)
void(* | debug )(tuint id, char *str)
siuTxInst_t TxInst
siuRxInst_t RxInst
siuPhoneSys_t phone_sys
tuint | cheap_used
tuint | vheap_used
tint | companding_law
tint | pcm_bits
linSample * | aer_recv_in_buf
tint | tx_ag_chg_delay_frm
tint | rx_ag_chg_delay_frm
tint | tx_ag_chg_delay_cnt
tint | rx_ag_chg_delay_cnt
Fract | spklin_gain
Fract | analog_micgainlin
Fract | digital_micgainlin
tbool | pending_gain_request [AER_SIM_NUM_HF_MIC]
siuGainControl_t gain_ctl
void * | piuInst
void * | aerHESInst
void * | agcHESInst
void * | aerHFInst [AER_SIM_NUM_HF_MIC]
void * | agcHFInst [AER_SIM_NUM_HF_MIC]
void * | aerHEShandle
void * | aerHFhandles [AER_SIM_NUM_HF_MIC]
void * | agcHEShandle
void * | agcHFhandles [AER_SIM_NUM_HF_MIC]
void * | drcInst
void * | veuInst
void * | mssInst
void * | bfInst

Detailed Description

Definition at line 109 of file siuloc.h.

Field Documentation

tuint siuInst_t::ID

Definition at line 110 of file siuloc.h.

Referenced by siuInit().

void(* siuInst_t::exception)(tuint id, char *str)

Referenced by siuInit().

void(* siuInst_t::debug)(tuint id, char *str)

Referenced by siuInit().

siuTxInst_t siuInst_t::TxInst

Definition at line 117 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

siuRxInst_t siuInst_t::RxInst

Definition at line 118 of file siuloc.h.

Referenced by siuRxOpen().

siuPhoneSys_t siuInst_t::phone_sys

Definition at line 119 of file siuloc.h.

Referenced by aer_sim_cfg_on_the_fly(), aer_sim_config_aer_params(), siu_close_aer(), siu_close_agc(), siu_mmic_control(), siu_mmic_init(), siu_mmic_proc_load_control(), siu_new_aer(), siuSendIn(), and siuTxOpen().

tuint siuInst_t::cheap_used

Definition at line 120 of file siuloc.h.

Referenced by siuInit().

tuint siuInst_t::vheap_used

Definition at line 121 of file siuloc.h.

Referenced by siuInit().

tint siuInst_t::companding_law

Definition at line 122 of file siuloc.h.

Referenced by siuInit().

tint siuInst_t::pcm_bits

Definition at line 128 of file siuloc.h.

Referenced by siuInit().

linSample* siuInst_t::aer_recv_in_buf

Definition at line 130 of file siuloc.h.

Referenced by aer_sim_init_siu(), and siuInit().

tint siuInst_t::tx_ag_chg_delay_frm

Definition at line 132 of file siuloc.h.

tint siuInst_t::rx_ag_chg_delay_frm

Definition at line 133 of file siuloc.h.

tint siuInst_t::tx_ag_chg_delay_cnt

Definition at line 134 of file siuloc.h.

tint siuInst_t::rx_ag_chg_delay_cnt

Definition at line 135 of file siuloc.h.

Fract siuInst_t::spklin_gain

Definition at line 136 of file siuloc.h.

Fract siuInst_t::analog_micgainlin

Definition at line 137 of file siuloc.h.

Fract siuInst_t::digital_micgainlin

Definition at line 138 of file siuloc.h.

tbool siuInst_t::pending_gain_request[AER_SIM_NUM_HF_MIC]

Definition at line 139 of file siuloc.h.

Referenced by siuAgcEvent(), siuInit(), and siuSendIn().

siuGainControl_t siuInst_t::gain_ctl

Definition at line 140 of file siuloc.h.

Referenced by siuAgcEvent(), and siuSendIn().

void* siuInst_t::piuInst

Definition at line 141 of file siuloc.h.

Referenced by siuInit().

void* siuInst_t::aerHESInst

Definition at line 142 of file siuloc.h.

Referenced by siu_close_aer(), siu_new_aer(), siu_open_aer(), siuAgcEvent(), siuGainControl(), and siuInit().

void* siuInst_t::agcHESInst

Definition at line 143 of file siuloc.h.

Referenced by siu_close_agc(), siu_new_agc(), siu_open_agc(), siuAgcAerEvent(), siuGainControl(), and siuInit().

void* siuInst_t::aerHFInst[AER_SIM_NUM_HF_MIC]

Definition at line 144 of file siuloc.h.

Referenced by aer_sim_cfg_on_the_fly(), aer_sim_config_aer_params(), aer_sim_fio_write_data(), aer_sim_get_erle(), aer_sim_print_version_mips(), siu_close_aer(), siu_mmic_control(), siu_mmic_init(), siu_mmic_proc_load_control(), siu_new_aer(), siu_open_aer(), siuAgcEvent(), siuGainControl(), siuInit(), siuReceiveIn(), and siuSendIn().

void* siuInst_t::agcHFInst[AER_SIM_NUM_HF_MIC]

Definition at line 145 of file siuloc.h.

Referenced by aer_sim_cfg_on_the_fly(), aer_sim_config_aer_params(), siu_close_agc(), siu_new_agc(), siu_open_agc(), siuAgcAerEvent(), siuGainControl(), siuInit(), and siuSendIn().

void* siuInst_t::aerHEShandle

Definition at line 146 of file siuloc.h.

Referenced by siu_new_aer().

void* siuInst_t::aerHFhandles[AER_SIM_NUM_HF_MIC]

Definition at line 147 of file siuloc.h.

Referenced by siu_new_aer().

void* siuInst_t::agcHEShandle

Definition at line 148 of file siuloc.h.

Referenced by siu_new_agc().

void* siuInst_t::agcHFhandles[AER_SIM_NUM_HF_MIC]

Definition at line 149 of file siuloc.h.

Referenced by aer_sim_config_aer_params(), siu_new_agc(), and siuSendIn().

void* siuInst_t::drcInst

Definition at line 150 of file siuloc.h.

Referenced by siu_close_drc(), siu_control_drc(), siu_delete_drc(), siu_new_drc(), siu_open_drc(), siuInit(), and siuReceiveIn().

void* siuInst_t::veuInst

Definition at line 151 of file siuloc.h.

Referenced by siuInit().

void* siuInst_t::mssInst

Definition at line 152 of file siuloc.h.

Referenced by siu_mmic_control(), siu_mmic_init(), siu_new_mss(), siu_open_mss(), siuInit(), and siuSendIn().

void* siuInst_t::bfInst

Definition at line 153 of file siuloc.h.

Referenced by siu_close_bf(), siu_config_bf(), siu_delete_bf(), siu_new_bf(), siu_open_bf(), siuInit(), and siuSendIn().

The documentation for this struct was generated from the following file:
  • siuloc.h


AER Simulation: siuPhoneSys_t Struct Reference

  • Data Structures
  • Data Fields

siuPhoneSys_t Struct Reference

#include <siuloc.h>

Data Fields

tuint | phone_mode
tint | mic_proc_order [AER_SIM_NUM_HF_MIC]
tint | mic_delay [AER_SIM_NUM_HF_MIC]
tint | mic_scale [AER_SIM_NUM_HF_MIC]
tint | num_HF_mic
tint | active_mic
tint | mic_active_time
tint | round_robin_cntr
tint | inactive_highload_mic

Detailed Description

Definition at line 90 of file siuloc.h.

Field Documentation

tuint siuPhoneSys_t::phone_mode

Definition at line 91 of file siuloc.h.

Referenced by siuTxOpen().

tint siuPhoneSys_t::mic_proc_order[AER_SIM_NUM_HF_MIC]

Definition at line 92 of file siuloc.h.

Referenced by siuTxOpen().

tint siuPhoneSys_t::mic_delay[AER_SIM_NUM_HF_MIC]

Definition at line 93 of file siuloc.h.

Referenced by siuTxOpen().

tint siuPhoneSys_t::mic_scale[AER_SIM_NUM_HF_MIC]

Definition at line 94 of file siuloc.h.

Referenced by siuTxOpen().

tint siuPhoneSys_t::num_HF_mic

Definition at line 95 of file siuloc.h.

Referenced by aer_sim_cfg_on_the_fly(), aer_sim_config_aer_params(), siu_close_aer(), siu_close_agc(), siu_new_aer(), and siuTxOpen().

tint siuPhoneSys_t::active_mic

Definition at line 96 of file siuloc.h.

Referenced by siu_mmic_control(), siu_mmic_init(), siu_mmic_proc_load_control(), siuSendIn(), and siuTxOpen().

tint siuPhoneSys_t::mic_active_time

Definition at line 97 of file siuloc.h.

Referenced by siuTxOpen().

tint siuPhoneSys_t::round_robin_cntr

Definition at line 98 of file siuloc.h.

Referenced by siuTxOpen().

tint siuPhoneSys_t::inactive_highload_mic

Definition at line 99 of file siuloc.h.

Referenced by siu_mmic_init(), and siu_mmic_proc_load_control().

The documentation for this struct was generated from the following file:
  • siuloc.h


AER Simulation: siuRxConfig_t Struct Reference

  • Data Structures
  • Data Fields

siuRxConfig_t Struct Reference

#include <siu.h>

Data Fields

tint | rin_frm_len
tint | rout_frm_len

Detailed Description

Definition at line 78 of file siu.h.

Field Documentation

tint siuRxConfig_t::rin_frm_len

Definition at line 79 of file siu.h.

Referenced by aer_sim_init_siu(), and siuRxOpen().

tint siuRxConfig_t::rout_frm_len

Definition at line 80 of file siu.h.

Referenced by aer_sim_init_siu(), and siuRxOpen().

The documentation for this struct was generated from the following file:
  • siu.h


AER Simulation: siuRxInst_t Struct Reference

  • Data Structures
  • Data Fields

siuRxInst_t Struct Reference

#include <siuloc.h>

Data Fields

tint | rin_frm_len
tint | rout_frm_len

Detailed Description

Definition at line 85 of file siuloc.h.

Field Documentation

tint siuRxInst_t::rin_frm_len

Definition at line 86 of file siuloc.h.

Referenced by siuRxOpen().

tint siuRxInst_t::rout_frm_len

Definition at line 87 of file siuloc.h.

Referenced by siuRxOpen().

The documentation for this struct was generated from the following file:
  • siuloc.h


AER Simulation: siuSetup_s Struct Reference

  • Data Structures
  • Data Fields

siuSetup_s Struct Reference

#include <aersim.h>

Collaboration diagram for siuSetup_s:

[legend]

Data Fields

siuSysCfg_t system_cfg
p651Pars_t p651Pars
aepSimPars_t | aep_params
siuAerSysPars_t aer_sys_params
tint | segment_size
tint | aer_kernel_srate
tint | aer_rin_frm_size
tint | aer_rout_frm_size
tint | aer_sin_frm_size
tint | aer_sout_frm_size
tint | aer_receive_out_length
tint | aep_gain_l2 [AECHO_LOOPCNT]
tint | aep_gain_start_exp
tint | aep_gain_start_mant
tint | aep_gain_adj_exp
Fract | aep_gain_adj_mant
tuint | aer_ctl_bitfield_0
tuint | aer_ctl_bitfield_1
tuint | bf_ctl_bitfield
tuint | bf_mics
tint | eqbq_tx_flag
tint | eqbq_rx_flag
tuint | agc_ctl_bitfield
tsize | aer_trace_size_rx
tsize | aer_trace_size_tx
tuint | aer_trace_cfg
tbool | aer_trace_flag
tbool | toggle_aer
aerControl_t | aerCtl
tbool | toggle_bf
bfControl_t | bfCtl
tbool | toggle_agc
agcControl_t | agcCtl
tbool | toggle_veu
aerControl_t | veuCtl
tbool | toggle_siugain
siuGainControl_t siuGainCtl
tbool | toggle_aep
aepControl_t | aepCtl
tbool | toggle_tx_sg
sgnSimPars_t | txSGN
tbool | toggle_rx_sg
sgnSimPars_t | rxSGN
tbool | toggle_piu_tg
tbool | piu_tg_state
tbool | piu_getlev
tbool | toggle_getflt
tbool | toggle_putflt
tbool | putflt_flag_last
tbool | aer_mips_profile
tbool | fe_sgn_flag
tbool | ne_sgn_flag
tint | aer_dbgstat_freq
tint | drc_on_flag
tuint | drc_cfgbits
tbool | drc_mips_profile
tbool | toggle_drcCtrl
drcControl_t | drcCtl
tbool | toggle_drcGetParam
tint | drcGetCode
drcReportParam_t | drcGetParam
tbool | txin_file_with_echo
void(* | g167_power_calc_fnc )(struct siuSetup_s *siu_setup)
FILE * | pow_track_file1
FILE * | pow_track_file2
tuint | aer_reset_bitfield
tuint | aer_valid_bitfield
tuint | new_phone_mode
tint | run_time
tint | aep_vary_time
tint | pow_track_option
tbool | g167_save_sig_flag
tbool | AEC_enabled
tbool | pow_track_enabled
tbool | dt_on
tbool | toggle_phone_mode
tbool | txout_cng_only
tbool | use_fdnlp
tbool | asnr_enable
tbool | cng_enable
tbool | test_double_talk
tbool | veu_enabled
int | doCacheFlush
int | doCacheEnable
tulong | cycles_before_aer
tulong | RxCyclesMax
tulong | RxCyclesAvg
tulong | TxCyclesMax
tulong | TxCyclesAvg

Detailed Description

Definition at line 97 of file aersim.h.

Field Documentation

siuSysCfg_t siuSetup_s::system_cfg

Definition at line 98 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_config_aer_params(), aer_sim_fio_write_data(), aer_sim_init(), aer_sim_init_siu(), aer_sim_instantiate_aer(), aer_sim_open_aep(), aer_sim_open_txrx_sgns(), aer_sim_read_cfg(), and main().

p651Pars_t siuSetup_s::p651Pars

Definition at line 99 of file aersim.h.

Referenced by aer_sim_init().

aepSimPars_t siuSetup_s::aep_params

Definition at line 100 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_init(), aer_sim_open_aep(), and main().

siuAerSysPars_t siuSetup_s::aer_sys_params

Definition at line 101 of file aersim.h.

Referenced by aer_sim_init(), and aer_sim_instantiate_aer().

tint siuSetup_s::segment_size

Definition at line 102 of file aersim.h.

Referenced by aer_sim_apply_config().

tint siuSetup_s::aer_kernel_srate

Definition at line 103 of file aersim.h.

tint siuSetup_s::aer_rin_frm_size

Definition at line 104 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_fio_read_fe(), aer_sim_init_siu(), and main().

tint siuSetup_s::aer_rout_frm_size

Definition at line 105 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_fio_write_data(), aer_sim_init_piu(), aer_sim_init_siu(), and aer_sim_open_aep().

tint siuSetup_s::aer_sin_frm_size

Definition at line 106 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_fio_read_ne(), aer_sim_init_siu(), and main().

tint siuSetup_s::aer_sout_frm_size

Definition at line 107 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_fio_write_data(), aer_sim_init_siu(), and main().

tint siuSetup_s::aer_receive_out_length

Definition at line 108 of file aersim.h.

tint siuSetup_s::aep_gain_l2[AECHO_LOOPCNT]

Definition at line 109 of file aersim.h.

Referenced by aer_sim_init().

tint siuSetup_s::aep_gain_start_exp

Definition at line 110 of file aersim.h.

Referenced by aer_sim_init().

tint siuSetup_s::aep_gain_start_mant

Definition at line 111 of file aersim.h.

Referenced by aer_sim_init().

tint siuSetup_s::aep_gain_adj_exp

Definition at line 112 of file aersim.h.

Referenced by aer_sim_init(), and main().

Fract siuSetup_s::aep_gain_adj_mant

Definition at line 113 of file aersim.h.

Referenced by aer_sim_init(), and main().

tuint siuSetup_s::aer_ctl_bitfield_0

Definition at line 114 of file aersim.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_read_cfg().

tuint siuSetup_s::aer_ctl_bitfield_1

Definition at line 115 of file aersim.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_read_cfg().

tuint siuSetup_s::bf_ctl_bitfield

Definition at line 116 of file aersim.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_read_cfg().

tuint siuSetup_s::bf_mics

Definition at line 117 of file aersim.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_read_cfg().

tint siuSetup_s::eqbq_tx_flag

Definition at line 118 of file aersim.h.

tint siuSetup_s::eqbq_rx_flag

Definition at line 119 of file aersim.h.

tuint siuSetup_s::agc_ctl_bitfield

Definition at line 120 of file aersim.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_read_cfg().

tsize siuSetup_s::aer_trace_size_rx

Definition at line 121 of file aersim.h.

Referenced by aer_sim_init().

tsize siuSetup_s::aer_trace_size_tx

Definition at line 122 of file aersim.h.

Referenced by aer_sim_init().

tuint siuSetup_s::aer_trace_cfg

Definition at line 123 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::aer_trace_flag

Definition at line 124 of file aersim.h.

tbool siuSetup_s::toggle_aer

Definition at line 125 of file aersim.h.

Referenced by aer_sim_cfg_on_the_fly(), and aer_sim_init().

aerControl_t siuSetup_s::aerCtl

Definition at line 126 of file aersim.h.

Referenced by aer_sim_cfg_on_the_fly().

tbool siuSetup_s::toggle_bf

Definition at line 127 of file aersim.h.

Referenced by aer_sim_init().

bfControl_t siuSetup_s::bfCtl

Definition at line 128 of file aersim.h.

tbool siuSetup_s::toggle_agc

Definition at line 129 of file aersim.h.

Referenced by aer_sim_cfg_on_the_fly(), and aer_sim_init().

agcControl_t siuSetup_s::agcCtl

Definition at line 130 of file aersim.h.

Referenced by aer_sim_cfg_on_the_fly().

tbool siuSetup_s::toggle_veu

Definition at line 131 of file aersim.h.

Referenced by aer_sim_init().

aerControl_t siuSetup_s::veuCtl

Definition at line 132 of file aersim.h.

tbool siuSetup_s::toggle_siugain

Definition at line 133 of file aersim.h.

Referenced by aer_sim_init().

siuGainControl_t siuSetup_s::siuGainCtl

Definition at line 135 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::toggle_aep

Definition at line 136 of file aersim.h.

Referenced by aer_sim_init().

aepControl_t siuSetup_s::aepCtl

Definition at line 138 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::toggle_tx_sg

Definition at line 139 of file aersim.h.

Referenced by aer_sim_init().

sgnSimPars_t siuSetup_s::txSGN

Definition at line 140 of file aersim.h.

Referenced by aer_sim_init(), and aer_sim_open_txrx_sgns().

tbool siuSetup_s::toggle_rx_sg

Definition at line 141 of file aersim.h.

Referenced by aer_sim_init().

sgnSimPars_t siuSetup_s::rxSGN

Definition at line 142 of file aersim.h.

Referenced by aer_sim_init(), and aer_sim_open_txrx_sgns().

tbool siuSetup_s::toggle_piu_tg

Definition at line 143 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::piu_tg_state

Definition at line 144 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::piu_getlev

Definition at line 145 of file aersim.h.

tbool siuSetup_s::toggle_getflt

Definition at line 146 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::toggle_putflt

Definition at line 147 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::putflt_flag_last

Definition at line 148 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::aer_mips_profile

Definition at line 149 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_init(), aer_sim_print_version_mips(), aer_sim_read_cfg(), main(), siuReceiveIn(), and siuSendIn().

tbool siuSetup_s::fe_sgn_flag

Definition at line 150 of file aersim.h.

Referenced by aer_sim_open_txrx_sgns(), aer_sim_read_cfg(), and main().

tbool siuSetup_s::ne_sgn_flag

Definition at line 151 of file aersim.h.

Referenced by aer_sim_open_txrx_sgns(), aer_sim_read_cfg(), and main().

tint siuSetup_s::aer_dbgstat_freq

Definition at line 152 of file aersim.h.

Referenced by aer_sim_init().

tint siuSetup_s::drc_on_flag

Definition at line 154 of file aersim.h.

Referenced by aer_sim_config_aer_params(), aer_sim_init(), and aer_sim_read_cfg().

tuint siuSetup_s::drc_cfgbits

Definition at line 155 of file aersim.h.

Referenced by aer_sim_init(), aer_sim_instantiate_aer(), and aer_sim_read_cfg().

tbool siuSetup_s::drc_mips_profile

Definition at line 162 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::toggle_drcCtrl

Definition at line 163 of file aersim.h.

Referenced by aer_sim_init().

drcControl_t siuSetup_s::drcCtl

Definition at line 164 of file aersim.h.

tbool siuSetup_s::toggle_drcGetParam

Definition at line 165 of file aersim.h.

Referenced by aer_sim_init().

tint siuSetup_s::drcGetCode

Definition at line 166 of file aersim.h.

drcReportParam_t siuSetup_s::drcGetParam

Definition at line 167 of file aersim.h.

tbool siuSetup_s::txin_file_with_echo

Definition at line 168 of file aersim.h.

Referenced by aer_sim_init().

void(* siuSetup_s::g167_power_calc_fnc)(struct siuSetup_s *siu_setup)

FILE* siuSetup_s::pow_track_file1

Definition at line 170 of file aersim.h.

FILE* siuSetup_s::pow_track_file2

Definition at line 171 of file aersim.h.

tuint siuSetup_s::aer_reset_bitfield

Definition at line 172 of file aersim.h.

Referenced by aer_sim_init().

tuint siuSetup_s::aer_valid_bitfield

Definition at line 173 of file aersim.h.

Referenced by aer_sim_init().

tuint siuSetup_s::new_phone_mode

Definition at line 174 of file aersim.h.

Referenced by aer_sim_init().

tint siuSetup_s::run_time

Definition at line 175 of file aersim.h.

Referenced by aer_sim_init().

tint siuSetup_s::aep_vary_time

Definition at line 176 of file aersim.h.

Referenced by aer_sim_init(), and aer_sim_open_aep().

tint siuSetup_s::pow_track_option

Definition at line 177 of file aersim.h.

tbool siuSetup_s::g167_save_sig_flag

Definition at line 178 of file aersim.h.

tbool siuSetup_s::AEC_enabled

Definition at line 179 of file aersim.h.

tbool siuSetup_s::pow_track_enabled

Definition at line 180 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::dt_on

Definition at line 181 of file aersim.h.

tbool siuSetup_s::toggle_phone_mode

Definition at line 182 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::txout_cng_only

Definition at line 183 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::use_fdnlp

Definition at line 184 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::asnr_enable

Definition at line 185 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::cng_enable

Definition at line 186 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::test_double_talk

Definition at line 187 of file aersim.h.

Referenced by aer_sim_init().

tbool siuSetup_s::veu_enabled

Definition at line 188 of file aersim.h.

Referenced by aer_sim_init().

int siuSetup_s::doCacheFlush

Definition at line 189 of file aersim.h.

int siuSetup_s::doCacheEnable

Definition at line 190 of file aersim.h.

Referenced by aer_sim_init().

tulong siuSetup_s::cycles_before_aer

Definition at line 191 of file aersim.h.

Referenced by aersim_profile_get_cycle_after_aer_receive(), aersim_profile_get_cycle_after_aer_send(), and aersim_profile_get_cycle_before_aer().

tulong siuSetup_s::RxCyclesMax

Definition at line 192 of file aersim.h.

Referenced by aer_sim_init(), aer_sim_print_version_mips(), and aersim_profile_get_cycle_after_aer_receive().

tulong siuSetup_s::RxCyclesAvg

Definition at line 193 of file aersim.h.

Referenced by aer_sim_init(), aer_sim_print_version_mips(), and aersim_profile_get_cycle_after_aer_receive().

tulong siuSetup_s::TxCyclesMax

Definition at line 194 of file aersim.h.

Referenced by aer_sim_init(), aer_sim_print_version_mips(), and aersim_profile_get_cycle_after_aer_send().

tulong siuSetup_s::TxCyclesAvg

Definition at line 195 of file aersim.h.

Referenced by aer_sim_init(), aer_sim_print_version_mips(), and aersim_profile_get_cycle_after_aer_send().

The documentation for this struct was generated from the following file:
  • aersim.h


AER Simulation: siuSysCfg_s Struct Reference

  • Data Structures
  • Data Fields

siuSysCfg_s Struct Reference

#include <aersim.h>

Data Fields

tint | ulaw
tint | pcm_bits
tint | num_BF_mic
tint | num_HF_mic
tint | segment_size
tint | frame_size
tint | sampling_rates
tint | bf_steer_angle
tbool | band_split_flag
tbool | mult_mic_type

Detailed Description

Definition at line 52 of file aersim.h.

Field Documentation

tint siuSysCfg_s::ulaw

Definition at line 53 of file aersim.h.

Referenced by aer_sim_init(), and aer_sim_init_siu().

tint siuSysCfg_s::pcm_bits

Definition at line 55 of file aersim.h.

Referenced by aer_sim_init(), and aer_sim_init_siu().

tint siuSysCfg_s::num_BF_mic

Definition at line 56 of file aersim.h.

Referenced by aer_sim_config_aer_params(), aer_sim_instantiate_aer(), aer_sim_read_cfg(), and main().

tint siuSysCfg_s::num_HF_mic

Definition at line 57 of file aersim.h.

Referenced by aer_sim_fio_write_data(), aer_sim_init(), aer_sim_init_siu(), aer_sim_instantiate_aer(), aer_sim_open_txrx_sgns(), aer_sim_read_cfg(), and main().

tint siuSysCfg_s::segment_size

Definition at line 58 of file aersim.h.

Referenced by aer_sim_apply_config(), and aer_sim_init().

tint siuSysCfg_s::frame_size

Definition at line 59 of file aersim.h.

Referenced by aer_sim_apply_config(), and aer_sim_init().

tint siuSysCfg_s::sampling_rates

Definition at line 60 of file aersim.h.

Referenced by aer_sim_apply_config(), aer_sim_config_aer_params(), aer_sim_init(), aer_sim_instantiate_aer(), aer_sim_open_aep(), aer_sim_open_txrx_sgns(), and aer_sim_read_cfg().

tint siuSysCfg_s::bf_steer_angle

Definition at line 64 of file aersim.h.

Referenced by aer_sim_config_aer_params(), and aer_sim_read_cfg().

tbool siuSysCfg_s::band_split_flag

Definition at line 65 of file aersim.h.

Referenced by aer_sim_init(), aer_sim_instantiate_aer(), and aer_sim_read_cfg().

tbool siuSysCfg_s::mult_mic_type

Definition at line 67 of file aersim.h.

Referenced by aer_sim_config_aer_params(), aer_sim_instantiate_aer(), aer_sim_read_cfg(), and main().

The documentation for this struct was generated from the following file:
  • aersim.h


AER Simulation: siuTxConfig_t Struct Reference

  • Data Structures
  • Data Fields

siuTxConfig_t Struct Reference

#include <siu.h>

Collaboration diagram for siuTxConfig_t:

[legend]

Data Fields

siuTxSendOut_t TxSendOut
tint | send_out_frame_length
tint | send_in_frame_length
tint | num_HF_mic

Detailed Description

Definition at line 64 of file siu.h.

Field Documentation

siuTxSendOut_t siuTxConfig_t::TxSendOut

Definition at line 65 of file siu.h.

Referenced by siuTxOpen().

tint siuTxConfig_t::send_out_frame_length

Definition at line 66 of file siu.h.

Referenced by aer_sim_init_siu(), and siuTxOpen().

tint siuTxConfig_t::send_in_frame_length

Definition at line 67 of file siu.h.

Referenced by aer_sim_init_siu(), and siuTxOpen().

tint siuTxConfig_t::num_HF_mic

Definition at line 68 of file siu.h.

Referenced by aer_sim_init_siu(), and siuTxOpen().

The documentation for this struct was generated from the following file:
  • siu.h


AER Simulation: siuTxInst_t Struct Reference

  • Data Structures
  • Data Fields

siuTxInst_t Struct Reference

#include <siuloc.h>

Collaboration diagram for siuTxInst_t:

[legend]

Data Fields

siuTxSendOut_t TxSendOut
linSample * | send_frame_ptr
linSample * | recv_frame_ptr
tint | send_out_frame_length
tint | send_in_frame_length
linSample | send_frm_del [AER_MAX_FRAME_LENGTH]
tbool | enabled

Detailed Description

Definition at line 75 of file siuloc.h.

Field Documentation

siuTxSendOut_t siuTxInst_t::TxSendOut

Definition at line 76 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

linSample* siuTxInst_t::send_frame_ptr

Definition at line 77 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

linSample* siuTxInst_t::recv_frame_ptr

Definition at line 78 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

tint siuTxInst_t::send_out_frame_length

Definition at line 79 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

tint siuTxInst_t::send_in_frame_length

Definition at line 80 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

linSample siuTxInst_t::send_frm_del[AER_MAX_FRAME_LENGTH]

Definition at line 81 of file siuloc.h.

Referenced by siuTxOpen().

tbool siuTxInst_t::enabled

Definition at line 82 of file siuloc.h.

Referenced by siuInit(), and siuTxOpen().

The documentation for this struct was generated from the following file:
  • siuloc.h


AER Simulation: siuTxSendOut_t Struct Reference

  • Data Structures
  • Data Fields

siuTxSendOut_t Struct Reference

#include <siu.h>

Data Fields

tint(* | fcn )(void *targetInst, void *send_in_frame, void *send_out_frame, void *send_out_8kHz, void *recv_frame, void *sout_pnlp_8kHz, void *trace_buf)
void * | targetInst

Detailed Description

Definition at line 50 of file siu.h.

Field Documentation

tint(* siuTxSendOut_t::fcn)(void *targetInst, void *send_in_frame, void *send_out_frame, void *send_out_8kHz, void *recv_frame, void *sout_pnlp_8kHz, void *trace_buf)

Referenced by siuInit().

void* siuTxSendOut_t::targetInst

Definition at line 54 of file siu.h.

Referenced by siuInit().

The documentation for this struct was generated from the following file:
  • siu.h


AER Simulation: svdinstbuf_t Struct Reference

  • Data Structures
  • Data Fields

svdinstbuf_t Struct Reference

Data Fields

LFract buf [AER_SIM_SVD_INST_SIZE]

Detailed Description

Definition at line 33 of file siumss.c.

Field Documentation

LFract svdinstbuf_t::buf[AER_SIM_SVD_INST_SIZE]

Definition at line 34 of file siumss.c.

The documentation for this struct was generated from the following file:
  • siumss.c