simple fix for FS#7274 - selected item might not be shown when a list is drawn in...
[Rockbox.git] / apps / settings_list.c
blob91c4cabe1b8e4e2af351cfc35e8e7c22ca5f73a4
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),
779 {F_T_INT|F_RECSETTING,&global_settings.rec_directory,LANG_RECORD_DIRECTORY,
780 INT(0),"rec directory",REC_BASE_DIR ",current",UNUSED},
781 #ifdef HAVE_BACKLIGHT
782 CHOICE_SETTING(F_RECSETTING, cliplight, LANG_CLIP_LIGHT, 0 ,
783 "cliplight", "off,main,both,remote", NULL,
784 #ifdef HAVE_REMOTE_LCD
786 #else
788 #endif
789 ID2P(LANG_OFF), ID2P(LANG_MAIN_UNIT)
790 #ifdef HAVE_REMOTE_LCD
791 , ID2P(LANG_REMOTE_MAIN), ID2P(LANG_REMOTE_UNIT)
792 #endif
794 {F_T_INT|F_RECSETTING,&global_settings.cliplight,LANG_CLIP_LIGHT,INT(0),
795 "cliplight","off,main,both,remote",UNUSED},
796 #endif
797 #ifdef DEFAULT_REC_MIC_GAIN
798 {F_T_INT|F_RECSETTING,&global_settings.rec_mic_gain,
799 LANG_RECORDING_GAIN,INT(DEFAULT_REC_MIC_GAIN),
800 "rec mic gain",NULL,UNUSED},
801 #endif /* DEFAULT_REC_MIC_GAIN */
802 #ifdef DEFAULT_REC_LEFT_GAIN
803 {F_T_INT|F_RECSETTING,&global_settings.rec_left_gain,
804 LANG_RECORDING_LEFT,INT(DEFAULT_REC_LEFT_GAIN),
805 "rec left gain",NULL,UNUSED},
806 #endif /* DEFAULT_REC_LEFT_GAIN */
807 #ifdef DEFAULT_REC_RIGHT_GAIN
808 {F_T_INT|F_RECSETTING,&global_settings.rec_right_gain,LANG_RECORDING_RIGHT,
809 INT(DEFAULT_REC_RIGHT_GAIN),
810 "rec right gain",NULL,UNUSED},
811 #endif /* DEFAULT_REC_RIGHT_GAIN */
812 #if CONFIG_CODEC == MAS3587F
813 {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
814 LANG_RECORDING_FREQUENCY,
815 INT(0),"rec frequency","44,48,32,22,24,16",UNUSED},
816 INT_SETTING(F_RECSETTING, rec_quality, LANG_RECORDING_QUALITY,
817 5, "rec quality",
818 UNIT_INT, 0, 7, 1, NULL, NULL, NULL),
819 OFFON_SETTING(F_RECSETTING,rec_editable,LANG_RECORDING_EDITABLE,
820 false,"editable recordings",NULL),
821 #endif /* CONFIG_CODEC == MAS3587F */
822 #if CONFIG_CODEC == SWCODEC
823 {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
824 LANG_RECORDING_FREQUENCY,INT(REC_FREQ_DEFAULT),
825 "rec frequency",REC_FREQ_CFG_VAL_LIST,UNUSED},
826 {F_T_INT|F_RECSETTING,&global_settings.rec_format,
827 LANG_RECORDING_FORMAT,INT(REC_FORMAT_DEFAULT),
828 "rec format",REC_FORMAT_CFG_VAL_LIST,UNUSED},
829 /** Encoder settings start - keep these together **/
830 /* aiff_enc */
831 /* (no settings yet) */
832 /* mp3_enc */
833 {F_T_INT|F_RECSETTING, &global_settings.mp3_enc_config.bitrate,-1,
834 INT(MP3_ENC_BITRATE_CFG_DEFAULT),
835 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST,UNUSED},
836 /* wav_enc */
837 /* (no settings yet) */
838 /* wavpack_enc */
839 /* (no settings yet) */
840 /** Encoder settings end **/
841 #endif /* CONFIG_CODEC == SWCODEC */
842 /* values for the trigger */
843 {F_T_INT|F_RECSETTING,&global_settings.rec_start_thres,
844 LANG_RECORD_START_THRESHOLD, INT(-35),
845 "trigger start threshold",NULL,UNUSED},
846 {F_T_INT|F_RECSETTING,&global_settings.rec_stop_thres,
847 LANG_RECORD_STOP_THRESHOLD,INT(-45),
848 "trigger stop threshold",NULL,UNUSED},
849 {F_T_INT|F_RECSETTING,&global_settings.rec_start_duration,
850 LANG_RECORD_MIN_DURATION,INT(0),
851 "trigger start duration",trig_durations_conf,UNUSED},
852 {F_T_INT|F_RECSETTING,&global_settings.rec_stop_postrec,
853 LANG_RECORD_STOP_POSTREC,INT(2),
854 "trigger stop postrec",trig_durations_conf,UNUSED},
855 {F_T_INT|F_RECSETTING,&global_settings.rec_stop_gap,
856 LANG_RECORD_STOP_GAP,INT(1),
857 "trigger min gap",trig_durations_conf,UNUSED},
858 {F_T_INT|F_RECSETTING,&global_settings.rec_trigger_mode,
859 LANG_RECORD_TRIGGER_MODE,INT(0),
860 "trigger mode","off,once,repeat",UNUSED},
861 #endif /* HAVE_RECORDING */
863 #ifdef HAVE_SPDIF_POWER
864 OFFON_SETTING(0, spdif_enable, LANG_SPDIF_ENABLE, false,
865 "spdif enable", spdif_power_enable),
866 #endif
867 CHOICE_SETTING(0, next_folder, LANG_NEXT_FOLDER, FOLDER_ADVANCE_OFF,
868 "folder navigation", "off,on,random",NULL ,3,
869 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), ID2P(LANG_RANDOM)),
870 OFFON_SETTING(0,runtimedb,LANG_RUNTIMEDB_ACTIVE,false,"gather runtime data",NULL),
872 #if CONFIG_CODEC == SWCODEC
873 /* replay gain */
874 OFFON_SETTING(0, replaygain, LANG_REPLAYGAIN_ENABLE, false, "replaygain", NULL),
875 CHOICE_SETTING(0, replaygain_type, LANG_REPLAYGAIN_MODE, REPLAYGAIN_ALBUM,
876 "replaygain type", "track,album,track shuffle", NULL, 3,
877 ID2P(LANG_TRACK_GAIN), ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN)),
878 OFFON_SETTING(0, replaygain_noclip, LANG_REPLAYGAIN_NOCLIP,
879 false, "replaygain noclip", NULL),
880 INT_SETTING(0, replaygain_preamp, LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp",
881 UNIT_DB, -120, 120, 5, replaygain_preamp_format, NULL, NULL),
883 CHOICE_SETTING(0, beep, LANG_BEEP, 0,
884 "beep", "off,weak,moderate,strong", NULL, 4,
885 ID2P(LANG_OFF), ID2P(LANG_WEAK), ID2P(LANG_MODERATE), ID2P(LANG_STRONG)),
887 /* crossfade */
888 CHOICE_SETTING(0, crossfade, LANG_CROSSFADE_ENABLE, 0, "crossfade",
889 "off,shuffle,track skip,shuffle and track skip,always",NULL, 5,
890 ID2P(LANG_OFF), ID2P(LANG_SHUFFLE), ID2P(LANG_TRACKSKIP),
891 ID2P(LANG_SHUFFLE_TRACKSKIP), ID2P(LANG_ALWAYS)),
892 INT_SETTING(0, crossfade_fade_in_delay, LANG_CROSSFADE_FADE_IN_DELAY, 0,
893 "crossfade fade in delay", UNIT_SEC, 0, 7, 1, NULL, NULL, NULL),
894 INT_SETTING(0, crossfade_fade_out_delay, LANG_CROSSFADE_FADE_OUT_DELAY, 0,
895 "crossfade fade out delay", UNIT_SEC, 0, 7, 1, NULL, NULL, NULL),
896 INT_SETTING(0, crossfade_fade_in_duration, LANG_CROSSFADE_FADE_IN_DURATION, 2,
897 "crossfade fade in duration", UNIT_SEC, 0, 15, 1, NULL, NULL, NULL),
898 INT_SETTING(0, crossfade_fade_out_duration, LANG_CROSSFADE_FADE_OUT_DURATION, 2,
899 "crossfade fade out duration", UNIT_SEC, 0, 15, 1, NULL, NULL, NULL),
900 CHOICE_SETTING(0, crossfade_fade_out_mixmode, LANG_CROSSFADE_FADE_OUT_MODE,
901 0, "crossfade fade out mode", "crossfade,mix", NULL, 2,
902 ID2P(LANG_CROSSFADE), ID2P(LANG_MIX)),
904 /* crossfeed */
905 OFFON_SETTING(0,crossfeed, LANG_CROSSFEED, false,
906 "crossfeed", dsp_set_crossfeed),
907 INT_SETTING(0, crossfeed_direct_gain, LANG_CROSSFEED_DIRECT_GAIN, 15,
908 "crossfeed direct gain", UNIT_DB, 0, 60, 5,
909 crossfeed_format, NULL, dsp_set_crossfeed_direct_gain),
910 INT_SETTING(0, crossfeed_cross_gain, LANG_CROSSFEED_CROSS_GAIN, 60,
911 "crossfeed cross gain", UNIT_DB, 30, 120, 5,
912 crossfeed_format, NULL, crossfeed_cross_set),
913 INT_SETTING(0, crossfeed_hf_attenuation, LANG_CROSSFEED_HF_ATTENUATION, 160,
914 "crossfeed hf attenuation", UNIT_DB, 60, 240, 5,
915 crossfeed_format, NULL, crossfeed_cross_set),
916 INT_SETTING(0, crossfeed_hf_cutoff, LANG_CROSSFEED_HF_CUTOFF, 700,
917 "crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100,
918 NULL, NULL, crossfeed_cross_set),
919 /* equalizer */
920 OFFON_SETTING(0,eq_enabled,LANG_EQUALIZER_ENABLED,false,"eq enabled",NULL),
921 INT_SETTING(0, eq_precut, LANG_EQUALIZER_PRECUT, 0, "eq precut",
922 UNIT_DB, 0, 240, 5, eq_precut_format, NULL, dsp_set_eq_precut),
923 /* 0..32768 Hz */
924 INT_SETTING(0, eq_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 60, "eq band 0 cutoff",
925 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
926 NULL, NULL, NULL),
927 INT_SETTING(0, eq_band1_cutoff, LANG_EQUALIZER_BAND_CENTER, 200, "eq band 1 cutoff",
928 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
929 NULL, NULL, NULL),
930 INT_SETTING(0, eq_band2_cutoff, LANG_EQUALIZER_BAND_CENTER, 800, "eq band 2 cutoff",
931 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
932 NULL, NULL, NULL),
933 INT_SETTING(0, eq_band3_cutoff, LANG_EQUALIZER_BAND_CENTER, 4000, "eq band 3 cutoff",
934 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
935 NULL, NULL, NULL),
936 INT_SETTING(0, eq_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 12000, "eq band 4 cutoff",
937 UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP,
938 NULL, NULL, NULL),
939 /* 0..64 (or 0.0 to 6.4) */
940 INT_SETTING(0, eq_band0_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 0 q",
941 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
942 eq_q_format, NULL, NULL),
943 INT_SETTING(0, eq_band1_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 1 q",
944 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
945 eq_q_format, NULL, NULL),
946 INT_SETTING(0, eq_band2_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 2 q",
947 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
948 eq_q_format, NULL, NULL),
949 INT_SETTING(0, eq_band3_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 3 q",
950 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
951 eq_q_format, NULL, NULL),
952 INT_SETTING(0, eq_band4_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 4 q",
953 UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
954 eq_q_format, NULL, NULL),
955 /* -240..240 (or -24db to +24db) */
956 INT_SETTING(0, eq_band0_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 0 gain",
957 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
958 eq_gain_format, NULL, NULL),
959 INT_SETTING(0, eq_band1_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 1 gain",
960 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
961 eq_gain_format, NULL, NULL),
962 INT_SETTING(0, eq_band2_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 2 gain",
963 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
964 eq_gain_format, NULL, NULL),
965 INT_SETTING(0, eq_band3_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 3 gain",
966 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
967 eq_gain_format, NULL, NULL),
968 INT_SETTING(0, eq_band4_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 4 gain",
969 UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP,
970 eq_gain_format, NULL, NULL),
972 /* dithering */
973 OFFON_SETTING(0, dithering_enabled, LANG_DITHERING,
974 false, "dithering enabled", dsp_dither_enable),
975 #endif
976 #ifdef HAVE_DIRCACHE
977 OFFON_SETTING(0,dircache,LANG_DIRCACHE_ENABLE,false,"dircache",NULL),
978 SYSTEM_SETTING(NVRAM(4),dircache_size,0),
979 #endif
981 #ifdef HAVE_TAGCACHE
982 #ifdef HAVE_TC_RAMCACHE
983 OFFON_SETTING(0,tagcache_ram,LANG_TAGCACHE_RAM,false,"tagcache_ram",NULL),
984 #endif
985 OFFON_SETTING(0,tagcache_autoupdate,
986 LANG_TAGCACHE_AUTOUPDATE,false,"tagcache_autoupdate",NULL),
987 #endif
988 #ifdef HAVE_LCD_BITMAP
989 CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
990 "default codepage", /* The order must match with that in unicode.c */
991 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
992 "iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8",
993 set_codepage, 13,
994 ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
995 ID2P(LANG_CODEPAGE_HEBREW), ID2P(LANG_CODEPAGE_CYRILLIC),
996 ID2P(LANG_CODEPAGE_THAI), ID2P(LANG_CODEPAGE_ARABIC),
997 ID2P(LANG_CODEPAGE_TURKISH), ID2P(LANG_CODEPAGE_LATIN_EXTENDED),
998 ID2P(LANG_CODEPAGE_JAPANESE), ID2P(LANG_CODEPAGE_SIMPLIFIED),
999 ID2P(LANG_CODEPAGE_KOREAN), ID2P(LANG_CODEPAGE_TRADITIONAL),
1000 ID2P(LANG_CODEPAGE_UTF8)),
1001 #else /* !HAVE_LCD_BITMAP */
1002 CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
1003 "default codepage", /* The order must match with that in unicode.c */
1004 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,utf-8",
1005 set_codepage, 6,
1006 ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
1007 ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH),
1008 ID2P(LANG_CODEPAGE_LATIN_EXTENDED), ID2P(LANG_CODEPAGE_UTF8)),
1009 #endif
1011 OFFON_SETTING(0,warnon_erase_dynplaylist,
1012 LANG_WARN_ERASEDYNPLAYLIST_MENU,false,
1013 "warn when erasing dynamic playlist",NULL),
1015 #ifdef HAVE_BACKLIGHT
1016 #ifdef HAS_BUTTON_HOLD
1017 CHOICE_SETTING(0, backlight_on_button_hold,
1018 LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "backlight on button hold",
1019 "normal,off,on", backlight_set_on_button_hold, 3,
1020 ID2P(LANG_BACKLIGHT_ON_BUTTON_HOLD_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
1021 #endif
1023 #ifdef HAVE_LCD_SLEEP
1024 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off,
1025 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF, 3,
1026 "lcd sleep after backlight off",
1027 "always,never,5,10,15,20,30,45,60,90", lcd_set_sleep_after_backlight_off,
1028 10, LANG_ALWAYS, LANG_NEVER, TALK_ID(5, UNIT_SEC), TALK_ID(10, UNIT_SEC),
1029 TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC),
1030 TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC), TALK_ID(90, UNIT_SEC)),
1031 #endif
1032 #endif /* HAVE_BACKLIGHT */
1034 #ifdef HAVE_WM8758
1035 OFFON_SETTING(0,eq_hw_enabled,LANG_EQUALIZER_HARDWARE_ENABLED,false,
1036 "eq hardware enabled",NULL),
1038 STRINGCHOICE_SETTING(0, eq_hw_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 1,
1039 "eq hardware band 0 cutoff", "80Hz,105Hz,135Hz,175Hz", NULL, 4,
1040 TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ),
1041 TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)),
1042 INT_SETTING(0, eq_hw_band0_gain, LANG_EQUALIZER_BAND_GAIN, 0,
1043 "eq hardware band 0 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1044 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1046 STRINGCHOICE_SETTING(0, eq_hw_band1_center, LANG_EQUALIZER_BAND_CENTER, 1,
1047 "eq hardware band 1 center", "230Hz,300Hz,385Hz,500Hz", NULL, 4,
1048 TALK_ID(230, UNIT_HERTZ), TALK_ID(300, UNIT_HERTZ),
1049 TALK_ID(385, UNIT_HERTZ), TALK_ID(500, UNIT_HERTZ)),
1050 CHOICE_SETTING(0, eq_hw_band1_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0,
1051 "eq hardware band 1 bandwidth", "narrow,wide", NULL, 2,
1052 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
1053 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
1054 INT_SETTING(0, eq_hw_band1_gain, LANG_EQUALIZER_BAND_GAIN, 0,
1055 "eq hardware band 1 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1056 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1058 STRINGCHOICE_SETTING(0, eq_hw_band2_center, LANG_EQUALIZER_BAND_CENTER, 1,
1059 "eq hardware band 2 center", "650Hz,850Hz,1.1kHz,1.4kHz", NULL, 4,
1060 TALK_ID(650, UNIT_HERTZ), TALK_ID(850, UNIT_HERTZ),
1061 TALK_ID(1100, UNIT_HERTZ), TALK_ID(1400, UNIT_HERTZ)),
1062 CHOICE_SETTING(0, eq_hw_band2_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0,
1063 "eq hardware band 2 bandwidth", "narrow,wide", NULL, 2,
1064 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
1065 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
1066 INT_SETTING(0, eq_hw_band2_gain, LANG_EQUALIZER_BAND_GAIN, 0,
1067 "eq hardware band 2 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1068 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1070 STRINGCHOICE_SETTING(0, eq_hw_band3_center, LANG_EQUALIZER_BAND_CENTER, 1,
1071 "eq hardware band 3 center", "1.8kHz,2.4kHz,3.2kHz,4.1kHz", NULL, 4,
1072 TALK_ID(1800, UNIT_HERTZ), TALK_ID(2400, UNIT_HERTZ),
1073 TALK_ID(3200, UNIT_HERTZ), TALK_ID(4100, UNIT_HERTZ)),
1074 CHOICE_SETTING(0, eq_hw_band3_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0,
1075 "eq hardware band 3 bandwidth", "narrow,wide", NULL, 2,
1076 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW),
1077 ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)),
1078 INT_SETTING(0, eq_hw_band3_gain, LANG_EQUALIZER_BAND_GAIN, 0,
1079 "eq hardware band 3 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1080 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1082 STRINGCHOICE_SETTING(0, eq_hw_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 1,
1083 "eq hardware band 4 cutoff", "5.3kHz,6.9kHz,9kHz,11.7kHz", NULL, 4,
1084 TALK_ID(5300, UNIT_HERTZ), TALK_ID(6900, UNIT_HERTZ),
1085 TALK_ID(9000, UNIT_HERTZ), TALK_ID(11700, UNIT_HERTZ)),
1086 INT_SETTING(0, eq_hw_band4_gain, LANG_EQUALIZER_BAND_GAIN, 0,
1087 "eq hardware band 4 gain", UNIT_DB, EQ_HW_GAIN_MIN,
1088 EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL),
1089 #endif
1091 OFFON_SETTING(0,hold_lr_for_scroll_in_list,-1,true,
1092 "hold_lr_for_scroll_in_list",NULL),
1093 CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_OFF,
1094 "show path in browser", "off,current directory,full path", NULL, 3,
1095 ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT), ID2P(LANG_SHOW_PATH_FULL)),
1097 #ifdef HAVE_AGC
1098 {F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORD_AGC_PRESET,INT(1),
1099 "agc mic preset",NULL,UNUSED},
1100 {F_T_INT,&global_settings.rec_agc_preset_line,LANG_RECORD_AGC_PRESET,INT(1),
1101 "agc line preset",NULL,UNUSED},
1102 {F_T_INT,&global_settings.rec_agc_maxgain_mic,-1,INT(104),
1103 "agc maximum mic gain",NULL,UNUSED},
1104 {F_T_INT,&global_settings.rec_agc_maxgain_line,-1,INT(96),
1105 "agc maximum line gain",NULL,UNUSED},
1106 {F_T_INT,&global_settings.rec_agc_cliptime,LANG_RECORD_AGC_CLIPTIME,INT(1),
1107 "agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED},
1108 #endif
1110 #ifdef HAVE_REMOTE_LCD
1111 #ifdef HAS_REMOTE_BUTTON_HOLD
1112 CHOICE_SETTING(0, remote_backlight_on_button_hold,
1113 LANG_BACKLIGHT_ON_BUTTON_HOLD, 0, "remote backlight on button hold",
1114 "normal,off,on", remote_backlight_set_on_button_hold, 3,
1115 ID2P(LANG_BACKLIGHT_ON_BUTTON_HOLD_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
1116 #endif
1117 #endif
1118 #ifdef HAVE_HEADPHONE_DETECTION
1119 CHOICE_SETTING(0, unplug_mode, LANG_UNPLUG, 0,
1120 "pause on headphone unplug", "off,pause,pause and resume", NULL, 3,
1121 ID2P(LANG_OFF), ID2P(LANG_PAUSE), ID2P(LANG_UNPLUG_RESUME)),
1122 INT_SETTING(0, unplug_rw, LANG_UNPLUG_RW, 0, "rewind duration on pause",
1123 UNIT_SEC, 0, 15, 1, NULL, NULL,NULL) ,
1124 OFFON_SETTING(0,unplug_autoresume,LANG_UNPLUG_DISABLE_AUTORESUME,false,
1125 "disable autoresume if phones not present",NULL),
1126 #endif
1127 #if CONFIG_TUNER
1128 CHOICE_SETTING(0, fm_region, LANG_FM_REGION, 0,
1129 "fm_region", "eu,us,jp,kr", set_radio_region, 4, ID2P(LANG_FM_EUROPE),
1130 ID2P(LANG_FM_US), ID2P(LANG_FM_JAPAN), ID2P(LANG_FM_KOREA)),
1131 #endif
1133 OFFON_SETTING(0,audioscrobbler,LANG_AUDIOSCROBBLER,
1134 false,"Last.fm Logging",NULL),
1136 #ifdef HAVE_RECORDING
1137 {F_T_INT|F_RECSETTING,&global_settings.rec_trigger_type,
1138 LANG_RECORD_TRIGGER_TYPE,
1139 INT(0),"trigger type","stop,pause,nf stp",UNUSED},
1140 #endif
1142 /** settings not in the old config blocks **/
1143 #if CONFIG_TUNER
1144 FILENAME_SETTING(0, fmr_file, "fmr",
1145 "", FMPRESET_PATH "/", ".fmr", MAX_FILENAME+1),
1146 #endif
1147 FILENAME_SETTING(F_THEMESETTING, font_file, "font",
1148 "", FONT_DIR "/", ".fnt", MAX_FILENAME+1),
1149 FILENAME_SETTING(F_THEMESETTING,wps_file, "wps",
1150 "", WPS_DIR "/", ".wps", MAX_FILENAME+1),
1151 FILENAME_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng",MAX_FILENAME+1),
1152 #ifdef HAVE_REMOTE_LCD
1153 FILENAME_SETTING(F_THEMESETTING,rwps_file,"rwps",
1154 "", WPS_DIR "/", ".rwps", MAX_FILENAME+1),
1155 #endif
1156 #if LCD_DEPTH > 1
1157 FILENAME_SETTING(F_THEMESETTING,backdrop_file,"backdrop",
1158 "", BACKDROP_DIR "/", ".bmp", MAX_FILENAME+1),
1159 #endif
1160 #ifdef HAVE_LCD_BITMAP
1161 FILENAME_SETTING(0,kbd_file,"kbd","",ROCKBOX_DIR "/",".kbd",MAX_FILENAME+1),
1162 #endif
1163 #ifdef HAVE_USB_POWER
1164 #if CONFIG_CHARGING
1165 OFFON_SETTING(0,usb_charging,LANG_USB_CHARGING,false,"usb charging",NULL),
1166 #endif
1167 #endif
1168 OFFON_SETTING(0,cuesheet,LANG_CUESHEET_ENABLE,false,"cuesheet support", NULL),
1169 CHOICE_SETTING(0, start_in_screen, LANG_START_SCREEN, 1,
1170 "start in screen", "previous,root,files,db,wps,menu,"
1171 #ifdef HAVE_RECORDING
1172 "recording,"
1173 #endif
1174 #if CONFIG_TUNER
1175 "radio,"
1176 #endif
1177 "bookmarks" ,NULL,
1178 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1180 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1182 #else
1184 #endif
1185 ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU),
1186 ID2P(LANG_DIR_BROWSER), ID2P(LANG_TAGCACHE),
1187 ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_SETTINGS_MENU),
1188 #ifdef HAVE_RECORDING
1189 ID2P(LANG_RECORDING),
1190 #endif
1191 #if CONFIG_TUNER
1192 ID2P(LANG_FM_RADIO),
1193 #endif
1194 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS)
1196 SYSTEM_SETTING(NVRAM(1),last_screen,-1),
1197 #if defined(HAVE_RTC_ALARM) && \
1198 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1199 {F_T_INT, &global_settings.alarm_wake_up_screen, LANG_ALARM_WAKEUP_SCREEN,
1200 INT(ALARM_START_WPS), "alarm wakeup screen", ALARM_SETTING_TEXT, UNUSED},
1201 #endif /* HAVE_RTC_ALARM */
1203 /* Customizable icons */
1204 #ifdef HAVE_LCD_BITMAP
1205 FILENAME_SETTING(F_THEMESETTING, icon_file, "iconset", "",
1206 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1207 FILENAME_SETTING(F_THEMESETTING, viewers_icon_file, "viewers iconset", "",
1208 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1209 #endif
1210 #ifdef HAVE_REMOTE_LCD
1211 FILENAME_SETTING(F_THEMESETTING, remote_icon_file, "remote iconset", "",
1212 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1213 FILENAME_SETTING(F_THEMESETTING, remote_viewers_icon_file,
1214 "remote viewers iconset", "",
1215 ICON_DIR "/", ".bmp", MAX_FILENAME+1),
1216 #endif /* HAVE_REMOTE_LCD */
1217 #ifdef HAVE_BUTTON_LIGHT
1218 INT_SETTING_W_CFGVALS(F_FLIPLIST, button_light_timeout,
1219 LANG_BUTTONLIGHT_TIMEOUT, 6,
1220 "button light timeout", backlight_times_conf, UNIT_SEC,
1221 0, 18, 1, backlight_formatter, backlight_getlang,
1222 button_backlight_set_timeout),
1223 #endif
1224 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1225 INT_SETTING(0, buttonlight_brightness, LANG_BUTTONLIGHT_BRIGHTNESS, DEFAULT_BRIGHTNESS_SETTING,
1226 "button light brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1,
1227 NULL, NULL, buttonlight_set_brightness),
1228 #endif
1229 INT_SETTING(0, list_accel_start_delay, LANG_LISTACCEL_START_DELAY,
1230 2, "list_accel_start_delay", UNIT_MS, 0, 10, 1,
1231 listaccel_formatter, listaccel_getlang, NULL),
1232 INT_SETTING(0, list_accel_wait, LANG_LISTACCEL_ACCEL_SPEED,
1233 3, "list_accel_wait", UNIT_SEC, 1, 10, 1,
1234 scanaccel_formatter, scanaccel_getlang, NULL),
1237 const int nb_settings = sizeof(settings)/sizeof(*settings);