1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Stuart Martin
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __SETTINGS_H__
23 #define __SETTINGS_H__
30 #include "timefuncs.h"
36 #if CONFIG_CODEC == SWCODEC
40 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
41 #include "backlight.h" /* for [MIN|MAX]_BRIGHTNESS_SETTING */
45 unsigned const char* string
;
49 /** Setting values defines **/
51 /* name of directory where configuration, fonts and other data
55 #undef ROCKBOX_DIR_LEN
57 #define ROCKBOX_DIR "."
58 #define ROCKBOX_DIR_LEN 1
61 /* ROCKBOX_DIR is now defined in autoconf.h for flexible build types */
63 #error ROCKBOX_DIR not defined (should be in autoconf.h)
65 #define ROCKBOX_DIR_LEN sizeof(ROCKBOX_DIR)
69 #define FONT_DIR ROCKBOX_DIR "/fonts"
70 #define LANG_DIR ROCKBOX_DIR "/langs"
71 #define WPS_DIR ROCKBOX_DIR "/wps"
72 #define THEME_DIR ROCKBOX_DIR "/themes"
73 #define ICON_DIR ROCKBOX_DIR "/icons"
75 #define PLUGIN_DIR ROCKBOX_DIR "/rocks"
76 #define PLUGIN_GAMES_DIR PLUGIN_DIR "/games"
77 #define PLUGIN_APPS_DIR PLUGIN_DIR "/apps"
78 #define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos"
79 #define VIEWERS_DIR PLUGIN_DIR "/viewers"
81 #define BACKDROP_DIR ROCKBOX_DIR "/backdrops"
82 #define REC_BASE_DIR "/"
83 #define EQS_DIR ROCKBOX_DIR "/eqs"
84 #define CODECS_DIR ROCKBOX_DIR "/codecs"
85 #define RECPRESETS_DIR ROCKBOX_DIR "/recpresets"
86 #define FMPRESET_PATH ROCKBOX_DIR "/fmpresets"
87 #define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists"
89 #define VIEWERS_CONFIG ROCKBOX_DIR "/viewers.config"
90 #define CONFIGFILE ROCKBOX_DIR "/config.cfg"
91 #define FIXEDSETTINGSFILE ROCKBOX_DIR "/fixed.cfg"
93 #define MAX_FILENAME 32
97 #define BOOKMARK_YES 1
98 #define BOOKMARK_ASK 2
99 #define BOOKMARK_UNIQUE_ONLY 2
100 #define BOOKMARK_RECENT_ONLY_YES 3
101 #define BOOKMARK_RECENT_ONLY_ASK 4
117 #define CROSSFADE_ENABLE_SHUFFLE 1
118 #define CROSSFADE_ENABLE_TRACKSKIP 2
119 #define CROSSFADE_ENABLE_SHUFFLE_AND_TRACKSKIP 3
120 #define CROSSFADE_ENABLE_ALWAYS 4
122 #define FOLDER_ADVANCE_OFF 0
123 #define FOLDER_ADVANCE_NEXT 1
124 #define FOLDER_ADVANCE_RANDOM 2
126 /* repeat mode options */
133 #ifdef AB_REPEAT_ENABLE
139 /* dir filter options */
140 /* Note: Any new filter modes need to be added before NUM_FILTER_MODES.
141 * Any new rockbox browse filter modes (accessible through the menu)
142 * must be added after NUM_FILTER_MODES. */
143 enum { SHOW_ALL
, SHOW_SUPPORTED
, SHOW_MUSIC
, SHOW_PLAYLIST
, SHOW_ID3DB
,
145 SHOW_WPS
, SHOW_RWPS
, SHOW_FMR
, SHOW_CFG
, SHOW_LNG
, SHOW_MOD
, SHOW_FONT
, SHOW_PLUGINS
};
147 /* file and dir sort options */
148 enum { SORT_ALPHA
, SORT_DATE
, SORT_DATE_REVERSED
, SORT_TYPE
, /* available as settings */
149 SORT_ALPHA_REVERSED
, SORT_TYPE_REVERSED
}; /* internal use only */
151 /* recursive dir insert options */
152 enum { RECURSE_OFF
, RECURSE_ON
, RECURSE_ASK
};
154 /* replaygain types */
155 enum { REPLAYGAIN_TRACK
= 0, REPLAYGAIN_ALBUM
, REPLAYGAIN_SHUFFLE
};
157 /* show path types */
158 enum { SHOW_PATH_OFF
= 0, SHOW_PATH_CURRENT
, SHOW_PATH_FULL
};
161 #ifdef HAVE_RTC_ALARM
162 enum { ALARM_START_WPS
= 0,
166 #ifdef HAVE_RECORDING
171 #if CONFIG_TUNER && defined(HAVE_RECORDING)
172 #define ALARM_SETTING_TEXT "wps,fm,rec"
174 #define ALARM_SETTING_TEXT "wps,fm"
175 #elif defined(HAVE_RECORDING)
176 #define ALARM_SETTING_TEXT "wps,rec"
179 #endif /* HAVE_RTC_ALARM */
180 /** virtual pointer stuff.. move to another .h maybe? **/
181 /* These define "virtual pointers", which could either be a literal string,
182 or a mean a string ID if the pointer is in a certain range.
183 This helps to save space for menus and options. */
185 #define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */
187 /* a space which is defined in stubs.c */
188 extern unsigned char vp_dummy
[VIRT_SIZE
];
189 #define VIRT_PTR vp_dummy
190 #elif CONFIG_CPU==DM320
191 /* the DM320 has IRAM at 0, so we use 0xffff bytes right after that */
192 #define VIRT_PTR ((unsigned char*)0x4000)
194 /* a location where we won't store strings, 0 is the fastest */
195 #define VIRT_PTR ((unsigned char*)0)
198 /* form a "virtual pointer" out of a language ID */
199 #define ID2P(id) (VIRT_PTR + id)
201 /* resolve a pointer which could be a virtualized ID or a literal */
202 #define P2STR(p) (char *)((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p)
204 /* get the string ID from a virtual pointer, -1 if not virtual */
205 #define P2ID(p) ((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1)
207 /* !defined(HAVE_LCD_COLOR) implies HAVE_LCD_CONTRAST with default 40.
208 Explicitly define HAVE_LCD_CONTRAST in config file for newer ports for
213 /** function prototypes **/
215 /* argument bits for settings_load() */
216 #define SETTINGS_RTC 1 /* only the settings from the RTC nonvolatile RAM */
217 #define SETTINGS_HD 2 /* only the settings from the disk sector */
218 #define SETTINGS_ALL 3 /* both */
219 void settings_load(int which
);
220 bool settings_load_config(const char* file
, bool apply
);
222 void status_save(void);
223 int settings_save(void);
224 /* defines for the options paramater */
226 SETTINGS_SAVE_CHANGED
= 0,
230 #ifdef HAVE_RECORDING
231 SETTINGS_SAVE_RECPRESETS
,
233 #if CONFIG_CODEC == SWCODEC
234 SETTINGS_SAVE_EQPRESET
,
237 bool settings_save_config(int options
);
239 struct settings_list
;
240 void reset_setting(const struct settings_list
*setting
, void *var
);
241 void settings_reset(void);
242 void sound_settings_apply(void);
243 void settings_apply(bool read_disk
);
244 void settings_apply_pm_range(void);
245 void settings_display(void);
247 enum optiontype
{ INT
, BOOL
};
249 const struct settings_list
* find_setting(const void* variable
, int *id
);
250 bool cfg_int_to_string(int setting_id
, int val
, char* buf
, int buf_len
);
251 bool set_bool_options(const char* string
, const bool* variable
,
252 const char* yes_str
, int yes_voice
,
253 const char* no_str
, int no_voice
,
254 void (*function
)(bool));
256 bool set_bool(const char* string
, const bool* variable
);
257 bool set_int(const unsigned char* string
, const char* unit
, int voice_unit
,
259 void (*function
)(int), int step
, int min
, int max
,
260 void (*formatter
)(char*, size_t, int, const char*) );
262 /* use this one if you need to create a lang from the value (i.e with TALK_ID()) */
263 bool set_int_ex(const unsigned char* string
, const char* unit
, int voice_unit
,
265 void (*function
)(int), int step
, int min
, int max
,
266 void (*formatter
)(char*, size_t, int, const char*),
267 int32_t (*get_talk_id
)(int, int));
269 void set_file(const char* filename
, char* setting
, int maxlen
);
271 bool set_option(const char* string
, const void* variable
, enum optiontype type
,
272 const struct opt_items
* options
, int numoptions
, void (*function
)(int));
276 /** global_settings and global_status struct definitions **/
280 int resume_index
; /* index in playlist (-1 for no active resume) */
281 uint32_t resume_offset
; /* byte offset in mp3 file */
282 int runtime
; /* current runtime since last charge */
283 int topruntime
; /* top known runtime */
285 int dircache_size
; /* directory cache structure last size, 22 bits */
288 int last_frequency
; /* Last frequency for resuming, in FREQ_STEP units,
289 relative to MIN_FREQ */
290 int statusbar_forced
; /* fix the bug where the statusbar would stay shown
291 if powered off inside the fm screen...
292 for some reason the screen doesnt use global_settings.statusbar
293 obviously a better fix is to fix the screen... so remove this
296 signed char last_screen
;
297 int viewer_icon_count
;
304 int volume
; /* audio output volume in decibels range depends on the dac */
305 int balance
; /* stereo balance: 0-100 0=left 50=bal 100=right */
306 int bass
; /* bass boost/cut in decibels */
307 int treble
; /* treble boost/cut in decibels */
308 int channel_config
; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */
309 int stereo_width
; /* 0-255% */
311 #if CONFIG_CODEC != SWCODEC
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 mdb_strength
; /* 0-127dB */
315 int mdb_harmonics
; /* 0-100% */
316 int mdb_center
; /* 20-300Hz */
317 int mdb_shape
; /* 50-300Hz */
318 bool mdb_enable
; /* true/false */
319 bool superbass
; /* true/false */
327 #if CONFIG_CODEC == SWCODEC
328 int crossfade
; /* Enable crossfade (0=off,1=shuffle,2=trackskip,3=shuff&trackskip,4=always) */
329 int crossfade_fade_in_delay
; /* Fade in delay (0-15s) */
330 int crossfade_fade_out_delay
; /* Fade out delay (0-15s) */
331 int crossfade_fade_in_duration
; /* Fade in duration (0-15s) */
332 int crossfade_fade_out_duration
; /* Fade out duration (0-15s) */
333 int crossfade_fade_out_mixmode
; /* Fade out mode (0=crossfade,1=mix) */
335 #ifdef HAVE_RECORDING
336 #if CONFIG_CODEC == SWCODEC
337 int rec_format
; /* record format index */
339 int rec_quality
; /* 0-7 */
340 #endif /* CONFIG_CODEC == SWCODEC */
341 int rec_source
; /* 0=mic, 1=line, 2=S/PDIF, 2 or 3=FM Radio */
342 int rec_frequency
; /* 0 = 44.1kHz (depends on target)
348 int rec_channels
; /* 0=Stereo, 1=Mono */
349 #if CONFIG_CODEC == SWCODEC
350 int rec_mono_mode
; /* how to create mono: L, R, L+R */
352 int rec_mic_gain
; /* depends on target */
353 int rec_left_gain
; /* depends on target */
354 int rec_right_gain
; /* depands on target */
355 bool rec_editable
; /* true means that the bit reservoir is off */
357 /* note: timesplit setting is not saved */
358 int rec_timesplit
; /* 0 = off,
359 1 = 00:05, 2 = 00:10, 3 = 00:15, 4 = 00:30
360 5 = 01:00, 6 = 02:00, 7 = 04:00, 8 = 06:00
361 9 = 08:00, 10= 10:00, 11= 12:00, 12= 18:00,
363 int rec_sizesplit
; /* 0 = off,
364 1 = 5MB, 2 = 10MB, 3 = 15MB, 4 = 32MB
365 5 = 64MB, 6 = 75MB, 7 = 100MB, 8 = 128MB
366 9 = 256MB, 10= 512MB, 11= 650MB, 12= 700MB,
367 13= 1GB, 14 = 1.5GB 15 = 1.75MB*/
368 int rec_split_type
; /* split/stop */
369 int rec_split_method
; /* time/filesize */
371 int rec_prerecord_time
; /* In seconds, 0-30, 0 means OFF */
372 char rec_directory
[MAX_FILENAME
+1];
373 int cliplight
; /* 0 = off
375 2 = main and remote lcd
378 int rec_start_thres_db
;
379 int rec_start_thres_linear
;
380 int rec_start_duration
; /* index of trig_durations */
381 int rec_stop_thres_db
;
382 int rec_stop_thres_linear
;
383 int rec_stop_postrec
;
384 int rec_stop_gap
; /* index of trig_durations */
385 int rec_trigger_mode
; /* see TRIG_MODE_XXX constants */
386 int rec_trigger_type
; /* what to do when trigger released */
389 int rec_agc_preset_mic
; /* AGC mic preset modes:
396 int rec_agc_preset_line
; /* AGC line-in preset modes:
403 int rec_agc_maxgain_mic
; /* AGC maximum mic gain */
404 int rec_agc_maxgain_line
; /* AGC maximum line-in gain */
405 int rec_agc_cliptime
; /* 0.2, 0.4, 0.6, 0.8, 1s */
407 #endif /* HAVE_RECORDING */
408 /* device settings */
410 #ifdef HAVE_LCD_CONTRAST
411 int contrast
; /* lcd contrast */
413 bool invert
; /* invert display */
414 int cursor_style
; /* style of the selection cursor */
415 bool flip_display
; /* turn display (and button layout) by 180 degrees */
416 int poweroff
; /* power off timer */
417 int backlight_timeout
; /* backlight off timeout: 0-18 0=never,
419 then according to timeout_values[] */
421 int backlight_timeout_plugged
;
424 #if defined(HAVE_BACKLIGHT_PWM_FADING)
425 int backlight_fade_in
; /* backlight fade in timing: 0..3 */
426 int backlight_fade_out
; /* backlight fade in timing: 0..7 */
427 #elif defined(USE_BACKLIGHT_SW_FADING)
428 bool backlight_fade_in
;
429 bool backlight_fade_out
;
432 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
435 int battery_capacity
; /* in mAh */
436 #if BATTERY_TYPES_COUNT > 1
437 int battery_type
; /* for units which can take multiple types (Ondio). */
439 #ifdef HAVE_SPDIF_POWER
440 bool spdif_enable
; /* S/PDIF power on/off */
444 unsigned char fmr_file
[MAX_FILENAME
+1]; /* last fmr preset */
446 #ifdef HAVE_LCD_BITMAP
447 unsigned char font_file
[MAX_FILENAME
+1]; /* last font */
449 unsigned char wps_file
[MAX_FILENAME
+1]; /* last wps */
450 unsigned char lang_file
[MAX_FILENAME
+1]; /* last language */
454 int repeat_mode
; /* 0=off 1=repeat all 2=repeat one 3=shuffle 4=ab */
455 int dirfilter
; /* 0=display all, 1=only supported, 2=only music,
456 3=dirs+playlists, 4=ID3 database */
457 bool sort_case
; /* dir sort order: 0=case insensitive, 1=sensitive */
458 int show_filename_ext
; /* show filename extensions in file browser?
459 0 = no, 1 = yes, 2 = only unknown 0 */
460 int volume_type
; /* how volume is displayed: 0=graphic, 1=percent */
461 int battery_display
; /* how battery is displayed: 0=graphic, 1=percent */
462 int timeformat
; /* time format: 0=24 hour clock, 1=12 hour clock */
463 bool playlist_shuffle
;
464 bool play_selected
; /* Plays selected file even in shuffle mode */
465 int ff_rewind_min_step
; /* FF/Rewind minimum step size */
466 int ff_rewind_accel
; /* FF/Rewind acceleration (in seconds per doubling) */
468 #ifdef HAVE_DISK_STORAGE
469 int disk_spindown
; /* time until disk spindown, in seconds (0=off) */
470 int buffer_margin
; /* MP3 buffer watermark margin, in seconds */
473 int peak_meter_release
; /* units per read out */
474 int peak_meter_hold
; /* hold time for peak meter in 1/100 s */
475 int peak_meter_clip_hold
; /* hold time for clips */
476 bool peak_meter_dbfs
; /* show linear or dbfs values */
477 int peak_meter_min
; /* range minimum */
478 int peak_meter_max
; /* range maximum */
479 #ifdef HAVE_RECORDING
480 bool peak_meter_clipcounter
; /* clipping count indicator */
482 bool car_adapter_mode
; /* 0=off 1=on */
483 #ifdef HAVE_ACCESSORY_SUPPLY
484 bool accessory_supply
; /* 0=off 1=on, accessory power supply for iPod */
487 /* show status bar */
488 bool statusbar
; /* 0=hide, 1=show */
490 #if CONFIG_KEYPAD == RECORDER_PAD
491 /* show button bar */
492 bool buttonbar
; /* 0=hide, 1=show */
495 /* show scroll bar */
496 bool scrollbar
; /* 0=hide, 1=show */
498 /* goto current song when exiting WPS */
499 bool browse_current
; /* 1=goto current song,
500 0=goto previous location */
503 int scroll_speed
; /* long texts scrolling speed: 1-30 */
504 int bidir_limit
; /* bidir scroll length limit */
505 int scroll_delay
; /* delay (in 1/10s) before starting scroll */
506 int scroll_step
; /* pixels to advance per update */
507 #ifdef HAVE_REMOTE_LCD
508 int remote_scroll_speed
; /* long texts scrolling speed: 1-30 */
509 int remote_scroll_delay
; /* delay (in 1/10s) before starting scroll */
510 int remote_scroll_step
; /* pixels to advance per update */
511 int remote_bidir_limit
; /* bidir scroll length limit */
514 #ifdef HAVE_LCD_BITMAP
515 bool offset_out_of_view
;
516 int screen_scroll_step
;
519 /* auto bookmark settings */
520 int autoloadbookmark
; /* auto load option: 0=off, 1=ask, 2=on */
521 int autocreatebookmark
; /* auto create option: 0=off, 1=ask, 2=on */
522 int usemrb
; /* use MRB list: 0=No, 1=Yes*/
523 #ifdef HAVE_LCD_CHARCELLS
524 int jump_scroll
; /* Fast jump when scrolling */
525 int jump_scroll_delay
; /* Delay between jump scroll screens */
527 bool fade_on_stop
; /* fade on pause/unpause/stop */
528 bool caption_backlight
; /* turn on backlight at end and start of track */
531 int fm_freq_step
; /* Frequency step for manual tuning, in kHz */
532 bool fm_force_mono
; /* Forces Mono mode if true */
533 bool fm_full_range
; /* Enables full 10MHz-160MHz range if true, else
537 int max_files_in_dir
; /* Max entries in directory (file browser) */
538 int max_files_in_playlist
; /* Max entries in playlist */
539 bool show_icons
; /* 0=hide 1=show */
540 int recursive_dir_insert
; /* should directories be inserted recursively */
542 #if CONFIG_CODEC == MAS3507D
543 bool line_in
; /* false=off, true=active */
546 /* playlist viewer settings */
547 bool playlist_viewer_icons
; /* display icons on viewer */
548 bool playlist_viewer_indices
; /* display playlist indices on viewer */
549 int playlist_viewer_track_display
; /* how to display tracks in viewer */
551 /* voice UI settings */
552 bool talk_menu
; /* enable voice UI */
553 int talk_dir
; /* voiced directories mode: 0=off 1=number 2=spell */
554 bool talk_dir_clip
; /* use directory .talk clips */
555 int talk_file
; /* voice file mode: 0=off, 1=number, 2=spell */
556 bool talk_file_clip
; /* use file .talk clips */
557 bool talk_filetype
; /* say file type */
558 bool talk_battery_level
;
560 /* file browser sorting */
561 int sort_file
; /* 0=alpha, 1=date, 2=date (new first), 3=type */
562 int sort_dir
; /* 0=alpha, 1=date (old first), 2=date (new first) */
564 #ifdef HAVE_REMOTE_LCD
566 int remote_contrast
; /* lcd contrast: 0-63 0=low 63=high */
567 bool remote_invert
; /* invert display */
568 bool remote_flip_display
; /* turn display (and button layout) by 180 degrees */
569 int remote_backlight_timeout
; /* backlight off timeout: 0-18 0=never,
571 then according to timeout_values[] */
572 int remote_backlight_timeout_plugged
;
573 bool remote_caption_backlight
; /* turn on backlight at end and start of track */
574 #ifdef HAS_REMOTE_BUTTON_HOLD
575 int remote_backlight_on_button_hold
; /* what to do with remote backlight when hold
578 #ifdef HAVE_REMOTE_LCD_TICKING
579 bool remote_reduce_ticking
; /* 0=normal operation,
580 1=EMI reduce on with cost more CPU. */
582 #endif /* HAVE_REMOTE_LCD */
584 int next_folder
; /* move to next folder */
585 bool runtimedb
; /* runtime database active? */
587 #if CONFIG_CODEC == SWCODEC
588 bool replaygain
; /* enable replaygain */
589 bool replaygain_noclip
; /* scale to prevent clips */
590 int replaygain_type
; /* 0=track gain, 1=album gain, 2=track gain if
591 shuffle is on, album gain otherwise */
592 int replaygain_preamp
; /* scale replaygained tracks by this */
593 int beep
; /* system beep volume when changing tracks etc. */
595 /* Crossfeed settings */
596 bool crossfeed
; /* enable crossfeed */
597 unsigned int crossfeed_direct_gain
; /* dB x 10 */
598 unsigned int crossfeed_cross_gain
; /* dB x 10 */
599 unsigned int crossfeed_hf_attenuation
; /* dB x 10 */
600 unsigned int crossfeed_hf_cutoff
; /* Frequency in Hz */
603 bool dircache
; /* enable directory cache */
606 #ifdef HAVE_TC_RAMCACHE
607 bool tagcache_ram
; /* load tagcache to ram? */
609 bool tagcache_autoupdate
; /* automatically keep tagcache in sync? */
611 int default_codepage
; /* set default codepage for tag conversion */
612 #ifdef HAVE_REMOTE_LCD
613 unsigned char rwps_file
[MAX_FILENAME
+1]; /* last remote-wps */
616 #if CONFIG_CODEC == SWCODEC
617 bool eq_enabled
; /* Enable equalizer */
618 unsigned int eq_precut
; /* dB */
620 /* Order is important here, must be cutoff, q, then gain for each band.
621 See dsp_eq_update_data in dsp.c for why. */
623 /* Band 0 settings */
624 int eq_band0_cutoff
; /* Hz */
626 int eq_band0_gain
; /* +/- dB */
628 /* Band 1 settings */
629 int eq_band1_cutoff
; /* Hz */
631 int eq_band1_gain
; /* +/- dB */
633 /* Band 2 settings */
634 int eq_band2_cutoff
; /* Hz */
636 int eq_band2_gain
; /* +/- dB */
638 /* Band 3 settings */
639 int eq_band3_cutoff
; /* Hz */
641 int eq_band3_gain
; /* +/- dB */
643 /* Band 4 settings */
644 int eq_band4_cutoff
; /* Hz */
646 int eq_band4_gain
; /* +/- dB */
648 bool dithering_enabled
;
653 unsigned char backdrop_file
[MAX_FILENAME
+1]; /* backdrop bitmap file */
656 bool warnon_erase_dynplaylist
; /* warn when erasing dynamic playlist */
657 bool scroll_paginated
; /* 0=dont 1=do */
658 #ifdef HAVE_LCD_COLOR
659 int bg_color
; /* background color native format */
660 int fg_color
; /* foreground color native format */
661 int lss_color
; /* background color for the selector or start color for the gradient */
662 int lse_color
; /* end color for the selector gradient */
663 int lst_color
; /* color of the text for the selector */
665 bool party_mode
; /* party mode - unstoppable music */
667 #ifdef HAVE_BACKLIGHT
668 bool bl_filter_first_keypress
; /* filter first keypress when dark? */
669 #ifdef HAVE_REMOTE_LCD
670 bool remote_bl_filter_first_keypress
; /* filter first remote keypress when remote dark? */
672 #ifdef HAS_BUTTON_HOLD
673 int backlight_on_button_hold
; /* what to do with backlight when hold
676 #ifdef HAVE_LCD_SLEEP_SETTING
677 int lcd_sleep_after_backlight_off
; /* when to put lcd to sleep after backlight
680 #endif /* HAVE_BACKLIGHT */
682 #ifdef HAVE_LCD_BITMAP
683 unsigned char kbd_file
[MAX_FILENAME
+1]; /* last keyboard */
686 #ifdef HAVE_USB_POWER
692 bool hold_lr_for_scroll_in_list
; /* hold L/R scrolls the list left/right */
693 #ifdef HAVE_LCD_BITMAP
694 int show_path_in_browser
; /* 0=off, 1=current directory, 2=full path */
697 #ifdef HAVE_HEADPHONE_DETECTION
698 int unplug_mode
; /* pause on headphone unplug */
699 int unplug_rw
; /* time in s to rewind when pausing */
700 bool unplug_autoresume
; /* disable auto-resume if no phones */
705 bool audioscrobbler
; /* Audioscrobbler logging */
707 /* If values are just added to the end, no need to bump plugin API
709 /* new stuff to be added at the end */
711 #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
712 /* Encoder Settings Start - keep these together */
713 struct mp3_enc_config mp3_enc_config
;
714 #if 0 /* These currently contain no members but their places in line
716 struct aiff_enc_config aiff_enc_config
;
717 struct wav_enc_config wav_enc_config
;
718 struct wavpack_enc_config wavpack_enc_config
;
720 /* Encoder Settings End */
721 #endif /* CONFIG_CODEC == SWCODEC */
724 #if defined(HAVE_RTC_ALARM) && \
725 (defined(HAVE_RECORDING) || CONFIG_TUNER)
726 int alarm_wake_up_screen
;
728 /* customizable icons */
729 #ifdef HAVE_LCD_BITMAP
730 unsigned char icon_file
[MAX_FILENAME
+1];
731 unsigned char viewers_icon_file
[MAX_FILENAME
+1];
733 #ifdef HAVE_REMOTE_LCD
734 unsigned char remote_icon_file
[MAX_FILENAME
+1];
735 unsigned char remote_viewers_icon_file
[MAX_FILENAME
+1];
737 #ifdef HAVE_LCD_COLOR
738 unsigned char colors_file
[MAX_FILENAME
+1];
740 #ifdef HAVE_BUTTON_LIGHT
741 int buttonlight_timeout
;
743 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
744 int buttonlight_brightness
;
746 #ifndef HAVE_SCROLLWHEEL
747 int list_accel_start_delay
; /* ms before we start increaseing step size */
748 int list_accel_wait
; /* ms between increases */
751 int usb_stack_mode
; /* device or host */
752 unsigned char usb_stack_device_driver
[32]; /* usb device driver to load */
754 #if CONFIG_CODEC == SWCODEC
755 int keyclick
; /* keyclick volume */
756 int keyclick_repeats
; /* keyclick on repeats */
758 unsigned char playlist_catalog_dir
[MAX_FILENAME
+1];
759 int skip_length
; /* skip length */
760 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
761 int touchpad_sensitivity
;
763 #ifdef HAVE_QUICKSCREEN
764 /* these are split because settings_list cant handle arrays */
771 /** global variables **/
772 extern long lasttime
;
773 /* global settings */
774 extern struct user_settings global_settings
;
776 extern struct system_status global_status
;
778 #endif /* __SETTINGS_H__ */