Kaynağa Gözat

Merge pull request #339 from FrankBoesing/DMAMEM-alignment

Dmamem alignment
dds
Paul Stoffregen 4 yıl önce
ebeveyn
işleme
188d13f19d
İşleme yapanın e-posta adresine bağlı hesap yok
8 değiştirilmiş dosya ile 12 ekleme ve 12 silme
  1. +2
    -2
      input_adc.cpp
  2. +2
    -2
      input_adcs.cpp
  3. +1
    -1
      input_pdm.cpp
  4. +1
    -1
      output_adat.cpp
  5. +1
    -1
      output_dac.cpp
  6. +1
    -1
      output_dacs.cpp
  7. +2
    -2
      output_pt8211.cpp
  8. +2
    -2
      output_pt8211_2.cpp

+ 2
- 2
input_adc.cpp Dosyayı Görüntüle

@@ -33,7 +33,7 @@

#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;
uint16_t AudioInputAnalog::block_offset = 0;
int32_t AudioInputAnalog::hpf_y1 = 0;
@@ -213,4 +213,4 @@ void AudioInputAnalog::update(void)
transmit(out_left);
release(out_left);
}
#endif
#endif

+ 2
- 2
input_adcs.cpp Dosyayı Görüntüle

@@ -33,8 +33,8 @@

#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_right = NULL;
uint16_t AudioInputAnalogStereo::offset_left = 0;

+ 1
- 1
input_pdm.cpp Dosyayı Görüntüle

@@ -52,7 +52,7 @@
// but its performance should be *much* better than the rapid passband rolloff
// 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];
audio_block_t * AudioInputPDM::block_left = NULL;
bool AudioInputPDM::update_responsibility = false;

+ 1
- 1
output_adat.cpp Dosyayı Görüntüle

@@ -56,7 +56,7 @@ uint16_t AudioOutputADAT::ch8_offset = 0;
bool AudioOutputADAT::update_responsibility = false;
//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);


+ 1
- 1
output_dac.cpp Dosyayı Görüntüle

@@ -30,7 +30,7 @@

#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_2nd = NULL;
bool AudioOutputAnalog::update_responsibility = false;

+ 1
- 1
output_dacs.cpp Dosyayı Görüntüle

@@ -30,7 +30,7 @@

#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_2nd = NULL;
audio_block_t * AudioOutputAnalogStereo::block_right_1st = NULL;

+ 2
- 2
output_pt8211.cpp Dosyayı Görüntüle

@@ -40,9 +40,9 @@ uint16_t AudioOutputPT8211::block_left_offset = 0;
uint16_t AudioOutputPT8211::block_right_offset = 0;
bool AudioOutputPT8211::update_responsibility = false;
#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
static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES];
DMAMEM __attribute__((aligned(32))) static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES];
#endif
DMAChannel AudioOutputPT8211::dma(false);


+ 2
- 2
output_pt8211_2.cpp Dosyayı Görüntüle

@@ -40,9 +40,9 @@ uint16_t AudioOutputPT8211_2::block_left_offset = 0;
uint16_t AudioOutputPT8211_2::block_right_offset = 0;
bool AudioOutputPT8211_2::update_responsibility = false;
#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
static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES];
DMAMEM __attribute__((aligned(32))) static uint32_t i2s_tx_buffer[AUDIO_BLOCK_SAMPLES];
#endif
DMAChannel AudioOutputPT8211_2::dma(false);


Yükleniyor…
İptal
Kaydet