#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
	//0616 filter2
	//-59, -73, -89, -106, -49, -73, -82, -147, 120, -106, -102, -88, -81, -222, -128, -163, 12, -236, 168, -312, -27, 253, -49, -552, 474, -456, -1161, -945, -379, -2014, -271, 15446
	//0617
	//- 32, -32, -34, -85, -25, -41, -89, -156, 55, -132, -171, -105, -17, -167, -138, -143, 39, -244, 206, -291, -42, 266, -80, -573, 437, -417, -1135, -922, -360, -2044, -273, 15418
	//0618 ΗΚΕΝ1
	22, 3, -38, -165, -132, -120, -72, -81, 125, -137, -211, -123, 36, -110, -135, -222, -47, -299, 176, -368, -136, 234, 30, -413, 494, -561, -1358, -1046, -281, -1857, -76, 15585
	
	//0903 MR4
	//115, -42, -40, -6, 22, -39, -33, 60, 125, -123, 82, 123, 32, -262, 108, -142, -76, -208, 390, -396, -281, 790, -176, -950, 814, 189, -997, -1241, 956, -2798, -1475, 16966
	//0903 MR5
	//120, -49, -29, -6, 41, -33, -9, 74, 156, -102, 120, 149, 78, -230, 159, -105, -21, -165, 449, -350, -220, 839, -111, -900, 880, 240, -930, -1188, 1024, -2746, -1407, 17019





};


// 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
    //-1, 2, -3, 3, -3, 5, -4, 6, -2, 3, -7, -6, 6, -4, 33, -29, 13, -130, 127, -31, 56, 190, -285, 64, -381, 931, -706, 318, 115, -640, -2194, 6418
    //- 1, 1, -3, 3, -4, 4, -5, 6, -2, 3, -7, -5, 7, -2, 36, -25, 18, -126, 129, -31, 54, 187, -287, 64, -384, 919, -736, 260, 23, -764, -2342, 6261
};
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
