Oops.
[Rockbox.git] / apps / settings_list.c
blob62daeb8c4deb01b31c5e5736179f919348eb467b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
20 #include "config.h"
21 #include <stdbool.h>
22 #include <string.h>
23 #include "ata.h"
24 #include "lang.h"
25 #include "talk.h"
26 #include "lcd.h"
27 #include "button.h"
28 #include "backlight.h"
29 #include "settings.h"
30 #include "settings_list.h"
31 #include "sound.h"
32 #include "dsp.h"
33 #include "debug.h"
34 #include "mpeg.h"
35 #include "audio.h"
36 #include "power.h"
37 #include "powermgmt.h"
38 #include "kernel.h"
39 #include "lcd-remote.h"
40 #include "list.h"
41 #include "rbunicode.h"
42 #ifdef HAVE_LCD_BITMAP
43 #include "peakmeter.h"
44 #endif
45 #include "menus/eq_menu.h"
46 #if CONFIG_TUNER
47 #include "radio.h"
48 #endif
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, &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), \
99 NULL, NULL, UNUSED}
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 = (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 = (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}}}}
147 /* some sets of values which are used more than once, to save memory */
148 static const char off_on[] = "off,on";
149 static const char off_on_ask[] = "off,on,ask";
150 static const char off_number_spell[] = "off,number,spell";
151 #ifdef HAVE_LCD_BITMAP
152 static const char graphic_numeric[] = "graphic,numeric";
153 #endif
155 #ifdef HAVE_RECORDING
156 /* keep synchronous to trig_durations and
157 trigger_times in settings_apply_trigger */
158 static const char trig_durations_conf [] =
159 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min";
160 /* these should be in the config.h files */
161 #if CONFIG_CODEC == MAS3587F
162 # define DEFAULT_REC_MIC_GAIN 8
163 # define DEFAULT_REC_LEFT_GAIN 2
164 # define DEFAULT_REC_RIGHT_GAIN 2
165 #elif CONFIG_CODEC == SWCODEC
166 # ifdef HAVE_UDA1380
167 # define DEFAULT_REC_MIC_GAIN 16
168 # define DEFAULT_REC_LEFT_GAIN 0
169 # define DEFAULT_REC_RIGHT_GAIN 0
170 # elif defined(HAVE_TLV320)
171 # define DEFAULT_REC_MIC_GAIN 0
172 # define DEFAULT_REC_LEFT_GAIN 0
173 # define DEFAULT_REC_RIGHT_GAIN 0
174 # elif defined(HAVE_WM8975)
175 # define DEFAULT_REC_MIC_GAIN 16
176 # define DEFAULT_REC_LEFT_GAIN 0
177 # define DEFAULT_REC_RIGHT_GAIN 0
178 # elif defined(HAVE_WM8758)
179 # define DEFAULT_REC_MIC_GAIN 16
180 # define DEFAULT_REC_LEFT_GAIN 0
181 # define DEFAULT_REC_RIGHT_GAIN 0
182 # elif defined(HAVE_WM8731)
183 # define DEFAULT_REC_MIC_GAIN 16
184 # define DEFAULT_REC_LEFT_GAIN 0
185 # define DEFAULT_REC_RIGHT_GAIN 0
186 # endif
187 #endif
189 static long rectime_getlang(int value)
191 if (value == 0)
192 return LANG_OFF;
193 return TALK_ID(value, UNIT_SEC);
195 static void rectime_formatter(char *buffer, int buffer_size,
196 int val, const char *unit)
198 (void)unit;
199 if (val == 0)
200 strcpy(buffer, str(LANG_OFF));
201 else
202 snprintf(buffer, buffer_size, "%d s", val);
205 #endif /* HAVE_RECORDING */
207 #ifdef HAVE_BACKLIGHT
208 static const char backlight_times_conf [] =
209 "off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90";
210 static const int backlight_times[] =
211 {-1, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90};
212 static void backlight_formatter(char *buffer, int buffer_size,
213 int val, const char *unit)
215 (void)unit;
216 if (val == 0)
217 strcpy(buffer, str(LANG_OFF));
218 else if (val == 1)
219 strcpy(buffer, str(LANG_ON));
220 else
221 snprintf(buffer, buffer_size, "%d s", backlight_times[val]);
223 static long backlight_getlang(int value)
225 if (value == 0)
226 return LANG_OFF;
227 else if (value == 1)
228 return LANG_ON;
229 return TALK_ID(backlight_times[value], UNIT_SEC);
231 #endif
232 /* ffwd/rewind and scan acceleration stuff */
233 static int ff_rewind_min_stepvals[] = {1,2,3,4,5,6,8,10,15,20,25,30,45,60};
234 static long ff_rewind_min_step_getlang(int value)
236 return TALK_ID(ff_rewind_min_stepvals[value], UNIT_SEC);
238 static void ff_rewind_min_step_formatter(char *buffer, int buffer_size,
239 int val, const char *unit)
241 (void)unit;
242 snprintf(buffer, buffer_size, "%ds", ff_rewind_min_stepvals[val]);
244 static long scanaccel_getlang(int value)
246 if (value == 0)
247 return LANG_OFF;
248 return TALK_ID(value, UNIT_SEC);
250 static void scanaccel_formatter(char *buffer, int buffer_size,
251 int val, const char *unit)
253 (void)unit;
254 if (val == 0)
255 strcpy(buffer, str(LANG_OFF));
256 else
257 snprintf(buffer, buffer_size, "2x/%ds", val);
260 static int poweroff_idle_timer_times[] = {0,1,2,3,4,5,6,7,8,9,10,15,30,45,60};
261 static long poweroff_idle_timer_getlang(int value)
263 if (value == 0)
264 return LANG_OFF;
265 return TALK_ID(poweroff_idle_timer_times[value], UNIT_MIN);
267 static void poweroff_idle_timer_formatter(char *buffer, int buffer_size,
268 int val, const char *unit)
270 (void)unit;
271 if (val == 0)
272 strcpy(buffer, str(LANG_OFF));
273 else
274 snprintf(buffer, buffer_size, "%dm", poweroff_idle_timer_times[val]);
277 #ifndef HAVE_SCROLLWHEEL
278 static long listaccel_getlang(int value)
280 if (value == 0)
281 return LANG_OFF;
282 return TALK_ID((HZ/2)*value, UNIT_MS);
284 static void listaccel_formatter(char *buffer, int buffer_size,
285 int val, const char *unit)
287 (void)unit;
288 if (val == 0)
289 strcpy(buffer, str(LANG_OFF));
290 else
291 snprintf(buffer, buffer_size, "%d ms", 5*HZ*val);
293 #endif /* HAVE_SCROLLWHEEL */
295 #if CONFIG_CODEC == SWCODEC
296 static void crossfeed_format(char* buffer, int buffer_size, int value,
297 const char* unit)
299 snprintf(buffer, buffer_size, "%s%d.%d %s", value == 0 ? " " : "-",
300 value / 10, value % 10, unit);
302 static void crossfeed_cross_set(int val)
304 (void)val;
305 dsp_set_crossfeed_cross_params(global_settings.crossfeed_cross_gain,
306 global_settings.crossfeed_hf_attenuation,
307 global_settings.crossfeed_hf_cutoff);
310 static void replaygain_preamp_format(char* buffer, int buffer_size, int value,
311 const char* unit)
313 int v = abs(value);
315 snprintf(buffer, buffer_size, "%s%d.%d %s", value < 0 ? "-" : "",
316 v / 10, v % 10, unit);
319 #endif
320 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
321 static void set_mdb_enable(bool value)
323 sound_set_mdb_enable((int)value);
325 static void set_superbass(bool value)
327 sound_set_superbass((int)value);
329 #endif
331 #ifdef HAVE_LCD_CHARCELLS
332 static void jumpscroll_format(char* buffer, int buffer_size, int value,
333 const char* unit)
335 (void)unit;
336 switch (value)
338 case 0:
339 strcpy(buffer, str(LANG_OFF));
340 break;
341 case 1:
342 strcpy(buffer, str(LANG_ONE_TIME));
343 break;
344 case 2:
345 case 3:
346 case 4:
347 snprintf(buffer, buffer_size, "%d", value);
348 break;
349 case 5:
350 strcpy(buffer, str(LANG_ALWAYS));
351 break;
354 static long jumpscroll_getlang(int value)
356 switch (value)
358 case 0:
359 return LANG_OFF;
360 case 1:
361 return LANG_ONE_TIME;
362 case 2:
363 case 3:
364 case 4:
365 return TALK_ID(2, UNIT_INT);
366 case 5:
367 return LANG_ALWAYS;
369 return -1;
371 #endif /* HAVE_LCD_CHARCELLS */
374 const struct settings_list settings[] = {
375 /* sound settings */
376 SOUND_SETTING(0,volume, LANG_VOLUME, "volume", SOUND_VOLUME),
377 SOUND_SETTING(0,balance, LANG_BALANCE, "balance", SOUND_BALANCE),
378 SOUND_SETTING(0,bass, LANG_BASS, "bass", SOUND_BASS),
379 SOUND_SETTING(0,treble, LANG_TREBLE, "treble", SOUND_TREBLE),
381 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
382 SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS),
383 STRINGCHOICE_SETTING(0,avc,LANG_AUTOVOL,0,"auto volume",
384 "off,20ms,2,4,8,", sound_set_avc, 5,
385 LANG_OFF,TALK_ID(20, UNIT_MS),TALK_ID(2, UNIT_SEC),
386 TALK_ID(4, UNIT_SEC),TALK_ID(8, UNIT_SEC)),
387 OFFON_SETTING(0, superbass, LANG_SUPERBASS, false, "superbass", set_superbass),
388 #endif
390 CHOICE_SETTING(0,channel_config,LANG_CHANNEL_CONFIGURATION,0,"channels",
391 "stereo,mono,custom,mono left,mono right,karaoke",
392 sound_set_channels,
393 6, ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO),
394 ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT),
395 ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)),
396 SOUND_SETTING(0,stereo_width, LANG_STEREO_WIDTH,
397 "stereo_width", SOUND_STEREO_WIDTH),
398 /* playback */
399 OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL),
400 SYSTEM_SETTING(NVRAM(4),resume_index,-1),
401 SYSTEM_SETTING(NVRAM(4),resume_first_index,0),
402 SYSTEM_SETTING(NVRAM(4),resume_offset,-1),
403 SYSTEM_SETTING(NVRAM(4),resume_seed,-1),
404 CHOICE_SETTING(0, repeat_mode, LANG_REPEAT, REPEAT_ALL, "repeat",
405 "off,all,one,shuffle"
406 #ifdef AB_REPEAT_ENABLE
407 ",ab"
408 #endif
409 , NULL,
410 #ifdef AB_REPEAT_ENABLE
412 #else
414 #endif
415 ID2P(LANG_OFF), ID2P(LANG_ALL), ID2P(LANG_REPEAT_ONE), ID2P(LANG_SHUFFLE)
416 #ifdef AB_REPEAT_ENABLE
417 ,ID2P(LANG_REPEAT_AB)
418 #endif
419 ), /* CHOICE_SETTING( repeat_mode ) */
420 /* LCD */
421 #ifdef HAVE_LCD_CONTRAST
422 /* its easier to leave this one un-macro()ed for the time being */
423 {F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.contrast,
424 LANG_CONTRAST, FUNCTYPE(lcd_default_contrast),
425 "contrast", NULL , {.int_setting = (struct int_setting[]){
426 { lcd_set_contrast, UNIT_INT, MIN_CONTRAST_SETTING,
427 MAX_CONTRAST_SETTING, 1, NULL, NULL}}}},
428 #endif
429 #ifdef HAVE_BACKLIGHT
430 INT_SETTING_W_CFGVALS(F_FLIPLIST, backlight_timeout, LANG_BACKLIGHT, 6,
431 "backlight timeout", backlight_times_conf, UNIT_SEC,
432 0, 18, 1, backlight_formatter, backlight_getlang,
433 backlight_set_timeout),
434 #if CONFIG_CHARGING
435 INT_SETTING_W_CFGVALS(F_FLIPLIST, backlight_timeout_plugged,
436 LANG_BACKLIGHT_ON_WHEN_CHARGING, 11,
437 "backlight timeout plugged", backlight_times_conf, UNIT_SEC,
438 0, 18, 1, backlight_formatter, backlight_getlang,
439 backlight_set_timeout_plugged),
440 #endif
441 #endif /* HAVE_BACKLIGHT */
442 #ifdef HAVE_LCD_BITMAP
443 #ifdef HAVE_LCD_INVERT
444 BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on,
445 LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_set_invert_display),
446 #endif
447 #ifdef HAVE_LCD_FLIP
448 OFFON_SETTING(0,flip_display, LANG_FLIP_DISPLAY, false,"flip display", NULL),
449 #endif
450 /* display */
451 BOOL_SETTING(F_TEMPVAR, invert_cursor, LANG_INVERT_CURSOR, true ,"invert cursor", off_on,
452 LANG_INVERT_CURSOR_BAR, LANG_INVERT_CURSOR_POINTER, NULL),
453 OFFON_SETTING(F_THEMESETTING|F_TEMPVAR, statusbar,
454 LANG_STATUS_BAR, true,"statusbar", NULL),
455 OFFON_SETTING(0,scrollbar, LANG_SCROLL_BAR, true,"scrollbar", NULL),
456 #if CONFIG_KEYPAD == RECORDER_PAD
457 OFFON_SETTING(0,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
458 #endif
459 CHOICE_SETTING(0, volume_type, LANG_VOLUME_DISPLAY, 0,
460 "volume display", graphic_numeric, NULL, 2,
461 ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
462 CHOICE_SETTING(0, battery_display, LANG_BATTERY_DISPLAY, 0,
463 "battery display", graphic_numeric, NULL, 2,
464 ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
465 #if CONFIG_RTC
466 CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0,
467 "time format", "24hour,12hour", NULL, 2,
468 ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)),
469 #endif
470 #endif /* HAVE_LCD_BITMAP */
471 OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL),
472 /* system */
473 INT_SETTING_W_CFGVALS(F_FLIPLIST, poweroff, LANG_POWEROFF_IDLE, 10, "idle poweroff",
474 "off,1,2,3,4,5,6,7,8,9,10,15,30,45,60", UNIT_MIN,
475 0, 14, 1, poweroff_idle_timer_formatter,
476 poweroff_idle_timer_getlang, set_poweroff_timeout),
477 SYSTEM_SETTING(NVRAM(4),runtime,0),
478 SYSTEM_SETTING(NVRAM(4),topruntime,0),
480 INT_SETTING(0,max_files_in_playlist,LANG_MAX_FILES_IN_PLAYLIST,
481 #if MEM > 1
482 10000,
483 #else
484 400,
485 #endif
486 "max files in playlist", UNIT_INT,1000,20000,1000,NULL,NULL,NULL),
487 INT_SETTING(0,max_files_in_dir,LANG_MAX_FILES_IN_DIR,
488 #if MEM > 1
489 1000,
490 #else
491 200,
492 #endif
493 "max files in dir", UNIT_INT,50,10000,50,NULL,NULL,NULL),
494 #ifndef SIMULATOR
495 #if BATTERY_CAPACITY_INC > 0
496 INT_SETTING(0, battery_capacity, LANG_BATTERY_CAPACITY, BATTERY_CAPACITY_DEFAULT,
497 "battery capacity", UNIT_MAH,
498 BATTERY_CAPACITY_MIN, BATTERY_CAPACITY_MAX, BATTERY_CAPACITY_INC,
499 NULL, NULL, NULL),
500 #endif
501 #endif
502 #if CONFIG_CHARGING
503 OFFON_SETTING(NVRAM(1), car_adapter_mode,
504 LANG_CAR_ADAPTER_MODE, false, "car adapter mode", NULL),
505 #endif
506 /* tuner */
507 #if CONFIG_TUNER
508 OFFON_SETTING(0,fm_force_mono, LANG_FM_MONO_MODE,
509 false, "force fm mono", toggle_mono_mode),
510 SYSTEM_SETTING(NVRAM(4),last_frequency,0),
511 #endif
513 #if BATTERY_TYPES_COUNT > 1
514 CHOICE_SETTING(0, battery_type, LANG_BATTERY_TYPE, 0,
515 "battery type","alkaline,nimh", NULL, 2,
516 ID2P(LANG_BATTERY_TYPE_ALKALINE), ID2P(LANG_BATTERY_TYPE_NIMH)),
517 #endif
518 #ifdef HAVE_REMOTE_LCD
519 /* remote lcd */
520 INT_SETTING(0, remote_contrast, LANG_CONTRAST, DEFAULT_REMOTE_CONTRAST_SETTING,
521 "remote contrast", UNIT_INT, MIN_REMOTE_CONTRAST_SETTING,
522 MAX_REMOTE_CONTRAST_SETTING, 1, NULL, NULL, lcd_remote_set_contrast),
523 BOOL_SETTING(0, remote_invert, LANG_INVERT, false ,"remote invert", off_on,
524 LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_remote_set_invert_display),
525 OFFON_SETTING(0,remote_flip_display, LANG_FLIP_DISPLAY,
526 false,"remote flip display", NULL),
527 INT_SETTING_W_CFGVALS(F_FLIPLIST, remote_backlight_timeout, LANG_BACKLIGHT, 6,
528 "remote backlight timeout", backlight_times_conf, UNIT_SEC,
529 0, 18, 1, backlight_formatter, backlight_getlang,
530 remote_backlight_set_timeout),
531 #if CONFIG_CHARGING
532 INT_SETTING_W_CFGVALS(F_FLIPLIST, remote_backlight_timeout_plugged,
533 LANG_BACKLIGHT_ON_WHEN_CHARGING, 11,
534 "remote backlight timeout plugged", backlight_times_conf, UNIT_SEC,
535 0, 18, 1, backlight_formatter, backlight_getlang,
536 remote_backlight_set_timeout_plugged),
537 #endif
538 #ifdef HAVE_REMOTE_LCD_TICKING
539 OFFON_SETTING(0,remote_reduce_ticking, LANG_REDUCE_TICKING,
540 false,"remote reduce ticking", NULL),
541 #endif
542 #endif
544 #ifdef HAVE_BACKLIGHT
545 OFFON_SETTING(0,bl_filter_first_keypress,
546 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
547 "backlight filters first keypress", NULL),
548 #ifdef HAVE_REMOTE_LCD
549 OFFON_SETTING(0,remote_bl_filter_first_keypress,
550 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
551 "backlight filters first remote keypress", NULL),
552 #endif
553 #endif /* HAVE_BACKLIGHT */
555 /** End of old RTC config block **/
557 #ifdef HAVE_BACKLIGHT
558 OFFON_SETTING(0,caption_backlight, LANG_CAPTION_BACKLIGHT,
559 false,"caption backlight",NULL),
560 #ifdef HAVE_REMOTE_LCD
561 OFFON_SETTING(0,remote_caption_backlight, LANG_CAPTION_BACKLIGHT,
562 false,"remote caption backlight",NULL),
563 #endif
564 #endif /* HAVE_BACKLIGHT */
565 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
566 INT_SETTING(0, brightness, LANG_BRIGHTNESS, DEFAULT_BRIGHTNESS_SETTING,
567 "brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1,
568 NULL, NULL, backlight_set_brightness),
569 #endif
570 #if defined(HAVE_BACKLIGHT_PWM_FADING) && !defined(SIMULATOR)
571 /* backlight fading */
572 STRINGCHOICE_SETTING(0,backlight_fade_in, LANG_BACKLIGHT_FADE_IN, 1,
573 "backlight fade in","off,500ms,1s,2s", backlight_set_fade_in, 4,
574 LANG_OFF, TALK_ID(500, UNIT_MS),
575 TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC)),
576 STRINGCHOICE_SETTING(0,backlight_fade_out, LANG_BACKLIGHT_FADE_OUT, 1,
577 "backlight fade out","off,500ms,1s,2s,3s,5s,10s", backlight_set_fade_out, 7,
578 LANG_OFF, TALK_ID(500, UNIT_MS),
579 TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC),
580 TALK_ID(3, UNIT_SEC), TALK_ID(5, UNIT_SEC), TALK_ID(10, UNIT_SEC)),
581 #endif
582 INT_SETTING(0, scroll_speed, LANG_SCROLL_SPEED, 9,"scroll speed",
583 UNIT_INT, 0, 15, 1, NULL, NULL, lcd_scroll_speed),
584 INT_SETTING(0, scroll_delay, LANG_SCROLL_DELAY, 1000, "scroll delay",
585 UNIT_MS, 0, 2500, 100, NULL,
586 NULL, lcd_scroll_delay) ,
587 INT_SETTING(0, bidir_limit, LANG_BIDIR_SCROLL, 50, "bidir limit",
588 UNIT_PERCENT, 0, 200, 25, NULL, NULL, lcd_bidir_scroll),
589 #ifdef HAVE_REMOTE_LCD
590 INT_SETTING(0, remote_scroll_speed, LANG_SCROLL_SPEED, 9, "remote scroll speed",
591 UNIT_INT, 0,15, 1, NULL, NULL, lcd_remote_scroll_speed),
592 INT_SETTING(0, remote_scroll_step, LANG_SCROLL_STEP, 6, "remote scroll step",
593 UNIT_PIXEL, 1, LCD_REMOTE_WIDTH, 1, NULL, NULL, lcd_remote_scroll_step),
594 INT_SETTING(0, remote_scroll_delay, LANG_SCROLL_DELAY, 1000, "remote scroll delay",
595 UNIT_MS, 0, 2500, 100, NULL, NULL, lcd_remote_scroll_delay),
596 INT_SETTING(0, remote_bidir_limit, LANG_BIDIR_SCROLL, 50, "remote bidir limit",
597 UNIT_PERCENT, 0, 200, 25, NULL, NULL, lcd_remote_bidir_scroll),
598 #endif
599 #ifdef HAVE_LCD_BITMAP
600 OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW,
601 false, "Screen Scrolls Out Of View", NULL),
602 INT_SETTING(0, scroll_step, LANG_SCROLL_STEP, 6, "scroll step",
603 UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, lcd_scroll_step),
604 INT_SETTING(0, screen_scroll_step, LANG_SCREEN_SCROLL_STEP,
605 16, "screen scroll step",
606 UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, NULL),
607 #endif /* HAVE_LCD_BITMAP */
608 #ifdef HAVE_LCD_CHARCELLS
609 INT_SETTING(0, jump_scroll, LANG_JUMP_SCROLL, 0, "jump scroll",
610 UNIT_INT, 0, 5, 1, jumpscroll_format, jumpscroll_getlang, lcd_jump_scroll),
611 INT_SETTING(0, jump_scroll_delay, LANG_JUMP_SCROLL_DELAY, 500, "jump scroll delay",
612 UNIT_MS, 0, 2500, 100, NULL, NULL, lcd_jump_scroll_delay),
613 #endif
614 OFFON_SETTING(0,scroll_paginated,LANG_SCROLL_PAGINATED,
615 false,"scroll paginated",NULL),
616 #ifdef HAVE_LCD_COLOR
617 {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.fg_color,-1,INT(LCD_DEFAULT_FG),
618 "foreground color",NULL,UNUSED},
619 {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.bg_color,-1,INT(LCD_DEFAULT_BG),
620 "background color",NULL,UNUSED},
621 #endif
622 /* more playback */
623 OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL),
624 OFFON_SETTING(0,party_mode,LANG_PARTY_MODE,false,"party mode",NULL),
625 OFFON_SETTING(0,fade_on_stop,LANG_FADE_ON_STOP,true,"volume fade",NULL),
626 INT_SETTING_W_CFGVALS(F_FLIPLIST, ff_rewind_min_step, LANG_FFRW_STEP, FF_REWIND_1000,
627 "scan min step", "1,2,3,4,5,6,8,10,15,20,25,30,45,60", UNIT_SEC,
628 13, 0, -1, ff_rewind_min_step_formatter,
629 ff_rewind_min_step_getlang, NULL),
630 INT_SETTING(0, ff_rewind_accel, LANG_FFRW_ACCEL, 3, "scan accel",
631 UNIT_SEC, 16, 0, -1, scanaccel_formatter, scanaccel_getlang, NULL),
632 #if (CONFIG_CODEC == SWCODEC) && !defined(HAVE_FLASH_STORAGE)
633 STRINGCHOICE_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0,"antiskip",
634 "5s,15s,30s,1min,2min,3min,5min,10min",NULL, 8,
635 TALK_ID(5, UNIT_SEC), TALK_ID(15, UNIT_SEC),
636 TALK_ID(30, UNIT_SEC), TALK_ID(1, UNIT_MIN), TALK_ID(2, UNIT_MIN),
637 TALK_ID(3, UNIT_MIN), TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN)),
638 #elif !defined(HAVE_FLASH_STORAGE)
639 INT_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0, "antiskip",
640 UNIT_SEC, 0, 7, 1, NULL, NULL, audio_set_buffer_margin),
641 #endif
642 /* disk */
643 #ifndef HAVE_FLASH_STORAGE
644 INT_SETTING(0, disk_spindown, LANG_SPINDOWN, 5, "disk spindown",
645 UNIT_SEC, 3, 254, 1, NULL, NULL, ata_spindown),
646 #endif /* HAVE_FLASH_STORAGE */
647 /* browser */
648 CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files",
649 "all,supported,music,playlists", NULL, 4, ID2P(LANG_ALL),
650 ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC), ID2P(LANG_PLAYLISTS)),
651 OFFON_SETTING(0,sort_case,LANG_SORT_CASE,false,"sort case",NULL),
652 OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL),
653 OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true,
654 "playlist viewer icons",NULL),
655 OFFON_SETTING(0,playlist_viewer_indices,LANG_SHOW_INDICES,true,
656 "playlist viewer indices",NULL),
657 CHOICE_SETTING(0, playlist_viewer_track_display, LANG_TRACK_DISPLAY, 0,
658 "playlist viewer track display","track name,full path", NULL, 2,
659 ID2P(LANG_DISPLAY_TRACK_NAME_ONLY), ID2P(LANG_DISPLAY_FULL_PATH)),
660 CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_OFF,
661 "recursive directory insert", off_on_ask, NULL , 3 ,
662 ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_ASK)),
663 /* bookmarks */
664 CHOICE_SETTING(0, autocreatebookmark, LANG_BOOKMARK_SETTINGS_AUTOCREATE,
665 BOOKMARK_NO, "autocreate bookmarks",
666 "off,on,ask,recent only - on,recent only - ask", NULL, 5,
667 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
668 ID2P(LANG_ASK), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES),
669 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK)),
670 CHOICE_SETTING(0, autoloadbookmark, LANG_BOOKMARK_SETTINGS_AUTOLOAD,
671 BOOKMARK_NO, "autoload bookmarks", off_on_ask, NULL, 3,
672 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), ID2P(LANG_ASK)),
673 CHOICE_SETTING(0, usemrb, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS,
674 BOOKMARK_NO, "use most-recent-bookmarks", "off,on,unique only", NULL, 3,
675 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
676 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY)),
677 #ifdef HAVE_LCD_BITMAP
678 /* peak meter */
679 STRINGCHOICE_SETTING(0, peak_meter_clip_hold, LANG_PM_CLIP_HOLD, 16,
680 "peak meter clip hold",
681 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
682 ",3min,5min,10min,20min,45min,90min", peak_meter_set_clip_hold,
683 25, LANG_PM_ETERNAL,
684 TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC), TALK_ID(3, UNIT_SEC),
685 TALK_ID(4, UNIT_SEC), TALK_ID(5, UNIT_SEC), TALK_ID(6, UNIT_SEC),
686 TALK_ID(7, UNIT_SEC), TALK_ID(8, UNIT_SEC), TALK_ID(9, UNIT_SEC),
687 TALK_ID(10, UNIT_SEC), TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC),
688 TALK_ID(25, UNIT_SEC), TALK_ID(30, UNIT_SEC), TALK_ID(45, UNIT_SEC),
689 TALK_ID(60, UNIT_SEC), TALK_ID(90, UNIT_SEC), TALK_ID(2, UNIT_MIN),
690 TALK_ID(3, UNIT_MIN), TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN),
691 TALK_ID(20, UNIT_MIN), TALK_ID(45, UNIT_MIN), TALK_ID(90, UNIT_MIN)),
692 STRINGCHOICE_SETTING(0, peak_meter_hold, LANG_PM_PEAK_HOLD, 3,
693 "peak meter hold",
694 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
695 NULL, 18, LANG_OFF,
696 TALK_ID(200, UNIT_MS), TALK_ID(300, UNIT_MS), TALK_ID(500, UNIT_MS),
697 TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC), TALK_ID(3, UNIT_SEC),
698 TALK_ID(4, UNIT_SEC), TALK_ID(5, UNIT_SEC), TALK_ID(6, UNIT_SEC),
699 TALK_ID(7, UNIT_SEC), TALK_ID(8, UNIT_SEC), TALK_ID(9, UNIT_SEC),
700 TALK_ID(10, UNIT_SEC), TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC),
701 TALK_ID(30, UNIT_SEC), TALK_ID(60, UNIT_SEC)),
702 INT_SETTING(0, peak_meter_release, LANG_PM_RELEASE, 8, "peak meter release",
703 LANG_PM_UNITS_PER_READ, 1, 0x7e1, 1, NULL, NULL,NULL),
704 OFFON_SETTING(0,peak_meter_dbfs,LANG_PM_DBFS,true,"peak meter dbfs",NULL),
705 {F_T_INT,&global_settings.peak_meter_min,LANG_PM_MIN,INT(60),"peak meter min",NULL,UNUSED},
706 {F_T_INT,&global_settings.peak_meter_max,LANG_PM_MAX,INT(0),"peak meter max",NULL,UNUSED},
707 #endif
708 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
709 SOUND_SETTING(0, mdb_strength, LANG_MDB_STRENGTH,
710 "mdb strength", SOUND_MDB_STRENGTH),
711 SOUND_SETTING(0, mdb_harmonics, LANG_MDB_HARMONICS,
712 "mdb harmonics", SOUND_MDB_HARMONICS),
713 SOUND_SETTING(0, mdb_center, LANG_MDB_CENTER,
714 "mdb center", SOUND_MDB_CENTER),
715 SOUND_SETTING(0, mdb_shape, LANG_MDB_SHAPE,
716 "mdb shape", SOUND_MDB_SHAPE),
717 OFFON_SETTING(0, mdb_enable, LANG_MDB_ENABLE,
718 false, "mdb enable", set_mdb_enable),
719 #endif
720 #if CONFIG_CODEC == MAS3507D
721 OFFON_SETTING(0,line_in,LANG_LINE_IN,false,"line in",NULL),
722 #endif
723 /* voice */
724 OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL),
725 CHOICE_SETTING(0, talk_dir, LANG_VOICE_DIR, 0,
726 "talk dir", off_number_spell, NULL, 3,
727 ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
728 ID2P(LANG_VOICE_SPELL)),
729 OFFON_SETTING(F_TEMPVAR, talk_dir_clip, LANG_VOICE_DIR_TALK, false, "talk dir clip", NULL),
730 CHOICE_SETTING(0, talk_file, LANG_VOICE_FILE, 0,
731 "talk file", off_number_spell, NULL, 3,
732 ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
733 ID2P(LANG_VOICE_SPELL)),
734 OFFON_SETTING(F_TEMPVAR, talk_file_clip, LANG_VOICE_FILE_TALK, false, "talk file clip", NULL),
736 /* file sorting */
737 CHOICE_SETTING(0, sort_file, LANG_SORT_FILE, 0 ,
738 "sort files", "alpha,oldest,newest,type", NULL, 4,
739 ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE),
740 ID2P(LANG_SORT_DATE_REVERSE) , ID2P(LANG_SORT_TYPE)),
741 CHOICE_SETTING(0, sort_dir, LANG_SORT_DIR, 0 ,
742 "sort dirs", "alpha,oldest,newest", NULL, 3,
743 ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE),
744 ID2P(LANG_SORT_DATE_REVERSE)),
745 BOOL_SETTING(0, id3_v1_first, LANG_ID3_ORDER, false,
746 "id3 tag priority", "v2-v1,v1-v2",
747 LANG_ID3_V1_FIRST, LANG_ID3_V2_FIRST, mpeg_id3_options),
749 #ifdef HAVE_RECORDING
750 /* recording */
751 STRINGCHOICE_SETTING(F_RECSETTING, rec_timesplit, LANG_SPLIT_TIME, 0,
752 "rec timesplit",
753 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
754 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
755 NULL, 16, LANG_OFF,
756 TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN), TALK_ID(15, UNIT_MIN),
757 TALK_ID(30, UNIT_MIN), TALK_ID(60, UNIT_MIN), TALK_ID(74, UNIT_MIN),
758 TALK_ID(80, UNIT_MIN), TALK_ID(2, UNIT_HOUR), TALK_ID(4, UNIT_HOUR),
759 TALK_ID(6, UNIT_HOUR), TALK_ID(8, UNIT_HOUR), TALK_ID(10, UNIT_HOUR),
760 TALK_ID(12, UNIT_HOUR), TALK_ID(18, UNIT_HOUR), TALK_ID(20, UNIT_HOUR),
761 TALK_ID(24, UNIT_HOUR)),
762 STRINGCHOICE_SETTING(F_RECSETTING, rec_sizesplit, LANG_SPLIT_SIZE, 0,
763 "rec sizesplit",
764 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
765 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
766 NULL, 16, LANG_OFF,
767 TALK_ID(5, UNIT_MB), TALK_ID(10, UNIT_MB), TALK_ID(15, UNIT_MB),
768 TALK_ID(32, UNIT_MB), TALK_ID(64, UNIT_MB), TALK_ID(75, UNIT_MB),
769 TALK_ID(100, UNIT_MB), TALK_ID(128, UNIT_MB), TALK_ID(256, UNIT_MB),
770 TALK_ID(512, UNIT_MB), TALK_ID(650, UNIT_MB), TALK_ID(700, UNIT_MB),
771 TALK_ID(1024, UNIT_MB), TALK_ID(1536, UNIT_MB), TALK_ID(1792, UNIT_MB)),
772 {F_T_INT|F_RECSETTING, &global_settings.rec_channels,
773 LANG_CHANNELS, INT(0),
774 "rec channels","stereo,mono",UNUSED},
775 CHOICE_SETTING(F_RECSETTING, rec_split_type, LANG_SPLIT_TYPE, 0 ,
776 "rec split type", "Split, Stop", NULL, 2,
777 ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING)),
778 CHOICE_SETTING(F_RECSETTING, rec_split_method, LANG_SPLIT_MEASURE, 0 ,
779 "rec split method", "Time,Filesize", NULL, 2,
780 ID2P(LANG_TIME), ID2P(LANG_REC_SIZE)),
781 {F_T_INT|F_RECSETTING, &global_settings.rec_source,
782 LANG_RECORDING_SOURCE, INT(0),
783 "rec source",
784 &HAVE_MIC_REC_(",mic")
785 HAVE_LINE_REC_(",line")
786 HAVE_SPDIF_REC_(",spdif")
787 HAVE_FMRADIO_REC_(",fmradio")[1]
788 ,UNUSED},
789 INT_SETTING(F_RECSETTING, rec_prerecord_time, LANG_RECORD_PRERECORD_TIME,
790 0, "prerecording time",
791 UNIT_SEC, 0, 30, 1, rectime_formatter, rectime_getlang, NULL),
793 FILENAME_SETTING(F_RECSETTING, rec_directory, "rec path",
794 REC_BASE_DIR, NULL, NULL, MAX_FILENAME+1),
795 #ifdef HAVE_BACKLIGHT
796 CHOICE_SETTING(F_RECSETTING, cliplight, LANG_CLIP_LIGHT, 0 ,
797 "cliplight", "off,main,both,remote", NULL,
798 #ifdef HAVE_REMOTE_LCD
799 4, ID2P(LANG_OFF), ID2P(LANG_MAIN_UNIT), ID2P(LANG_REMOTE_MAIN),
800 ID2P(LANG_REMOTE_UNIT)
801 #else
802 2, ID2P(LANG_OFF), ID2P(LANG_ON)
803 #endif
805 {F_T_INT|F_RECSETTING,&global_settings.cliplight,LANG_CLIP_LIGHT,INT(0),
806 "cliplight","off,main,both,remote",UNUSED},
807 #endif
808 #ifdef DEFAULT_REC_MIC_GAIN
809 {F_T_INT|F_RECSETTING,&global_settings.rec_mic_gain,
810 LANG_GAIN,INT(DEFAULT_REC_MIC_GAIN),
811 "rec mic gain",NULL,UNUSED},
812 #endif /* DEFAULT_REC_MIC_GAIN */
813 #ifdef DEFAULT_REC_LEFT_GAIN
814 {F_T_INT|F_RECSETTING,&global_settings.rec_left_gain,
815 LANG_RECORDING_LEFT,INT(DEFAULT_REC_LEFT_GAIN),
816 "rec left gain",NULL,UNUSED},
817 #endif /* DEFAULT_REC_LEFT_GAIN */
818 #ifdef DEFAULT_REC_RIGHT_GAIN
819 {F_T_INT|F_RECSETTING,&global_settings.rec_right_gain,LANG_RECORDING_RIGHT,
820 INT(DEFAULT_REC_RIGHT_GAIN),
821 "rec right gain",NULL,UNUSED},
822 #endif /* DEFAULT_REC_RIGHT_GAIN */
823 #if CONFIG_CODEC == MAS3587F
824 {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
825 LANG_RECORDING_FREQUENCY,
826 INT(0),"rec frequency","44,48,32,22,24,16",UNUSED},
827 INT_SETTING(F_RECSETTING, rec_quality, LANG_RECORDING_QUALITY,
828 5, "rec quality",
829 UNIT_INT, 0, 7, 1, NULL, NULL, NULL),
830 OFFON_SETTING(F_RECSETTING,rec_editable,LANG_RECORDING_EDITABLE,
831 false,"editable recordings",NULL),
832 #endif /* CONFIG_CODEC == MAS3587F */
833 #if CONFIG_CODEC == SWCODEC
834 {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
835 LANG_RECORDING_FREQUENCY,INT(REC_FREQ_DEFAULT),
836 "rec frequency",REC_FREQ_CFG_VAL_LIST,UNUSED},
837 {F_T_INT|F_RECSETTING,&global_settings.rec_format,
838 LANG_RECORDING_FORMAT,INT(REC_FORMAT_DEFAULT),
839 "rec format",REC_FORMAT_CFG_VAL_LIST,UNUSED},
840 /** Encoder settings start - keep these together **/
841 /* aiff_enc */
842 /* (no settings yet) */
843 /* mp3_enc */
844 {F_T_INT|F_RECSETTING, &global_settings.mp3_enc_config.bitrate,-1,
845 INT(MP3_ENC_BITRATE_CFG_DEFAULT),
846 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST,UNUSED},
847 /* wav_enc */
848 /* (no settings yet) */
849 /* wavpack_enc */
850 /* (no settings yet) */
851 /** Encoder settings end **/
852 #endif /* CONFIG_CODEC == SWCODEC */
853 /* values for the trigger */
854 {F_T_INT|F_RECSETTING,&global_settings.rec_start_thres,
855 LANG_RECORD_START_THRESHOLD, INT(-35),
856 "trigger start threshold",NULL,UNUSED},
857 {F_T_INT|F_RECSETTING,&global_settings.rec_stop_thres,
858 LANG_RECORD_STOP_THRESHOLD,INT(-45),
859 "trigger stop threshold",NULL,UNUSED},
860 {F_T_INT|F_RECSETTING,&global_settings.rec_start_duration,
861 LANG_MIN_DURATION,INT(0),
862 "trigger start duration",trig_durations_conf,UNUSED},
863 {F_T_INT|F_RECSETTING,&global_settings.rec_stop_postrec,
864 LANG_MIN_DURATION,INT(2),
865 "trigger stop postrec",trig_durations_conf,UNUSED},
866 {F_T_INT|F_RECSETTING,&global_settings.rec_stop_gap,
867 LANG_RECORD_STOP_GAP,INT(1),
868 "trigger min gap",trig_durations_conf,UNUSED},
869 {F_T_INT|F_RECSETTING,&global_settings.rec_trigger_mode,
870 LANG_RECORD_TRIGGER,INT(0),
871 "trigger mode","off,once,repeat",UNUSED},
872 #endif /* HAVE_RECORDING */
874 #ifdef HAVE_SPDIF_POWER
875 OFFON_SETTING(0, spdif_enable, LANG_SPDIF_ENABLE, false,
876 "spdif enable", spdif_power_enable),
877 #endif
878 CHOICE_SETTING(0, next_folder, LANG_NEXT_FOLDER, FOLDER_ADVANCE_OFF,
879 "folder navigation", "off,on,random",NULL ,3,
880 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), ID2P(LANG_RANDOM)),
881 OFFON_SETTING(0,runtimedb,LANG_RUNTIMEDB_ACTIVE,false,"gather runtime data",NULL),
883 #if CONFIG_CODEC == SWCODEC
884 /* replay gain */
885 OFFON_SETTING(0, replaygain, LANG_REPLAYGAIN_ENABLE, false, "replaygain", NULL),
886 CHOICE_SETTING(0, replaygain_type, LANG_REPLAYGAIN_MODE, REPLAYGAIN_ALBUM,
887 "replaygain type", "track,album,track shuffle", NULL, 3,
888 ID2P(LANG_TRACK_GAIN), ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN)),
889 OFFON_SETTING(0, replaygain_noclip, LANG_REPLAYGAIN_NOCLIP,
890 false, "replaygain noclip", NULL),
891 INT_SETTING(0, replaygain_preamp, LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp",
892 UNIT_DB, -120, 120, 5, replaygain_preamp_format, NULL, NULL),
894 CHOICE_SETTING(0, beep, LANG_BEEP, 0,
895 "beep", "off,weak,moderate,strong", NULL, 4,
896 ID2P(LANG_OFF), ID2P(LANG_WEAK), ID2P(LANG_MODERATE), ID2P(LANG_STRONG)),
898 /* crossfade */
899 CHOICE_SETTING(0, crossfade, LANG_CROSSFADE_ENABLE, 0, "crossfade",
900 "off,shuffle,track skip,shuffle and track skip,always",NULL, 5,
901 ID2P(LANG_OFF), ID2P(LANG_SHUFFLE), ID2P(LANG_TRACKSKIP),
902 ID2P(LANG_SHUFFLE_TRACKSKIP), ID2P(LANG_ALWAYS)),
903 INT_SETTING(0, crossfade_fade_in_delay, LANG_CROSSFADE_FADE_IN_DELAY, 0,
904 "crossfade fade in delay", UNIT_SEC, 0, 7, 1, NULL, NULL, NULL),
905 INT_SETTING(0, crossfade_fade_out_delay, LANG_CROSSFADE_FADE_OUT_DELAY, 0,
906 "crossfade fade out delay", UNIT_SEC, 0, 7, 1, NULL, NULL, NULL),
907 INT_SETTING(0, crossfade_fade_in_duration, LANG_CROSSFADE_FADE_IN_DURATION, 2,
908 "crossfade fade in duration", UNIT_SEC, 0, 15, 1, NULL, NULL, NULL),
909 INT_SETTING(0, crossfade_fade_out_duration, LANG_CROSSFADE_FADE_OUT_DURATION, 2,
910 "crossfade fade out duration", UNIT_SEC, 0, 15, 1, NULL, NULL, NULL),
911 CHOICE_SETTING(0, crossfade_fade_out_mixmode, LANG_CROSSFADE_FADE_OUT_MODE,
912 0, "crossfade fade out mode", "crossfade,mix", NULL, 2,
913 ID2P(LANG_CROSSFADE), ID2P(LANG_MIX)),
915 /* crossfeed */
916 OFFON_SETTING(0,crossfeed, LANG_CROSSFEED, false,
917 "crossfeed", dsp_set_crossfeed),
918 INT_SETTING(0, crossfeed_direct_gain, LANG_CROSSFEED_DIRECT_GAIN, 15,
919 "crossfeed direct gain", UNIT_DB, 0, 60, 5,
920 crossfeed_format, NULL, dsp_set_crossfeed_direct_gain),
921 INT_SETTING(0, crossfeed_cross_gain, LANG_CROSSFEED_CROSS_GAIN, 60,
922 "crossfeed cross gain", UNIT_DB, 30, 120, 5,
923 crossfeed_format, NULL, crossfeed_cross_set),
924 INT_SETTING(0, crossfeed_hf_attenuation, LANG_CROSSFEED_HF_ATTENUATION, 160,
925 "crossfeed hf attenuation", UNIT_DB, 60, 240, 5,
926 crossfeed_format, NULL, crossfeed_cross_set),
927 INT_SETTING(0, crossfeed_hf_cutoff, LANG_CROSSFEED_HF_CUTOFF, 700,
928 "crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100,
929 NULL, NULL, crossfeed_cross_set),
930 /* equalizer */
931 OFFON_SETTING(0,eq_enabled,LANG_EQUALIZER_ENABLED,false,"eq enabled",NULL),
932 INT_SETTING(0, eq_precut, LANG_EQUALIZER_PRECUT, 0, "eq precut",
933 UNIT_DB, 0, 240, 5, eq_precut_format, NULL, dsp_set_eq_precut),
934 /* 0..32768 Hz */
935 INT_SETTING(0, eq_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 60, "eq band 0 cutoff",
936 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
937 NULL, NULL, NULL),
938 INT_SETTING(0, eq_band1_cutoff, LANG_EQUALIZER_BAND_CENTER, 200, "eq band 1 cutoff",
939 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
940 NULL, NULL, NULL),
941 INT_SETTING(0, eq_band2_cutoff, LANG_EQUALIZER_BAND_CENTER, 800, "eq band 2 cutoff",
942 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
943 NULL, NULL, NULL),
944 INT_SETTING(0, eq_band3_cutoff, LANG_EQUALIZER_BAND_CENTER, 4000, "eq band 3 cutoff",
945 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
946 NULL, NULL, NULL),
947 INT_SETTING(0, eq_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 12000, "eq band 4 cutoff",
948 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
949 NULL, NULL, NULL),
950 /* 0..64 (or 0.0 to 6.4) */
951 INT_SETTING(0, eq_band0_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 0 q",
952 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
953 eq_q_format, NULL, NULL),
954 INT_SETTING(0, eq_band1_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 1 q",
955 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
956 eq_q_format, NULL, NULL),
957 INT_SETTING(0, eq_band2_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 2 q",
958 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
959 eq_q_format, NULL, NULL),
960 INT_SETTING(0, eq_band3_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 3 q",
961 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
962 eq_q_format, NULL, NULL),
963 INT_SETTING(0, eq_band4_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 4 q",
964 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
965 eq_q_format, NULL, NULL),
966 /* -240..240 (or -24db to +24db) */
967 INT_SETTING(0, eq_band0_gain, LANG_GAIN, 0, "eq band 0 gain",
968 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
969 eq_gain_format, NULL, NULL),
970 INT_SETTING(0, eq_band1_gain, LANG_GAIN, 0, "eq band 1 gain",
971 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
972 eq_gain_format, NULL, NULL),
973 INT_SETTING(0, eq_band2_gain, LANG_GAIN, 0, "eq band 2 gain",
974 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
975 eq_gain_format, NULL, NULL),
976 INT_SETTING(0, eq_band3_gain, LANG_GAIN, 0, "eq band 3 gain",
977 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
978 eq_gain_format, NULL, NULL),
979 INT_SETTING(0, eq_band4_gain, LANG_GAIN, 0, "eq band 4 gain",
980 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
981 eq_gain_format, NULL, NULL),
983 /* dithering */
984 OFFON_SETTING(0, dithering_enabled, LANG_DITHERING,
985 false, "dithering enabled", dsp_dither_enable),
986 #endif
987 #ifdef HAVE_DIRCACHE
988 OFFON_SETTING(0,dircache,LANG_DIRCACHE_ENABLE,false,"dircache",NULL),
989 SYSTEM_SETTING(NVRAM(4),dircache_size,0),
990 #endif
992 #ifdef HAVE_TAGCACHE
993 #ifdef HAVE_TC_RAMCACHE
994 OFFON_SETTING(0,tagcache_ram,LANG_TAGCACHE_RAM,false,"tagcache_ram",NULL),
995 #endif
996 OFFON_SETTING(0,tagcache_autoupdate,
997 LANG_TAGCACHE_AUTOUPDATE,false,"tagcache_autoupdate",NULL),
998 #endif
999 CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
1000 "default codepage",
1001 #ifdef HAVE_LCD_BITMAP
1002 /* The order must match with that in unicode.c */
1003 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1004 "iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8",
1005 set_codepage, 13,
1006 ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
1007 ID2P(LANG_CODEPAGE_HEBREW), ID2P(LANG_CODEPAGE_CYRILLIC),
1008 ID2P(LANG_CODEPAGE_THAI), ID2P(LANG_CODEPAGE_ARABIC),
1009 ID2P(LANG_CODEPAGE_TURKISH), ID2P(LANG_CODEPAGE_LATIN_EXTENDED),
1010 ID2P(LANG_CODEPAGE_JAPANESE), ID2P(LANG_CODEPAGE_SIMPLIFIED),
1011 ID2P(LANG_CODEPAGE_KOREAN), ID2P(LANG_CODEPAGE_TRADITIONAL),
1012 ID2P(LANG_CODEPAGE_UTF8)),
1013 #else /* !HAVE_LCD_BITMAP */
1014 /* The order must match with that in unicode.c */
1015 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,utf-8",
1016 set_codepage, 6,
1017 ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
1018 ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH),
1019 ID2P(LANG_CODEPAGE_LATIN_EXTENDED), ID2P(LANG_CODEPAGE_UTF8)),
1020 #endif
1021 OFFON_SETTING(0,warnon_erase_dynplaylist,
1022 LANG_WARN_ERASEDYNPLAYLIST_MENU,false,
1023 "warn when erasing dynamic playlist",NULL),
1025 #ifdef HAVE_BACKLIGHT
1026 #ifdef HAS_BUTTON_HOLD
1027 CHOICE_SETTING(0, backlight_on_button_hold,
1028 LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "backlight on button hold",
1029 "normal,off,on", backlight_set_on_button_hold, 3,
1030 ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
1031 #endif
1033 #ifdef HAVE_LCD_SLEEP
1034 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off,
1035 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF, 3,
1036 "lcd sleep after backlight off",
1037 "always,never,5,10,15,20,30,45,60,90", lcd_set_sleep_after_backlight_off,
1038 10, LANG_ALWAYS, LANG_NEVER, TALK_ID(5, UNIT_SEC), TALK_ID(10, UNIT_SEC),
1039 TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC),
1040 TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC), TALK_ID(90, UNIT_SEC)),
1041 #endif
1042 #endif /* HAVE_BACKLIGHT */
1044 #ifdef HAVE_WM8758
1045 OFFON_SETTING(0,eq_hw_enabled,LANG_EQUALIZER_HARDWARE_ENABLED,false,
1046 "eq hardware enabled",NULL),
1048 STRINGCHOICE_SETTING(0, eq_hw_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 1,
1049 "eq hardware band 0 cutoff", "80Hz,105Hz,135Hz,175Hz", NULL, 4,
1050 TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ),
1051 TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)),
1052 INT_SETTING(0, eq_hw_band0_gain, LANG_GAIN, 0,
1053 "eq hardware band 0 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1054 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1056 STRINGCHOICE_SETTING(0, eq_hw_band1_center, LANG_EQUALIZER_BAND_CENTER, 1,
1057 "eq hardware band 1 center", "230Hz,300Hz,385Hz,500Hz", NULL, 4,
1058 TALK_ID(230, UNIT_HERTZ), TALK_ID(300, UNIT_HERTZ),
1059 TALK_ID(385, UNIT_HERTZ), TALK_ID(500, UNIT_HERTZ)),
1060 CHOICE_SETTING(0, eq_hw_band1_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0,
1061 "eq hardware band 1 bandwidth", "narrow,wide", NULL, 2,
1062 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
1063 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
1064 INT_SETTING(0, eq_hw_band1_gain, LANG_GAIN, 0,
1065 "eq hardware band 1 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1066 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1068 STRINGCHOICE_SETTING(0, eq_hw_band2_center, LANG_EQUALIZER_BAND_CENTER, 1,
1069 "eq hardware band 2 center", "650Hz,850Hz,1.1kHz,1.4kHz", NULL, 4,
1070 TALK_ID(650, UNIT_HERTZ), TALK_ID(850, UNIT_HERTZ),
1071 TALK_ID(1100, UNIT_HERTZ), TALK_ID(1400, UNIT_HERTZ)),
1072 CHOICE_SETTING(0, eq_hw_band2_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0,
1073 "eq hardware band 2 bandwidth", "narrow,wide", NULL, 2,
1074 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
1075 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
1076 INT_SETTING(0, eq_hw_band2_gain, LANG_GAIN, 0,
1077 "eq hardware band 2 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1078 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1080 STRINGCHOICE_SETTING(0, eq_hw_band3_center, LANG_EQUALIZER_BAND_CENTER, 1,
1081 "eq hardware band 3 center", "1.8kHz,2.4kHz,3.2kHz,4.1kHz", NULL, 4,
1082 TALK_ID(1800, UNIT_HERTZ), TALK_ID(2400, UNIT_HERTZ),
1083 TALK_ID(3200, UNIT_HERTZ), TALK_ID(4100, UNIT_HERTZ)),
1084 CHOICE_SETTING(0, eq_hw_band3_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0,
1085 "eq hardware band 3 bandwidth", "narrow,wide", NULL, 2,
1086 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
1087 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
1088 INT_SETTING(0, eq_hw_band3_gain, LANG_GAIN, 0,
1089 "eq hardware band 3 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1090 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1092 STRINGCHOICE_SETTING(0, eq_hw_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 1,
1093 "eq hardware band 4 cutoff", "5.3kHz,6.9kHz,9kHz,11.7kHz", NULL, 4,
1094 TALK_ID(5300, UNIT_HERTZ), TALK_ID(6900, UNIT_HERTZ),
1095 TALK_ID(9000, UNIT_HERTZ), TALK_ID(11700, UNIT_HERTZ)),
1096 INT_SETTING(0, eq_hw_band4_gain, LANG_GAIN, 0,
1097 "eq hardware band 4 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1098 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1099 #endif
1101 OFFON_SETTING(0,hold_lr_for_scroll_in_list,-1,true,
1102 "hold_lr_for_scroll_in_list",NULL),
1103 CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_OFF,
1104 "show path in browser", "off,current directory,full path", NULL, 3,
1105 ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT), ID2P(LANG_DISPLAY_FULL_PATH)),
1107 #ifdef HAVE_AGC
1108 {F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORD_AGC_PRESET,INT(1),
1109 "agc mic preset",NULL,UNUSED},
1110 {F_T_INT,&global_settings.rec_agc_preset_line,LANG_RECORD_AGC_PRESET,INT(1),
1111 "agc line preset",NULL,UNUSED},
1112 {F_T_INT,&global_settings.rec_agc_maxgain_mic,-1,INT(104),
1113 "agc maximum mic gain",NULL,UNUSED},
1114 {F_T_INT,&global_settings.rec_agc_maxgain_line,-1,INT(96),
1115 "agc maximum line gain",NULL,UNUSED},
1116 {F_T_INT,&global_settings.rec_agc_cliptime,LANG_RECORD_AGC_CLIPTIME,INT(1),
1117 "agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED},
1118 #endif
1120 #ifdef HAVE_REMOTE_LCD
1121 #ifdef HAS_REMOTE_BUTTON_HOLD
1122 CHOICE_SETTING(0, remote_backlight_on_button_hold,
1123 LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "remote backlight on button hold",
1124 "normal,off,on", remote_backlight_set_on_button_hold, 3,
1125 ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
1126 #endif
1127 #endif
1128 #ifdef HAVE_HEADPHONE_DETECTION
1129 CHOICE_SETTING(0, unplug_mode, LANG_HEADPHONE_UNPLUG, 0,
1130 "pause on headphone unplug", "off,pause,pause and resume", NULL, 3,
1131 ID2P(LANG_OFF), ID2P(LANG_PAUSE), ID2P(LANG_HEADPHONE_UNPLUG_RESUME)),
1132 INT_SETTING(0, unplug_rw, LANG_HEADPHONE_UNPLUG_RW, 0, "rewind duration on pause",
1133 UNIT_SEC, 0, 15, 1, NULL, NULL,NULL) ,
1134 OFFON_SETTING(0,unplug_autoresume,LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME,false,
1135 "disable autoresume if phones not present",NULL),
1136 #endif
1137 #if CONFIG_TUNER
1138 CHOICE_SETTING(0, fm_region, LANG_FM_REGION, 0,
1139 "fm_region", "eu,us,jp,kr", set_radio_region, 4, ID2P(LANG_FM_EUROPE),
1140 ID2P(LANG_FM_US), ID2P(LANG_FM_JAPAN), ID2P(LANG_FM_KOREA)),
1141 #endif
1143 OFFON_SETTING(0,audioscrobbler,LANG_AUDIOSCROBBLER,
1144 false,"Last.fm Logging",NULL),
1146 #ifdef HAVE_RECORDING
1147 {F_T_INT|F_RECSETTING,&global_settings.rec_trigger_type,
1148 LANG_RECORD_TRIGGER_TYPE,
1149 INT(0),"trigger type","stop,pause,nf stp",UNUSED},
1150 #endif
1152 /** settings not in the old config blocks **/
1153 #if CONFIG_TUNER
1154 FILENAME_SETTING(0, fmr_file, "fmr",
1155 "", FMPRESET_PATH "/", ".fmr", MAX_FILENAME+1),
1156 #endif
1157 FILENAME_SETTING(F_THEMESETTING, font_file, "font",
1158 "", FONT_DIR "/", ".fnt", MAX_FILENAME+1),
1159 FILENAME_SETTING(F_THEMESETTING,wps_file, "wps",
1160 "", WPS_DIR "/", ".wps", MAX_FILENAME+1),
1161 FILENAME_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng",MAX_FILENAME+1),
1162 #ifdef HAVE_REMOTE_LCD
1163 FILENAME_SETTING(F_THEMESETTING,rwps_file,"rwps",
1164 "", WPS_DIR "/", ".rwps", MAX_FILENAME+1),
1165 #endif
1166 #if LCD_DEPTH > 1
1167 FILENAME_SETTING(F_THEMESETTING,backdrop_file,"backdrop",
1168 "", BACKDROP_DIR "/", ".bmp", MAX_FILENAME+1),
1169 #endif
1170 #ifdef HAVE_LCD_BITMAP
1171 FILENAME_SETTING(0,kbd_file,"kbd","",ROCKBOX_DIR "/",".kbd",MAX_FILENAME+1),
1172 #endif
1173 #ifdef HAVE_USB_POWER
1174 #if CONFIG_CHARGING
1175 OFFON_SETTING(0,usb_charging,LANG_USB_CHARGING,false,"usb charging",NULL),
1176 #endif
1177 #endif
1178 OFFON_SETTING(0,cuesheet,LANG_CUESHEET_ENABLE,false,"cuesheet support", NULL),
1179 CHOICE_SETTING(0, start_in_screen, LANG_START_SCREEN, 1,
1180 "start in screen", "previous,root,files,db,wps,menu,"
1181 #ifdef HAVE_RECORDING
1182 "recording,"
1183 #endif
1184 #if CONFIG_TUNER
1185 "radio,"
1186 #endif
1187 "bookmarks" ,NULL,
1188 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1190 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1192 #else
1194 #endif
1195 ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU),
1196 ID2P(LANG_DIR_BROWSER), ID2P(LANG_TAGCACHE),
1197 ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_SETTINGS),
1198 #ifdef HAVE_RECORDING
1199 ID2P(LANG_RECORDING),
1200 #endif
1201 #if CONFIG_TUNER
1202 ID2P(LANG_FM_RADIO),
1203 #endif
1204 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS)
1206 SYSTEM_SETTING(NVRAM(1),last_screen,-1),
1207 #if defined(HAVE_RTC_ALARM) && \
1208 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1209 {F_T_INT, &global_settings.alarm_wake_up_screen, LANG_ALARM_WAKEUP_SCREEN,
1210 INT(ALARM_START_WPS), "alarm wakeup screen", ALARM_SETTING_TEXT, UNUSED},
1211 #endif /* HAVE_RTC_ALARM */
1213 /* Customizable icons */
1214 #ifdef HAVE_LCD_BITMAP
1215 FILENAME_SETTING(F_THEMESETTING, icon_file, "iconset", "",
1216 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1217 FILENAME_SETTING(F_THEMESETTING, viewers_icon_file, "viewers iconset", "",
1218 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1219 #endif
1220 #ifdef HAVE_REMOTE_LCD
1221 FILENAME_SETTING(F_THEMESETTING, remote_icon_file, "remote iconset", "",
1222 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1223 FILENAME_SETTING(F_THEMESETTING, remote_viewers_icon_file,
1224 "remote viewers iconset", "",
1225 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1226 #endif /* HAVE_REMOTE_LCD */
1227 #ifdef HAVE_LCD_COLOR
1228 FILENAME_SETTING(F_THEMESETTING, colors_file, "filetype colours", "",
1229 THEME_DIR "/", ".colours", MAX_FILENAME+1),
1230 #endif
1231 #ifdef HAVE_BUTTON_LIGHT
1232 INT_SETTING_W_CFGVALS(F_FLIPLIST, button_light_timeout,
1233 LANG_BUTTONLIGHT_TIMEOUT, 6,
1234 "button light timeout", backlight_times_conf, UNIT_SEC,
1235 0, 18, 1, backlight_formatter, backlight_getlang,
1236 button_backlight_set_timeout),
1237 #endif
1238 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1239 INT_SETTING(0, buttonlight_brightness, LANG_BUTTONLIGHT_BRIGHTNESS, DEFAULT_BRIGHTNESS_SETTING,
1240 "button light brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1,
1241 NULL, NULL, buttonlight_set_brightness),
1242 #endif
1243 #ifndef HAVE_SCROLLWHEEL
1244 INT_SETTING(0, list_accel_start_delay, LANG_LISTACCEL_START_DELAY,
1245 2, "list_accel_start_delay", UNIT_MS, 0, 10, 1,
1246 listaccel_formatter, listaccel_getlang, NULL),
1247 INT_SETTING(0, list_accel_wait, LANG_LISTACCEL_ACCEL_SPEED,
1248 3, "list_accel_wait", UNIT_SEC, 1, 10, 1,
1249 scanaccel_formatter, scanaccel_getlang, NULL),
1250 #endif /* HAVE_SCROLLWHEEL */
1253 const int nb_settings = sizeof(settings)/sizeof(*settings);