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