1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 Jonathan Gordon
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
31 #include "backlight.h"
33 #include "settings_list.h"
40 #include "powermgmt.h"
42 #include "lcd-remote.h"
44 #include "rbunicode.h"
45 #ifdef HAVE_LCD_BITMAP
46 #include "peakmeter.h"
48 #include "menus/eq_menu.h"
53 #define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT)
54 /** NOTE: NVRAM_CONFIG_VERSION is in settings_list.h
55 and you may need to update it if you edit this file */
57 #define UNUSED {.RESERVED=NULL}
58 #define INT(a) {.int_ = a}
59 #define UINT(a) {.uint_ = a}
60 #define BOOL(a) {.bool_ = a}
61 #define CHARPTR(a) {.charptr = a}
62 #define UCHARPTR(a) {.ucharptr = a}
63 #define FUNCTYPE(a) {.func = a}
64 #define NODEFAULT INT(0)
66 /* in all the following macros the args are:
67 - flags: bitwise | or the F_ bits in settings_list.h
68 - var: pointer to the variable being changed (usually in global_settings)
69 - lang_id: LANG_* id to display in menus and setting screens for the setting
70 - default: the default value for the variable, set if settings are reset
71 - name: the name of the setting in config files
72 - cfg_vals: comma seperated list of legal values in cfg files.
73 NULL if a number is written to the file instead.
74 - cb: the callback used by the setting screen.
77 /* Use for int settings which use the set_sound() function to set them */
78 #define SOUND_SETTING(flags,var,lang_id,name,setting) \
79 {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \
80 lang_id, NODEFAULT,name,NULL, \
81 {.sound_setting=(struct sound_setting[]){{setting}}} }
83 /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO
84 or dont save as "off" or "on" in the cfg */
85 #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes,no,cb) \
86 {flags|F_BOOL_SETTING, &global_settings.var, \
87 lang_id, BOOL(default),name,cfgvals, \
88 {.bool_setting=(struct bool_setting[]){{cb,yes,no}}} }
90 /* bool setting which does use LANG_YES and _NO and save as "off,on" */
91 #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
92 {flags|F_BOOL_SETTING, &global_settings.var, \
93 lang_id, BOOL(default),name,off_on, \
94 {.bool_setting=(struct bool_setting[]) \
95 {{cb,LANG_SET_BOOL_YES,LANG_SET_BOOL_NO}}} }
97 /* int variable which is NOT saved to .cfg files,
98 (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */
99 #define SYSTEM_SETTING(flags,var,default) \
100 {flags|F_T_INT, &global_status.var,-1, INT(default), \
103 /* setting which stores as a filename in the .cfgvals
104 prefix: The absolute path to not save in the variable, ex /.rockbox/wps_file
105 suffx: The file extention (usually...) e.g .wps_file */
106 #define FILENAME_SETTING(flags,var,name,default,prefix,suffix,len) \
107 {flags|F_T_UCHARPTR, &global_settings.var,-1, \
108 CHARPTR(default),name,NULL, \
109 {.filename_setting= \
110 (struct filename_setting[]){{prefix,suffix,len}}} }
112 /* Used for settings which use the set_option() setting screen.
113 The ... arg is a list of pointers to strings to display in the setting
114 screen. These can either be literal strings, or ID2P(LANG_*) */
115 #define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \
116 {flags|F_CHOICE_SETTING|F_T_INT, &global_settings.var, lang_id, \
117 INT(default), name, cfg_vals, \
118 {.choice_setting = (struct choice_setting[]){ \
119 {cb, count, {.desc = (const unsigned char*[]) \
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, \
126 {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS, \
127 &global_settings.var, lang_id, \
128 INT(default), name, cfg_vals, \
129 {.choice_setting = (struct choice_setting[]){ \
130 {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}}
132 /* for settings which use the set_int() setting screen.
133 unit is the UNIT_ define to display/talk.
134 the first one saves a string to the config file,
135 the second one saves the variable value to the config file */
136 #define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \
137 unit, min, max, step, formatter, get_talk_id, cb) \
138 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
139 lang_id, INT(default), name, cfg_vals, \
140 {.int_setting = (struct int_setting[]){ \
141 {cb, unit, min, max, step, formatter, get_talk_id}}}}
142 #define INT_SETTING(flags, var, lang_id, default, name, \
143 unit, min, max, step, formatter, get_talk_id, cb) \
144 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
145 lang_id, INT(default), name, NULL, \
146 {.int_setting = (struct int_setting[]){ \
147 {cb, unit, min, max, step, formatter, get_talk_id}}}}
148 #define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \
149 unit, min, max, step, formatter, get_talk_id, cb) \
150 {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \
151 lang_id, INT(default), name, NULL, \
152 {.int_setting = (struct int_setting[]){ \
153 {cb, unit, min, max, step, formatter, get_talk_id}}}}
155 #define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
156 unit, formatter, get_talk_id, cb, count, ...) \
157 {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \
158 lang_id, INT(default), name, cfg_vals, \
159 {.table_setting = (struct table_setting[]) { \
160 {cb, formatter, get_talk_id, unit, count, \
161 (const int[]){__VA_ARGS__}}}}}
163 /* some sets of values which are used more than once, to save memory */
164 static const char off_on
[] = "off,on";
165 static const char off_on_ask
[] = "off,on,ask";
166 static const char off_number_spell
[] = "off,number,spell";
167 #ifdef HAVE_LCD_BITMAP
168 static const char graphic_numeric
[] = "graphic,numeric";
171 /* Default theme settings */
172 #define DEFAULT_WPSNAME "cabbiev2"
174 #ifdef HAVE_LCD_BITMAP
177 #define DEFAULT_FONTNAME "rockfont-8"
178 #elif LCD_HEIGHT <= 80
179 #define DEFAULT_FONTNAME "Sazanami-Mincho-Regular-11"
180 #elif LCD_HEIGHT <= 220
181 #define DEFAULT_FONTNAME "helvR10"
182 #elif LCD_HEIGHT <= 320
183 #define DEFAULT_FONTNAME "helvR12"
185 #define DEFAULT_FONTNAME "helvR10"
189 #define DEFAULT_FONTNAME ""
192 #ifdef HAVE_LCD_COLOR
193 #define DEFAULT_ICONSET "tango_small"
194 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
196 #define DEFAULT_ICONSET "tango_small_mono"
197 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
198 #else /* monochrome */
199 #define DEFAULT_ICONSET ""
200 #define DEFAULT_VIEWERS_ICONSET ""
203 #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
204 #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
205 #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
206 #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
207 #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
209 #define DEFAULT_BACKDROP "cabbiev2"
211 #ifdef HAVE_RECORDING
212 /* these should be in the config.h files */
213 #if CONFIG_CODEC == MAS3587F
214 # define DEFAULT_REC_MIC_GAIN 8
215 # define DEFAULT_REC_LEFT_GAIN 2
216 # define DEFAULT_REC_RIGHT_GAIN 2
217 #elif CONFIG_CODEC == SWCODEC
219 # define DEFAULT_REC_MIC_GAIN 16
220 # define DEFAULT_REC_LEFT_GAIN 0
221 # define DEFAULT_REC_RIGHT_GAIN 0
222 # elif defined(HAVE_TLV320)
223 # define DEFAULT_REC_MIC_GAIN 0
224 # define DEFAULT_REC_LEFT_GAIN 0
225 # define DEFAULT_REC_RIGHT_GAIN 0
226 # elif defined(HAVE_WM8975)
227 # define DEFAULT_REC_MIC_GAIN 16
228 # define DEFAULT_REC_LEFT_GAIN 0
229 # define DEFAULT_REC_RIGHT_GAIN 0
230 # elif defined(HAVE_WM8758)
231 # define DEFAULT_REC_MIC_GAIN 16
232 # define DEFAULT_REC_LEFT_GAIN 0
233 # define DEFAULT_REC_RIGHT_GAIN 0
234 # elif defined(HAVE_WM8731)
235 # define DEFAULT_REC_MIC_GAIN 16
236 # define DEFAULT_REC_LEFT_GAIN 0
237 # define DEFAULT_REC_RIGHT_GAIN 0
241 #endif /* HAVE_RECORDING */
243 static void formatter_unit_0_is_off(char *buffer
, size_t buffer_size
,
244 int val
, const char *unit
)
247 strcpy(buffer
, str(LANG_OFF
));
249 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
252 static int32_t getlang_unit_0_is_off(int value
, int unit
)
257 return TALK_ID(value
,unit
);
260 #ifdef HAVE_BACKLIGHT
261 static void backlight_formatter(char *buffer
, size_t buffer_size
,
262 int val
, const char *unit
)
265 strcpy(buffer
, str(LANG_OFF
));
267 strcpy(buffer
, str(LANG_ON
));
269 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
271 static int32_t backlight_getlang(int value
, int unit
)
278 return TALK_ID(value
, unit
);
282 #ifndef HAVE_SCROLLWHEEL
283 static void scanaccel_formatter(char *buffer
, size_t buffer_size
,
284 int val
, const char *unit
)
288 strcpy(buffer
, str(LANG_OFF
));
290 snprintf(buffer
, buffer_size
, "2x/%ds", val
);
294 #if CONFIG_CODEC == SWCODEC
295 static void crossfeed_cross_set(int val
)
298 dsp_set_crossfeed_cross_params(global_settings
.crossfeed_cross_gain
,
299 global_settings
.crossfeed_hf_attenuation
,
300 global_settings
.crossfeed_hf_cutoff
);
303 static void db_format(char* buffer
, size_t buffer_size
, int value
,
308 snprintf(buffer
, buffer_size
, "%s%d.%d %s", value
< 0 ? "-" : "",
309 v
/ 10, v
% 10, unit
);
312 static int32_t get_dec_talkid(int value
, int unit
)
314 return TALK_ID_DECIMAL(value
, 1, unit
);
317 static int32_t get_precut_talkid(int value
, int unit
)
319 return TALK_ID_DECIMAL(-value
, 1, unit
);
323 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
324 static void set_mdb_enable(bool value
)
326 sound_set_mdb_enable((int)value
);
328 static void set_superbass(bool value
)
330 sound_set_superbass((int)value
);
334 #ifdef HAVE_LCD_CHARCELLS
335 static void jumpscroll_format(char* buffer
, size_t buffer_size
, int value
,
342 strcpy(buffer
, str(LANG_OFF
));
345 strcpy(buffer
, str(LANG_ONE_TIME
));
350 snprintf(buffer
, buffer_size
, "%d", value
);
353 strcpy(buffer
, str(LANG_ALWAYS
));
357 static int32_t jumpscroll_getlang(int value
, int unit
)
364 return LANG_ONE_TIME
;
368 return TALK_ID(value
, unit
);
374 #endif /* HAVE_LCD_CHARCELLS */
376 const struct settings_list settings
[] = {
378 SOUND_SETTING(F_NO_WRAP
,volume
, LANG_VOLUME
, "volume", SOUND_VOLUME
),
379 SOUND_SETTING(0, balance
, LANG_BALANCE
, "balance", SOUND_BALANCE
),
380 SOUND_SETTING(F_NO_WRAP
,bass
, LANG_BASS
, "bass", SOUND_BASS
),
381 SOUND_SETTING(F_NO_WRAP
,treble
, LANG_TREBLE
, "treble", SOUND_TREBLE
),
383 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
384 SOUND_SETTING(0,loudness
, LANG_LOUDNESS
, "loudness", SOUND_LOUDNESS
),
385 STRINGCHOICE_SETTING(F_SOUNDSETTING
,avc
,LANG_AUTOVOL
,0,"auto volume",
386 "off,20ms,2,4,8,", sound_set_avc
, 5,
387 LANG_OFF
,TALK_ID(20, UNIT_MS
),TALK_ID(2, UNIT_SEC
),
388 TALK_ID(4, UNIT_SEC
),TALK_ID(8, UNIT_SEC
)),
389 OFFON_SETTING(F_SOUNDSETTING
, superbass
, LANG_SUPERBASS
, false, "superbass",
393 CHOICE_SETTING(F_SOUNDSETTING
, channel_config
, LANG_CHANNEL_CONFIGURATION
,
395 "stereo,mono,custom,mono left,mono right,karaoke",
396 sound_set_channels
, 6,
397 ID2P(LANG_CHANNEL_STEREO
), ID2P(LANG_CHANNEL_MONO
),
398 ID2P(LANG_CHANNEL_CUSTOM
), ID2P(LANG_CHANNEL_LEFT
),
399 ID2P(LANG_CHANNEL_RIGHT
), ID2P(LANG_CHANNEL_KARAOKE
)),
400 SOUND_SETTING(F_SOUNDSETTING
, stereo_width
, LANG_STEREO_WIDTH
,
401 "stereo_width", SOUND_STEREO_WIDTH
),
403 OFFON_SETTING(0, playlist_shuffle
, LANG_SHUFFLE
, false, "shuffle", NULL
),
404 SYSTEM_SETTING(NVRAM(4), resume_index
, -1),
405 SYSTEM_SETTING(NVRAM(4), resume_first_index
, 0),
406 SYSTEM_SETTING(NVRAM(4), resume_offset
, -1),
407 SYSTEM_SETTING(NVRAM(4), resume_seed
, -1),
408 CHOICE_SETTING(0, repeat_mode
, LANG_REPEAT
, REPEAT_ALL
, "repeat",
409 "off,all,one,shuffle"
410 #ifdef AB_REPEAT_ENABLE
414 #ifdef AB_REPEAT_ENABLE
419 ID2P(LANG_OFF
), ID2P(LANG_ALL
), ID2P(LANG_REPEAT_ONE
),
421 #ifdef AB_REPEAT_ENABLE
422 ,ID2P(LANG_REPEAT_AB
)
424 ), /* CHOICE_SETTING( repeat_mode ) */
426 #ifdef HAVE_LCD_CONTRAST
427 /* its easier to leave this one un-macro()ed for the time being */
428 { F_T_INT
|F_DEF_ISFUNC
|F_INT_SETTING
, &global_settings
.contrast
,
429 LANG_CONTRAST
, FUNCTYPE(lcd_default_contrast
), "contrast", NULL
, {
430 .int_setting
= (struct int_setting
[]) {
431 { lcd_set_contrast
, UNIT_INT
, MIN_CONTRAST_SETTING
,
432 MAX_CONTRAST_SETTING
, 1, NULL
, NULL
}}}},
434 #ifdef HAVE_BACKLIGHT
435 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout
, LANG_BACKLIGHT
, 5,
436 "backlight timeout", off_on
, UNIT_SEC
, backlight_formatter
,
437 backlight_getlang
, backlight_set_timeout
, 20,
438 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
440 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout_plugged
,
441 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
442 "backlight timeout plugged", off_on
, UNIT_SEC
,
443 backlight_formatter
, backlight_getlang
,
444 backlight_set_timeout_plugged
, 20,
445 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
447 #endif /* HAVE_BACKLIGHT */
448 #ifdef HAVE_LCD_BITMAP
449 #ifdef HAVE_LCD_INVERT
450 BOOL_SETTING(0, invert
, LANG_INVERT
, false ,"invert", off_on
,
451 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
, lcd_set_invert_display
),
454 OFFON_SETTING(0, flip_display
, LANG_FLIP_DISPLAY
, false, "flip display",
458 CHOICE_SETTING(F_TEMPVAR
|F_THEMESETTING
, cursor_style
, LANG_INVERT_CURSOR
,
459 #ifdef HAVE_LCD_COLOR
461 "pointer,bar (inverse),bar (color),bar (gradient)", NULL
, 4,
462 ID2P(LANG_INVERT_CURSOR_POINTER
),
463 ID2P(LANG_INVERT_CURSOR_BAR
),
464 ID2P(LANG_INVERT_CURSOR_COLOR
),
465 ID2P(LANG_INVERT_CURSOR_GRADIENT
)),
467 1, "selector type", "pointer,bar (inverse)", NULL
, 2,
468 ID2P(LANG_INVERT_CURSOR_POINTER
),
469 ID2P(LANG_INVERT_CURSOR_BAR
)),
471 OFFON_SETTING(F_THEMESETTING
|F_TEMPVAR
, statusbar
,
472 LANG_STATUS_BAR
, true,"statusbar", NULL
),
473 OFFON_SETTING(0,scrollbar
, LANG_SCROLL_BAR
, true,"scrollbar", NULL
),
474 #if CONFIG_KEYPAD == RECORDER_PAD
475 OFFON_SETTING(0,buttonbar
, LANG_BUTTON_BAR
,true,"buttonbar", NULL
),
477 CHOICE_SETTING(0, volume_type
, LANG_VOLUME_DISPLAY
, 0,
478 "volume display", graphic_numeric
, NULL
, 2,
479 ID2P(LANG_DISPLAY_GRAPHIC
),
480 ID2P(LANG_DISPLAY_NUMERIC
)),
481 CHOICE_SETTING(0, battery_display
, LANG_BATTERY_DISPLAY
, 0,
482 "battery display", graphic_numeric
, NULL
, 2,
483 ID2P(LANG_DISPLAY_GRAPHIC
), ID2P(LANG_DISPLAY_NUMERIC
)),
485 CHOICE_SETTING(0, timeformat
, LANG_TIMEFORMAT
, 0,
486 "time format", "24hour,12hour", NULL
, 2,
487 ID2P(LANG_24_HOUR_CLOCK
), ID2P(LANG_12_HOUR_CLOCK
)),
489 #endif /* HAVE_LCD_BITMAP */
490 OFFON_SETTING(0,show_icons
, LANG_SHOW_ICONS
,true,"show icons", NULL
),
492 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, poweroff
, LANG_POWEROFF_IDLE
, 10,
493 "idle poweroff", "off", UNIT_MIN
, formatter_unit_0_is_off
,
494 getlang_unit_0_is_off
, set_poweroff_timeout
, 15,
495 0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
496 SYSTEM_SETTING(NVRAM(4), runtime
, 0),
497 SYSTEM_SETTING(NVRAM(4), topruntime
, 0),
498 INT_SETTING(0, max_files_in_playlist
,
499 LANG_MAX_FILES_IN_PLAYLIST
,
505 "max files in playlist", UNIT_INT
, 1000, 32000, 1000,
507 INT_SETTING(0, max_files_in_dir
, LANG_MAX_FILES_IN_DIR
,
513 "max files in dir", UNIT_INT
, 50, 10000, 50,
515 #if BATTERY_CAPACITY_INC > 0
516 INT_SETTING(0, battery_capacity
, LANG_BATTERY_CAPACITY
,
517 BATTERY_CAPACITY_DEFAULT
, "battery capacity", UNIT_MAH
,
518 BATTERY_CAPACITY_MIN
, BATTERY_CAPACITY_MAX
,
519 BATTERY_CAPACITY_INC
, NULL
, NULL
, NULL
),
522 OFFON_SETTING(NVRAM(1), car_adapter_mode
,
523 LANG_CAR_ADAPTER_MODE
, false, "car adapter mode", NULL
),
525 #ifdef HAVE_ACCESSORY_SUPPLY
526 OFFON_SETTING(0, accessory_supply
, LANG_ACCESSORY_SUPPLY
,
527 true, "accessory power supply", accessory_supply_set
),
531 OFFON_SETTING(0,fm_force_mono
, LANG_FM_MONO_MODE
,
532 false, "force fm mono", toggle_mono_mode
),
533 SYSTEM_SETTING(NVRAM(4),last_frequency
,0),
536 #if BATTERY_TYPES_COUNT > 1
537 CHOICE_SETTING(0, battery_type
, LANG_BATTERY_TYPE
, 0, "battery type",
538 "alkaline,nimh", NULL
, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE
),
539 ID2P(LANG_BATTERY_TYPE_NIMH
)),
541 #ifdef HAVE_REMOTE_LCD
543 INT_SETTING(0, remote_contrast
, LANG_CONTRAST
,
544 DEFAULT_REMOTE_CONTRAST_SETTING
, "remote contrast", UNIT_INT
,
545 MIN_REMOTE_CONTRAST_SETTING
, MAX_REMOTE_CONTRAST_SETTING
, 1,
546 NULL
, NULL
, lcd_remote_set_contrast
),
547 BOOL_SETTING(0, remote_invert
, LANG_INVERT
, false ,"remote invert", off_on
,
548 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
,
549 lcd_remote_set_invert_display
),
550 OFFON_SETTING(0,remote_flip_display
, LANG_FLIP_DISPLAY
,
551 false,"remote flip display", NULL
),
552 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout
,
553 LANG_BACKLIGHT
, 5, "remote backlight timeout", off_on
,
554 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
555 remote_backlight_set_timeout
, 20,
556 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
558 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout_plugged
,
559 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
560 "remote backlight timeout plugged", off_on
, UNIT_SEC
,
561 backlight_formatter
, backlight_getlang
,
562 remote_backlight_set_timeout_plugged
, 20,
563 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
565 #ifdef HAVE_REMOTE_LCD_TICKING
566 OFFON_SETTING(0, remote_reduce_ticking
, LANG_REDUCE_TICKING
,
567 false,"remote reduce ticking", NULL
),
571 #ifdef HAVE_BACKLIGHT
572 OFFON_SETTING(0, bl_filter_first_keypress
,
573 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
574 "backlight filters first keypress", NULL
),
575 #ifdef HAVE_REMOTE_LCD
576 OFFON_SETTING(0, remote_bl_filter_first_keypress
,
577 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
578 "backlight filters first remote keypress", NULL
),
580 #endif /* HAVE_BACKLIGHT */
582 /** End of old RTC config block **/
584 #ifdef HAVE_BACKLIGHT
585 OFFON_SETTING(0, caption_backlight
, LANG_CAPTION_BACKLIGHT
,
586 false, "caption backlight", NULL
),
587 #ifdef HAVE_REMOTE_LCD
588 OFFON_SETTING(0, remote_caption_backlight
, LANG_CAPTION_BACKLIGHT
,
589 false, "remote caption backlight", NULL
),
591 #endif /* HAVE_BACKLIGHT */
592 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
593 INT_SETTING(F_NO_WRAP
, brightness
, LANG_BRIGHTNESS
,
594 DEFAULT_BRIGHTNESS_SETTING
, "brightness",UNIT_INT
,
595 MIN_BRIGHTNESS_SETTING
, MAX_BRIGHTNESS_SETTING
, 1,
596 NULL
, NULL
, backlight_set_brightness
),
598 #if defined(HAVE_BACKLIGHT_PWM_FADING) && !defined(SIMULATOR)
599 /* backlight fading */
600 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_in
,
601 LANG_BACKLIGHT_FADE_IN
, 300, "backlight fade in", "off",
602 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
603 backlight_set_fade_in
, 7, 0,100,200,300,500,1000,2000),
604 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_out
,
605 LANG_BACKLIGHT_FADE_OUT
, 2000, "backlight fade out", "off",
606 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
607 backlight_set_fade_out
, 10,
608 0,100,200,300,500,1000,2000,3000,5000,10000),
610 INT_SETTING(F_PADTITLE
, scroll_speed
, LANG_SCROLL_SPEED
, 9,"scroll speed",
611 UNIT_INT
, 0, 15, 1, NULL
, NULL
, lcd_scroll_speed
),
612 INT_SETTING(F_PADTITLE
, scroll_delay
, LANG_SCROLL_DELAY
, 1000,
613 "scroll delay", UNIT_MS
, 0, 2500, 100, NULL
,
614 NULL
, lcd_scroll_delay
),
615 INT_SETTING(0, bidir_limit
, LANG_BIDIR_SCROLL
, 50, "bidir limit",
616 UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
, lcd_bidir_scroll
),
617 #ifdef HAVE_REMOTE_LCD
618 INT_SETTING(0, remote_scroll_speed
, LANG_SCROLL_SPEED
, 9,
619 "remote scroll speed", UNIT_INT
, 0,15, 1,
620 NULL
, NULL
, lcd_remote_scroll_speed
),
621 INT_SETTING(0, remote_scroll_step
, LANG_SCROLL_STEP
, 6,
622 "remote scroll step", UNIT_PIXEL
, 1, LCD_REMOTE_WIDTH
, 1, NULL
,
623 NULL
, lcd_remote_scroll_step
),
624 INT_SETTING(0, remote_scroll_delay
, LANG_SCROLL_DELAY
, 1000,
625 "remote scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
626 lcd_remote_scroll_delay
),
627 INT_SETTING(0, remote_bidir_limit
, LANG_BIDIR_SCROLL
, 50,
628 "remote bidir limit", UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
,
629 lcd_remote_bidir_scroll
),
631 #ifdef HAVE_LCD_BITMAP
632 OFFON_SETTING(0, offset_out_of_view
, LANG_SCREEN_SCROLL_VIEW
,
633 false, "Screen Scrolls Out Of View",
634 gui_list_screen_scroll_out_of_view
),
635 INT_SETTING(F_PADTITLE
, scroll_step
, LANG_SCROLL_STEP
, 6, "scroll step",
636 UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
, lcd_scroll_step
),
637 INT_SETTING(F_PADTITLE
, screen_scroll_step
, LANG_SCREEN_SCROLL_STEP
, 16,
638 "screen scroll step", UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
,
639 gui_list_screen_scroll_step
),
640 #endif /* HAVE_LCD_BITMAP */
641 #ifdef HAVE_LCD_CHARCELLS
642 INT_SETTING(0, jump_scroll
, LANG_JUMP_SCROLL
, 0, "jump scroll", UNIT_INT
, 0,
643 5, 1, jumpscroll_format
, jumpscroll_getlang
, lcd_jump_scroll
),
644 INT_SETTING(0, jump_scroll_delay
, LANG_JUMP_SCROLL_DELAY
, 500,
645 "jump scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
646 lcd_jump_scroll_delay
),
648 OFFON_SETTING(0,scroll_paginated
,LANG_SCROLL_PAGINATED
,
649 false,"scroll paginated",NULL
),
650 #ifdef HAVE_LCD_COLOR
652 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.fg_color
,-1,
653 INT(DEFAULT_THEME_FOREGROUND
),"foreground color",NULL
,UNUSED
},
654 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.bg_color
,-1,
655 INT(DEFAULT_THEME_BACKGROUND
),"background color",NULL
,UNUSED
},
656 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lss_color
,-1,
657 INT(DEFAULT_THEME_SELECTOR_START
),"line selector start color",NULL
,
659 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lse_color
,-1,
660 INT(DEFAULT_THEME_SELECTOR_END
),"line selector end color",NULL
,UNUSED
},
661 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lst_color
,-1,
662 INT(DEFAULT_THEME_SELECTOR_TEXT
),"line selector text color",NULL
,
667 OFFON_SETTING(0,play_selected
,LANG_PLAY_SELECTED
,true,"play selected",NULL
),
668 OFFON_SETTING(0,party_mode
,LANG_PARTY_MODE
,false,"party mode",NULL
),
669 OFFON_SETTING(0,fade_on_stop
,LANG_FADE_ON_STOP
,true,"volume fade",NULL
),
670 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, ff_rewind_min_step
,
671 LANG_FFRW_STEP
, 1, "scan min step", NULL
, UNIT_SEC
,
672 NULL
, NULL
, NULL
, 14, 1,2,3,4,5,6,8,10,15,20,25,30,45,60),
673 CHOICE_SETTING(0, ff_rewind_accel
, LANG_FFRW_ACCEL
, 2,
674 "seek accel", "very fast,fast,normal,slow,very slow", NULL
, 5,
675 ID2P(LANG_VERY_FAST
), ID2P(LANG_FAST
), ID2P(LANG_NORMAL
),
676 ID2P(LANG_SLOW
) , ID2P(LANG_VERY_SLOW
)),
677 #if (CONFIG_CODEC == SWCODEC) && !defined(HAVE_FLASH_STORAGE)
678 STRINGCHOICE_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0,"antiskip",
679 "5s,15s,30s,1min,2min,3min,5min,10min", NULL
, 8,
680 TALK_ID(5, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
681 TALK_ID(30, UNIT_SEC
), TALK_ID(1, UNIT_MIN
),
682 TALK_ID(2, UNIT_MIN
), TALK_ID(3, UNIT_MIN
),
683 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
)),
684 #elif !defined(HAVE_FLASH_STORAGE)
685 INT_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0, "antiskip",
686 UNIT_SEC
, 0, 7, 1, NULL
, NULL
, audio_set_buffer_margin
),
689 #ifndef HAVE_FLASH_STORAGE
690 INT_SETTING(0, disk_spindown
, LANG_SPINDOWN
, 5, "disk spindown",
691 UNIT_SEC
, 3, 254, 1, NULL
, NULL
, ata_spindown
),
692 #endif /* HAVE_FLASH_STORAGE */
694 CHOICE_SETTING(0, dirfilter
, LANG_FILTER
, SHOW_SUPPORTED
, "show files",
695 "all,supported,music,playlists", NULL
, 4, ID2P(LANG_ALL
),
696 ID2P(LANG_FILTER_SUPPORTED
), ID2P(LANG_FILTER_MUSIC
),
697 ID2P(LANG_PLAYLISTS
)),
698 OFFON_SETTING(0, sort_case
, LANG_SORT_CASE
, false, "sort case", NULL
),
699 CHOICE_SETTING(0, show_filename_ext
, LANG_SHOW_FILENAME_EXT
, 3,
700 "show filename exts", "off,on,unknown,view_all", NULL
, 4 ,
701 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_UNKNOWN_TYPES
),
702 ID2P(LANG_EXT_ONLY_VIEW_ALL
)),
703 OFFON_SETTING(0,browse_current
,LANG_FOLLOW
,false,"follow playlist",NULL
),
704 OFFON_SETTING(0,playlist_viewer_icons
,LANG_SHOW_ICONS
,true,
705 "playlist viewer icons",NULL
),
706 OFFON_SETTING(0,playlist_viewer_indices
,LANG_SHOW_INDICES
,true,
707 "playlist viewer indices",NULL
),
708 CHOICE_SETTING(0, playlist_viewer_track_display
, LANG_TRACK_DISPLAY
, 0,
709 "playlist viewer track display","track name,full path",
710 NULL
, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY
),
711 ID2P(LANG_DISPLAY_FULL_PATH
)),
712 CHOICE_SETTING(0, recursive_dir_insert
, LANG_RECURSE_DIRECTORY
, RECURSE_ON
,
713 "recursive directory insert", off_on_ask
, NULL
, 3 ,
714 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_ASK
)),
716 CHOICE_SETTING(0, autocreatebookmark
, LANG_BOOKMARK_SETTINGS_AUTOCREATE
,
717 BOOKMARK_NO
, "autocreate bookmarks",
718 "off,on,ask,recent only - on,recent only - ask", NULL
, 5,
719 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
720 ID2P(LANG_ASK
), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
),
721 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
)),
722 CHOICE_SETTING(0, autoloadbookmark
, LANG_BOOKMARK_SETTINGS_AUTOLOAD
,
723 BOOKMARK_NO
, "autoload bookmarks", off_on_ask
, NULL
, 3,
724 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
726 CHOICE_SETTING(0, usemrb
, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
,
727 BOOKMARK_NO
, "use most-recent-bookmarks",
728 "off,on,unique only", NULL
, 3, ID2P(LANG_SET_BOOL_NO
),
729 ID2P(LANG_SET_BOOL_YES
),
730 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
)),
731 #ifdef HAVE_LCD_BITMAP
733 STRINGCHOICE_SETTING(0, peak_meter_clip_hold
, LANG_PM_CLIP_HOLD
, 16,
734 "peak meter clip hold",
735 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
736 ",3min,5min,10min,20min,45min,90min",
737 peak_meter_set_clip_hold
, 25, LANG_PM_ETERNAL
,
738 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
739 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
740 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
741 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
742 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
743 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
744 TALK_ID(25, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
745 TALK_ID(45, UNIT_SEC
), TALK_ID(60, UNIT_SEC
),
746 TALK_ID(90, UNIT_SEC
), TALK_ID(2, UNIT_MIN
),
747 TALK_ID(3, UNIT_MIN
), TALK_ID(5, UNIT_MIN
),
748 TALK_ID(10, UNIT_MIN
), TALK_ID(20, UNIT_MIN
),
749 TALK_ID(45, UNIT_MIN
), TALK_ID(90, UNIT_MIN
)),
750 STRINGCHOICE_SETTING(0, peak_meter_hold
, LANG_PM_PEAK_HOLD
, 3,
752 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
753 NULL
, 18, LANG_OFF
, TALK_ID(200, UNIT_MS
),
754 TALK_ID(300, UNIT_MS
), TALK_ID(500, UNIT_MS
),
755 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
756 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
757 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
758 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
759 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
760 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
761 TALK_ID(30, UNIT_SEC
), TALK_ID(60, UNIT_SEC
)),
762 INT_SETTING(0, peak_meter_release
, LANG_PM_RELEASE
, 8, "peak meter release",
763 UNIT_PM_TICK
, 1, 0x7e, 1, NULL
, NULL
,NULL
),
764 OFFON_SETTING(0,peak_meter_dbfs
,LANG_PM_DBFS
,true,"peak meter dbfs",NULL
),
765 {F_T_INT
, &global_settings
.peak_meter_min
, LANG_PM_MIN
,INT(60),
766 "peak meter min", NULL
, UNUSED
},
767 {F_T_INT
, &global_settings
.peak_meter_max
, LANG_PM_MAX
,INT(0),
768 "peak meter max", NULL
, UNUSED
},
769 #ifdef HAVE_RECORDING
770 OFFON_SETTING(0, peak_meter_clipcounter
, LANG_PM_CLIPCOUNTER
, false,
771 "peak meter clipcounter", NULL
),
772 #endif /* HAVE_RECORDING */
773 #endif /* HAVE_LCD_BITMAP */
774 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
775 SOUND_SETTING(F_SOUNDSETTING
, mdb_strength
, LANG_MDB_STRENGTH
,
776 "mdb strength", SOUND_MDB_STRENGTH
),
777 SOUND_SETTING(F_SOUNDSETTING
, mdb_harmonics
, LANG_MDB_HARMONICS
,
778 "mdb harmonics", SOUND_MDB_HARMONICS
),
779 SOUND_SETTING(F_SOUNDSETTING
, mdb_center
, LANG_MDB_CENTER
,
780 "mdb center", SOUND_MDB_CENTER
),
781 SOUND_SETTING(F_SOUNDSETTING
, mdb_shape
, LANG_MDB_SHAPE
,
782 "mdb shape", SOUND_MDB_SHAPE
),
783 OFFON_SETTING(F_SOUNDSETTING
, mdb_enable
, LANG_MDB_ENABLE
,
784 false, "mdb enable", set_mdb_enable
),
786 #if CONFIG_CODEC == MAS3507D
787 OFFON_SETTING(F_SOUNDSETTING
, line_in
,LANG_LINE_IN
,false,"line in",NULL
),
790 OFFON_SETTING(F_TEMPVAR
, talk_menu
, LANG_VOICE_MENU
, true, "talk menu", NULL
),
791 CHOICE_SETTING(0, talk_dir
, LANG_VOICE_DIR
, 0,
792 "talk dir", off_number_spell
, NULL
, 3,
793 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
794 ID2P(LANG_VOICE_SPELL
)),
795 OFFON_SETTING(F_TEMPVAR
, talk_dir_clip
, LANG_VOICE_DIR_TALK
, false,
796 "talk dir clip", NULL
),
797 CHOICE_SETTING(0, talk_file
, LANG_VOICE_FILE
, 0,
798 "talk file", off_number_spell
, NULL
, 3,
799 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
800 ID2P(LANG_VOICE_SPELL
)),
801 OFFON_SETTING(F_TEMPVAR
, talk_file_clip
, LANG_VOICE_FILE_TALK
, false,
802 "talk file clip", NULL
),
803 OFFON_SETTING(F_TEMPVAR
, talk_filetype
, LANG_VOICE_FILETYPE
, false,
804 "talk filetype", NULL
),
805 OFFON_SETTING(F_TEMPVAR
, talk_battery_level
, LANG_TALK_BATTERY_LEVEL
, false,
806 "Announce Battery Level", NULL
),
809 CHOICE_SETTING(0, sort_file
, LANG_SORT_FILE
, 0 ,
810 "sort files", "alpha,oldest,newest,type", NULL
, 4,
811 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
812 ID2P(LANG_SORT_DATE_REVERSE
) , ID2P(LANG_SORT_TYPE
)),
813 CHOICE_SETTING(0, sort_dir
, LANG_SORT_DIR
, 0 ,
814 "sort dirs", "alpha,oldest,newest", NULL
, 3,
815 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
816 ID2P(LANG_SORT_DATE_REVERSE
)),
818 #ifdef HAVE_RECORDING
820 STRINGCHOICE_SETTING(F_RECSETTING
, rec_timesplit
, LANG_SPLIT_TIME
, 0,
822 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
823 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
825 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
),
826 TALK_ID(15, UNIT_MIN
), TALK_ID(30, UNIT_MIN
),
827 TALK_ID(60, UNIT_MIN
), TALK_ID(74, UNIT_MIN
),
828 TALK_ID(80, UNIT_MIN
), TALK_ID(2, UNIT_HOUR
),
829 TALK_ID(4, UNIT_HOUR
), TALK_ID(6, UNIT_HOUR
),
830 TALK_ID(8, UNIT_HOUR
), TALK_ID(10, UNIT_HOUR
),
831 TALK_ID(12, UNIT_HOUR
), TALK_ID(18, UNIT_HOUR
),
832 TALK_ID(20, UNIT_HOUR
), TALK_ID(24, UNIT_HOUR
)),
833 STRINGCHOICE_SETTING(F_RECSETTING
, rec_sizesplit
, LANG_SPLIT_SIZE
, 0,
835 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
836 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
838 TALK_ID(5, UNIT_MB
), TALK_ID(10, UNIT_MB
),
839 TALK_ID(15, UNIT_MB
), TALK_ID(32, UNIT_MB
),
840 TALK_ID(64, UNIT_MB
), TALK_ID(75, UNIT_MB
),
841 TALK_ID(100, UNIT_MB
), TALK_ID(128, UNIT_MB
),
842 TALK_ID(256, UNIT_MB
), TALK_ID(512, UNIT_MB
),
843 TALK_ID(650, UNIT_MB
), TALK_ID(700, UNIT_MB
),
844 TALK_ID(1024, UNIT_MB
), TALK_ID(1536, UNIT_MB
),
845 TALK_ID(1792, UNIT_MB
)),
846 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_channels
, LANG_CHANNELS
, INT(0),
847 "rec channels","stereo,mono",UNUSED
},
848 CHOICE_SETTING(F_RECSETTING
, rec_split_type
, LANG_SPLIT_TYPE
, 0,
849 "rec split type", "Split,Stop,Shutdown", NULL
, 3,
850 ID2P(LANG_START_NEW_FILE
), ID2P(LANG_STOP_RECORDING
),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN
)),
851 CHOICE_SETTING(F_RECSETTING
, rec_split_method
, LANG_SPLIT_MEASURE
, 0,
852 "rec split method", "Time,Filesize", NULL
, 2,
853 ID2P(LANG_TIME
), ID2P(LANG_REC_SIZE
)),
854 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_source
, LANG_RECORDING_SOURCE
,
855 INT(0), "rec source",
856 &HAVE_MIC_REC_(",mic")
857 HAVE_LINE_REC_(",line")
858 HAVE_SPDIF_REC_(",spdif")
859 HAVE_FMRADIO_REC_(",fmradio")[1],
861 INT_SETTING(F_RECSETTING
, rec_prerecord_time
, LANG_RECORD_PRERECORD_TIME
, 0,
862 "prerecording time", UNIT_SEC
, 0, 30, 1,
863 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
865 FILENAME_SETTING(F_RECSETTING
, rec_directory
, "rec path",
866 REC_BASE_DIR
, NULL
, NULL
, MAX_FILENAME
+1),
867 #ifdef HAVE_BACKLIGHT
868 CHOICE_SETTING(F_RECSETTING
, cliplight
, LANG_CLIP_LIGHT
, 0,
869 "cliplight", "off,main,both,remote", NULL
,
870 #ifdef HAVE_REMOTE_LCD
871 4, ID2P(LANG_OFF
), ID2P(LANG_MAIN_UNIT
),
872 ID2P(LANG_REMOTE_MAIN
), ID2P(LANG_REMOTE_UNIT
)
874 2, ID2P(LANG_OFF
), ID2P(LANG_ON
)
878 #ifdef DEFAULT_REC_MIC_GAIN
879 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_mic_gain
,
880 LANG_GAIN
,INT(DEFAULT_REC_MIC_GAIN
),
881 "rec mic gain",NULL
,UNUSED
},
882 #endif /* DEFAULT_REC_MIC_GAIN */
883 #ifdef DEFAULT_REC_LEFT_GAIN
884 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_left_gain
,
885 LANG_RECORDING_LEFT
,INT(DEFAULT_REC_LEFT_GAIN
),
886 "rec left gain",NULL
,UNUSED
},
887 #endif /* DEFAULT_REC_LEFT_GAIN */
888 #ifdef DEFAULT_REC_RIGHT_GAIN
889 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_right_gain
,LANG_RECORDING_RIGHT
,
890 INT(DEFAULT_REC_RIGHT_GAIN
),
891 "rec right gain",NULL
,UNUSED
},
892 #endif /* DEFAULT_REC_RIGHT_GAIN */
893 #if CONFIG_CODEC == MAS3587F
894 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
895 LANG_RECORDING_FREQUENCY
, INT(0),
896 "rec frequency","44,48,32,22,24,16", UNUSED
},
897 INT_SETTING(F_RECSETTING
, rec_quality
, LANG_RECORDING_QUALITY
, 5,
898 "rec quality", UNIT_INT
, 0, 7, 1, NULL
, NULL
, NULL
),
899 OFFON_SETTING(F_RECSETTING
, rec_editable
, LANG_RECORDING_EDITABLE
, false,
900 "editable recordings", NULL
),
901 #endif /* CONFIG_CODEC == MAS3587F */
902 #if CONFIG_CODEC == SWCODEC
903 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
904 LANG_RECORDING_FREQUENCY
,INT(REC_FREQ_DEFAULT
),
905 "rec frequency",REC_FREQ_CFG_VAL_LIST
,UNUSED
},
906 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_format
,
907 LANG_RECORDING_FORMAT
,INT(REC_FORMAT_DEFAULT
),
908 "rec format",REC_FORMAT_CFG_VAL_LIST
,UNUSED
},
909 /** Encoder settings start - keep these together **/
911 /* (no settings yet) */
913 {F_T_INT
|F_RECSETTING
, &global_settings
.mp3_enc_config
.bitrate
,-1,
914 INT(MP3_ENC_BITRATE_CFG_DEFAULT
),
915 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST
,UNUSED
},
917 /* (no settings yet) */
919 /* (no settings yet) */
920 /** Encoder settings end **/
921 #endif /* CONFIG_CODEC == SWCODEC */
922 /* values for the trigger */
923 INT_SETTING(F_RECSETTING
, rec_start_thres_db
, LANG_RECORD_START_THRESHOLD
, -35,
924 "trigger start threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, -1, NULL
, NULL
, NULL
),
925 INT_SETTING(F_RECSETTING
, rec_start_thres_linear
, LANG_RECORD_START_THRESHOLD
, 5,
926 "trigger start threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
927 INT_SETTING(F_RECSETTING
, rec_stop_thres_db
, LANG_RECORD_STOP_THRESHOLD
, -45,
928 "trigger stop threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, -1, NULL
, NULL
, NULL
),
929 INT_SETTING(F_RECSETTING
, rec_stop_thres_linear
, LANG_RECORD_STOP_THRESHOLD
, 10,
930 "trigger stop threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
931 TABLE_SETTING(F_RECSETTING
, rec_start_duration
, LANG_MIN_DURATION
, 0,
932 "trigger start duration",
933 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
934 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
935 0,1,2,5,10,15,20,25,30,60,120,300,600),
936 TABLE_SETTING(F_RECSETTING
, rec_stop_postrec
, LANG_MIN_DURATION
, 0,
937 "trigger stop duration",
938 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
939 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
940 0,1,2,5,10,15,20,25,30,60,120,300,600),
941 TABLE_SETTING(F_RECSETTING
, rec_stop_gap
, LANG_RECORD_STOP_GAP
, 1,
943 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
944 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
945 0,1,2,5,10,15,20,25,30,60,120,300,600),
946 CHOICE_SETTING(F_RECSETTING
, rec_trigger_mode
, LANG_RECORD_TRIGGER
, TRIG_MODE_OFF
,
947 "trigger mode","off,once,repeat", NULL
,3,
948 ID2P(LANG_OFF
), ID2P(LANG_RECORD_TRIG_NOREARM
), ID2P(LANG_REPEAT
)),
949 CHOICE_SETTING(F_RECSETTING
, rec_trigger_type
, LANG_RECORD_TRIGGER_TYPE
, TRIG_TYPE_STOP
,
950 "trigger mode","off,once,repeat", NULL
,3,
951 ID2P(LANG_RECORD_TRIGGER_STOP
), ID2P(LANG_PAUSE
), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP
)),
952 #endif /* HAVE_RECORDING */
954 #ifdef HAVE_SPDIF_POWER
955 OFFON_SETTING(F_SOUNDSETTING
, spdif_enable
, LANG_SPDIF_ENABLE
, false,
956 "spdif enable", spdif_power_enable
),
958 CHOICE_SETTING(0, next_folder
, LANG_NEXT_FOLDER
, FOLDER_ADVANCE_OFF
,
959 "folder navigation", "off,on,random",NULL
,3,
960 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
962 OFFON_SETTING(0, runtimedb
, LANG_RUNTIMEDB_ACTIVE
, false,
963 "gather runtime data", NULL
),
965 #if CONFIG_CODEC == SWCODEC
967 OFFON_SETTING(F_SOUNDSETTING
, replaygain
, LANG_REPLAYGAIN_ENABLE
, false,
969 CHOICE_SETTING(F_SOUNDSETTING
, replaygain_type
, LANG_REPLAYGAIN_MODE
,
970 REPLAYGAIN_ALBUM
, "replaygain type",
971 "track,album,track shuffle", NULL
, 3, ID2P(LANG_TRACK_GAIN
),
972 ID2P(LANG_ALBUM_GAIN
), ID2P(LANG_SHUFFLE_GAIN
)),
973 OFFON_SETTING(F_SOUNDSETTING
, replaygain_noclip
, LANG_REPLAYGAIN_NOCLIP
,
974 false, "replaygain noclip", NULL
),
975 INT_SETTING_NOWRAP(F_SOUNDSETTING
, replaygain_preamp
,
976 LANG_REPLAYGAIN_PREAMP
, 0, "replaygain preamp",
977 UNIT_DB
, -120, 120, 5, db_format
, get_dec_talkid
, NULL
),
979 CHOICE_SETTING(0, beep
, LANG_BEEP
, 0, "beep", "off,weak,moderate,strong",
980 NULL
, 4, ID2P(LANG_OFF
), ID2P(LANG_WEAK
),
981 ID2P(LANG_MODERATE
), ID2P(LANG_STRONG
)),
984 CHOICE_SETTING(F_SOUNDSETTING
, crossfade
, LANG_CROSSFADE_ENABLE
, 0,
986 "off,shuffle,track skip,shuffle and track skip,always", NULL
,
987 5, ID2P(LANG_OFF
), ID2P(LANG_SHUFFLE
), ID2P(LANG_TRACKSKIP
),
988 ID2P(LANG_SHUFFLE_TRACKSKIP
), ID2P(LANG_ALWAYS
)),
989 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_delay
,
990 LANG_CROSSFADE_FADE_IN_DELAY
, 0,
991 "crossfade fade in delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
, NULL
),
992 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_delay
,
993 LANG_CROSSFADE_FADE_OUT_DELAY
, 0,
994 "crossfade fade out delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
,NULL
),
995 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_duration
,
996 LANG_CROSSFADE_FADE_IN_DURATION
, 2,
997 "crossfade fade in duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
999 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_duration
,
1000 LANG_CROSSFADE_FADE_OUT_DURATION
, 2,
1001 "crossfade fade out duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1003 CHOICE_SETTING(F_SOUNDSETTING
, crossfade_fade_out_mixmode
,
1004 LANG_CROSSFADE_FADE_OUT_MODE
, 0,
1005 "crossfade fade out mode", "crossfade,mix", NULL
, 2,
1006 ID2P(LANG_CROSSFADE
), ID2P(LANG_MIX
)),
1009 OFFON_SETTING(F_SOUNDSETTING
, crossfeed
, LANG_CROSSFEED
, false,
1010 "crossfeed", dsp_set_crossfeed
),
1011 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_direct_gain
,
1012 LANG_CROSSFEED_DIRECT_GAIN
, -15,
1013 "crossfeed direct gain", UNIT_DB
, -60, 0, 5,
1014 db_format
, get_dec_talkid
,dsp_set_crossfeed_direct_gain
),
1015 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_cross_gain
,
1016 LANG_CROSSFEED_CROSS_GAIN
, -60,
1017 "crossfeed cross gain", UNIT_DB
, -120, -30, 5,
1018 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1019 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_attenuation
,
1020 LANG_CROSSFEED_HF_ATTENUATION
, -160,
1021 "crossfeed hf attenuation", UNIT_DB
, -240, -60, 5,
1022 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1023 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_cutoff
,
1024 LANG_CROSSFEED_HF_CUTOFF
, 700,
1025 "crossfeed hf cutoff", UNIT_HERTZ
, 500, 2000, 100,
1026 NULL
, NULL
, crossfeed_cross_set
),
1029 OFFON_SETTING(F_EQSETTING
, eq_enabled
, LANG_EQUALIZER_ENABLED
, false,
1030 "eq enabled", NULL
),
1031 INT_SETTING_NOWRAP(F_EQSETTING
, eq_precut
, LANG_EQUALIZER_PRECUT
, 0,
1032 "eq precut", UNIT_DB
, 0, 240, 5, eq_precut_format
,
1033 get_precut_talkid
, dsp_set_eq_precut
),
1035 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1036 60, "eq band 0 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1037 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1038 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1039 200, "eq band 1 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1040 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1041 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1042 800, "eq band 2 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1043 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1044 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1045 4000, "eq band 3 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1046 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1047 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1048 12000, "eq band 4 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1049 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1050 /* 0..64 (or 0.0 to 6.4) */
1051 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_q
, LANG_EQUALIZER_BAND_Q
, 7,
1052 "eq band 0 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1053 eq_q_format
, get_dec_talkid
, NULL
),
1054 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_q
, LANG_EQUALIZER_BAND_Q
, 10,
1055 "eq band 1 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1056 eq_q_format
, get_dec_talkid
, NULL
),
1057 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_q
, LANG_EQUALIZER_BAND_Q
, 10,
1058 "eq band 2 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1059 eq_q_format
, get_dec_talkid
, NULL
),
1060 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_q
, LANG_EQUALIZER_BAND_Q
, 10,
1061 "eq band 3 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1062 eq_q_format
, get_dec_talkid
, NULL
),
1063 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_q
, LANG_EQUALIZER_BAND_Q
, 7,
1064 "eq band 4 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1065 eq_q_format
, get_dec_talkid
, NULL
),
1066 /* -240..240 (or -24db to +24db) */
1067 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_gain
, LANG_GAIN
, 0,
1068 "eq band 0 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1069 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1070 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_gain
, LANG_GAIN
, 0,
1071 "eq band 1 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1072 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1073 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_gain
, LANG_GAIN
, 0,
1074 "eq band 2 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1075 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1076 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_gain
, LANG_GAIN
, 0,
1077 "eq band 3 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1078 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1079 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_gain
, LANG_GAIN
, 0,
1080 "eq band 4 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1081 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1084 OFFON_SETTING(F_SOUNDSETTING
, dithering_enabled
, LANG_DITHERING
, false,
1085 "dithering enabled", dsp_dither_enable
),
1088 SOUND_SETTING(F_NO_WRAP
, bass_cutoff
, LANG_BASS_CUTOFF
,
1089 "bass cutoff", SOUND_BASS_CUTOFF
),
1090 SOUND_SETTING(F_NO_WRAP
, treble_cutoff
, LANG_TREBLE_CUTOFF
,
1091 "treble cutoff", SOUND_TREBLE_CUTOFF
),
1093 #ifdef HAVE_DIRCACHE
1094 OFFON_SETTING(0,dircache
,LANG_DIRCACHE_ENABLE
,false,"dircache",NULL
),
1095 SYSTEM_SETTING(NVRAM(4),dircache_size
,0),
1098 #ifdef HAVE_TAGCACHE
1099 #ifdef HAVE_TC_RAMCACHE
1100 OFFON_SETTING(0,tagcache_ram
,LANG_TAGCACHE_RAM
,false,"tagcache_ram",NULL
),
1102 OFFON_SETTING(0, tagcache_autoupdate
, LANG_TAGCACHE_AUTOUPDATE
, false,
1103 "tagcache_autoupdate", NULL
),
1105 CHOICE_SETTING(0, default_codepage
, LANG_DEFAULT_CODEPAGE
, 0,
1107 #ifdef HAVE_LCD_BITMAP
1108 /* The order must match with that in unicode.c */
1109 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1110 "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8",
1112 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1113 ID2P(LANG_CODEPAGE_HEBREW
), ID2P(LANG_CODEPAGE_CYRILLIC
),
1114 ID2P(LANG_CODEPAGE_THAI
), ID2P(LANG_CODEPAGE_ARABIC
),
1115 ID2P(LANG_CODEPAGE_TURKISH
),
1116 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1117 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1118 ID2P(LANG_CODEPAGE_JAPANESE
),
1119 ID2P(LANG_CODEPAGE_SIMPLIFIED
), ID2P(LANG_CODEPAGE_KOREAN
),
1120 ID2P(LANG_CODEPAGE_TRADITIONAL
), ID2P(LANG_CODEPAGE_UTF8
)),
1121 #else /* !HAVE_LCD_BITMAP */
1122 /* The order must match with that in unicode.c */
1123 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,utf-8",
1125 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1126 ID2P(LANG_CODEPAGE_CYRILLIC
), ID2P(LANG_CODEPAGE_TURKISH
),
1127 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1128 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1129 ID2P(LANG_CODEPAGE_UTF8
)),
1131 OFFON_SETTING(0, warnon_erase_dynplaylist
, LANG_WARN_ERASEDYNPLAYLIST_MENU
,
1132 false, "warn when erasing dynamic playlist",NULL
),
1134 #ifdef HAVE_BACKLIGHT
1135 #ifdef HAS_BUTTON_HOLD
1136 CHOICE_SETTING(0, backlight_on_button_hold
, LANG_BACKLIGHT_ON_BUTTON_HOLD
,
1137 0, "backlight on button hold", "normal,off,on",
1138 backlight_set_on_button_hold
, 3,
1139 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1142 #ifdef HAVE_LCD_SLEEP_SETTING
1143 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off
,
1144 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF
, 3,
1145 "lcd sleep after backlight off",
1146 "always,never,5,10,15,20,30,45,60,90",
1147 lcd_set_sleep_after_backlight_off
, 10,
1148 LANG_ALWAYS
, LANG_NEVER
, TALK_ID(5, UNIT_SEC
),
1149 TALK_ID(10, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
1150 TALK_ID(20, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1151 TALK_ID(45, UNIT_SEC
),TALK_ID(60, UNIT_SEC
),
1152 TALK_ID(90, UNIT_SEC
)),
1153 #endif /* HAVE_LCD_SLEEP_SETTING */
1154 #endif /* HAVE_BACKLIGHT */
1156 OFFON_SETTING(0, hold_lr_for_scroll_in_list
, -1, true,
1157 "hold_lr_for_scroll_in_list",NULL
),
1158 #ifdef HAVE_LCD_BITMAP
1159 CHOICE_SETTING(0, show_path_in_browser
, LANG_SHOW_PATH
, SHOW_PATH_OFF
,
1160 "show path in browser", "off,current directory,full path",
1161 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_SHOW_PATH_CURRENT
),
1162 ID2P(LANG_DISPLAY_FULL_PATH
)),
1166 {F_T_INT
,&global_settings
.rec_agc_preset_mic
,LANG_RECORD_AGC_PRESET
,INT(1),
1167 "agc mic preset",NULL
,UNUSED
},
1168 {F_T_INT
,&global_settings
.rec_agc_preset_line
,LANG_RECORD_AGC_PRESET
,INT(1),
1169 "agc line preset",NULL
,UNUSED
},
1170 {F_T_INT
,&global_settings
.rec_agc_maxgain_mic
,-1,INT(104),
1171 "agc maximum mic gain",NULL
,UNUSED
},
1172 {F_T_INT
,&global_settings
.rec_agc_maxgain_line
,-1,INT(96),
1173 "agc maximum line gain",NULL
,UNUSED
},
1174 {F_T_INT
,&global_settings
.rec_agc_cliptime
,LANG_RECORD_AGC_CLIPTIME
,INT(1),
1175 "agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED
},
1178 #ifdef HAVE_REMOTE_LCD
1179 #ifdef HAS_REMOTE_BUTTON_HOLD
1180 CHOICE_SETTING(0, remote_backlight_on_button_hold
,
1181 LANG_BACKLIGHT_ON_BUTTON_HOLD
, 0,
1182 "remote backlight on button hold",
1183 "normal,off,on", remote_backlight_set_on_button_hold
, 3,
1184 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1187 #ifdef HAVE_HEADPHONE_DETECTION
1188 CHOICE_SETTING(0, unplug_mode
, LANG_HEADPHONE_UNPLUG
, 0,
1189 "pause on headphone unplug", "off,pause,pause and resume",
1190 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_PAUSE
),
1191 ID2P(LANG_HEADPHONE_UNPLUG_RESUME
)),
1192 INT_SETTING(0, unplug_rw
, LANG_HEADPHONE_UNPLUG_RW
, 0,
1193 "rewind duration on pause", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1195 OFFON_SETTING(0, unplug_autoresume
,
1196 LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME
, false,
1197 "disable autoresume if phones not present",NULL
),
1200 CHOICE_SETTING(0, fm_region
, LANG_FM_REGION
, 0,
1201 "fm_region", "eu,us,jp,kr", set_radio_region
, 4,
1202 ID2P(LANG_FM_EUROPE
), ID2P(LANG_FM_US
),
1203 ID2P(LANG_FM_JAPAN
), ID2P(LANG_FM_KOREA
)),
1206 OFFON_SETTING(0, audioscrobbler
, LANG_AUDIOSCROBBLER
, false,
1207 "Last.fm Logging", NULL
),
1209 FILENAME_SETTING(0, fmr_file
, "fmr", "",
1210 FMPRESET_PATH
"/", ".fmr", MAX_FILENAME
+1),
1212 #ifdef HAVE_LCD_BITMAP
1213 FILENAME_SETTING(F_THEMESETTING
, font_file
, "font",
1214 DEFAULT_FONTNAME
, FONT_DIR
"/", ".fnt", MAX_FILENAME
+1),
1216 FILENAME_SETTING(F_THEMESETTING
,wps_file
, "wps",
1217 DEFAULT_WPSNAME
, WPS_DIR
"/", ".wps", MAX_FILENAME
+1),
1218 FILENAME_SETTING(0,lang_file
,"lang","",LANG_DIR
"/",".lng",MAX_FILENAME
+1),
1219 #ifdef HAVE_REMOTE_LCD
1220 FILENAME_SETTING(F_THEMESETTING
,rwps_file
,"rwps",
1221 DEFAULT_WPSNAME
, WPS_DIR
"/", ".rwps", MAX_FILENAME
+1),
1224 FILENAME_SETTING(F_THEMESETTING
,backdrop_file
,"backdrop",
1225 DEFAULT_BACKDROP
, BACKDROP_DIR
"/", ".bmp",MAX_FILENAME
+1),
1227 #ifdef HAVE_LCD_BITMAP
1228 FILENAME_SETTING(0,kbd_file
,"kbd","",ROCKBOX_DIR
"/",".kbd",MAX_FILENAME
+1),
1230 #ifdef HAVE_USB_POWER
1232 OFFON_SETTING(0,usb_charging
,LANG_USB_CHARGING
,false,"usb charging",NULL
),
1235 OFFON_SETTING(0,cuesheet
,LANG_CUESHEET_ENABLE
,false,"cuesheet support",
1237 OFFON_SETTING(0,study_mode
,LANG_ENABLE_STUDY_MODE
,false,"Study mode",
1239 INT_SETTING(0, study_hop_step
, LANG_STUDY_HOP_STEP
, 5, "Study hop step",
1240 UNIT_SEC
, 0, 250, 1, NULL
, NULL
, NULL
),
1241 CHOICE_SETTING(0, start_in_screen
, LANG_START_SCREEN
, 1,
1242 "start in screen", "previous,root,files,db,wps,menu,"
1243 #ifdef HAVE_RECORDING
1250 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1252 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1257 ID2P(LANG_PREVIOUS_SCREEN
), ID2P(LANG_MAIN_MENU
),
1258 ID2P(LANG_DIR_BROWSER
), ID2P(LANG_TAGCACHE
),
1259 ID2P(LANG_RESUME_PLAYBACK
), ID2P(LANG_SETTINGS
),
1260 #ifdef HAVE_RECORDING
1261 ID2P(LANG_RECORDING
),
1264 ID2P(LANG_FM_RADIO
),
1266 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
)
1268 SYSTEM_SETTING(NVRAM(1),last_screen
,-1),
1269 #if defined(HAVE_RTC_ALARM) && \
1270 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1271 {F_T_INT
, &global_settings
.alarm_wake_up_screen
, LANG_ALARM_WAKEUP_SCREEN
,
1272 INT(ALARM_START_WPS
), "alarm wakeup screen", ALARM_SETTING_TEXT
,UNUSED
},
1273 #endif /* HAVE_RTC_ALARM */
1275 /* Customizable icons */
1276 #ifdef HAVE_LCD_BITMAP
1277 FILENAME_SETTING(F_THEMESETTING
, icon_file
, "iconset", DEFAULT_ICONSET
,
1278 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1279 FILENAME_SETTING(F_THEMESETTING
, viewers_icon_file
, "viewers iconset",
1280 DEFAULT_VIEWERS_ICONSET
,
1281 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1283 #ifdef HAVE_REMOTE_LCD
1284 FILENAME_SETTING(F_THEMESETTING
, remote_icon_file
, "remote iconset", "",
1285 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1286 FILENAME_SETTING(F_THEMESETTING
, remote_viewers_icon_file
,
1287 "remote viewers iconset", "",
1288 ICON_DIR
"/", ".bmp", MAX_FILENAME
+1),
1289 #endif /* HAVE_REMOTE_LCD */
1290 #ifdef HAVE_LCD_COLOR
1291 FILENAME_SETTING(F_THEMESETTING
, colors_file
, "filetype colours", "-",
1292 THEME_DIR
"/", ".colours", MAX_FILENAME
+1),
1294 #ifdef HAVE_BUTTON_LIGHT
1295 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, buttonlight_timeout
,
1296 LANG_BUTTONLIGHT_TIMEOUT
, 5, "button light timeout", off_on
,
1297 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
1298 buttonlight_set_timeout
, 20,
1299 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
1301 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1302 INT_SETTING(F_NO_WRAP
, buttonlight_brightness
, LANG_BUTTONLIGHT_BRIGHTNESS
,
1303 DEFAULT_BRIGHTNESS_SETTING
,
1304 "button light brightness",UNIT_INT
, MIN_BRIGHTNESS_SETTING
,
1305 MAX_BRIGHTNESS_SETTING
, 1, NULL
, NULL
,
1306 buttonlight_set_brightness
),
1308 #ifndef HAVE_SCROLLWHEEL
1309 INT_SETTING(0, list_accel_start_delay
, LANG_LISTACCEL_START_DELAY
,
1310 2, "list_accel_start_delay", UNIT_MS
, 0, 10, 1,
1311 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1312 INT_SETTING(0, list_accel_wait
, LANG_LISTACCEL_ACCEL_SPEED
,
1313 3, "list_accel_wait", UNIT_SEC
, 1, 10, 1,
1314 scanaccel_formatter
, getlang_unit_0_is_off
, NULL
),
1315 #endif /* HAVE_SCROLLWHEEL */
1317 SYSTEM_SETTING(0, statusbar_forced
, 0),
1319 #if CONFIG_CODEC == SWCODEC
1321 CHOICE_SETTING(0, keyclick
, LANG_KEYCLICK
, 0,
1322 "keyclick", "off,weak,moderate,strong", NULL
, 4,
1323 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
),
1325 OFFON_SETTING(0, keyclick_repeats
, LANG_KEYCLICK_REPEATS
, false,
1326 "keyclick repeats", NULL
),
1327 #endif /* CONFIG_CODEC == SWCODEC */
1328 FILENAME_SETTING(0, playlist_catalog_dir
, "playlist catalog directory",
1329 PLAYLIST_CATALOG_DEFAULT_DIR
, NULL
, NULL
, MAX_FILENAME
+1),
1330 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
1331 CHOICE_SETTING(0, touchpad_sensitivity
, LANG_TOUCHPAD_SENSITIVITY
, 0,
1332 "touchpad sensitivity", "normal,high", touchpad_set_sensitivity
, 2,
1333 ID2P(LANG_NORMAL
), ID2P(LANG_HIGH
)),
1337 const int nb_settings
= sizeof(settings
)/sizeof(*settings
);