1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 Jonathan Gordon
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 ****************************************************************************/
29 #include "backlight.h"
31 #include "settings_list.h"
38 #include "powermgmt.h"
40 #include "lcd-remote.h"
42 #include "rbunicode.h"
43 #ifdef HAVE_LCD_BITMAP
44 #include "peakmeter.h"
46 #include "menus/eq_menu.h"
51 #define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT)
52 /** NOTE: NVRAM_CONFIG_VERSION is in settings_list.h
53 and you may need to update it if you edit this file */
55 #define UNUSED {.RESERVED=NULL}
56 #define INT(a) {.int_ = a}
57 #define UINT(a) {.uint_ = a}
58 #define BOOL(a) {.bool_ = a}
59 #define CHARPTR(a) {.charptr = a}
60 #define UCHARPTR(a) {.ucharptr = a}
61 #define FUNCTYPE(a) {.func = a}
62 #define NODEFAULT INT(0)
64 /* in all the following macros the args are:
65 - flags: bitwise | or the F_ bits in settings_list.h
66 - var: pointer to the variable being changed (usually in global_settings)
67 - lang_ig: LANG_* id to display in menus and setting screens for the settings
68 - default: the default value for the variable, set if settings are reset
69 - name: the name of the setting in config files
70 - cfg_vals: comma seperated list of legal values in cfg files.
71 NULL if a number is written to the file instead.
72 - cb: the callback used by the setting screen.
75 /* Use for int settings which use the set_sound() function to set them */
76 #define SOUND_SETTING(flags,var,lang_id,name,setting) \
77 {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \
78 lang_id, NODEFAULT,name,NULL, \
79 {.sound_setting=(struct sound_setting[]){{setting}}} }
81 /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO,
82 or dont save as "off" or "on" in the cfg */
83 #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes,no,cb) \
84 {flags|F_BOOL_SETTING, &global_settings.var, \
85 lang_id, BOOL(default),name,cfgvals, \
86 {.bool_setting=(struct bool_setting[]){{cb,yes,no}}} }
88 /* bool setting which does use LANG_YES and _NO and save as "off,on" */
89 #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
90 {flags|F_BOOL_SETTING, &global_settings.var, \
91 lang_id, BOOL(default),name,off_on, \
92 {.bool_setting=(struct bool_setting[]) \
93 {{cb,LANG_SET_BOOL_YES,LANG_SET_BOOL_NO}}} }
95 /* int variable which is NOT saved to .cfg files,
96 (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */
97 #define SYSTEM_SETTING(flags,var,default) \
98 {flags|F_T_INT, &global_status.var,-1, INT(default), \
101 /* setting which stores as a filename in the .cfgvals
102 prefix: The absolute path to not save in the variable, e.g /.rockbox/wps_file
103 suffx: The file extention (usually...) e.g .wps_file */
104 #define FILENAME_SETTING(flags,var,name,default,prefix,suffix,len) \
105 {flags|F_T_UCHARPTR, &global_settings.var,-1, \
106 CHARPTR(default),name,NULL, \
107 {.filename_setting= \
108 (struct filename_setting[]){{prefix,suffix,len}}} }
110 /* Used for settings which use the set_option() setting screen.
111 the ... arg is a list of pointers to strings to display in the setting screen.
112 These can either be literal strings, or ID2P(LANG_*) */
113 #define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \
114 {flags|F_CHOICE_SETTING|F_T_INT, &global_settings.var, lang_id, \
115 INT(default), name, cfg_vals, \
116 {.choice_setting = (struct choice_setting[]){ \
117 {cb, count, {.desc = (const unsigned char*[]){__VA_ARGS__}}}}}}
119 /* Similar to above, except the strings to display are taken from cfg_vals,
120 the ... arg is a list of ID's to talk for the strings... can use TALK_ID()'s */
121 #define STRINGCHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \
122 {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS, \
123 &global_settings.var, lang_id, \
124 INT(default), name, cfg_vals, \
125 {.choice_setting = (struct choice_setting[]){ \
126 {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}}
128 /* for settings which use the set_int() setting screen.
129 unit is the UNIT_ define to display/talk.
130 the first one saves a string to the config file,
131 the second one saves the variable value to the config file */
132 #define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \
133 unit, min, max, step, formatter, get_talk_id, cb) \
134 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
135 lang_id, INT(default), name, cfg_vals, \
136 {.int_setting = (struct int_setting[]){ \
137 {cb, unit, min, max, step, formatter, get_talk_id}}}}
138 #define INT_SETTING(flags, var, lang_id, default, name, \
139 unit, min, max, step, formatter, get_talk_id, cb) \
140 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
141 lang_id, INT(default), name, NULL, \
142 {.int_setting = (struct int_setting[]){ \
143 {cb, unit, min, max, step, formatter, get_talk_id}}}}
144 #define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \
145 unit, min, max, step, formatter, get_talk_id, cb) \
146 {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \
147 lang_id, INT(default), name, NULL, \
148 {.int_setting = (struct int_setting[]){ \
149 {cb, unit, min, max, step, formatter, get_talk_id}}}}
151 #define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
152 unit, formatter, get_talk_id, cb, count, ...) \
153 {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \
154 lang_id, INT(default), name, cfg_vals, \
155 {.table_setting = (struct table_setting[]) { \
156 {cb, formatter, get_talk_id, unit, count, \
157 (const int[]){__VA_ARGS__}}}}}
159 /* some sets of values which are used more than once, to save memory */
160 static const char off_on
[] = "off,on";
161 static const char off_on_ask
[] = "off,on,ask";
162 static const char off_number_spell
[] = "off,number,spell";
163 #ifdef HAVE_LCD_BITMAP
164 static const char graphic_numeric
[] = "graphic,numeric";
167 /* Default theme settings */
168 #define DEFAULT_WPSNAME "cabbiev2"
170 #ifdef HAVE_LCD_BITMAP
173 #define DEFAULT_FONTNAME "rockfont-8"
174 #elif LCD_HEIGHT <= 80
175 #define DEFAULT_FONTNAME "Sazanami-Mincho-Regular-11"
176 #elif LCD_HEIGHT <= 220
177 #define DEFAULT_FONTNAME "helvR10"
178 #elif LCD_HEIGHT <= 320
179 #define DEFAULT_FONTNAME "helvR12"
181 #define DEFAULT_FONTNAME "helvR10"
185 #define DEFAULT_FONTNAME ""
188 #ifdef HAVE_LCD_COLOR
189 #define DEFAULT_ICONSET "tango_small"
190 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
192 #define DEFAULT_ICONSET "tango_small_mono"
193 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
194 #else /* monochrome */
195 #define DEFAULT_ICONSET ""
196 #define DEFAULT_VIEWERS_ICONSET ""
199 #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
200 #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
201 #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
202 #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
203 #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
205 #define DEFAULT_BACKDROP "cabbiev2"
207 #ifdef HAVE_RECORDING
208 /* keep synchronous to trig_durations and
209 trigger_times in settings_apply_trigger */
210 static const char trig_durations_conf
[] =
211 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min";
212 /* these should be in the config.h files */
213 #if CONFIG_CODEC == MAS3587F
214 # define DEFAULT_REC_MIC_GAIN 8
215 # define DEFAULT_REC_LEFT_GAIN 2
216 # define DEFAULT_REC_RIGHT_GAIN 2
217 #elif CONFIG_CODEC == SWCODEC
219 # define DEFAULT_REC_MIC_GAIN 16
220 # define DEFAULT_REC_LEFT_GAIN 0
221 # define DEFAULT_REC_RIGHT_GAIN 0
222 # elif defined(HAVE_TLV320)
223 # define DEFAULT_REC_MIC_GAIN 0
224 # define DEFAULT_REC_LEFT_GAIN 0
225 # define DEFAULT_REC_RIGHT_GAIN 0
226 # elif defined(HAVE_WM8975)
227 # define DEFAULT_REC_MIC_GAIN 16
228 # define DEFAULT_REC_LEFT_GAIN 0
229 # define DEFAULT_REC_RIGHT_GAIN 0
230 # elif defined(HAVE_WM8758)
231 # define DEFAULT_REC_MIC_GAIN 16
232 # define DEFAULT_REC_LEFT_GAIN 0
233 # define DEFAULT_REC_RIGHT_GAIN 0
234 # elif defined(HAVE_WM8731)
235 # define DEFAULT_REC_MIC_GAIN 16
236 # define DEFAULT_REC_LEFT_GAIN 0
237 # define DEFAULT_REC_RIGHT_GAIN 0
241 #endif /* HAVE_RECORDING */
243 static void formatter_unit_0_is_off(char *buffer
, size_t buffer_size
,
244 int val
, const char *unit
)
247 strcpy(buffer
, str(LANG_OFF
));
249 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
252 static int32_t getlang_unit_0_is_off(int value
, int unit
)
257 return TALK_ID(value
,unit
);
260 #ifdef HAVE_BACKLIGHT
261 static void backlight_formatter(char *buffer
, size_t buffer_size
,
262 int val
, const char *unit
)
265 strcpy(buffer
, str(LANG_OFF
));
267 strcpy(buffer
, str(LANG_ON
));
269 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
271 static int32_t backlight_getlang(int value
, int unit
)
278 return TALK_ID(value
, unit
);
282 static void scanaccel_formatter(char *buffer
, size_t buffer_size
,
283 int val
, const char *unit
)
287 strcpy(buffer
, str(LANG_OFF
));
289 snprintf(buffer
, buffer_size
, "2x/%ds", val
);
292 #if CONFIG_CODEC == SWCODEC
293 static void crossfeed_cross_set(int val
)
296 dsp_set_crossfeed_cross_params(global_settings
.crossfeed_cross_gain
,
297 global_settings
.crossfeed_hf_attenuation
,
298 global_settings
.crossfeed_hf_cutoff
);
301 static void db_format(char* buffer
, size_t buffer_size
, int value
,
306 snprintf(buffer
, buffer_size
, "%s%d.%d %s", value
< 0 ? "-" : "",
307 v
/ 10, v
% 10, unit
);
310 static int32_t get_dec_talkid(int value
, int unit
)
312 return TALK_ID_DECIMAL(value
, 1, unit
);
315 static int32_t get_precut_talkid(int value
, int unit
)
317 return TALK_ID_DECIMAL(-value
, 1, unit
);
321 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
322 static void set_mdb_enable(bool value
)
324 sound_set_mdb_enable((int)value
);
326 static void set_superbass(bool value
)
328 sound_set_superbass((int)value
);
332 #ifdef HAVE_LCD_CHARCELLS
333 static void jumpscroll_format(char* buffer
, size_t buffer_size
, int value
,
340 strcpy(buffer
, str(LANG_OFF
));
343 strcpy(buffer
, str(LANG_ONE_TIME
));
348 snprintf(buffer
, buffer_size
, "%d", value
);
351 strcpy(buffer
, str(LANG_ALWAYS
));
355 static int32_t jumpscroll_getlang(int value
, int unit
)
362 return LANG_ONE_TIME
;
366 return TALK_ID(value
, unit
);
372 #endif /* HAVE_LCD_CHARCELLS */
375 const struct settings_list settings
[] = {
377 SOUND_SETTING(F_NO_WRAP
,volume
, LANG_VOLUME
, "volume", SOUND_VOLUME
),
378 SOUND_SETTING(0, balance
, LANG_BALANCE
, "balance", SOUND_BALANCE
),
379 SOUND_SETTING(F_NO_WRAP
,bass
, LANG_BASS
, "bass", SOUND_BASS
),
380 SOUND_SETTING(F_NO_WRAP
,treble
, LANG_TREBLE
, "treble", SOUND_TREBLE
),
382 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
383 SOUND_SETTING(0,loudness
, LANG_LOUDNESS
, "loudness", SOUND_LOUDNESS
),
384 STRINGCHOICE_SETTING(F_SOUNDSETTING
,avc
,LANG_AUTOVOL
,0,"auto volume",
385 "off,20ms,2,4,8,", sound_set_avc
, 5,
386 LANG_OFF
,TALK_ID(20, UNIT_MS
),TALK_ID(2, UNIT_SEC
),
387 TALK_ID(4, UNIT_SEC
),TALK_ID(8, UNIT_SEC
)),
388 OFFON_SETTING(F_SOUNDSETTING
, superbass
, LANG_SUPERBASS
, false, "superbass", set_superbass
),
391 CHOICE_SETTING(F_SOUNDSETTING
, channel_config
, LANG_CHANNEL_CONFIGURATION
,
393 "stereo,mono,custom,mono left,mono right,karaoke",
395 6, ID2P(LANG_CHANNEL_STEREO
), ID2P(LANG_CHANNEL_MONO
),
396 ID2P(LANG_CHANNEL_CUSTOM
), ID2P(LANG_CHANNEL_LEFT
),
397 ID2P(LANG_CHANNEL_RIGHT
), ID2P(LANG_CHANNEL_KARAOKE
)),
398 SOUND_SETTING(F_SOUNDSETTING
, stereo_width
, LANG_STEREO_WIDTH
,
399 "stereo_width", SOUND_STEREO_WIDTH
),
401 OFFON_SETTING(0, playlist_shuffle
, LANG_SHUFFLE
, false, "shuffle", NULL
),
402 SYSTEM_SETTING(NVRAM(4),resume_index
,-1),
403 SYSTEM_SETTING(NVRAM(4),resume_first_index
,0),
404 SYSTEM_SETTING(NVRAM(4),resume_offset
,-1),
405 SYSTEM_SETTING(NVRAM(4),resume_seed
,-1),
406 CHOICE_SETTING(0, repeat_mode
, LANG_REPEAT
, REPEAT_ALL
, "repeat",
407 "off,all,one,shuffle"
408 #ifdef AB_REPEAT_ENABLE
412 #ifdef AB_REPEAT_ENABLE
417 ID2P(LANG_OFF
), ID2P(LANG_ALL
), ID2P(LANG_REPEAT_ONE
), ID2P(LANG_SHUFFLE
)
418 #ifdef AB_REPEAT_ENABLE
419 ,ID2P(LANG_REPEAT_AB
)
421 ), /* CHOICE_SETTING( repeat_mode ) */
423 #ifdef HAVE_LCD_CONTRAST
424 /* its easier to leave this one un-macro()ed for the time being */
425 {F_T_INT
|F_DEF_ISFUNC
|F_INT_SETTING
, &global_settings
.contrast
,
426 LANG_CONTRAST
, FUNCTYPE(lcd_default_contrast
),
427 "contrast", NULL
, {.int_setting
= (struct int_setting
[]){
428 { lcd_set_contrast
, UNIT_INT
, MIN_CONTRAST_SETTING
,
429 MAX_CONTRAST_SETTING
, 1, NULL
, NULL
}}}},
431 #ifdef HAVE_BACKLIGHT
432 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout
, LANG_BACKLIGHT
, 5,
433 "backlight timeout", off_on
, UNIT_SEC
, backlight_formatter
,
434 backlight_getlang
, backlight_set_timeout
, 20,
435 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
437 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout_plugged
,
438 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
439 "backlight timeout plugged", off_on
, UNIT_SEC
,
440 backlight_formatter
, backlight_getlang
,
441 backlight_set_timeout_plugged
, 20,
442 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
444 #endif /* HAVE_BACKLIGHT */
445 #ifdef HAVE_LCD_BITMAP
446 #ifdef HAVE_LCD_INVERT
447 BOOL_SETTING(0, invert
, LANG_INVERT
, false ,"invert", off_on
,
448 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
, lcd_set_invert_display
),
451 OFFON_SETTING(0,flip_display
, LANG_FLIP_DISPLAY
, false,"flip display", NULL
),
454 CHOICE_SETTING(F_TEMPVAR
|F_THEMESETTING
, cursor_style
, LANG_INVERT_CURSOR
,
455 #ifdef HAVE_LCD_COLOR
456 3, "selector type", "pointer,bar (inverse),bar (color),bar (gradient)",
458 ID2P(LANG_INVERT_CURSOR_POINTER
), ID2P(LANG_INVERT_CURSOR_BAR
),
459 ID2P(LANG_INVERT_CURSOR_COLOR
), ID2P(LANG_INVERT_CURSOR_GRADIENT
)),
461 1, "selector type", "pointer,bar (inverse)", NULL
, 2,
462 ID2P(LANG_INVERT_CURSOR_POINTER
), ID2P(LANG_INVERT_CURSOR_BAR
)),
464 OFFON_SETTING(F_THEMESETTING
|F_TEMPVAR
, statusbar
,
465 LANG_STATUS_BAR
, true,"statusbar", NULL
),
466 OFFON_SETTING(0,scrollbar
, LANG_SCROLL_BAR
, true,"scrollbar", NULL
),
467 #if CONFIG_KEYPAD == RECORDER_PAD
468 OFFON_SETTING(0,buttonbar
, LANG_BUTTON_BAR
,true,"buttonbar", NULL
),
470 CHOICE_SETTING(0, volume_type
, LANG_VOLUME_DISPLAY
, 0,
471 "volume display", graphic_numeric
, NULL
, 2,
472 ID2P(LANG_DISPLAY_GRAPHIC
), ID2P(LANG_DISPLAY_NUMERIC
)),
473 CHOICE_SETTING(0, battery_display
, LANG_BATTERY_DISPLAY
, 0,
474 "battery display", graphic_numeric
, NULL
, 2,
475 ID2P(LANG_DISPLAY_GRAPHIC
), ID2P(LANG_DISPLAY_NUMERIC
)),
477 CHOICE_SETTING(0, timeformat
, LANG_TIMEFORMAT
, 0,
478 "time format", "24hour,12hour", NULL
, 2,
479 ID2P(LANG_24_HOUR_CLOCK
), ID2P(LANG_12_HOUR_CLOCK
)),
481 #endif /* HAVE_LCD_BITMAP */
482 OFFON_SETTING(0,show_icons
, LANG_SHOW_ICONS
,true,"show icons", NULL
),
484 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, poweroff
, LANG_POWEROFF_IDLE
, 10,
485 "idle poweroff", "off", UNIT_MIN
, formatter_unit_0_is_off
,
486 getlang_unit_0_is_off
, set_poweroff_timeout
, 15,
487 0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
488 SYSTEM_SETTING(NVRAM(4),runtime
,0),
489 SYSTEM_SETTING(NVRAM(4),topruntime
,0),
491 INT_SETTING(0,max_files_in_playlist
,LANG_MAX_FILES_IN_PLAYLIST
,
497 "max files in playlist", UNIT_INT
,1000,32000,1000,NULL
,NULL
,NULL
),
498 INT_SETTING(0,max_files_in_dir
,LANG_MAX_FILES_IN_DIR
,
504 "max files in dir", UNIT_INT
,50,10000,50,NULL
,NULL
,NULL
),
505 #if BATTERY_CAPACITY_INC > 0
506 INT_SETTING(0, battery_capacity
, LANG_BATTERY_CAPACITY
, BATTERY_CAPACITY_DEFAULT
,
507 "battery capacity", UNIT_MAH
,
508 BATTERY_CAPACITY_MIN
, BATTERY_CAPACITY_MAX
, BATTERY_CAPACITY_INC
,
512 OFFON_SETTING(NVRAM(1), car_adapter_mode
,
513 LANG_CAR_ADAPTER_MODE
, false, "car adapter mode", NULL
),
515 #ifdef HAVE_ACCESSORY_SUPPLY
516 OFFON_SETTING(0, accessory_supply
, LANG_ACCESSORY_SUPPLY
,
517 true, "accessory power supply", accessory_supply_set
),
521 OFFON_SETTING(0,fm_force_mono
, LANG_FM_MONO_MODE
,
522 false, "force fm mono", toggle_mono_mode
),
523 SYSTEM_SETTING(NVRAM(4),last_frequency
,0),
526 #if BATTERY_TYPES_COUNT > 1
527 CHOICE_SETTING(0, battery_type
, LANG_BATTERY_TYPE
, 0,
528 "battery type","alkaline,nimh", NULL
, 2,
529 ID2P(LANG_BATTERY_TYPE_ALKALINE
), ID2P(LANG_BATTERY_TYPE_NIMH
)),
531 #ifdef HAVE_REMOTE_LCD
533 INT_SETTING(0, remote_contrast
, LANG_CONTRAST
, DEFAULT_REMOTE_CONTRAST_SETTING
,
534 "remote contrast", UNIT_INT
, MIN_REMOTE_CONTRAST_SETTING
,
535 MAX_REMOTE_CONTRAST_SETTING
, 1, NULL
, NULL
, lcd_remote_set_contrast
),
536 BOOL_SETTING(0, remote_invert
, LANG_INVERT
, false ,"remote invert", off_on
,
537 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
, lcd_remote_set_invert_display
),
538 OFFON_SETTING(0,remote_flip_display
, LANG_FLIP_DISPLAY
,
539 false,"remote flip display", NULL
),
540 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout
,
541 LANG_BACKLIGHT
, 5, "remote backlight timeout", off_on
,
542 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
543 remote_backlight_set_timeout
, 20,
544 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
546 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout_plugged
,
547 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
548 "remote backlight timeout plugged", off_on
, UNIT_SEC
,
549 backlight_formatter
, backlight_getlang
,
550 remote_backlight_set_timeout_plugged
, 20,
551 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
553 #ifdef HAVE_REMOTE_LCD_TICKING
554 OFFON_SETTING(0,remote_reduce_ticking
, LANG_REDUCE_TICKING
,
555 false,"remote reduce ticking", NULL
),
559 #ifdef HAVE_BACKLIGHT
560 OFFON_SETTING(0,bl_filter_first_keypress
,
561 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
562 "backlight filters first keypress", NULL
),
563 #ifdef HAVE_REMOTE_LCD
564 OFFON_SETTING(0,remote_bl_filter_first_keypress
,
565 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
566 "backlight filters first remote keypress", NULL
),
568 #endif /* HAVE_BACKLIGHT */
570 /** End of old RTC config block **/
572 #ifdef HAVE_BACKLIGHT
573 OFFON_SETTING(0,caption_backlight
, LANG_CAPTION_BACKLIGHT
,
574 false,"caption backlight",NULL
),
575 #ifdef HAVE_REMOTE_LCD
576 OFFON_SETTING(0,remote_caption_backlight
, LANG_CAPTION_BACKLIGHT
,
577 false,"remote caption backlight",NULL
),
579 #endif /* HAVE_BACKLIGHT */
580 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
581 INT_SETTING(F_NO_WRAP
, brightness
, LANG_BRIGHTNESS
, DEFAULT_BRIGHTNESS_SETTING
,
582 "brightness",UNIT_INT
, MIN_BRIGHTNESS_SETTING
, MAX_BRIGHTNESS_SETTING
, 1,
583 NULL
, NULL
, backlight_set_brightness
),
585 #if defined(HAVE_BACKLIGHT_PWM_FADING) && !defined(SIMULATOR)
586 /* backlight fading */
587 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_in
,
588 LANG_BACKLIGHT_FADE_IN
, 300, "backlight fade in", "off",
589 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
590 backlight_set_fade_in
, 7, 0,100,200,300,500,1000,2000),
591 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_out
,
592 LANG_BACKLIGHT_FADE_OUT
, 2000, "backlight fade out", "off",
593 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
594 backlight_set_fade_out
, 10,
595 0,100,200,300,500,1000,2000,3000,5000,10000),
597 INT_SETTING(F_PADTITLE
, scroll_speed
, LANG_SCROLL_SPEED
, 9,"scroll speed",
598 UNIT_INT
, 0, 15, 1, NULL
, NULL
, lcd_scroll_speed
),
599 INT_SETTING(F_PADTITLE
, scroll_delay
, LANG_SCROLL_DELAY
, 1000, "scroll delay",
600 UNIT_MS
, 0, 2500, 100, NULL
,
601 NULL
, lcd_scroll_delay
) ,
602 INT_SETTING(0, bidir_limit
, LANG_BIDIR_SCROLL
, 50, "bidir limit",
603 UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
, lcd_bidir_scroll
),
604 #ifdef HAVE_REMOTE_LCD
605 INT_SETTING(0, remote_scroll_speed
, LANG_SCROLL_SPEED
, 9, "remote scroll speed",
606 UNIT_INT
, 0,15, 1, NULL
, NULL
, lcd_remote_scroll_speed
),
607 INT_SETTING(0, remote_scroll_step
, LANG_SCROLL_STEP
, 6, "remote scroll step",
608 UNIT_PIXEL
, 1, LCD_REMOTE_WIDTH
, 1, NULL
, NULL
, lcd_remote_scroll_step
),
609 INT_SETTING(0, remote_scroll_delay
, LANG_SCROLL_DELAY
, 1000, "remote scroll delay",
610 UNIT_MS
, 0, 2500, 100, NULL
, NULL
, lcd_remote_scroll_delay
),
611 INT_SETTING(0, remote_bidir_limit
, LANG_BIDIR_SCROLL
, 50, "remote bidir limit",
612 UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
, lcd_remote_bidir_scroll
),
614 #ifdef HAVE_LCD_BITMAP
615 OFFON_SETTING(0, offset_out_of_view
, LANG_SCREEN_SCROLL_VIEW
,
616 false, "Screen Scrolls Out Of View", gui_list_screen_scroll_out_of_view
),
617 INT_SETTING(F_PADTITLE
, scroll_step
, LANG_SCROLL_STEP
, 6, "scroll step",
618 UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
, lcd_scroll_step
),
619 INT_SETTING(F_PADTITLE
, screen_scroll_step
, LANG_SCREEN_SCROLL_STEP
,
620 16, "screen scroll step",
621 UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
, gui_list_screen_scroll_step
),
622 #endif /* HAVE_LCD_BITMAP */
623 #ifdef HAVE_LCD_CHARCELLS
624 INT_SETTING(0, jump_scroll
, LANG_JUMP_SCROLL
, 0, "jump scroll",
625 UNIT_INT
, 0, 5, 1, jumpscroll_format
, jumpscroll_getlang
, lcd_jump_scroll
),
626 INT_SETTING(0, jump_scroll_delay
, LANG_JUMP_SCROLL_DELAY
, 500, "jump scroll delay",
627 UNIT_MS
, 0, 2500, 100, NULL
, NULL
, lcd_jump_scroll_delay
),
629 OFFON_SETTING(0,scroll_paginated
,LANG_SCROLL_PAGINATED
,
630 false,"scroll paginated",NULL
),
631 #ifdef HAVE_LCD_COLOR
633 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.fg_color
,-1,INT(DEFAULT_THEME_FOREGROUND
),
634 "foreground color",NULL
,UNUSED
},
635 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.bg_color
,-1,INT(DEFAULT_THEME_BACKGROUND
),
636 "background color",NULL
,UNUSED
},
637 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lss_color
,-1,INT(DEFAULT_THEME_SELECTOR_START
),
638 "line selector start color",NULL
,UNUSED
},
639 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lse_color
,-1,INT(DEFAULT_THEME_SELECTOR_END
),
640 "line selector end color",NULL
,UNUSED
},
641 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lst_color
,-1,INT(DEFAULT_THEME_SELECTOR_TEXT
),
642 "line selector text color",NULL
,UNUSED
},
646 OFFON_SETTING(0,play_selected
,LANG_PLAY_SELECTED
,true,"play selected",NULL
),
647 OFFON_SETTING(0,party_mode
,LANG_PARTY_MODE
,false,"party mode",NULL
),
648 OFFON_SETTING(0,fade_on_stop
,LANG_FADE_ON_STOP
,true,"volume fade",NULL
),
649 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, ff_rewind_min_step
,
650 LANG_FFRW_STEP
, 1, "scan min step", NULL
, UNIT_SEC
,
651 NULL
, NULL
, NULL
, 14, 1,2,3,4,5,6,8,10,15,20,25,30,45,60),
652 INT_SETTING(0, ff_rewind_accel
, LANG_FFRW_ACCEL
, 3, "scan accel",
653 UNIT_SEC
, 16, 0, -1, scanaccel_formatter
, getlang_unit_0_is_off
, NULL
),
654 #if (CONFIG_CODEC == SWCODEC) && !defined(HAVE_FLASH_STORAGE)
655 STRINGCHOICE_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0,"antiskip",
656 "5s,15s,30s,1min,2min,3min,5min,10min",NULL
, 8,
657 TALK_ID(5, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
658 TALK_ID(30, UNIT_SEC
), TALK_ID(1, UNIT_MIN
), TALK_ID(2, UNIT_MIN
),
659 TALK_ID(3, UNIT_MIN
), TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
)),
660 #elif !defined(HAVE_FLASH_STORAGE)
661 INT_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0, "antiskip",
662 UNIT_SEC
, 0, 7, 1, NULL
, NULL
, audio_set_buffer_margin
),
665 #ifndef HAVE_FLASH_STORAGE
666 INT_SETTING(0, disk_spindown
, LANG_SPINDOWN
, 5, "disk spindown",
667 UNIT_SEC
, 3, 254, 1, NULL
, NULL
, ata_spindown
),
668 #endif /* HAVE_FLASH_STORAGE */
670 CHOICE_SETTING(0, dirfilter
, LANG_FILTER
, SHOW_SUPPORTED
, "show files",
671 "all,supported,music,playlists", NULL
, 4, ID2P(LANG_ALL
),
672 ID2P(LANG_FILTER_SUPPORTED
), ID2P(LANG_FILTER_MUSIC
), ID2P(LANG_PLAYLISTS
)),
673 OFFON_SETTING(0,sort_case
,LANG_SORT_CASE
,false,"sort case",NULL
),
674 CHOICE_SETTING(0, show_filename_ext
, LANG_SHOW_FILENAME_EXT
, 3,
675 "show filename exts", "off,on,unknown,view_all", NULL
, 4 ,
676 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_UNKNOWN_TYPES
),
677 ID2P(LANG_EXT_ONLY_VIEW_ALL
)),
678 OFFON_SETTING(0,browse_current
,LANG_FOLLOW
,false,"follow playlist",NULL
),
679 OFFON_SETTING(0,playlist_viewer_icons
,LANG_SHOW_ICONS
,true,
680 "playlist viewer icons",NULL
),
681 OFFON_SETTING(0,playlist_viewer_indices
,LANG_SHOW_INDICES
,true,
682 "playlist viewer indices",NULL
),
683 CHOICE_SETTING(0, playlist_viewer_track_display
, LANG_TRACK_DISPLAY
, 0,
684 "playlist viewer track display","track name,full path", NULL
, 2,
685 ID2P(LANG_DISPLAY_TRACK_NAME_ONLY
), ID2P(LANG_DISPLAY_FULL_PATH
)),
686 CHOICE_SETTING(0, recursive_dir_insert
, LANG_RECURSE_DIRECTORY
, RECURSE_ON
,
687 "recursive directory insert", off_on_ask
, NULL
, 3 ,
688 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_ASK
)),
690 CHOICE_SETTING(0, autocreatebookmark
, LANG_BOOKMARK_SETTINGS_AUTOCREATE
,
691 BOOKMARK_NO
, "autocreate bookmarks",
692 "off,on,ask,recent only - on,recent only - ask", NULL
, 5,
693 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
694 ID2P(LANG_ASK
), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
),
695 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
)),
696 CHOICE_SETTING(0, autoloadbookmark
, LANG_BOOKMARK_SETTINGS_AUTOLOAD
,
697 BOOKMARK_NO
, "autoload bookmarks", off_on_ask
, NULL
, 3,
698 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
), ID2P(LANG_ASK
)),
699 CHOICE_SETTING(0, usemrb
, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
,
700 BOOKMARK_NO
, "use most-recent-bookmarks", "off,on,unique only", NULL
, 3,
701 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
702 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
)),
703 #ifdef HAVE_LCD_BITMAP
705 STRINGCHOICE_SETTING(0, peak_meter_clip_hold
, LANG_PM_CLIP_HOLD
, 16,
706 "peak meter clip hold",
707 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
708 ",3min,5min,10min,20min,45min,90min", peak_meter_set_clip_hold
,
710 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
), TALK_ID(3, UNIT_SEC
),
711 TALK_ID(4, UNIT_SEC
), TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
712 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
), TALK_ID(9, UNIT_SEC
),
713 TALK_ID(10, UNIT_SEC
), TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
714 TALK_ID(25, UNIT_SEC
), TALK_ID(30, UNIT_SEC
), TALK_ID(45, UNIT_SEC
),
715 TALK_ID(60, UNIT_SEC
), TALK_ID(90, UNIT_SEC
), TALK_ID(2, UNIT_MIN
),
716 TALK_ID(3, UNIT_MIN
), TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
),
717 TALK_ID(20, UNIT_MIN
), TALK_ID(45, UNIT_MIN
), TALK_ID(90, UNIT_MIN
)),
718 STRINGCHOICE_SETTING(0, peak_meter_hold
, LANG_PM_PEAK_HOLD
, 3,
720 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
722 TALK_ID(200, UNIT_MS
), TALK_ID(300, UNIT_MS
), TALK_ID(500, UNIT_MS
),
723 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
), TALK_ID(3, UNIT_SEC
),
724 TALK_ID(4, UNIT_SEC
), TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
725 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
), TALK_ID(9, UNIT_SEC
),
726 TALK_ID(10, UNIT_SEC
), TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
727 TALK_ID(30, UNIT_SEC
), TALK_ID(60, UNIT_SEC
)),
728 INT_SETTING(0, peak_meter_release
, LANG_PM_RELEASE
, 8, "peak meter release",
729 UNIT_PM_TICK
, 1, 0x7e, 1, NULL
, NULL
,NULL
),
730 OFFON_SETTING(0,peak_meter_dbfs
,LANG_PM_DBFS
,true,"peak meter dbfs",NULL
),
731 {F_T_INT
,&global_settings
.peak_meter_min
,LANG_PM_MIN
,INT(60),"peak meter min",NULL
,UNUSED
},
732 {F_T_INT
,&global_settings
.peak_meter_max
,LANG_PM_MAX
,INT(0),"peak meter max",NULL
,UNUSED
},
733 #ifdef HAVE_RECORDING
734 OFFON_SETTING(0,peak_meter_clipcounter
,LANG_PM_CLIPCOUNTER
,false,
735 "peak meter clipcounter",NULL
),
736 #endif /* HAVE_RECORDING */
737 #endif /* HAVE_LCD_BITMAP */
738 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
739 SOUND_SETTING(F_SOUNDSETTING
, mdb_strength
, LANG_MDB_STRENGTH
,
740 "mdb strength", SOUND_MDB_STRENGTH
),
741 SOUND_SETTING(F_SOUNDSETTING
, mdb_harmonics
, LANG_MDB_HARMONICS
,
742 "mdb harmonics", SOUND_MDB_HARMONICS
),
743 SOUND_SETTING(F_SOUNDSETTING
, mdb_center
, LANG_MDB_CENTER
,
744 "mdb center", SOUND_MDB_CENTER
),
745 SOUND_SETTING(F_SOUNDSETTING
, mdb_shape
, LANG_MDB_SHAPE
,
746 "mdb shape", SOUND_MDB_SHAPE
),
747 OFFON_SETTING(F_SOUNDSETTING
, mdb_enable
, LANG_MDB_ENABLE
,
748 false, "mdb enable", set_mdb_enable
),
750 #if CONFIG_CODEC == MAS3507D
751 OFFON_SETTING(F_SOUNDSETTING
, line_in
,LANG_LINE_IN
,false,"line in",NULL
),
754 OFFON_SETTING(F_TEMPVAR
, talk_menu
, LANG_VOICE_MENU
, true, "talk menu", NULL
),
755 CHOICE_SETTING(0, talk_dir
, LANG_VOICE_DIR
, 0,
756 "talk dir", off_number_spell
, NULL
, 3,
757 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
758 ID2P(LANG_VOICE_SPELL
)),
759 OFFON_SETTING(F_TEMPVAR
, talk_dir_clip
, LANG_VOICE_DIR_TALK
, false, "talk dir clip", NULL
),
760 CHOICE_SETTING(0, talk_file
, LANG_VOICE_FILE
, 0,
761 "talk file", off_number_spell
, NULL
, 3,
762 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
763 ID2P(LANG_VOICE_SPELL
)),
764 OFFON_SETTING(F_TEMPVAR
, talk_file_clip
, LANG_VOICE_FILE_TALK
, false, "talk file clip", NULL
),
765 OFFON_SETTING(F_TEMPVAR
, talk_filetype
, LANG_VOICE_FILETYPE
,
766 false, "talk filetype", NULL
),
767 OFFON_SETTING(F_TEMPVAR
, talk_battery_level
,
768 LANG_TALK_BATTERY_LEVEL
, false,
769 "Announce Battery Level", NULL
),
772 CHOICE_SETTING(0, sort_file
, LANG_SORT_FILE
, 0 ,
773 "sort files", "alpha,oldest,newest,type", NULL
, 4,
774 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
775 ID2P(LANG_SORT_DATE_REVERSE
) , ID2P(LANG_SORT_TYPE
)),
776 CHOICE_SETTING(0, sort_dir
, LANG_SORT_DIR
, 0 ,
777 "sort dirs", "alpha,oldest,newest", NULL
, 3,
778 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
779 ID2P(LANG_SORT_DATE_REVERSE
)),
781 #ifdef HAVE_RECORDING
783 STRINGCHOICE_SETTING(F_RECSETTING
, rec_timesplit
, LANG_SPLIT_TIME
, 0,
785 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
786 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
788 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
), TALK_ID(15, UNIT_MIN
),
789 TALK_ID(30, UNIT_MIN
), TALK_ID(60, UNIT_MIN
), TALK_ID(74, UNIT_MIN
),
790 TALK_ID(80, UNIT_MIN
), TALK_ID(2, UNIT_HOUR
), TALK_ID(4, UNIT_HOUR
),
791 TALK_ID(6, UNIT_HOUR
), TALK_ID(8, UNIT_HOUR
), TALK_ID(10, UNIT_HOUR
),
792 TALK_ID(12, UNIT_HOUR
), TALK_ID(18, UNIT_HOUR
), TALK_ID(20, UNIT_HOUR
),
793 TALK_ID(24, UNIT_HOUR
)),
794 STRINGCHOICE_SETTING(F_RECSETTING
, rec_sizesplit
, LANG_SPLIT_SIZE
, 0,
796 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
797 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
799 TALK_ID(5, UNIT_MB
), TALK_ID(10, UNIT_MB
), TALK_ID(15, UNIT_MB
),
800 TALK_ID(32, UNIT_MB
), TALK_ID(64, UNIT_MB
), TALK_ID(75, UNIT_MB
),
801 TALK_ID(100, UNIT_MB
), TALK_ID(128, UNIT_MB
), TALK_ID(256, UNIT_MB
),
802 TALK_ID(512, UNIT_MB
), TALK_ID(650, UNIT_MB
), TALK_ID(700, UNIT_MB
),
803 TALK_ID(1024, UNIT_MB
), TALK_ID(1536, UNIT_MB
), TALK_ID(1792, UNIT_MB
)),
804 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_channels
,
805 LANG_CHANNELS
, INT(0),
806 "rec channels","stereo,mono",UNUSED
},
807 CHOICE_SETTING(F_RECSETTING
, rec_split_type
, LANG_SPLIT_TYPE
, 0 ,
808 "rec split type", "Split,Stop", NULL
, 2,
809 ID2P(LANG_START_NEW_FILE
), ID2P(LANG_STOP_RECORDING
)),
810 CHOICE_SETTING(F_RECSETTING
, rec_split_method
, LANG_SPLIT_MEASURE
, 0 ,
811 "rec split method", "Time,Filesize", NULL
, 2,
812 ID2P(LANG_TIME
), ID2P(LANG_REC_SIZE
)),
813 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_source
,
814 LANG_RECORDING_SOURCE
, INT(0),
816 &HAVE_MIC_REC_(",mic")
817 HAVE_LINE_REC_(",line")
818 HAVE_SPDIF_REC_(",spdif")
819 HAVE_FMRADIO_REC_(",fmradio")[1]
821 INT_SETTING(F_RECSETTING
, rec_prerecord_time
, LANG_RECORD_PRERECORD_TIME
,
822 0, "prerecording time", UNIT_SEC
, 0, 30, 1,
823 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
825 FILENAME_SETTING(F_RECSETTING
, rec_directory
, "rec path",
826 REC_BASE_DIR
, NULL
, NULL
, MAX_FILENAME
+1),
827 #ifdef HAVE_BACKLIGHT
828 CHOICE_SETTING(F_RECSETTING
, cliplight
, LANG_CLIP_LIGHT
, 0 ,
829 "cliplight", "off,main,both,remote", NULL
,
830 #ifdef HAVE_REMOTE_LCD
831 4, ID2P(LANG_OFF
), ID2P(LANG_MAIN_UNIT
), ID2P(LANG_REMOTE_MAIN
),
832 ID2P(LANG_REMOTE_UNIT
)
834 2, ID2P(LANG_OFF
), ID2P(LANG_ON
)
838 #ifdef DEFAULT_REC_MIC_GAIN
839 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_mic_gain
,
840 LANG_GAIN
,INT(DEFAULT_REC_MIC_GAIN
),
841 "rec mic gain",NULL
,UNUSED
},
842 #endif /* DEFAULT_REC_MIC_GAIN */
843 #ifdef DEFAULT_REC_LEFT_GAIN
844 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_left_gain
,
845 LANG_RECORDING_LEFT
,INT(DEFAULT_REC_LEFT_GAIN
),
846 "rec left gain",NULL
,UNUSED
},
847 #endif /* DEFAULT_REC_LEFT_GAIN */
848 #ifdef DEFAULT_REC_RIGHT_GAIN
849 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_right_gain
,LANG_RECORDING_RIGHT
,
850 INT(DEFAULT_REC_RIGHT_GAIN
),
851 "rec right gain",NULL
,UNUSED
},
852 #endif /* DEFAULT_REC_RIGHT_GAIN */
853 #if CONFIG_CODEC == MAS3587F
854 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
855 LANG_RECORDING_FREQUENCY
,
856 INT(0),"rec frequency","44,48,32,22,24,16",UNUSED
},
857 INT_SETTING(F_RECSETTING
, rec_quality
, LANG_RECORDING_QUALITY
,
859 UNIT_INT
, 0, 7, 1, NULL
, NULL
, NULL
),
860 OFFON_SETTING(F_RECSETTING
,rec_editable
,LANG_RECORDING_EDITABLE
,
861 false,"editable recordings",NULL
),
862 #endif /* CONFIG_CODEC == MAS3587F */
863 #if CONFIG_CODEC == SWCODEC
864 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
865 LANG_RECORDING_FREQUENCY
,INT(REC_FREQ_DEFAULT
),
866 "rec frequency",REC_FREQ_CFG_VAL_LIST
,UNUSED
},
867 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_format
,
868 LANG_RECORDING_FORMAT
,INT(REC_FORMAT_DEFAULT
),
869 "rec format",REC_FORMAT_CFG_VAL_LIST
,UNUSED
},
870 /** Encoder settings start - keep these together **/
872 /* (no settings yet) */
874 {F_T_INT
|F_RECSETTING
, &global_settings
.mp3_enc_config
.bitrate
,-1,
875 INT(MP3_ENC_BITRATE_CFG_DEFAULT
),
876 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST
,UNUSED
},
878 /* (no settings yet) */
880 /* (no settings yet) */
881 /** Encoder settings end **/
882 #endif /* CONFIG_CODEC == SWCODEC */
883 /* values for the trigger */
884 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_start_thres
,
885 LANG_RECORD_START_THRESHOLD
, INT(-35),
886 "trigger start threshold",NULL
,UNUSED
},
887 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_stop_thres
,
888 LANG_RECORD_STOP_THRESHOLD
,INT(-45),
889 "trigger stop threshold",NULL
,UNUSED
},
890 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_start_duration
,
891 LANG_MIN_DURATION
,INT(0),
892 "trigger start duration",trig_durations_conf
,UNUSED
},
893 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_stop_postrec
,
894 LANG_MIN_DURATION
,INT(2),
895 "trigger stop postrec",trig_durations_conf
,UNUSED
},
896 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_stop_gap
,
897 LANG_RECORD_STOP_GAP
,INT(1),
898 "trigger min gap",trig_durations_conf
,UNUSED
},
899 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_trigger_mode
,
900 LANG_RECORD_TRIGGER
,INT(0),
901 "trigger mode","off,once,repeat",UNUSED
},
902 #endif /* HAVE_RECORDING */
904 #ifdef HAVE_SPDIF_POWER
905 OFFON_SETTING(F_SOUNDSETTING
, spdif_enable
, LANG_SPDIF_ENABLE
, false,
906 "spdif enable", spdif_power_enable
),
908 CHOICE_SETTING(0, next_folder
, LANG_NEXT_FOLDER
, FOLDER_ADVANCE_OFF
,
909 "folder navigation", "off,on,random",NULL
,3,
910 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
), ID2P(LANG_RANDOM
)),
911 OFFON_SETTING(0,runtimedb
,LANG_RUNTIMEDB_ACTIVE
,false,"gather runtime data",NULL
),
913 #if CONFIG_CODEC == SWCODEC
915 OFFON_SETTING(F_SOUNDSETTING
, replaygain
, LANG_REPLAYGAIN_ENABLE
, false, "replaygain", NULL
),
916 CHOICE_SETTING(F_SOUNDSETTING
, replaygain_type
, LANG_REPLAYGAIN_MODE
, REPLAYGAIN_ALBUM
,
917 "replaygain type", "track,album,track shuffle", NULL
, 3,
918 ID2P(LANG_TRACK_GAIN
), ID2P(LANG_ALBUM_GAIN
), ID2P(LANG_SHUFFLE_GAIN
)),
919 OFFON_SETTING(F_SOUNDSETTING
, replaygain_noclip
, LANG_REPLAYGAIN_NOCLIP
,
920 false, "replaygain noclip", NULL
),
921 INT_SETTING_NOWRAP(F_SOUNDSETTING
, replaygain_preamp
, LANG_REPLAYGAIN_PREAMP
, 0, "replaygain preamp",
922 UNIT_DB
, -120, 120, 5, db_format
, get_dec_talkid
, NULL
),
924 CHOICE_SETTING(0, beep
, LANG_BEEP
, 0,
925 "beep", "off,weak,moderate,strong", NULL
, 4,
926 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
), ID2P(LANG_STRONG
)),
929 CHOICE_SETTING(F_SOUNDSETTING
, crossfade
, LANG_CROSSFADE_ENABLE
, 0, "crossfade",
930 "off,shuffle,track skip,shuffle and track skip,always",NULL
, 5,
931 ID2P(LANG_OFF
), ID2P(LANG_SHUFFLE
), ID2P(LANG_TRACKSKIP
),
932 ID2P(LANG_SHUFFLE_TRACKSKIP
), ID2P(LANG_ALWAYS
)),
933 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_delay
, LANG_CROSSFADE_FADE_IN_DELAY
, 0,
934 "crossfade fade in delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
, NULL
),
935 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_delay
, LANG_CROSSFADE_FADE_OUT_DELAY
, 0,
936 "crossfade fade out delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
, NULL
),
937 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_duration
, LANG_CROSSFADE_FADE_IN_DURATION
, 2,
938 "crossfade fade in duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
, NULL
),
939 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_duration
, LANG_CROSSFADE_FADE_OUT_DURATION
, 2,
940 "crossfade fade out duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
, NULL
),
941 CHOICE_SETTING(F_SOUNDSETTING
, crossfade_fade_out_mixmode
, LANG_CROSSFADE_FADE_OUT_MODE
,
942 0, "crossfade fade out mode", "crossfade,mix", NULL
, 2,
943 ID2P(LANG_CROSSFADE
), ID2P(LANG_MIX
)),
946 OFFON_SETTING(F_SOUNDSETTING
, crossfeed
, LANG_CROSSFEED
, false,
947 "crossfeed", dsp_set_crossfeed
),
948 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_direct_gain
, LANG_CROSSFEED_DIRECT_GAIN
,
949 -15, "crossfeed direct gain", UNIT_DB
, -60, 0, 5,
950 db_format
, get_dec_talkid
, dsp_set_crossfeed_direct_gain
),
951 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_cross_gain
, LANG_CROSSFEED_CROSS_GAIN
, -60,
952 "crossfeed cross gain", UNIT_DB
, -120, -30, 5,
953 db_format
, get_dec_talkid
, crossfeed_cross_set
),
954 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_attenuation
, LANG_CROSSFEED_HF_ATTENUATION
, -160,
955 "crossfeed hf attenuation", UNIT_DB
, -240, -60, 5,
956 db_format
, get_dec_talkid
, crossfeed_cross_set
),
957 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_cutoff
, LANG_CROSSFEED_HF_CUTOFF
, 700,
958 "crossfeed hf cutoff", UNIT_HERTZ
, 500, 2000, 100,
959 NULL
, NULL
, crossfeed_cross_set
),
962 OFFON_SETTING(F_EQSETTING
, eq_enabled
, LANG_EQUALIZER_ENABLED
, false,
964 INT_SETTING_NOWRAP(F_EQSETTING
, eq_precut
, LANG_EQUALIZER_PRECUT
, 0,
965 "eq precut", UNIT_DB
, 0, 240, 5, eq_precut_format
, get_precut_talkid
,
968 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
969 60, "eq band 0 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
970 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
971 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
972 200, "eq band 1 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
973 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
974 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
975 800, "eq band 2 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
976 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
977 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
978 4000, "eq band 3 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
979 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
980 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
981 12000, "eq band 4 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
982 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
983 /* 0..64 (or 0.0 to 6.4) */
984 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_q
, LANG_EQUALIZER_BAND_Q
, 7,
985 "eq band 0 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
986 eq_q_format
, get_dec_talkid
, NULL
),
987 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_q
, LANG_EQUALIZER_BAND_Q
, 10,
988 "eq band 1 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
989 eq_q_format
, get_dec_talkid
, NULL
),
990 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_q
, LANG_EQUALIZER_BAND_Q
, 10,
991 "eq band 2 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
992 eq_q_format
, get_dec_talkid
, NULL
),
993 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_q
, LANG_EQUALIZER_BAND_Q
, 10,
994 "eq band 3 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
995 eq_q_format
, get_dec_talkid
, NULL
),
996 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_q
, LANG_EQUALIZER_BAND_Q
, 7,
997 "eq band 4 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
998 eq_q_format
, get_dec_talkid
, NULL
),
999 /* -240..240 (or -24db to +24db) */
1000 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_gain
, LANG_GAIN
, 0,
1001 "eq band 0 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1002 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1003 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_gain
, LANG_GAIN
, 0,
1004 "eq band 1 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1005 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1006 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_gain
, LANG_GAIN
, 0,
1007 "eq band 2 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1008 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1009 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_gain
, LANG_GAIN
, 0,
1010 "eq band 3 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1011 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1012 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_gain
, LANG_GAIN
, 0,
1013 "eq band 4 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1014 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1017 OFFON_SETTING(F_SOUNDSETTING
, dithering_enabled
, LANG_DITHERING
,
1018 false, "dithering enabled", dsp_dither_enable
),
1021 SOUND_SETTING(F_NO_WRAP
, bass_cutoff
, LANG_BASS_CUTOFF
, "bass cutoff",
1023 SOUND_SETTING(F_NO_WRAP
, treble_cutoff
, LANG_TREBLE_CUTOFF
, "treble cutoff",
1024 SOUND_TREBLE_CUTOFF
),
1026 #ifdef HAVE_DIRCACHE
1027 OFFON_SETTING(0,dircache
,LANG_DIRCACHE_ENABLE
,false,"dircache",NULL
),
1028 SYSTEM_SETTING(NVRAM(4),dircache_size
,0),
1031 #ifdef HAVE_TAGCACHE
1032 #ifdef HAVE_TC_RAMCACHE
1033 OFFON_SETTING(0,tagcache_ram
,LANG_TAGCACHE_RAM
,false,"tagcache_ram",NULL
),
1035 OFFON_SETTING(0,tagcache_autoupdate
,
1036 LANG_TAGCACHE_AUTOUPDATE
,false,"tagcache_autoupdate",NULL
),
1038 CHOICE_SETTING(0, default_codepage
, LANG_DEFAULT_CODEPAGE
, 0,
1040 #ifdef HAVE_LCD_BITMAP
1041 /* The order must match with that in unicode.c */
1042 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1043 "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8",
1045 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1046 ID2P(LANG_CODEPAGE_HEBREW
), ID2P(LANG_CODEPAGE_CYRILLIC
),
1047 ID2P(LANG_CODEPAGE_THAI
), ID2P(LANG_CODEPAGE_ARABIC
),
1048 ID2P(LANG_CODEPAGE_TURKISH
), ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1049 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
), ID2P(LANG_CODEPAGE_JAPANESE
),
1050 ID2P(LANG_CODEPAGE_SIMPLIFIED
), ID2P(LANG_CODEPAGE_KOREAN
),
1051 ID2P(LANG_CODEPAGE_TRADITIONAL
), ID2P(LANG_CODEPAGE_UTF8
)),
1052 #else /* !HAVE_LCD_BITMAP */
1053 /* The order must match with that in unicode.c */
1054 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,utf-8",
1056 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1057 ID2P(LANG_CODEPAGE_CYRILLIC
), ID2P(LANG_CODEPAGE_TURKISH
),
1058 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
), ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1059 ID2P(LANG_CODEPAGE_UTF8
)),
1061 OFFON_SETTING(0,warnon_erase_dynplaylist
,
1062 LANG_WARN_ERASEDYNPLAYLIST_MENU
,false,
1063 "warn when erasing dynamic playlist",NULL
),
1065 #ifdef HAVE_BACKLIGHT
1066 #ifdef HAS_BUTTON_HOLD
1067 CHOICE_SETTING(0, backlight_on_button_hold
,
1068 LANG_BACKLIGHT_ON_BUTTON_HOLD
, 0, "backlight on button hold",
1069 "normal,off,on", backlight_set_on_button_hold
, 3,
1070 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1073 #ifdef HAVE_LCD_SLEEP
1074 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off
,
1075 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF
, 3,
1076 "lcd sleep after backlight off",
1077 "always,never,5,10,15,20,30,45,60,90", lcd_set_sleep_after_backlight_off
,
1078 10, LANG_ALWAYS
, LANG_NEVER
, TALK_ID(5, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
1079 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1080 TALK_ID(45, UNIT_SEC
),TALK_ID(60, UNIT_SEC
), TALK_ID(90, UNIT_SEC
)),
1082 #endif /* HAVE_BACKLIGHT */
1084 OFFON_SETTING(0,hold_lr_for_scroll_in_list
,-1,true,
1085 "hold_lr_for_scroll_in_list",NULL
),
1086 #ifdef HAVE_LCD_BITMAP
1087 CHOICE_SETTING(0, show_path_in_browser
, LANG_SHOW_PATH
, SHOW_PATH_OFF
,
1088 "show path in browser", "off,current directory,full path", NULL
, 3,
1089 ID2P(LANG_OFF
), ID2P(LANG_SHOW_PATH_CURRENT
), ID2P(LANG_DISPLAY_FULL_PATH
)),
1093 {F_T_INT
,&global_settings
.rec_agc_preset_mic
,LANG_RECORD_AGC_PRESET
,INT(1),
1094 "agc mic preset",NULL
,UNUSED
},
1095 {F_T_INT
,&global_settings
.rec_agc_preset_line
,LANG_RECORD_AGC_PRESET
,INT(1),
1096 "agc line preset",NULL
,UNUSED
},
1097 {F_T_INT
,&global_settings
.rec_agc_maxgain_mic
,-1,INT(104),
1098 "agc maximum mic gain",NULL
,UNUSED
},
1099 {F_T_INT
,&global_settings
.rec_agc_maxgain_line
,-1,INT(96),
1100 "agc maximum line gain",NULL
,UNUSED
},
1101 {F_T_INT
,&global_settings
.rec_agc_cliptime
,LANG_RECORD_AGC_CLIPTIME
,INT(1),
1102 "agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED
},
1105 #ifdef HAVE_REMOTE_LCD
1106 #ifdef HAS_REMOTE_BUTTON_HOLD
1107 CHOICE_SETTING(0, remote_backlight_on_button_hold
,
1108 LANG_BACKLIGHT_ON_BUTTON_HOLD
, 0, "remote backlight on button hold",
1109 "normal,off,on", remote_backlight_set_on_button_hold
, 3,
1110 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1113 #ifdef HAVE_HEADPHONE_DETECTION
1114 CHOICE_SETTING(0, unplug_mode
, LANG_HEADPHONE_UNPLUG
, 0,
1115 "pause on headphone unplug", "off,pause,pause and resume", NULL
, 3,
1116 ID2P(LANG_OFF
), ID2P(LANG_PAUSE
), ID2P(LANG_HEADPHONE_UNPLUG_RESUME
)),
1117 INT_SETTING(0, unplug_rw
, LANG_HEADPHONE_UNPLUG_RW
, 0, "rewind duration on pause",
1118 UNIT_SEC
, 0, 15, 1, NULL
, NULL
,NULL
) ,
1119 OFFON_SETTING(0,unplug_autoresume
,LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME
,false,
1120 "disable autoresume if phones not present",NULL
),
1123 CHOICE_SETTING(0, fm_region
, LANG_FM_REGION
, 0,
1124 "fm_region", "eu,us,jp,kr", set_radio_region
, 4, ID2P(LANG_FM_EUROPE
),
1125 ID2P(LANG_FM_US
), ID2P(LANG_FM_JAPAN
), ID2P(LANG_FM_KOREA
)),
1128 OFFON_SETTING(0,audioscrobbler
,LANG_AUDIOSCROBBLER
,
1129 false,"Last.fm Logging",NULL
),
1131 #ifdef HAVE_RECORDING
1132 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_trigger_type
,
1133 LANG_RECORD_TRIGGER_TYPE
,
1134 INT(0),"trigger type","stop,pause,nf stp",UNUSED
},
1137 /** settings not in the old config blocks **/
1139 FILENAME_SETTING(0, fmr_file
, "fmr",
1140 "", FMPRESET_PATH
"/", ".fmr", MAX_FILENAME
+1),
1142 #ifdef HAVE_LCD_BITMAP
1143 FILENAME_SETTING(F_THEMESETTING
, font_file
, "font",
1144 DEFAULT_FONTNAME
, FONT_DIR
"/", ".fnt", MAX_FILENAME
+1),
1146 FILENAME_SETTING(F_THEMESETTING
,wps_file
, "wps",
1147 DEFAULT_WPSNAME
, WPS_DIR
"/", ".wps", MAX_FILENAME
+1),
1148 FILENAME_SETTING(0,lang_file
,"lang","",LANG_DIR
"/",".lng",MAX_FILENAME
+1),
1149 #ifdef HAVE_REMOTE_LCD
1150 FILENAME_SETTING(F_THEMESETTING
,rwps_file
,"rwps",
1151 DEFAULT_WPSNAME
, WPS_DIR
"/", ".rwps", MAX_FILENAME
+1),
1154 FILENAME_SETTING(F_THEMESETTING
,backdrop_file
,"backdrop",
1155 DEFAULT_BACKDROP
, BACKDROP_DIR
"/", ".bmp", MAX_FILENAME
+1),
1157 #ifdef HAVE_LCD_BITMAP
1158 FILENAME_SETTING(0,kbd_file
,"kbd","",ROCKBOX_DIR
"/",".kbd",MAX_FILENAME
+1),
1160 #ifdef HAVE_USB_POWER
1162 OFFON_SETTING(0,usb_charging
,LANG_USB_CHARGING
,false,"usb charging",NULL
),
1165 OFFON_SETTING(0,cuesheet
,LANG_CUESHEET_ENABLE
,false,"cuesheet support", NULL
),
1166 CHOICE_SETTING(0, start_in_screen
, LANG_START_SCREEN
, 1,
1167 "start in screen", "previous,root,files,db,wps,menu,"
1168 #ifdef HAVE_RECORDING
1175 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1177 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1182 ID2P(LANG_PREVIOUS_SCREEN
), ID2P(LANG_MAIN_MENU
),
1183 ID2P(LANG_DIR_BROWSER
), ID2P(LANG_TAGCACHE
),
1184 ID2P(LANG_RESUME_PLAYBACK
), ID2P(LANG_SETTINGS
),
1185 #ifdef HAVE_RECORDING
1186 ID2P(LANG_RECORDING
),
1189 ID2P(LANG_FM_RADIO
),
1191 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
)
1193 SYSTEM_SETTING(NVRAM(1),last_screen
,-1),
1194 #if defined(HAVE_RTC_ALARM) && \
1195 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1196 {F_T_INT
, &global_settings
.alarm_wake_up_screen
, LANG_ALARM_WAKEUP_SCREEN
,
1197 INT(ALARM_START_WPS
), "alarm wakeup screen", ALARM_SETTING_TEXT
, UNUSED
},
1198 #endif /* HAVE_RTC_ALARM */
1200 /* Customizable icons */
1201 #ifdef HAVE_LCD_BITMAP
1202 FILENAME_SETTING(F_THEMESETTING
, icon_file
, "iconset", DEFAULT_ICONSET
,
1203 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1204 FILENAME_SETTING(F_THEMESETTING
, viewers_icon_file
, "viewers iconset", DEFAULT_VIEWERS_ICONSET
,
1205 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1207 #ifdef HAVE_REMOTE_LCD
1208 FILENAME_SETTING(F_THEMESETTING
, remote_icon_file
, "remote iconset", "",
1209 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1210 FILENAME_SETTING(F_THEMESETTING
, remote_viewers_icon_file
,
1211 "remote viewers iconset", "",
1212 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1213 #endif /* HAVE_REMOTE_LCD */
1214 #ifdef HAVE_LCD_COLOR
1215 FILENAME_SETTING(F_THEMESETTING
, colors_file
, "filetype colours", "-",
1216 THEME_DIR
"/", ".colours", MAX_FILENAME
+1),
1218 #ifdef HAVE_BUTTON_LIGHT
1219 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, buttonlight_timeout
,
1220 LANG_BUTTONLIGHT_TIMEOUT
, 5, "button light timeout", off_on
,
1221 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
1222 buttonlight_set_timeout
, 20,
1223 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
1225 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1226 INT_SETTING(F_NO_WRAP
, buttonlight_brightness
, LANG_BUTTONLIGHT_BRIGHTNESS
, DEFAULT_BRIGHTNESS_SETTING
,
1227 "button light brightness",UNIT_INT
, MIN_BRIGHTNESS_SETTING
, MAX_BRIGHTNESS_SETTING
, 1,
1228 NULL
, NULL
, buttonlight_set_brightness
),
1230 #ifndef HAVE_SCROLLWHEEL
1231 INT_SETTING(0, list_accel_start_delay
, LANG_LISTACCEL_START_DELAY
,
1232 2, "list_accel_start_delay", UNIT_MS
, 0, 10, 1,
1233 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1234 INT_SETTING(0, list_accel_wait
, LANG_LISTACCEL_ACCEL_SPEED
,
1235 3, "list_accel_wait", UNIT_SEC
, 1, 10, 1,
1236 scanaccel_formatter
, getlang_unit_0_is_off
, NULL
),
1237 #endif /* HAVE_SCROLLWHEEL */
1239 SYSTEM_SETTING(0, statusbar_forced
, 0),
1241 #if CONFIG_CODEC == SWCODEC
1243 CHOICE_SETTING(0, keyclick
, LANG_KEYCLICK
, 0,
1244 "keyclick", "off,weak,moderate,strong", NULL
, 4,
1245 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
), ID2P(LANG_STRONG
)),
1246 OFFON_SETTING(0, keyclick_repeats
, LANG_KEYCLICK_REPEATS
, false, "keyclick repeats", NULL
),
1247 #endif /* CONFIG_CODEC == SWCODEC */
1248 FILENAME_SETTING(0, playlist_catalog_dir
, "playlist catalog directory",
1249 PLAYLIST_CATALOG_DEFAULT_DIR
, NULL
, NULL
, MAX_FILENAME
+1),
1252 const int nb_settings
= sizeof(settings
)/sizeof(*settings
);