| #define COEF_HPF_DCBLOCK (1048300<<10) // DC Removal filter coefficient in S1.30 | #define COEF_HPF_DCBLOCK (1048300<<10) // DC Removal filter coefficient in S1.30 | ||||
| DMAMEM static uint16_t analog_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint16_t analog_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| audio_block_t * AudioInputAnalog::block_left = NULL; | audio_block_t * AudioInputAnalog::block_left = NULL; | ||||
| uint16_t AudioInputAnalog::block_offset = 0; | uint16_t AudioInputAnalog::block_offset = 0; | ||||
| int32_t AudioInputAnalog::hpf_y1 = 0; | int32_t AudioInputAnalog::hpf_y1 = 0; | ||||
| transmit(out_left); | transmit(out_left); | ||||
| release(out_left); | release(out_left); | ||||
| } | } | ||||
| #endif | |||||
| #endif |
| #define COEF_HPF_DCBLOCK (1048300<<10) // DC Removal filter coefficient in S1.30 | #define COEF_HPF_DCBLOCK (1048300<<10) // DC Removal filter coefficient in S1.30 | ||||
| DMAMEM static uint16_t left_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| DMAMEM static uint16_t right_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint16_t left_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint16_t right_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| audio_block_t * AudioInputAnalogStereo::block_left = NULL; | audio_block_t * AudioInputAnalogStereo::block_left = NULL; | ||||
| audio_block_t * AudioInputAnalogStereo::block_right = NULL; | audio_block_t * AudioInputAnalogStereo::block_right = NULL; | ||||
| uint16_t AudioInputAnalogStereo::offset_left = 0; | uint16_t AudioInputAnalogStereo::offset_left = 0; |
| // but its performance should be *much* better than the rapid passband rolloff | // but its performance should be *much* better than the rapid passband rolloff | ||||
| // of Cascaded Integrator Comb (CIC) or moving average filters. | // of Cascaded Integrator Comb (CIC) or moving average filters. | ||||
| DMAMEM static uint32_t pdm_buffer[AUDIO_BLOCK_SAMPLES*4]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint32_t pdm_buffer[AUDIO_BLOCK_SAMPLES*4]; | |||||
| static uint32_t leftover[14]; | static uint32_t leftover[14]; | ||||
| audio_block_t * AudioInputPDM::block_left = NULL; | audio_block_t * AudioInputPDM::block_left = NULL; | ||||
| bool AudioInputPDM::update_responsibility = false; | bool AudioInputPDM::update_responsibility = false; |
| bool AudioOutputADAT::update_responsibility = false; | bool AudioOutputADAT::update_responsibility = false; | ||||
| //uint32_t AudioOutputADAT::vucp = VUCP_VALID; | //uint32_t AudioOutputADAT::vucp = VUCP_VALID; | ||||
| DMAMEM static uint32_t ADAT_tx_buffer[AUDIO_BLOCK_SAMPLES * 8]; //4 KB, AUDIO_BLOCK_SAMPLES is usually 128 | |||||
| DMAMEM __attribute__((aligned(32))) static uint32_t ADAT_tx_buffer[AUDIO_BLOCK_SAMPLES * 8]; //4 KB, AUDIO_BLOCK_SAMPLES is usually 128 | |||||
| DMAChannel AudioOutputADAT::dma(false); | DMAChannel AudioOutputADAT::dma(false); | ||||
| #if defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) | #if defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) | ||||
| DMAMEM static uint16_t dac_buffer[AUDIO_BLOCK_SAMPLES*2]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint16_t dac_buffer[AUDIO_BLOCK_SAMPLES*2]; | |||||
| audio_block_t * AudioOutputAnalog::block_left_1st = NULL; | audio_block_t * AudioOutputAnalog::block_left_1st = NULL; | ||||
| audio_block_t * AudioOutputAnalog::block_left_2nd = NULL; | audio_block_t * AudioOutputAnalog::block_left_2nd = NULL; | ||||
| bool AudioOutputAnalog::update_responsibility = false; | bool AudioOutputAnalog::update_responsibility = false; |
| #if defined(__MK64FX512__) || defined(__MK66FX1M0__) | #if defined(__MK64FX512__) || defined(__MK66FX1M0__) | ||||
| DMAMEM static uint32_t dac_buffer[AUDIO_BLOCK_SAMPLES*2]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint32_t dac_buffer[AUDIO_BLOCK_SAMPLES*2]; | |||||
| audio_block_t * AudioOutputAnalogStereo::block_left_1st = NULL; | audio_block_t * AudioOutputAnalogStereo::block_left_1st = NULL; | ||||
| audio_block_t * AudioOutputAnalogStereo::block_left_2nd = NULL; | audio_block_t * AudioOutputAnalogStereo::block_left_2nd = NULL; | ||||
| audio_block_t * AudioOutputAnalogStereo::block_right_1st = NULL; | audio_block_t * AudioOutputAnalogStereo::block_right_1st = NULL; |
| uint16_t AudioOutputPT8211::block_right_offset = 0; | uint16_t AudioOutputPT8211::block_right_offset = 0; | ||||
| bool AudioOutputPT8211::update_responsibility = false; | bool AudioOutputPT8211::update_responsibility = false; | ||||
| #if defined(AUDIO_PT8211_OVERSAMPLING) | #if defined(AUDIO_PT8211_OVERSAMPLING) | ||||
| static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES*4]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES*4]; | |||||
| #else | #else | ||||
| static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| #endif | #endif | ||||
| DMAChannel AudioOutputPT8211::dma(false); | DMAChannel AudioOutputPT8211::dma(false); | ||||
| uint16_t AudioOutputPT8211_2::block_right_offset = 0; | uint16_t AudioOutputPT8211_2::block_right_offset = 0; | ||||
| bool AudioOutputPT8211_2::update_responsibility = false; | bool AudioOutputPT8211_2::update_responsibility = false; | ||||
| #if defined(AUDIO_PT8211_OVERSAMPLING) | #if defined(AUDIO_PT8211_OVERSAMPLING) | ||||
| static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES*4]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES*4]; | |||||
| #else | #else | ||||
| static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| DMAMEM __attribute__((aligned(32))) static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES]; | |||||
| #endif | #endif | ||||
| DMAChannel AudioOutputPT8211_2::dma(false); | DMAChannel AudioOutputPT8211_2::dma(false); | ||||