Increase filter stages to 20. We cant quite run that many though.
This commit is contained in:
parent
ac571efcf8
commit
dbf35e8b60
|
@ -41,9 +41,9 @@ typedef struct _bqf_mem_t {
|
||||||
fix3_28_t y_2;
|
fix3_28_t y_2;
|
||||||
} bqf_mem_t;
|
} bqf_mem_t;
|
||||||
|
|
||||||
// In reality we do not have enough CPU resource to run 8 filtering
|
// More filters should be possible, but the config structure
|
||||||
// stages without some optimisation.
|
// might grow beyond the current 512 byte size.
|
||||||
#define MAX_FILTER_STAGES 16
|
#define MAX_FILTER_STAGES 20
|
||||||
extern int filter_stages;
|
extern int filter_stages;
|
||||||
|
|
||||||
extern bqf_coeff_t bqf_filters_left[MAX_FILTER_STAGES];
|
extern bqf_coeff_t bqf_filters_left[MAX_FILTER_STAGES];
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define FLASH_MAGIC 0x2E8AFEDD
|
#define FLASH_MAGIC 0x2E8AFEDD
|
||||||
#define CONFIG_VERSION 2
|
#define CONFIG_VERSION 3
|
||||||
#define MINIMUM_CONFIG_VERSION 1
|
#define MINIMUM_CONFIG_VERSION 3
|
||||||
|
|
||||||
enum structure_types {
|
enum structure_types {
|
||||||
// Commands/Responses, these are container TLVs. The Value will be a set of TLV structures.
|
// Commands/Responses, these are container TLVs. The Value will be a set of TLV structures.
|
||||||
|
@ -53,18 +53,20 @@ typedef struct __attribute__((__packed__)) _tlv_header {
|
||||||
typedef struct __attribute__((__packed__)) _filter2 {
|
typedef struct __attribute__((__packed__)) _filter2 {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t reserved[3];
|
uint8_t reserved[3];
|
||||||
double f0;
|
float f0;
|
||||||
double Q;
|
float Q;
|
||||||
} filter2;
|
} filter2;
|
||||||
|
|
||||||
typedef struct __attribute__((__packed__)) _filter3 {
|
typedef struct __attribute__((__packed__)) _filter3 {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t reserved[3];
|
uint8_t reserved[3];
|
||||||
double f0;
|
float f0;
|
||||||
double db_gain;
|
float db_gain;
|
||||||
double Q;
|
float Q;
|
||||||
} filter3;
|
} filter3;
|
||||||
|
|
||||||
|
// WARNING: We wont be able to support more than 8 of these filters
|
||||||
|
// due to the config structure size.
|
||||||
typedef struct __attribute__((__packed__)) _filter6 {
|
typedef struct __attribute__((__packed__)) _filter6 {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t reserved[3];
|
uint8_t reserved[3];
|
||||||
|
@ -98,7 +100,7 @@ typedef struct __attribute__((__packed__)) _flash_header_tlv {
|
||||||
|
|
||||||
typedef struct __attribute__((__packed__)) _preprocessing_configuration_tlv {
|
typedef struct __attribute__((__packed__)) _preprocessing_configuration_tlv {
|
||||||
tlv_header header;
|
tlv_header header;
|
||||||
double preamp;
|
float preamp;
|
||||||
uint8_t reverse_stereo;
|
uint8_t reverse_stereo;
|
||||||
uint8_t reserved[3];
|
uint8_t reserved[3];
|
||||||
} preprocessing_configuration_tlv;
|
} preprocessing_configuration_tlv;
|
||||||
|
|
Loading…
Reference in New Issue