diff options
Diffstat (limited to 'apps/plugin.c')
-rw-r--r-- | apps/plugin.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 90b3837cf8..a00a54e4ec 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -471,6 +471,9 @@ static const struct plugin_api rockbox_api = { | |||
471 | lcd_set_backdrop, | 471 | lcd_set_backdrop, |
472 | #endif | 472 | #endif |
473 | 473 | ||
474 | #ifdef IRAM_STEAL | ||
475 | plugin_iram_init, | ||
476 | #endif | ||
474 | }; | 477 | }; |
475 | 478 | ||
476 | int plugin_load(const char* plugin, void* parameter) | 479 | int plugin_load(const char* plugin, void* parameter) |
@@ -683,9 +686,20 @@ void* plugin_get_audio_buffer(int* buffer_size) | |||
683 | audio_stop(); | 686 | audio_stop(); |
684 | talk_buffer_steal(); /* we use the mp3 buffer, need to tell */ | 687 | talk_buffer_steal(); /* we use the mp3 buffer, need to tell */ |
685 | *buffer_size = audiobufend - audiobuf; | 688 | *buffer_size = audiobufend - audiobuf; |
686 | #endif | ||
687 | return audiobuf; | 689 | return audiobuf; |
690 | #endif | ||
691 | } | ||
692 | |||
693 | #ifdef IRAM_STEAL | ||
694 | /* Initializes plugin IRAM */ | ||
695 | void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size, | ||
696 | char *iedata, size_t iedata_size) | ||
697 | { | ||
698 | audio_iram_steal(); | ||
699 | memcpy(iramstart, iramcopy, iram_size); | ||
700 | memset(iedata, 0, iedata_size); | ||
688 | } | 701 | } |
702 | #endif /* IRAM_STEAL */ | ||
689 | 703 | ||
690 | /* The plugin wants to stay resident after leaving its main function, e.g. | 704 | /* The plugin wants to stay resident after leaving its main function, e.g. |
691 | runs from timer or own thread. The callback is registered to later | 705 | runs from timer or own thread. The callback is registered to later |