summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h36
1 files changed, 4 insertions, 32 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index acaee27687..ecc662cb7f 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -88,8 +88,6 @@ void* plugin_get_buffer(size_t *buffer_size);
88#ifdef HAVE_RECORDING 88#ifdef HAVE_RECORDING
89#include "recording.h" 89#include "recording.h"
90#endif 90#endif
91#else
92#include "mas35xx.h"
93#endif /* CONFIG_CODEC == SWCODEC */ 91#endif /* CONFIG_CODEC == SWCODEC */
94#include "settings.h" 92#include "settings.h"
95#include "timer.h" 93#include "timer.h"
@@ -355,13 +353,9 @@ struct plugin_api {
355 const enum screen_type screen); 353 const enum screen_type screen);
356#endif 354#endif
357 355
356#ifdef HAVE_BACKLIGHT
358 /* lcd backlight */ 357 /* lcd backlight */
359 /* The backlight_* functions must be present in the API regardless whether 358 /* For OLED targets like the Sansa Clip, the backlight_* functions control
360 * HAVE_BACKLIGHT is defined or not. The reason is that the stock Ondio has
361 * no backlight but can be modded to have backlight (it's prepared on the
362 * PCB). This makes backlight an all-target feature API wise, and keeps API
363 * compatible between stock and modded Ondio.
364 * For OLED targets like the Sansa Clip, the backlight_* functions control
365 * the display enable, which has essentially the same effect. */ 359 * the display enable, which has essentially the same effect. */
366 bool (*is_backlight_on)(bool ignore_always_off); 360 bool (*is_backlight_on)(bool ignore_always_off);
367 void (*backlight_on)(void); 361 void (*backlight_on)(void);
@@ -383,6 +377,7 @@ struct plugin_api {
383 void (*remote_backlight_set_timeout_plugged)(int index); 377 void (*remote_backlight_set_timeout_plugged)(int index);
384#endif 378#endif
385#endif /* HAVE_REMOTE_LCD */ 379#endif /* HAVE_REMOTE_LCD */
380#endif /* HAVE_BACKLIGHT */
386 381
387 /* list */ 382 /* list */
388 void (*gui_synclist_init)(struct gui_synclist * lists, 383 void (*gui_synclist_init)(struct gui_synclist * lists,
@@ -689,8 +684,7 @@ struct plugin_api {
689 int (*sound_enum_hw_eq_band_setting)(unsigned int band, 684 int (*sound_enum_hw_eq_band_setting)(unsigned int band,
690 unsigned int band_setting); 685 unsigned int band_setting);
691#endif /* AUDIOHW_HAVE_EQ */ 686#endif /* AUDIOHW_HAVE_EQ */
692#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \ 687#if ((CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHCONTROL))
693 (CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHCONTROL)
694 void (*sound_set_pitch)(int32_t pitch); 688 void (*sound_set_pitch)(int32_t pitch);
695#endif 689#endif
696#if (CONFIG_PLATFORM & PLATFORM_NATIVE) 690#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
@@ -771,13 +765,6 @@ struct plugin_api {
771 void (*keyclick_click)(bool rawbutton, int action); 765 void (*keyclick_click)(bool rawbutton, int action);
772#endif /* CONFIG_CODEC == SWCODEC */ 766#endif /* CONFIG_CODEC == SWCODEC */
773 767
774#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
775 unsigned short (*peak_meter_scale_value)(unsigned short val,
776 int meterwidth);
777 void (*peak_meter_set_use_dbfs)(bool use);
778 bool (*peak_meter_get_use_dbfs)(void);
779#endif
780
781 /* metadata */ 768 /* metadata */
782 bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname); 769 bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname);
783 bool (*mp3info)(struct mp3entry *entry, const char *filename); 770 bool (*mp3info)(struct mp3entry *entry, const char *filename);
@@ -845,21 +832,6 @@ struct plugin_api {
845 unsigned long (*mpeg_get_last_header)(void); 832 unsigned long (*mpeg_get_last_header)(void);
846#endif 833#endif
847 834
848 /* MAS communication */
849#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
850 int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len);
851 int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
852 int (*mas_readreg)(int reg);
853 int (*mas_writereg)(int reg, unsigned int val);
854#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
855 int (*mas_codec_writereg)(int reg, unsigned int val);
856 int (*mas_codec_readreg)(int reg);
857 void (*i2c_begin)(void);
858 void (*i2c_end)(void);
859 int (*i2c_write)(int address, const unsigned char* buf, int count );
860#endif
861#endif /* !SIMULATOR && CONFIG_CODEC != SWCODEC */
862
863 /* menu */ 835 /* menu */
864 struct menu_table *(*root_menu_get_options)(int *nb_options); 836 struct menu_table *(*root_menu_get_options)(int *nb_options);
865 int (*do_menu)(const struct menu_item_ex *menu, int *start_selected, 837 int (*do_menu)(const struct menu_item_ex *menu, int *start_selected,