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; | ||||
| } bqf_mem_t; | ||||
| 
 | ||||
| // In reality we do not have enough CPU resource to run 8 filtering
 | ||||
| // stages without some optimisation.
 | ||||
| #define MAX_FILTER_STAGES 16 | ||||
| // More filters should be possible, but the config structure
 | ||||
| // might grow beyond the current 512 byte size.
 | ||||
| #define MAX_FILTER_STAGES 20 | ||||
| extern int filter_stages; | ||||
| 
 | ||||
| extern bqf_coeff_t bqf_filters_left[MAX_FILTER_STAGES]; | ||||
|  |  | |||
|  | @ -17,8 +17,8 @@ | |||
| #include <stdint.h> | ||||
| 
 | ||||
| #define FLASH_MAGIC 0x2E8AFEDD | ||||
| #define CONFIG_VERSION 2 | ||||
| #define MINIMUM_CONFIG_VERSION 1 | ||||
| #define CONFIG_VERSION 3 | ||||
| #define MINIMUM_CONFIG_VERSION 3 | ||||
| 
 | ||||
| enum structure_types { | ||||
|     // 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 { | ||||
|     uint8_t type; | ||||
|     uint8_t reserved[3]; | ||||
|     double f0; | ||||
|     double Q; | ||||
|     float f0; | ||||
|     float Q; | ||||
| } filter2; | ||||
| 
 | ||||
| typedef struct __attribute__((__packed__)) _filter3 { | ||||
|     uint8_t type; | ||||
|     uint8_t reserved[3]; | ||||
|     double f0; | ||||
|     double db_gain; | ||||
|     double Q; | ||||
|     float f0; | ||||
|     float db_gain; | ||||
|     float Q; | ||||
| } 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 { | ||||
|     uint8_t type; | ||||
|     uint8_t reserved[3]; | ||||
|  | @ -98,7 +100,7 @@ typedef struct __attribute__((__packed__)) _flash_header_tlv { | |||
| 
 | ||||
| typedef struct __attribute__((__packed__)) _preprocessing_configuration_tlv { | ||||
|     tlv_header header; | ||||
|     double preamp; | ||||
|     float preamp; | ||||
|     uint8_t reverse_stereo; | ||||
|     uint8_t reserved[3]; | ||||
| } preprocessing_configuration_tlv; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 George Norton
						George Norton