1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by wavey@wavey.org
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef __SETTINGS_H__
21 #define __SETTINGS_H__
28 #include "timefuncs.h"
34 #if CONFIG_CODEC == SWCODEC
38 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
39 #include "backlight.h" /* for [MIN|MAX]_BRIGHTNESS_SETTING */
42 /** Setting values defines **/
44 /* name of directory where configuration, fonts and other data
47 #define ROCKBOX_DIR "."
48 #define ROCKBOX_DIR_LEN 1
50 #define ROCKBOX_DIR "/.rockbox"
51 #define ROCKBOX_DIR_LEN 9
54 #define FONT_DIR ROCKBOX_DIR "/fonts"
55 #define LANG_DIR ROCKBOX_DIR "/langs"
56 #define WPS_DIR ROCKBOX_DIR "/wps"
57 #define THEME_DIR ROCKBOX_DIR "/themes"
58 #define PLUGIN_DIR ROCKBOX_DIR "/rocks"
59 #define VIEWERS_DIR ROCKBOX_DIR "/viewers"
60 #define BACKDROP_DIR ROCKBOX_DIR "/backdrops"
61 #define REC_BASE_DIR "/recordings"
62 #define EQS_DIR ROCKBOX_DIR "/eqs"
63 #define CODECS_DIR ROCKBOX_DIR"/codecs"
64 #define FMPRESET_PATH ROCKBOX_DIR "/fmpresets"
66 #define VIEWERS_CONFIG ROCKBOX_DIR "/viewers.config"
67 #define CONFIGFILE ROCKBOX_DIR "/config.cfg"
68 #define FIXEDSETTINGSFILE ROCKBOX_DIR "/fixed.cfg"
70 #define MAX_FILENAME 32
74 #define BOOKMARK_YES 1
75 #define BOOKMARK_ASK 2
76 #define BOOKMARK_UNIQUE_ONLY 2
77 #define BOOKMARK_RECENT_ONLY_YES 3
78 #define BOOKMARK_RECENT_ONLY_ASK 4
79 #define FF_REWIND_1000 0
80 #define FF_REWIND_2000 1
81 #define FF_REWIND_3000 2
82 #define FF_REWIND_4000 3
83 #define FF_REWIND_5000 4
84 #define FF_REWIND_6000 5
85 #define FF_REWIND_8000 6
86 #define FF_REWIND_10000 7
87 #define FF_REWIND_15000 8
88 #define FF_REWIND_20000 9
89 #define FF_REWIND_25000 10
90 #define FF_REWIND_30000 11
91 #define FF_REWIND_45000 12
92 #define FF_REWIND_60000 13
94 #define TRIG_MODE_OFF 0
95 #define TRIG_MODE_NOREARM 1
96 #define TRIG_MODE_REARM 2
98 #define TRIG_DURATION_COUNT 13
99 extern const char * const trig_durations
[TRIG_DURATION_COUNT
];
101 #define CROSSFADE_ENABLE_SHUFFLE 1
102 #define CROSSFADE_ENABLE_TRACKSKIP 2
103 #define CROSSFADE_ENABLE_SHUFFLE_AND_TRACKSKIP 3
104 #define CROSSFADE_ENABLE_ALWAYS 4
106 #define FOLDER_ADVANCE_OFF 0
107 #define FOLDER_ADVANCE_NEXT 1
108 #define FOLDER_ADVANCE_RANDOM 2
113 #ifndef HAVE_LCD_COLOR
114 #define DEFAULT_CONTRAST_SETTING 40
117 #if defined HAVE_LCD_CHARCELLS
118 #define MIN_CONTRAST_SETTING 5
119 #define MAX_CONTRAST_SETTING 31
121 #define MIN_CONTRAST_SETTING 5
122 #define MAX_CONTRAST_SETTING 63
126 #ifdef HAVE_REMOTE_LCD
127 #ifndef DEFAULT_REMOTE_CONTRAST_SETTING
128 /* May be defined in config file if driver code needs the value */
129 #define DEFAULT_REMOTE_CONTRAST_SETTING 42
131 #define MIN_REMOTE_CONTRAST_SETTING MIN_CONTRAST_SETTING
132 #define MAX_REMOTE_CONTRAST_SETTING MAX_CONTRAST_SETTING
135 #endif /* !TARGET_TREE */
137 #if !defined(HAVE_LCD_COLOR)
138 #define HAVE_LCD_CONTRAST
141 /* repeat mode options */
148 #ifdef AB_REPEAT_ENABLE
154 /* dir filter options */
155 /* Note: Any new filter modes need to be added before NUM_FILTER_MODES.
156 * Any new rockbox browse filter modes (accessible through the menu)
157 * must be added after NUM_FILTER_MODES. */
158 enum { SHOW_ALL
, SHOW_SUPPORTED
, SHOW_MUSIC
, SHOW_PLAYLIST
, SHOW_ID3DB
,
160 SHOW_WPS
, SHOW_RWPS
, SHOW_FMR
, SHOW_CFG
, SHOW_LNG
, SHOW_MOD
, SHOW_FONT
, SHOW_PLUGINS
};
162 /* recursive dir insert options */
163 enum { RECURSE_OFF
, RECURSE_ON
, RECURSE_ASK
};
165 /* replaygain types */
166 enum { REPLAYGAIN_TRACK
= 0, REPLAYGAIN_ALBUM
, REPLAYGAIN_SHUFFLE
};
168 /* show path types */
169 enum { SHOW_PATH_OFF
= 0, SHOW_PATH_CURRENT
, SHOW_PATH_FULL
};
172 #ifdef HAVE_RTC_ALARM
173 enum { ALARM_START_WPS
= 0,
177 #ifdef HAVE_RECORDING
182 #if CONFIG_TUNER && defined(HAVE_RECORDING)
183 #define ALARM_SETTING_TEXT "wps,fm,rec"
185 #define ALARM_SETTING_TEXT "wps,fm"
186 #elif defined(HAVE_RECORDING)
187 #define ALARM_SETTING_TEXT "wps,rec"
190 #endif /* HAVE_RTC_ALARM */
191 /** virtual pointer stuff.. move to another .h maybe? **/
192 /* These define "virtual pointers", which could either be a literal string,
193 or a mean a string ID if the pointer is in a certain range.
194 This helps to save space for menus and options. */
196 #define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */
198 /* a space which is defined in stubs.c */
199 extern unsigned char vp_dummy
[VIRT_SIZE
];
200 #define VIRT_PTR vp_dummy
202 /* a location where we won't store strings, 0 is the fastest */
203 #define VIRT_PTR ((unsigned char*)0)
206 /* form a "virtual pointer" out of a language ID */
207 #define ID2P(id) (VIRT_PTR + id)
209 /* resolve a pointer which could be a virtualized ID or a literal */
210 #define P2STR(p) (char *)((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p)
212 /* get the string ID from a virtual pointer, -1 if not virtual */
213 #define P2ID(p) ((p>=VIRT_PTR && p<=VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1)
215 /* !defined(HAVE_LCD_COLOR) implies HAVE_LCD_CONTRAST with default 40.
216 Explicitly define HAVE_LCD_CONTRAST in config file for newer ports for
221 /** function prototypes **/
223 /* argument bits for settings_load() */
224 #define SETTINGS_RTC 1 /* only the settings from the RTC nonvolatile RAM */
225 #define SETTINGS_HD 2 /* only the settings from the disk sector */
226 #define SETTINGS_ALL 3 /* both */
227 void settings_load(int which
);
228 bool settings_load_config(const char* file
, bool apply
);
230 void status_save( void );
231 int settings_save(void);
232 /* defines for the options paramater */
233 #define SETTINGS_SAVE_CHANGED 0
234 #define SETTINGS_SAVE_ALL 1
235 #define SETTINGS_SAVE_THEME 2
236 bool settings_save_config(int options
);
238 void settings_reset(void);
239 void sound_settings_apply(void);
240 void settings_apply(void);
241 void settings_apply_pm_range(void);
242 void settings_display(void);
244 enum optiontype
{ INT
, BOOL
};
247 unsigned const char* string
;
250 const struct settings_list
* find_setting(void* variable
, int *id
);
251 bool cfg_int_to_string(int setting_id
, int val
, char* buf
, int buf_len
);
252 void talk_setting(void *global_settings_variable
);
253 bool set_sound(const unsigned char * string
,
254 int* variable
, int setting
);
255 bool set_bool_options(const char* string
, bool* variable
,
256 const char* yes_str
, int yes_voice
,
257 const char* no_str
, int no_voice
,
258 void (*function
)(bool));
260 bool set_bool(const char* string
, bool* variable
);
261 bool set_option(const char* string
, void* variable
, enum optiontype type
,
262 const struct opt_items
* options
, int numoptions
, void (*function
)(int));
263 bool set_int(const unsigned char* string
, const char* unit
, int voice_unit
,
265 void (*function
)(int), int step
, int min
, int max
,
266 void (*formatter
)(char*, int, int, const char*) );
267 /* use this one if you need to create a lang from the value (i.e with TALK_ID()) */
268 bool set_int_ex(const unsigned char* string
, const char* unit
, int voice_unit
,
270 void (*function
)(int), int step
, int min
, int max
,
271 void (*formatter
)(char*, int, int, const char*),
272 long (*get_talk_id
)(int));
274 /* the following are either not in setting.c or shouldnt be */
275 bool set_time_screen(const char* string
, struct tm
*tm
);
276 int read_line(int fd
, char* buffer
, int buffer_size
);
277 void set_file(char* filename
, char* setting
, int maxlen
);
278 unsigned int rec_timesplit_seconds(void);
279 unsigned long rec_sizesplit_bytes(void);
280 void settings_apply_trigger(void);
283 /** global_settings and global_status struct definitions **/
287 int resume_index
; /* index in playlist (-1 for no active resume) */
288 int resume_first_index
; /* index of first track in playlist */
289 uint32_t resume_offset
; /* byte offset in mp3 file */
290 int resume_seed
; /* shuffle seed (-1=no resume shuffle 0=sorted
292 int runtime
; /* current runtime since last charge */
293 int topruntime
; /* top known runtime */
295 int dircache_size
; /* directory cache structure last size, 22 bits */
298 int last_frequency
; /* Last frequency for resuming, in FREQ_STEP units,
299 relative to MIN_FREQ */
308 int volume
; /* audio output volume: 0-100 0=off 100=max */
309 int balance
; /* stereo balance: 0-100 0=left 50=bal 100=right */
310 int bass
; /* bass eq: 0-100 0=off 100=max */
311 int treble
; /* treble eq: 0-100 0=low 100=high */
312 int loudness
; /* loudness eq: 0-100 0=off 100=max */
313 int avc
; /* auto volume correct: 0=off, 1=20ms, 2=2s 3=4s 4=8s */
314 int channel_config
; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */
315 int stereo_width
; /* 0-255% */
316 int mdb_strength
; /* 0-127dB */
317 int mdb_harmonics
; /* 0-100% */
318 int mdb_center
; /* 20-300Hz */
319 int mdb_shape
; /* 50-300Hz */
320 bool mdb_enable
; /* true/false */
321 bool superbass
; /* true/false */
323 #if CONFIG_CODEC == SWCODEC
324 int crossfade
; /* Enable crossfade (0=off,1=shuffle,2=trackskip,3=shuff&trackskip,4=always) */
325 int crossfade_fade_in_delay
; /* Fade in delay (0-15s) */
326 int crossfade_fade_out_delay
; /* Fade out delay (0-15s) */
327 int crossfade_fade_in_duration
; /* Fade in duration (0-15s) */
328 int crossfade_fade_out_duration
; /* Fade out duration (0-15s) */
329 int crossfade_fade_out_mixmode
; /* Fade out mode (0=crossfade,1=mix) */
332 #if CONFIG_CODEC == SWCODEC
333 int rec_format
; /* record format index */
335 int rec_quality
; /* 0-7 */
336 #endif /* CONFIG_CODEC == SWCODEC */
337 int rec_source
; /* 0=mic, 1=line, 2=S/PDIF, 2 or 3=FM Radio */
338 int rec_frequency
; /* 0 = 44.1kHz (depends on target)
344 int rec_channels
; /* 0=Stereo, 1=Mono */
345 int rec_mic_gain
; /* depends on target */
346 int rec_left_gain
; /* depends on target */
347 int rec_right_gain
; /* depands on target */
348 bool rec_editable
; /* true means that the bit reservoir is off */
350 /* note: timesplit setting is not saved */
351 int rec_timesplit
; /* 0 = off,
352 1 = 00:05, 2 = 00:10, 3 = 00:15, 4 = 00:30
353 5 = 01:00, 6 = 02:00, 7 = 04:00, 8 = 06:00
354 9 = 08:00, 10= 10:00, 11= 12:00, 12= 18:00,
356 int rec_sizesplit
; /* 0 = off,
357 1 = 5MB, 2 = 10MB, 3 = 15MB, 4 = 32MB
358 5 = 64MB, 6 = 75MB, 7 = 100MB, 8 = 128MB
359 9 = 256MB, 10= 512MB, 11= 650MB, 12= 700MB,
360 13= 1GB, 14 = 1.5GB 15 = 1.75MB*/
361 int rec_split_type
; /* split/stop */
362 int rec_split_method
; /* time/filesize */
364 int rec_prerecord_time
; /* In seconds, 0-30, 0 means OFF */
365 int rec_directory
; /* 0=base dir, 1=current dir */
366 int cliplight
; /* 0 = off
368 2 = main and remote lcd
371 int rec_start_thres
; /* negative: db, positive: % range -87 .. 100 */
372 int rec_start_duration
; /* index of trig_durations */
373 int rec_stop_thres
; /* negative: db, positive: % */
374 int rec_stop_postrec
; /* negative: db, positive: % range -87 .. 100 */
375 int rec_stop_gap
; /* index of trig_durations */
376 int rec_trigger_mode
; /* see TRIG_MODE_XXX constants */
377 int rec_trigger_type
; /* what to do when trigger released */
380 int rec_agc_preset_mic
; /* AGC mic preset modes:
387 int rec_agc_preset_line
; /* AGC line-in preset modes:
394 int rec_agc_maxgain_mic
; /* AGC maximum mic gain */
395 int rec_agc_maxgain_line
; /* AGC maximum line-in gain */
396 int rec_agc_cliptime
; /* 0.2, 0.4, 0.6, 0.8, 1s */
399 /* device settings */
401 #ifdef HAVE_LCD_CONTRAST
402 int contrast
; /* lcd contrast */
404 bool invert
; /* invert display */
405 bool invert_cursor
; /* invert the current file in dir browser and menu
406 instead of using the default cursor */
407 bool flip_display
; /* turn display (and button layout) by 180 degrees */
408 int poweroff
; /* power off timer */
409 int backlight_timeout
; /* backlight off timeout: 0-18 0=never,
411 then according to timeout_values[] */
412 int backlight_timeout_plugged
;
413 #ifdef HAVE_BACKLIGHT_PWM_FADING
414 int backlight_fade_in
; /* backlight fade in timing: 0..3 */
415 int backlight_fade_out
; /* backlight fade in timing: 0..7 */
417 int battery_capacity
; /* in mAh */
418 int battery_type
; /* for units which can take multiple types (Ondio). */
420 #ifdef HAVE_SPDIF_POWER
421 bool spdif_enable
; /* S/PDIF power on/off */
425 unsigned char fmr_file
[MAX_FILENAME
+1]; /* last fmr preset */
427 unsigned char font_file
[MAX_FILENAME
+1]; /* last font */
428 unsigned char wps_file
[MAX_FILENAME
+1]; /* last wps */
429 unsigned char lang_file
[MAX_FILENAME
+1]; /* last language */
433 int repeat_mode
; /* 0=off 1=repeat all 2=repeat one 3=shuffle 4=ab */
434 int dirfilter
; /* 0=display all, 1=only supported, 2=only music,
435 3=dirs+playlists, 4=ID3 database */
436 bool sort_case
; /* dir sort order: 0=case insensitive, 1=sensitive */
437 int volume_type
; /* how volume is displayed: 0=graphic, 1=percent */
438 int battery_display
; /* how battery is displayed: 0=graphic, 1=percent */
439 int timeformat
; /* time format: 0=24 hour clock, 1=12 hour clock */
440 bool playlist_shuffle
;
441 bool play_selected
; /* Plays selected file even in shuffle mode */
442 int ff_rewind_min_step
; /* FF/Rewind minimum step size */
443 int ff_rewind_accel
; /* FF/Rewind acceleration (in seconds per doubling) */
444 int disk_spindown
; /* time until disk spindown, in seconds (0=off) */
445 int buffer_margin
; /* MP3 buffer watermark margin, in seconds */
447 int peak_meter_release
; /* units per read out */
448 int peak_meter_hold
; /* hold time for peak meter in 1/100 s */
449 int peak_meter_clip_hold
; /* hold time for clips */
450 bool peak_meter_dbfs
; /* show linear or dbfs values */
451 int peak_meter_min
; /* range minimum */
452 int peak_meter_max
; /* range maximum */
453 bool car_adapter_mode
; /* 0=off 1=on */
455 /* show status bar */
456 bool statusbar
; /* 0=hide, 1=show */
458 /* show button bar */
459 bool buttonbar
; /* 0=hide, 1=show */
461 /* show scroll bar */
462 bool scrollbar
; /* 0=hide, 1=show */
464 /* goto current song when exiting WPS */
465 bool browse_current
; /* 1=goto current song,
466 0=goto previous location */
469 int scroll_speed
; /* long texts scrolling speed: 1-30 */
470 int bidir_limit
; /* bidir scroll length limit */
471 int scroll_delay
; /* delay (in 1/10s) before starting scroll */
472 int scroll_step
; /* pixels to advance per update */
473 #ifdef HAVE_REMOTE_LCD
474 int remote_scroll_speed
; /* long texts scrolling speed: 1-30 */
475 int remote_scroll_delay
; /* delay (in 1/10s) before starting scroll */
476 int remote_scroll_step
; /* pixels to advance per update */
477 int remote_bidir_limit
; /* bidir scroll length limit */
480 #ifdef HAVE_LCD_BITMAP
481 bool offset_out_of_view
;
482 int screen_scroll_step
;
485 /* auto bookmark settings */
486 int autoloadbookmark
; /* auto load option: 0=off, 1=ask, 2=on */
487 int autocreatebookmark
; /* auto create option: 0=off, 1=ask, 2=on */
488 int usemrb
; /* use MRB list: 0=No, 1=Yes*/
489 #ifdef HAVE_LCD_CHARCELLS
490 int jump_scroll
; /* Fast jump when scrolling */
491 int jump_scroll_delay
; /* Delay between jump scroll screens */
493 bool fade_on_stop
; /* fade on pause/unpause/stop */
494 bool caption_backlight
; /* turn on backlight at end and start of track */
497 int fm_freq_step
; /* Frequency step for manual tuning, in kHz */
498 bool fm_force_mono
; /* Forces Mono mode if true */
499 bool fm_full_range
; /* Enables full 10MHz-160MHz range if true, else
503 int max_files_in_dir
; /* Max entries in directory (file browser) */
504 int max_files_in_playlist
; /* Max entries in playlist */
505 bool show_icons
; /* 0=hide 1=show */
506 int recursive_dir_insert
; /* should directories be inserted recursively */
508 bool line_in
; /* false=off, true=active */
510 bool id3_v1_first
; /* true = ID3V1 has prio over ID3V2 tag */
512 /* playlist viewer settings */
513 bool playlist_viewer_icons
; /* display icons on viewer */
514 bool playlist_viewer_indices
; /* display playlist indices on viewer */
515 int playlist_viewer_track_display
; /* how to display tracks in viewer */
517 /* voice UI settings */
518 bool talk_menu
; /* enable voice UI */
519 int talk_dir
; /* talkbox mode: 0=off 1=number 2=clip@enter 3=clip@hover */
520 int talk_file
; /* voice filename mode: 0=off, 1=number, other t.b.d. */
522 /* file browser sorting */
523 int sort_file
; /* 0=alpha, 1=date, 2=date (new first), 3=type */
524 int sort_dir
; /* 0=alpha, 1=date (old first), 2=date (new first) */
526 #ifdef HAVE_REMOTE_LCD
528 int remote_contrast
; /* lcd contrast: 0-63 0=low 63=high */
529 bool remote_invert
; /* invert display */
530 bool remote_flip_display
; /* turn display (and button layout) by 180 degrees */
531 int remote_backlight_timeout
; /* backlight off timeout: 0-18 0=never,
533 then according to timeout_values[] */
534 int remote_backlight_timeout_plugged
;
535 bool remote_caption_backlight
; /* turn on backlight at end and start of track */
536 #ifdef HAS_REMOTE_BUTTON_HOLD
537 int remote_backlight_on_button_hold
; /* what to do with remote backlight when hold
540 #ifdef HAVE_REMOTE_LCD_TICKING
541 bool remote_reduce_ticking
; /* 0=normal operation,
542 1=EMI reduce on with cost more CPU. */
544 #endif /* HAVE_REMOTE_LCD */
546 int next_folder
; /* move to next folder */
547 bool runtimedb
; /* runtime database active? */
549 #if CONFIG_CODEC == SWCODEC
550 bool replaygain
; /* enable replaygain */
551 bool replaygain_noclip
; /* scale to prevent clips */
552 int replaygain_type
; /* 0=track gain, 1=album gain, 2=track gain if
553 shuffle is on, album gain otherwise */
554 int replaygain_preamp
; /* scale replaygained tracks by this */
555 int beep
; /* system beep volume when changing tracks etc. */
557 /* Crossfeed settings */
558 bool crossfeed
; /* enable crossfeed */
559 unsigned int crossfeed_direct_gain
; /* - dB x 10 */
560 unsigned int crossfeed_cross_gain
; /* - dB x 10 */
561 unsigned int crossfeed_hf_attenuation
; /* - dB x 10 */
562 unsigned int crossfeed_hf_cutoff
; /* Frequency in Hz */
565 bool dircache
; /* enable directory cache */
568 #ifdef HAVE_TC_RAMCACHE
569 bool tagcache_ram
; /* load tagcache to ram? */
571 bool tagcache_autoupdate
; /* automatically keep tagcache in sync? */
573 int default_codepage
; /* set default codepage for tag conversion */
574 #ifdef HAVE_REMOTE_LCD
575 unsigned char rwps_file
[MAX_FILENAME
+1]; /* last remote-wps */
577 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
578 int brightness
; /* iriver h300: backlight PWM value: 2..15
579 (0 and 1 are black) */
582 #if CONFIG_CODEC == SWCODEC
583 bool eq_enabled
; /* Enable equalizer */
584 unsigned int eq_precut
; /* dB */
586 /* Order is important here, must be cutoff, q, then gain for each band.
587 See dsp_eq_update_data in dsp.c for why. */
589 /* Band 0 settings */
590 int eq_band0_cutoff
; /* Hz */
592 int eq_band0_gain
; /* +/- dB */
594 /* Band 1 settings */
595 int eq_band1_cutoff
; /* Hz */
597 int eq_band1_gain
; /* +/- dB */
599 /* Band 2 settings */
600 int eq_band2_cutoff
; /* Hz */
602 int eq_band2_gain
; /* +/- dB */
604 /* Band 3 settings */
605 int eq_band3_cutoff
; /* Hz */
607 int eq_band3_gain
; /* +/- dB */
609 /* Band 4 settings */
610 int eq_band4_cutoff
; /* Hz */
612 int eq_band4_gain
; /* +/- dB */
614 bool dithering_enabled
;
618 unsigned char backdrop_file
[MAX_FILENAME
+1]; /* backdrop bitmap file */
621 bool warnon_erase_dynplaylist
; /* warn when erasing dynamic playlist */
622 bool scroll_paginated
; /* 0=dont 1=do */
623 #ifdef HAVE_LCD_COLOR
624 int bg_color
; /* background color native format */
625 int fg_color
; /* foreground color native format */
627 bool party_mode
; /* party mode - unstoppable music */
630 bool bl_filter_first_keypress
; /* filter first keypress when dark? */
631 #ifdef HAVE_REMOTE_LCD
632 bool remote_bl_filter_first_keypress
; /* filter first remote keypress when remote dark? */
634 #ifdef HAS_BUTTON_HOLD
635 int backlight_on_button_hold
; /* what to do with backlight when hold
638 #ifdef HAVE_LCD_SLEEP
639 int lcd_sleep_after_backlight_off
; /* when to put lcd to sleep after backlight
642 #endif /* CONFIG_BACKLIGHT */
644 #ifdef HAVE_LCD_BITMAP
645 unsigned char kbd_file
[MAX_FILENAME
+1]; /* last keyboard */
648 #ifdef HAVE_USB_POWER
655 bool eq_hw_enabled
; /* Enable hardware equalizer */
657 int eq_hw_band0_cutoff
;
658 int eq_hw_band0_gain
;
660 int eq_hw_band1_center
;
661 int eq_hw_band1_bandwidth
;
662 int eq_hw_band1_gain
;
664 int eq_hw_band2_center
;
665 int eq_hw_band2_bandwidth
;
666 int eq_hw_band2_gain
;
668 int eq_hw_band3_center
;
669 int eq_hw_band3_bandwidth
;
670 int eq_hw_band3_gain
;
672 int eq_hw_band4_cutoff
;
673 int eq_hw_band4_gain
;
675 bool hold_lr_for_scroll_in_list
; /* hold L/R scrolls the list left/right */
676 int show_path_in_browser
; /* 0=off, 1=current directory, 2=full path */
678 #ifdef HAVE_HEADPHONE_DETECTION
679 int unplug_mode
; /* pause on headphone unplug */
680 int unplug_rw
; /* time in s to rewind when pausing */
681 bool unplug_autoresume
; /* disable auto-resume if no phones */
686 bool audioscrobbler
; /* Audioscrobbler logging */
688 /* If values are just added to the end, no need to bump plugin API
690 /* new stuff to be added at the end */
692 #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
693 /* Encoder Settings Start - keep these together */
694 struct mp3_enc_config mp3_enc_config
;
695 #if 0 /* These currently contain no members but their places in line
697 struct aiff_enc_config aiff_enc_config
;
698 struct wav_enc_config wav_enc_config
;
699 struct wavpack_enc_config wavpack_enc_config
;
701 /* Encoder Settings End */
702 #endif /* CONFIG_CODEC == SWCODEC */
705 #if defined(HAVE_RTC_ALARM) && \
706 (defined(HAVE_RECORDING) || CONFIG_TUNER)
707 int alarm_wake_up_screen
;
712 /** global variables **/
713 extern long lasttime
;
714 /* Recording base directory */
715 extern const char rec_base_directory
[];
716 /* global settings */
717 extern struct user_settings global_settings
;
719 extern struct system_status global_status
;
721 #endif /* __SETTINGS_H__ */