#ifndef	SolmonVoice_EQ
#define SolmonVoice_EQ

#include "SamsungSolomonVoiceW_Int.h"

#define		SF_EQ_TAP					SF_FIRFILTERNUM /*63*/
#define		SF_INC_ADTIME				31000
#define		SF_DEC_ADTMIE				10000

// WB bypass
//short _FIRCoef_OUTPUT_WB[FIRFILTERTEMP] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16384 };
// FIR 25 // Buds+ final
//short _FIRCoef_OUTPUT_WB[FIRFILTERTEMP] = { -39, -172, -237, -119, 75, -45, -211, -26, 196, -50, -251, -131, 134, -16, -575, -325, 570, -161, -980, 366, 843, -689, -715, 439, 409, -1041, -1892, 452, 565, -3587, -740, 20397};
// Bean DV2
short _FIRCoef_OUTPUT_WB[FIRFILTERTEMP] = { 
	//15, 10, -113, -130, 6, -56, -181, -185, -28, -13, -128, -141, -9, -156, -262, 149, 420, -469, -873, 345, 596, -867, -610, 1126, 546, -2298, -1838, 2275, 1136, -4145, -1558, 19289
	//35, 20, -19, -41, 28, -12, -95, -63, 28, -27, -135, -88, 24, -116, -168, -47, 106, -220, -329, -54, 70, -348, -500, 257, -53, -1250, -1287, 1652, 1604, -5807, -2166, 22478
	//16, 0, -9, -34, 61, 9, -60, -51, 44, -40, -146, -124, 1, -149, -169, -39, 160, -147, -207, 82, 238, -191, -339, 373, 34, -1235, -1320, 1539, 1447, -6026, -2400, 22218	
	//0428
	//-2, 1, 33, -51, 26, 17, -24, -59, 38, -68, -149, -71, 16, -238, -158, 44, 92, -162, -54, -50, -31, 203, 42, -354, -505, -79, -594, -93, 143, -3114, -1391, 18040
	//0429
	//6, 0, 37, -34, 35, -44, -8, -7, 13, -96, -76, -141, -67, -75, -69, -209, 92, 81, -180, -228, 266, 255, -327, -383, -202, 115, -610, -785, -40, -1639, -1275, 16073
	//0601_1
	//-203, -162, -109, -87, -17, -57, -87, -79, -89, -161, -117, -177, -231, -128, -85, -253, -95, 35, -242, -323, 142, 223, -253, -527, 91, 168, -865, -656, -138, -2449, -1143, 17122
	//0601_2
	//-190, -163, -99, -91, -12, -68, -80, -90, -84, -167, -109, -171, -219, -144, -73, -269, -104, 39, -241, -325, 192, 195, -267, -492, 42, 111, -790, -721, -81, -2088, -1207, 16533
	//1. 0605 ΗΚΕΝ1-1
	//-42, -107, -83, -72, -78, -119, -51, -65, -11, -94, -30, -158, -105, -107, -31, -290, -47, -47, -49, -373, 263, 93, -167, -613, 183, -61, -759, -1042, 83, -2288, -1232, 16530
	//0611 filter1
	-60, -64, -75, -133, -50, -70, -104, -100, 73, -95, -122, -112, -19, -212, -87, -133, -68, -206, 99, -289, 2, 173, -72, -675, 429, -310, -1019, -611, -250, -2067, -499, 14997
	//0611 filter2
	//-74, -28, -66, -176, -56, -15, -93, -154, 62, -48, -130, -164, -1, -144, -91, -185, -60, -185, 45, -321, 103, 271, -137, -783, 429, -315, -1117, -545, 145, -1760, -791, 14336


};


// NB bypass
//short _FIRCoef_OUTPUT_NB[FIRFILTERTEMP] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16384,};
// NB FIR 3 Buds+ final
short _FIRCoef_OUTPUT_NB[FIRFILTERTEMP] = { 9, -31, 112, -146, 116, -62, -29, 37, 56, -161, 163, -191, -80, 69, -111, -133, 178, -462, -133, 15, -448, 91, 197, -997, -241, -158, -1155, 1494, 20, -4026, -6781, 32767};

//RX EQ filter
short _FIRCoef_OUTPUT_RX_WB[FIRFILTERTEMP] = { 
	//- 4, 0, 3, -7, 14, -25, 35, -53, 78, -93, 105, -148, 171, -152, 150, -155, 138, -123, -37, 177, 35, 138, -765, 738, -516, 760, -1127, 2007, -1335, -745, -3063, 7835
	-4, 0, 3, -7, 14, -25, 35, -53, 79, -92, 105, -148, 171, -151, 151, -154, 139, -122, -36, 178, 36, 140, -764, 740, -514, 763, -1125, 2010, -1333, -742, -3061, 7837
};
short _FIRCoef_OUTPUT_RX_NB[FIRFILTERTEMP] = { -6, 4, 7, -6, 27, -32, 62, -77, 124, -122, 179, -197, 249, -199, 246, -170, 187, -77, -57, 340, -144, 487, -1027, 1212, -1140, 1630, -1776, 2925, -2587, 328, -2767, 6799 };

void SolomonVoiceWFIRFilterInit(FIRStatus* FIR_buf, SamsungSolomonVoiceWTxFIRParam* FIR_param);
void SolomonVoiceW_FIR_ParamConfig(SamsungSolomonVoiceWTxFIRParam* FIR_param, SamsungSolomonVoiceWTxFIRParam* param);
void FN_SOLOMONVOICEW_TX_FirCoefConfig(short *SF_FIRCoef, short *rxfircoef);
int FN_SOLOMONVOICEW_TX_FilterUpdate(short* cur_coeff, short* dst_coeff, short flag);
void FN_SOLOMONVOICEW_TX_FIRFilter(short* Input, short* FIRCoeff, short* FIRFiltBuff, short size);

#endif
