optek_eq_tune_by_uart.h
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* optek_eq_tune_by_uart.h
*
* Created on: 2019-11-21
* Author: Windowns
*/
#ifndef DSPEQ_TUNING_H
#define DSPEQ_TUNING_H
//extern U8 uart1_fifo_buf[1024];
//extern U8 uart1_fifo_buf[576];
extern FIFO Uart1RcvFifo;
#define DAPP_0p1MS_SAMPLES_44_1kHz 4 /*44.1kHz*/
#define E_VALUE 19 //Q19 [-256,256)
//#define EQ_NUMBER 10//used EQ number
//#define FC_MIN_FREQUENCY 0
//#define FC_MAX_FREQUENCY SAMPLE_FREQUENCY/2
//#define FC_FREQ_EQUAL_GAP 1//Hz
//#define PI 3.1415926535898
typedef struct{
int b0;
int b1;
int b2;
int a1;
int a2;
} EQ_COEF;
typedef struct {
int Attack_Rate;
int Attack;
int Release_Rate;
int Release;
int clipping;
int master_volume;
int volume;
}DRC_PARMS_FPs;
typedef struct {
int magic_start;
int len;
EQ_COEF eq_filter[10];
//EQ_COEF drc_filter[4]; //EBASS uses the same eq
//EQ_COEF _3d_filter[4];
EQ_COEF _3d_filter[4]; //EBASS uses the same eq
EQ_COEF drc_filter[4];
EQ_COEF EBASS_filter[2]; //EBASS stop frequecy
int DRC_mode;
int DRC_cutOff;
DRC_PARMS_FPs DRC[2];
int _3D_en;
int _3D_cutOff_Freq;
int _3D_factor;
int EBASS_en;
int EBASS_LPF_Freq;//change to fall timer factor
int EBASS_HPF_Freq;//change to cut off freq
int EBASS_Gain;//virtual bass
int magic_end;
}OPTEK_DSP_RXs;
extern OPTEK_DSP_RXs optek_dsp_rx;
void optek_dsp_tools_tuning_init(void);
void app_nav_eq_set_process (UI_MSG *process_msg);
void app_nav_eq_tuning_data_receive(U8 data);
#endif //DSPEQ_TUNING_H