Browse Source

add DMAMEM, fix warnings

dds
Frank Bösing 4 years ago
parent
commit
31a3d575b1
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      input_i2s.cpp
  2. +1
    -1
      input_i2s2.cpp
  3. +1
    -1
      input_i2s_hex.cpp
  4. +1
    -1
      input_i2s_quad.cpp

+ 1
- 1
input_i2s.cpp View File

#include "input_i2s.h" #include "input_i2s.h"
#include "output_i2s.h" #include "output_i2s.h"


static uint32_t i2s_rx_buffer[AUDIO_BLOCK_SAMPLES];
DMAMEM __attribute__((aligned(32))) static uint32_t i2s_rx_buffer[AUDIO_BLOCK_SAMPLES];
audio_block_t * AudioInputI2S::block_left = NULL; audio_block_t * AudioInputI2S::block_left = NULL;
audio_block_t * AudioInputI2S::block_right = NULL; audio_block_t * AudioInputI2S::block_right = NULL;
uint16_t AudioInputI2S::block_offset = 0; uint16_t AudioInputI2S::block_offset = 0;

+ 1
- 1
input_i2s2.cpp View File

#include "input_i2s2.h" #include "input_i2s2.h"
#include "output_i2s2.h" #include "output_i2s2.h"


static uint32_t i2s2_rx_buffer[AUDIO_BLOCK_SAMPLES];
DMAMEM __attribute__((aligned(32))) static uint32_t i2s2_rx_buffer[AUDIO_BLOCK_SAMPLES];
audio_block_t * AudioInputI2S2::block_left = NULL; audio_block_t * AudioInputI2S2::block_left = NULL;
audio_block_t * AudioInputI2S2::block_right = NULL; audio_block_t * AudioInputI2S2::block_right = NULL;
uint16_t AudioInputI2S2::block_offset = 0; uint16_t AudioInputI2S2::block_offset = 0;

+ 1
- 1
input_i2s_hex.cpp View File

if (block_ch1) { if (block_ch1) {
offset = block_offset; offset = block_offset;
if (offset <= AUDIO_BLOCK_SAMPLES/2) { if (offset <= AUDIO_BLOCK_SAMPLES/2) {
arm_dcache_delete(src, sizeof(i2s_rx_buffer) / 2);
arm_dcache_delete((void*)src, sizeof(i2s_rx_buffer) / 2);
block_offset = offset + AUDIO_BLOCK_SAMPLES/2; block_offset = offset + AUDIO_BLOCK_SAMPLES/2;
dest1 = &(block_ch1->data[offset]); dest1 = &(block_ch1->data[offset]);
dest2 = &(block_ch2->data[offset]); dest2 = &(block_ch2->data[offset]);

+ 1
- 1
input_i2s_quad.cpp View File

if (block_ch1) { if (block_ch1) {
offset = block_offset; offset = block_offset;
if (offset <= AUDIO_BLOCK_SAMPLES/2) { if (offset <= AUDIO_BLOCK_SAMPLES/2) {
arm_dcache_delete(src, sizeof(i2s_rx_buffer) / 2);
arm_dcache_delete((void*)src, sizeof(i2s_rx_buffer) / 2);
block_offset = offset + AUDIO_BLOCK_SAMPLES/2; block_offset = offset + AUDIO_BLOCK_SAMPLES/2;
dest1 = &(block_ch1->data[offset]); dest1 = &(block_ch1->data[offset]);
dest2 = &(block_ch2->data[offset]); dest2 = &(block_ch2->data[offset]);

Loading…
Cancel
Save