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