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