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:
Aidan MacDonald 2026-02-01 13:21:20 +00:00 • committed by Solomon Peachy
parent 34525a18dc
commit 2429e117d0
5 changed files with 7 additions and 9 deletions

View file

@ -387,7 +387,7 @@ static void start_sound(void)
if (sound_playing)
return;
#ifndef PLUGIN_USE_IRAM
#ifndef USE_IRAM
/* Ensure control of PCM - stopping music itn't obligatory */
rb->plugin_get_audio_buffer(NULL);
#endif

View file

@ -248,7 +248,7 @@ static volatile int audio_tail = 0; /* which of the two buffers to record? */
#ifndef SIMULATOR
static int16_t audio_data[2][BUFFER_SIZE] MEM_ALIGN_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;
#else
#define iram_audio_data audio_data[audio_head]
@ -1047,7 +1047,7 @@ static void record_and_get_pitch(void)
#ifdef HAVE_SCHEDULER_BOOSTCTRL
rb->trigger_cpu_boost();
#endif
#ifdef PLUGIN_USE_IRAM
#ifdef USE_IRAM
rb->memcpy(iram_audio_data, audio_data[audio_head],
settings.sample_size * sizeof (int16_t));
#endif

View file

@ -74,7 +74,7 @@ enum plugin_status plugin__start(const void *param)
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
/* IRAM must be copied before clearing the BSS ! */
#ifdef PLUGIN_USE_IRAM
#ifdef USE_IRAM
extern char iramcopy[], iramstart[], iramend[], iedata[], iend[];
size_t iram_size = iramend - iramstart;
size_t ibss_size = iend - iedata;
@ -92,7 +92,7 @@ enum plugin_status plugin__start(const void *param)
*/
asm volatile ("" ::: "memory");
}
#endif /* PLUGIN_USE_IRAM */
#endif /* USE_IRAM */
/* zero out the bss section */
rb->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start);

View file

@ -36,7 +36,7 @@
static int loop_repeat_dram = LOOP_REPEAT_DRAM;
static volatile int buf_dram[BUF_SIZE] MEM_ALIGN_ATTR;
#if defined(PLUGIN_USE_IRAM)
#if defined(USE_IRAM)
#if PLUGIN_BUFFER_SIZE <= 0x8000
#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, MEMCPY);
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,
(loop_repeat_iram*BUF_SIZE*sizeof(buf_iram[0]))>>20);
ret = 0;

View file

@ -1187,12 +1187,10 @@ Lyre prototype 1 */
(CONFIG_CPU == PNX0101) || \
(CONFIG_CPU == TCC7801)
# define USE_IRAM
# define PLUGIN_USE_IRAM
/* AS3525 +2MB: core, plugins, codecs */
#elif (CONFIG_CPU == AS3525) && (MEMORYSIZE > 2) && !defined(BOOTLOADER)
# define USE_IRAM
# define PLUGIN_USE_IRAM
/* AS3525 2MB: core only */
#elif (CONFIG_CPU == AS3525) && (MEMORYSIZE <= 2) && !defined(BOOTLOADER) && \