diff --git a/file_demo_bios/am572x/components/mss/mss.h b/file_demo_bios/am572x/components/mss/mss.h
+++ /dev/null
@@ -1,501 +0,0 @@
-#ifndef _MSS_H\r
-#define _MSS_H\r
-\r
-/**\r
- * @file mss.h\r
- * @brief Contains external API for Multi-Source Selection (MSS) module.\r
- *\r
- * Copyright (c) 2016, Texas Instruments Incorporated
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-\r
-\r
-#include <ti/mas/types/types.h>\r
-#include <ti/mas/util/ecomem.h> /* memory descriptor structure */\r
-\r
-/* Define MSS Module as a master group in Doxygen format and add all MSS API \r
- definitions to this group. */\r
-/** @defgroup mss_module MSS Module API\r
- * @{\r
- */\r
-/** @} */\r
-\r
-/** @defgroup mss_api_functions MSS Functions\r
- * @ingroup mss_module\r
- */\r
-\r
-/** @defgroup mss_api_structures MSS Data Structures\r
- * @ingroup mss_module\r
- */\r
-\r
-/** @defgroup mss_api_constants MSS Constants (enum's and define's)\r
- * @ingroup mss_module\r
- */\r
-\f\r
-/** @defgroup mss_err_code MSS Error Codes\r
- * @ingroup mss_api_constants\r
- * @{\r
- *\r
- * @name MSS error codes\r
- *\r
- * Error codes returned by MSS API functions.\r
- */\r
-/*@{*/\r
-enum {\r
- mss_NOERR = 0, /**< success, no error */\r
- mss_ERR_NOMEMORY = 1, /**< supplied memory are not enough */\r
- mss_ERR_NOTOPENED = 2, /**< MSS instance not in opened state */\r
- mss_ERR_NOTCLOSED = 3, /**< MSS instance not in closed state */\r
- mss_ERR_INVALIDPAR = 4, /**< configuration parameter is invalid */\r
- mss_ERR_INVALIDSRC = 5 /**< no valid source is provided to process */\r
-};\r
-/*@}*/\r
-/** @} */\r
-\r
-/** @defgroup mss_samp_rate MSS Sampling Rates Definitions\r
- * @ingroup mss_api_constants\r
- * @{\r
- *\r
- * @name MSS sampling rates\r
- *\r
- * Sampling rates that are supported by MSS. \r
-*/\r
-/*@{*/\r
-enum {\r
- mss_SAMP_RATE_8K = 1, /**< 8kHz */\r
- mss_SAMP_RATE_16K = 2 /**< 16kHz */\r
-};\r
-typedef tint mssSampRate_t;\r
-\r
-/*@}*/\r
-/** @} */\r
-\r
-/** @defgroup mss_src_type MSS Source Type Definitions\r
- * @ingroup mss_api_constants\r
- * @{\r
- *\r
- * @name MSS source types\r
- *\r
- * MSS supports multiple types of sources which can be microphones, beams, etc.\r
- * Microphones can be fixed (mounted on the device) or remote, and can have \r
- * their own built-in acoustic echo canceller. \r
-*/\r
-/*@{*/\r
-enum {\r
- mss_SRC_INVALID = -1, /**< Invalid source type */\r
- mss_SRC_MIC_FIXED = 0, /**< Fixed microphones */\r
- mss_SRC_MIC_REMOTE = 1, /**< Remote microphones */\r
- mss_SRC_MIC_CLEAN = 2, /**< Clean microphones (with built-in AEC) */\r
- mss_SRC_BEAM = 3, /**< Beams from microphone arrays */\r
- mss_SRC_MAX = mss_SRC_BEAM\r
-};\r
-\r
-typedef tint mssSrcType_t;\r
-#define mss_MAX_NUM_SRC_TYPES (mss_SRC_MAX+1) /**< Max # of supported source types */\r
-/*@}*/\r
-/** @} */\r
-\r
-/** \r
- * @ingroup mss_api_structures\r
- *\r
- * @brief Source structure used to manually select a source. \r
- */\r
-typedef struct mssSrc_s {\r
- mssSrcType_t group; /**< source group to be manually selected:\r
- valid values: mss_SRC_MIC_FIXED, etc. */\r
- tint index; /**< group index of the source to be manually selected:\r
- range: 0 - number of sources minus 1 */\r
-} mssSrc_t;\r
-\r
-/** \r
- * @ingroup mss_api_structures\r
- *\r
- * @brief Configuration structure for mssGetSizes()\r
- * \brief This structure is used for getting memory requirements of MSS through \r
- * function mssGetSizes().\r
- */\r
-typedef struct mssSizeConfig_s {\r
- mssSampRate_t max_sampling_rate; /**< Maximum sampling rate: \r
- 8kHz: set to mss_SAMP_RATE_8K. \r
- 16kHz: set to mss_SAMP_RATE_16K. */ \r
- tint max_num_mic_fixed; /**< Maximum number of fixed microphones */\r
- tint max_num_mic_remote; /**< Maximum number of remote microphones */\r
- tint max_num_mic_clean; /**< Maximum number of microphones with built-in AEC */\r
- tint max_num_beam; /**< Maximum number of beams from microphone array */\r
-} mssSizeConfig_t;\r
-\r
-/** \r
- * @ingroup mss_api_structures\r
- *\r
- * @brief Configuration structure for mssNew()\r
- * \brief This structure is used for creating a new MSS instance through \r
- * function mssNew().\r
- */\r
-typedef struct mssNewConfig_s {\r
- void *handle; /**< handle */\r
- mssSizeConfig_t sizeCfg; /**< size configration */\r
-} mssNewConfig_t;\r
-\r
-/** \r
- * @ingroup mss_api_structures\r
- *\r
- * @brief Configuration structure for mssOpen()\r
- * \brief This structure contains system parameters to configure an MSS \r
- * instance through mssOpen(). MSS doesn't have default value for these\r
- * parameters, and they must be set explicitly when mssOpen() is called\r
- * the first time after mssNew(). \r
- * \remarks This structure doesn't contain any configurable parameters that are\r
- * controlled through mssControl_s to avoid confusion.\r
- */\r
-typedef struct mssConfig_s {\r
- mssSampRate_t sampling_rate; /**< Sampling rate: \r
- 8kHz: set to mss_SAMP_RATE_8K. \r
- 16kHz: set to mss_SAMP_RATE_16K. */ \r
- tint num_mic_fixed; /**< Number of fixed microphones */\r
- tint num_mic_remote; /**< Number of remote microphones */\r
- tint num_mic_clean; /**< Number of microphones with built-in AEC */\r
- tint num_mic_array; /**< Number of microphones in microphone-array*/\r
- tint num_beam; /**< Number of beams from microphone array */\r
-} mssConfig_t;\r
-\r
-/** \r
- * @ingroup mss_api_structures\r
- *\r
- * @brief MSS control bitfield structure \r
- *\r
- * Bitfield masks mss_CTL_MODES_XYZ may be used to change MSS operation modes\r
- * through mssControl(), by constructing elements "mask" and "value" of mssModes_s.\r
- *\r
- * @verbatim\r
- MSS Modes Control Bitfield: \r
- ---------------------------------------\r
- |15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0|\r
- ---------------------------------------\r
- bits values meaning\r
- (from LSB) \r
- 0 1 MSS bypass operation - MSS always selects the \r
- first available source passed to mssProcess(). \r
- 0 MSS normal operation. \r
- 1 1 Freeze the update of MSS states - MSS always selects \r
- whatever source that was selcted before update was \r
- frozen. \r
- 0 Enable the update of MSS states - normal operation. \r
- *\r
- */\r
-typedef struct mssCtlBf_s {\r
- tuint mask; /**< Indicates the bits to be changed. */\r
- tuint value; /**< Gives new value of each bit indicated by mask. */\r
-/*@{*/\r
-#define mss_CTL_MODES_BYPASS 0x0001 /**< Bypass MSS */\r
-#define mss_CTL_MODES_FREEZE 0x0002 /**< Freeze MSS internal states update */\r
-#define mss_CTL_MODES_DEFAULT 0x0000 /**< Default (normal) operation modes */\r
-/*@}*/\r
-} mssCtlBf_t;\r
-\r
-/** \r
- * @ingroup mss_api_structures\r
- *\r
- * @brief Control structure for mssControl()\r
- *\r
- * \brief This structure is used to change MSS configurable parameters. \r
- * Element mssControl_s.valid_bitfield indicates which parameter to be\r
- * changed, and other elements give the parameter values. \r
- */\r
-typedef struct mssControl_s {\r
- tuint valid_bitfield;\r
-/*@{*/\r
-#define mss_CTL_MODES 0x0001 /**< change mssControl_s.modes */\r
-#define mss_CTL_SELECT_SRC 0x0002 /**< change mssControl_s.source */\r
-#define mss_CTL_SWITCH_THRESH 0x0004 /**< change mssControl_s.switch_thresh */\r
-#define mss_CTL_SWITCH_DURATION 0x0008 /**< change mssControl_s.switch_duration */\r
-#define mss_CTL_SWITCH_HNAGOVER 0x0010 /**< change mssControl_s.switch_hangover */\r
-#define mss_CTL_ALL ( mss_CTL_MODES \\r
- | mss_CTL_SELECT_SRC \\r
- | mss_CTL_SWITCH_THRESH \\r
- | mss_CTL_SWITCH_DURATION \\r
- | mss_CTL_SWITCH_HNAGOVER ) /**< change all */\r
-/*@}*/ \r
- mssCtlBf_t modes; /**< controls MSS operation modes */\r
- mssSrc_t source; /**< the source selected by external user */\r
- tint switch_thresh; /**< switch threshold in msec: a source needs\r
- to meet the selection criteria for this\r
- amount of time before switch to this \r
- source starts. Default is 250msec */\r
- tint switch_duration; /**< switch duration in msec: it takes this\r
- amount of time to switch from one source \r
- to another. Default is 500msec. */\r
- tint switch_hangover; /**< switch hangover in msec: after a new \r
- source is selected, it has to wait this \r
- time before evaluating next possible \r
- source switch. Default is 1000msec. */\r
-} mssControl_t;\r
-\r
-/** \r
- * @ingroup mss_api_structures\r
- *\r
- * @brief MSS debug structure \r
- *\r
- * \brief This structure is used to provide MSS debugging information.\r
- */\r
-#define mss_DEBUG_STATE_NUM_TUINT 16 \r
-typedef struct mssDebugStat_s {\r
- mssSrc_t cur_src; /**< Current source */\r
- mssSrc_t new_src; /**< Temporary new source */\r
- tuint states[mss_DEBUG_STATE_NUM_TUINT]; /**< MSS internal states */\r
-} mssDebugStat_t;\r
-\r
- \r
-/**\r
- * @ingroup mss_api_functions\r
- *\r
- * @brief Function mssGetSizes() obtains from MSS the memory requirements of \r
- * an instance, which depend on provided configuration parameters. \r
- *\r
- * @param[in] cfg Pointer to a size configuration structure.\r
- * @param[out] nbufs Memory location to store the returned number of buffers\r
- * required by the instance.\r
- * @param[out] bufs Memory location to store the returned address of the \r
- * vector of memory buffer descriptions required by MSS. \r
- *\r
- * @remark Type ecomemBuffer_t is defined in ecomem.h of util package.\r
- *\r
- * @retval MSS error code, always mss_NOERR.\r
- */\r
-tint mssGetSizes(tint *nbufs, const ecomemBuffer_t **bufs, mssSizeConfig_t *cfg);\r
-\r
-/**\r
- * @ingroup mss_api_functions\r
- *\r
- * @brief Function mssNew() creates a new instance of MSS. \r
- * \remark Function mssNew() must be called before mssOpen()is called.\r
- *\r
- * @param[in] nbufs Number of memory buffers allocated by the user.\r
- * @param[in] bufs Pointer to memory buffer descriptors defined by\r
- * user.\r
- * \remark Buffer alignment property of each buffer passed to mssNew() must be \r
- * equal to or better than what is returned by mssGetSizes(), and must\r
- * be in consistency with the base address of the buffer.\r
- *\r
- * @param[in] cfg Pointer to new instance configuration structure.\r
- * @param[in,out] mssInst Memory location that will receive a pointer to \r
- * the created MSS instance. This pointer will be \r
- * returned by mssNew().\r
- * @retval MSS error code. See \ref mss_err_code.\r
- * @verbatim\r
- error code description\r
- mss_NOERR success\r
- mss_ERR_INVALIDPAR *mssInst is not NULL or nbufs is not correct \r
- mss_ERR_NOMEMORY properties of certain buffer are bad:\r
- - size is not zero but base address is NULL,\r
- - alignment and base address are not consistent,\r
- - volatility does not meet requirement.\r
- \endverbatim\r
- *\r
- * @pre The pointer at the location pointed to by mssInst must be set to NULL \r
- * before this function is called.\r
- * @post A pointer to the MSS instance buffer will be returned to the location\r
- * pointed to by mssInst. Instance state will be set to closed.\r
- */\r
-tint mssNew (void **mssInst, tint nbufs, ecomemBuffer_t *bufs, mssNewConfig_t *cfg);\r
-\r
-/**\r
- * @ingroup mss_api_functions \r
- *\r
- * @brief Function mssOpen() initializes and configures an MSS instance.\r
- *\r
- * @remark This function must be called after mssNew() to initialize a new MSS\r
- * instance. It may also be called to reconfigure an instance that \r
- * has been closed by mssClose() but not deleted by mssDelete().\r
- *\r
- * @param[in] cfg Pointer to MSS configuration parameter.\r
- * @param[in] mssInst Pointer to MSS instance.\r
- * @retval MSS error code. See \ref mss_err_code.\r
- * @verbatim\r
- error code description\r
- mss_NOERR success\r
- mss_ERR_NOTCLOSED MSS instance state has not been set to closed, i.e,\r
- mssNew() or mssClose() not called for the instance.\r
- mss_ERR_INVALIDPAR bad configuration parameters:\r
- - cfg is NULL\r
- - total number of sources is less than or equal to 0.\r
- \endverbatim\r
- *\r
- * @pre Function mssNew() must be called before mssOpen() is called the first\r
- * time to open a new instance. For subsequent calls to open an existing\r
- * instance, mssClose() must be called before mssOpen() to close the\r
- * instance.\r
- * @post All the parameters that are not part of mssConfig_t are set to \r
- * default values by mssOpen. \r
- * @post After MSS instance is opened, mssControl() and mssProcess() may \r
- * be called for control or processing. \r
- *\r
- */\r
-tint mssOpen (void *mssInst, mssConfig_t *cfg);\r
-\r
-/**\r
- * @ingroup mss_api_functions\r
- *\r
- * @brief Function mssControl() changes MSS operation modes or parameters. \r
- *\r
- * @param[in] mssInst Pointer to MSS instance.\r
- * @param[in,out] ctl Pointer to MSS control structure. \r
- *\r
- * @retval MSS error code. See \ref mss_err_code.\r
- * @verbatim\r
- error code description\r
- mss_NOERR success\r
- mss_ERR_NOTOPENED MSS instance has not been opened\r
- mss_ERR_INVALIDSRC mssControl_s.source is an invalid source\r
- \endverbatim\r
- *\r
- */\r
-tint mssControl (void *mssInst, mssControl_t *ctl);\r
-\r
-/**\r
- * @ingroup mss_api_functions\r
- *\r
- * @brief Function mssProcess() examines all input sources to MSS and selects \r
- * the best one.\r
- *\r
- * @param[in] mssInst Pointer to MSS instance.\r
- * @param[in] rx_out_sync Synchronized Rx path output signal, NOT to be\r
- * selected, but to assist source\r
- * selection. (Not used)\r
- * @param[in] mic_fixed Signals from fixed mics.\r
- * @param[in] mic_remote Signals from remote mics.\r
- * @param[in] mic_clean Signals from mics with own AEC.\r
- * @param[in] mic_array Signals from mics in the mic-array.\r
- * @param[in] beam Signals from beams formed from mic-array.\r
- *\r
- * @param[out] out Buffer to store the selected source signal\r
- *\r
- * @remark All input signals and output signal are 16-bit linear samples \r
- * of 10 msec. \r
- *\r
- * @retval MSS error code. See \ref mss_err_code.\r
- * @verbatim\r
- error code description\r
- mss_NOERR success\r
- mss_ERR_NOTOPENED MSS instance has not been opened\r
- mss_ERR_INVALIDSRC mssControl_s.source is an invalid source\r
- \endverbatim\r
- *\r
- */\r
-tint mssProcess(void *mssInst, void *out, void *rx_out_sync, void *mic_fixed[],\r
- void *mic_remote[], void *mic_clean[], void *mic_array[], void *beam[]);\r
-\r
-/**\r
- * @ingroup mss_api_functions\r
- *\r
- * @brief Function mssDebugStat() returns debug information.\r
- *\r
- * @param[in] mssInst Pointer to MSS instance.\r
- * @param[out] mssDbg Debug information.\r
- *\r
- * @retval MSS error code. See \ref mss_err_code.\r
- * @verbatim\r
- error code description\r
- mss_NOERR success\r
- mss_ERR_NOTOPENED MSS instance has not been opened\r
- \endverbatim\r
- *\r
- */ \r
-tint mssDebugStat(void *mssInst, mssDebugStat_t *mssDbg);\r
-\r
-/**\r
- * @ingroup mss_api_functions\r
- *\r
- * @brief Function mssClose() closes an MSS instance. \r
- * \remark Function mssClose() must be called before mssDelete() is called.\r
- *\r
- * @param[in] mssInst pointer to the instance to be closed\r
- * @retval MSS error code. See \ref mss_err_code.\r
- * @verbatim\r
- error code description\r
- mss_NOERR success\r
- mss_ERR_NOTOPENED MSS instance is not in open state\r
- \endverbatim\r
- *\r
- */\r
-tint mssClose(void *mssInst);\r
-\r
-/**\r
- * @ingroup mss_api_functions\r
- *\r
- * @brief Function mssDelete() deletes the MSS instance identified by mssInst\r
- * and returns the addresses of those buffers used by this instance. \r
- *\r
- * @param[in] nbufs Number of buffers used by this instance.\r
- * @param[in] bufs Pointer to buffer descriptors to store returned\r
- * addresses of the buffers used by this instance.\r
- * @param[in,out] mssInst Memory location where the pointer to MSS instance\r
- * is stored.\r
- * @retval MSS error code. See \ref mss_err_code.\r
- * @verbatim\r
- error code description\r
- mss_NOERR success\r
- mss_ERR_NOTCLOSED MSS instance has not been closed.\r
- mss_ERR_NOMEMORY Not enough buffer descriptors to store all returned \r
- buffer addresses.\r
- \endverbatim\r
- *\r
- * @pre MSS instance must be closed by mssClose() before mssDelete() is called. \r
- * @post After mssDelete() is called, MSS instance pointer stored at mssInst \r
- will be set to NULL, and the addresses of the buffers used by this \r
- instance will be returned to the location pointed to by bufs.\r
- */\r
-tint mssDelete(void **mssInst, tint nbufs, ecomemBuffer_t *bufs);\r
-\r
-\r
-/* -------------------------- MSS Call Table -------------------------------- */\r
-/**\r
- * @ingroup mss_api_structures\r
- *\r
- * @brief MSS call table\r
- *\r
- */\r
-typedef struct {\r
- tint (*mssClose) (void *mssInst);\r
- tint (*mssControl) (void *mssInst, mssControl_t *ctl);\r
- tint (*mssDelete) (void **mssInst, tint nbufs, ecomemBuffer_t *bufs);\r
- tint (*mssGetSizes) (tint *nbufs, const ecomemBuffer_t **bufs,\r
- mssSizeConfig_t *cfg);\r
- tint (*mssNew) (void **mssInst, tint nbufs, ecomemBuffer_t *bufs,\r
- mssNewConfig_t *cfg);\r
- tint (*mssOpen) (void *mssInst, mssConfig_t *cfg);\r
- tint (*mssProcess) (void *mssInst, void *out, void *rx_out_sync, \r
- void *mic_fixed[], void *mic_remote[], void *mic_clean[], \r
- void *mic_array[], void *beam[]); \r
-} mssCallTable_t;\r
-\r
-#endif\r
-/* Nothing past this point */\r
-\r