mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
Replace all uses of PLUGIN_USE_IRAM with USE_IRAM
PLUGIN_USE_IRAM is almost equivalent to USE_IRAM except that USE_IRAM might be defined in core, but not plugins. All remaining uses of PLUGIN_USE_IRAM are inside plugins, however, so there is no point keeping both defines around. Change-Id: I6902c85651f3d82b7d19ea32eaa60fc5c19eded7
This commit is contained in:
parent
34525a18dc
commit
2429e117d0
5 changed files with 7 additions and 9 deletions
|
|
@ -387,7 +387,7 @@ static void start_sound(void)
|
||||||
if (sound_playing)
|
if (sound_playing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef PLUGIN_USE_IRAM
|
#ifndef USE_IRAM
|
||||||
/* Ensure control of PCM - stopping music itn't obligatory */
|
/* Ensure control of PCM - stopping music itn't obligatory */
|
||||||
rb->plugin_get_audio_buffer(NULL);
|
rb->plugin_get_audio_buffer(NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ static volatile int audio_tail = 0; /* which of the two buffers to record? */
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
static int16_t audio_data[2][BUFFER_SIZE] MEM_ALIGN_ATTR;
|
static int16_t audio_data[2][BUFFER_SIZE] MEM_ALIGN_ATTR;
|
||||||
static fixed yin_buffer[YIN_BUFFER_SIZE] IBSS_ATTR;
|
static fixed yin_buffer[YIN_BUFFER_SIZE] IBSS_ATTR;
|
||||||
#ifdef PLUGIN_USE_IRAM
|
#ifdef USE_IRAM
|
||||||
static int16_t iram_audio_data[BUFFER_SIZE] IBSS_ATTR;
|
static int16_t iram_audio_data[BUFFER_SIZE] IBSS_ATTR;
|
||||||
#else
|
#else
|
||||||
#define iram_audio_data audio_data[audio_head]
|
#define iram_audio_data audio_data[audio_head]
|
||||||
|
|
@ -1047,7 +1047,7 @@ static void record_and_get_pitch(void)
|
||||||
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
||||||
rb->trigger_cpu_boost();
|
rb->trigger_cpu_boost();
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLUGIN_USE_IRAM
|
#ifdef USE_IRAM
|
||||||
rb->memcpy(iram_audio_data, audio_data[audio_head],
|
rb->memcpy(iram_audio_data, audio_data[audio_head],
|
||||||
settings.sample_size * sizeof (int16_t));
|
settings.sample_size * sizeof (int16_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ enum plugin_status plugin__start(const void *param)
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||||
|
|
||||||
/* IRAM must be copied before clearing the BSS ! */
|
/* IRAM must be copied before clearing the BSS ! */
|
||||||
#ifdef PLUGIN_USE_IRAM
|
#ifdef USE_IRAM
|
||||||
extern char iramcopy[], iramstart[], iramend[], iedata[], iend[];
|
extern char iramcopy[], iramstart[], iramend[], iedata[], iend[];
|
||||||
size_t iram_size = iramend - iramstart;
|
size_t iram_size = iramend - iramstart;
|
||||||
size_t ibss_size = iend - iedata;
|
size_t ibss_size = iend - iedata;
|
||||||
|
|
@ -92,7 +92,7 @@ enum plugin_status plugin__start(const void *param)
|
||||||
*/
|
*/
|
||||||
asm volatile ("" ::: "memory");
|
asm volatile ("" ::: "memory");
|
||||||
}
|
}
|
||||||
#endif /* PLUGIN_USE_IRAM */
|
#endif /* USE_IRAM */
|
||||||
|
|
||||||
/* zero out the bss section */
|
/* zero out the bss section */
|
||||||
rb->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start);
|
rb->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
static int loop_repeat_dram = LOOP_REPEAT_DRAM;
|
static int loop_repeat_dram = LOOP_REPEAT_DRAM;
|
||||||
static volatile int buf_dram[BUF_SIZE] MEM_ALIGN_ATTR;
|
static volatile int buf_dram[BUF_SIZE] MEM_ALIGN_ATTR;
|
||||||
|
|
||||||
#if defined(PLUGIN_USE_IRAM)
|
#if defined(USE_IRAM)
|
||||||
|
|
||||||
#if PLUGIN_BUFFER_SIZE <= 0x8000
|
#if PLUGIN_BUFFER_SIZE <= 0x8000
|
||||||
#define IBUF_SIZE (1<<12) /* 16 KB = (1<<12)*sizeof(int) */
|
#define IBUF_SIZE (1<<12) /* 16 KB = (1<<12)*sizeof(int) */
|
||||||
|
|
@ -231,7 +231,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
ret |= test(buf_dram, BUF_SIZE, loop_repeat_dram, MEMSET);
|
ret |= test(buf_dram, BUF_SIZE, loop_repeat_dram, MEMSET);
|
||||||
ret |= test(buf_dram, BUF_SIZE, loop_repeat_dram, MEMCPY);
|
ret |= test(buf_dram, BUF_SIZE, loop_repeat_dram, MEMCPY);
|
||||||
if (ret != 0 && loop_repeat_dram < MAX_REPEAT_DRAM) loop_repeat_dram *= 2;
|
if (ret != 0 && loop_repeat_dram < MAX_REPEAT_DRAM) loop_repeat_dram *= 2;
|
||||||
#if defined(PLUGIN_USE_IRAM)
|
#if defined(USE_IRAM)
|
||||||
TEST_MEM_PRINTF("IRAM cnt: %d size: %d MB", loop_repeat_iram,
|
TEST_MEM_PRINTF("IRAM cnt: %d size: %d MB", loop_repeat_iram,
|
||||||
(loop_repeat_iram*BUF_SIZE*sizeof(buf_iram[0]))>>20);
|
(loop_repeat_iram*BUF_SIZE*sizeof(buf_iram[0]))>>20);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
|
||||||
|
|
@ -1187,12 +1187,10 @@ Lyre prototype 1 */
|
||||||
(CONFIG_CPU == PNX0101) || \
|
(CONFIG_CPU == PNX0101) || \
|
||||||
(CONFIG_CPU == TCC7801)
|
(CONFIG_CPU == TCC7801)
|
||||||
# define USE_IRAM
|
# define USE_IRAM
|
||||||
# define PLUGIN_USE_IRAM
|
|
||||||
|
|
||||||
/* AS3525 +2MB: core, plugins, codecs */
|
/* AS3525 +2MB: core, plugins, codecs */
|
||||||
#elif (CONFIG_CPU == AS3525) && (MEMORYSIZE > 2) && !defined(BOOTLOADER)
|
#elif (CONFIG_CPU == AS3525) && (MEMORYSIZE > 2) && !defined(BOOTLOADER)
|
||||||
# define USE_IRAM
|
# define USE_IRAM
|
||||||
# define PLUGIN_USE_IRAM
|
|
||||||
|
|
||||||
/* AS3525 2MB: core only */
|
/* AS3525 2MB: core only */
|
||||||
#elif (CONFIG_CPU == AS3525) && (MEMORYSIZE <= 2) && !defined(BOOTLOADER) && \
|
#elif (CONFIG_CPU == AS3525) && (MEMORYSIZE <= 2) && !defined(BOOTLOADER) && \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue