index d0fa142bda91aebcce35c2ce7eca30f583d70b92..4a241721700b29e7faa75d94edf99aecc07573f1 100644 (file)
--- a/common/components/sys.h
+++ b/common/components/sys.h
/*
- * Copyright (c) 2016, Texas Instruments Incorporated
+ * Copyright (c) 2017, Texas Instruments Incorporated\r
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#define SYS_FRAME_SIZE (TYP_LINSAMPLE_SIZE*SYS_FRAME_LENGTH/TYP_TWORD_SIZE) /* Frame size in bytes */\r
#define SYS_IN_LENGTH (2L*SYS_FRAME_LENGTH*SYS_MICS_MAX) /* Input buffer length (dual) */\r
#define SYS_IN_SIZE (TYP_LINSAMPLE_SIZE*SYS_IN_LENGTH/TYP_TWORD_SIZE) /* # of words in input buffer */\r
+#define SYS_USE_DRC 1 /* Do we want use DRC */\r
\r
/*======================================================================\r
* Bit masks, bit-mask handling macros, error codes\r
#define SYS_ERR_MSSDEBUG (-15)\r
#define SYS_ERR_ANGLECONFIG (-16)\r
#define SYS_ERR_VAUERROR (-17)\r
+#define SYS_ERR_NOMEMORY (-18)\r
\r
/*======================================================================\r
* System Data Types\r
struct sysConfig_stc {\r
tint nmics; /* The actual number of microphones in ths system */\r
tint nvmics; /* The acutal number of virtual microphones in the system */\r
- tbool use_fileio; /* Use file I/O to load microphone files */\r
- tbool use_default; /* Use default angles for virtual microphones */\r
+ tint asnr_delay; /* delay in ms. Default is 5ms. */\r
+ tint asnr_attn[3]; /* band1, band2, band3 attenutation for ASNR (dB) */\r
+ tint asnr_enable; /* TRUE: enable ASNR, FALSE: disable it */\r
+ tint use_fileio; /* Use file I/O to load microphone files */\r
+ tint use_default; /* Use default angles for virtual microphones */\r
+ tint vad_enable; /* TRUE: enable VAD, FALSE: disable it */\r
+ tint drc_exp_knee; /* in dBm0! (default was -50dBm0 */\r
+ tint drc_max_amp; /* max gain in dB (default was 6dB */\r
+ tint drc_enable; /* TRUE: enable DRC, FALSE: disable it */\r
};\r
typedef struct sysConfig_stc sysConfig_t;\r
\r
void *asnrInst_p[SYS_VMICS_MAX]; /* ASNR instance pointers */\r
void *mssInst_p; /* MSS instance pointer */\r
void *vauInst_p; /* VAU instance pointer */\r
+ void *drcInst_p; /* DRC instance pointer */\r
\r
tint vmicangles[SYS_VMICS_MAX]; /* use SYS_BF_ANGLE_xxx from sysbfflt.h */\r
\r
- tbool use_fileio; /* Use file I/O to load microphone files */\r
- tbool eof; /* End of file reached */\r
- tbool use_default; /* Use default vmic angles (4,6,8,12 vmics supported only) */\r
+ tint asnr_delay; /* in ms. Default is 5ms. */\r
+ tint asnr_attn[3]; /* band 1,2,3 attenutations in dB */\r
+ tint asnr_enable; /* TRUE: enable, FALSE: disable ASNR */\r
+ tint use_fileio; /* Use file I/O to load microphone files */\r
+ tint eof; /* End of file reached */\r
+ tint use_default; /* Use default vmic angles (4,6,8,12 vmics supported only) */\r
+ tint vad_enable; /* TRUE: enable VAD, FALSE: disable it */\r
+ tint drc_exp_knee; /* in dBm0 (default was -50dBm0 */\r
+ tint drc_max_amp; /* max gain in dB (default was 6dB */\r
+ tint drc_enable; /* TRUE: enable DRC, FALSE: disable it */\r
};\r
typedef struct sysContext_stc sysContext_t;\r
\r
extern tint sysBfVMicAngles[]; /* Defined in sys.c */\r
\r
/* Buffer descriptor array for memory allocations */\r
-#define SYS_COMP_MAXBUFS 10\r
+#define SYS_COMP_MAXBUFS 12\r
extern ecomemBuffer_t sysCompBufs[];\r
\r
/*======================================================================\r
/* sysmss.c */\r
extern void sysMssCreate(void); /* Create the MSS module */\r
\r
+/* sysdrc.c */\r
+extern void sysDrcCreate(void); /* Create the DRC module */\r
+\r
/* sysvau.c */\r
extern void sysVauCreate(void); /* Create the VAU module */\r
\r