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"
52 #ifdef IPOD_ACCESSORY_PROTOCOL
55 #include "statusbar.h"
56 #ifdef HAVE_TOUCHSCREEN
57 #include "touchscreen.h"
58 #include "ctype.h" /* For isspace() */
61 #define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT)
62 /** NOTE: NVRAM_CONFIG_VERSION is in settings_list.h
63 and you may need to update it if you edit this file */
65 #define UNUSED {.RESERVED=NULL}
66 #define INT(a) {.int_ = a}
67 #define UINT(a) {.uint_ = a}
68 #define BOOL(a) {.bool_ = a}
69 #define CHARPTR(a) {.charptr = a}
70 #define UCHARPTR(a) {.ucharptr = a}
71 #define FUNCTYPE(a) {.func = a}
72 #define NODEFAULT INT(0)
74 /* in all the following macros the args are:
75 - flags: bitwise | or the F_ bits in settings_list.h
76 - var: pointer to the variable being changed (usually in global_settings)
77 - lang_id: LANG_* id to display in menus and setting screens for the setting
78 - default: the default value for the variable, set if settings are reset
79 - name: the name of the setting in config files
80 - cfg_vals: comma seperated list of legal values in cfg files.
81 NULL if a number is written to the file instead.
82 - cb: the callback used by the setting screen.
85 /* Use for int settings which use the set_sound() function to set them */
86 #define SOUND_SETTING(flags,var,lang_id,name,setting) \
87 {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \
88 lang_id, NODEFAULT,name,NULL, \
89 {.sound_setting=(struct sound_setting[]){{setting}}} }
91 /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO
92 or dont save as "off" or "on" in the cfg */
93 #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes,no,cb) \
94 {flags|F_BOOL_SETTING, &global_settings.var, \
95 lang_id, BOOL(default),name,cfgvals, \
96 {.bool_setting=(struct bool_setting[]){{cb,yes,no}}} }
98 /* bool setting which does use LANG_YES and _NO and save as "off,on" */
99 #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
100 {flags|F_BOOL_SETTING, &global_settings.var, \
101 lang_id, BOOL(default),name,off_on, \
102 {.bool_setting=(struct bool_setting[]) \
103 {{cb,LANG_SET_BOOL_YES,LANG_SET_BOOL_NO}}} }
105 /* int variable which is NOT saved to .cfg files,
106 (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */
107 #define SYSTEM_SETTING(flags,var,default) \
108 {flags|F_T_INT, &global_status.var,-1, INT(default), \
111 /* setting which stores as a filename (or another string) in the .cfgvals
112 The string must be a char array (which all of our string settings are),
113 not just a char pointer.
114 prefix: The absolute path to not save in the variable, ex /.rockbox/wps_file
115 suffix: The file extention (usually...) e.g .wps_file
116 If the prefix is set (not NULL), then the suffix must be set as well.
118 #define TEXT_SETTING(flags,var,name,default,prefix,suffix) \
119 {flags|F_T_UCHARPTR, &global_settings.var,-1, \
120 CHARPTR(default),name,NULL, \
121 {.filename_setting= \
122 (struct filename_setting[]){ \
123 {prefix,suffix,sizeof(global_settings.var)}}} }
125 /* Used for settings which use the set_option() setting screen.
126 The ... arg is a list of pointers to strings to display in the setting
127 screen. These can either be literal strings, or ID2P(LANG_*) */
128 #define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \
129 {flags|F_CHOICE_SETTING|F_T_INT, &global_settings.var, lang_id, \
130 INT(default), name, cfg_vals, \
131 {.choice_setting = (struct choice_setting[]){ \
132 {cb, count, {.desc = (const unsigned char*[]) \
135 /* Similar to above, except the strings to display are taken from cfg_vals,
136 the ... arg is a list of ID's to talk for the strings, can use TALK_ID()'s */
137 #define STRINGCHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals, \
139 {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS, \
140 &global_settings.var, lang_id, \
141 INT(default), name, cfg_vals, \
142 {.choice_setting = (struct choice_setting[]){ \
143 {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}}
145 /* for settings which use the set_int() setting screen.
146 unit is the UNIT_ define to display/talk.
147 the first one saves a string to the config file,
148 the second one saves the variable value to the config file */
149 #define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \
150 unit, min, max, step, formatter, get_talk_id, cb) \
151 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
152 lang_id, INT(default), name, cfg_vals, \
153 {.int_setting = (struct int_setting[]){ \
154 {cb, unit, min, max, step, formatter, get_talk_id}}}}
155 #define INT_SETTING(flags, var, lang_id, default, name, \
156 unit, min, max, step, formatter, get_talk_id, cb) \
157 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
158 lang_id, INT(default), name, NULL, \
159 {.int_setting = (struct int_setting[]){ \
160 {cb, unit, min, max, step, formatter, get_talk_id}}}}
161 #define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \
162 unit, min, max, step, formatter, get_talk_id, cb) \
163 {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \
164 lang_id, INT(default), name, NULL, \
165 {.int_setting = (struct int_setting[]){ \
166 {cb, unit, min, max, step, formatter, get_talk_id}}}}
168 #define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
169 unit, formatter, get_talk_id, cb, count, ...) \
170 {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \
171 lang_id, INT(default), name, cfg_vals, \
172 {.table_setting = (struct table_setting[]) { \
173 {cb, formatter, get_talk_id, unit, count, \
174 (const int[]){__VA_ARGS__}}}}}
176 #define CUSTOM_SETTING(flags, var, lang_id, default, name, \
177 load_from_cfg, write_to_cfg, \
178 is_change, set_default) \
179 {flags|F_CUSTOM_SETTING|F_T_CUSTOM|F_BANFROMQS, \
180 &global_settings.var, lang_id, \
181 {.custom = (void*)default}, name, NULL, \
182 {.custom_setting = (struct custom_setting[]){ \
183 {load_from_cfg, write_to_cfg, is_change, set_default}}}}
184 /* some sets of values which are used more than once, to save memory */
185 static const char off_on
[] = "off,on";
186 static const char off_on_ask
[] = "off,on,ask";
187 static const char off_number_spell
[] = "off,number,spell";
188 #ifdef HAVE_LCD_BITMAP
189 static const char graphic_numeric
[] = "graphic,numeric";
192 /* Default theme settings */
193 #define DEFAULT_WPSNAME "cabbiev2"
195 #ifdef HAVE_LCD_BITMAP
198 #define DEFAULT_FONTNAME "08-Rockfont"
199 #elif LCD_HEIGHT <= 80
200 #define DEFAULT_FONTNAME "11-Sazanami-Mincho"
201 #elif LCD_HEIGHT <= 220
202 #define DEFAULT_FONTNAME "12-Adobe-Helvetica"
203 #elif LCD_HEIGHT <= 320
204 #define DEFAULT_FONTNAME "15-Adobe-Helvetica"
206 #define DEFAULT_FONTNAME "12-Adobe-Helvetica"
210 #define DEFAULT_FONTNAME ""
213 #ifdef HAVE_LCD_COLOR
214 #define DEFAULT_ICONSET "tango_small"
215 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
217 #define DEFAULT_ICONSET "tango_small_mono"
218 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
219 #else /* monochrome */
220 #define DEFAULT_ICONSET ""
221 #define DEFAULT_VIEWERS_ICONSET ""
224 #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
225 #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
226 #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
227 #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
228 #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
230 #define DEFAULT_BACKDROP "cabbiev2"
232 #ifdef HAVE_RECORDING
233 /* these should be in the config.h files */
234 #if CONFIG_CODEC == MAS3587F
235 # define DEFAULT_REC_MIC_GAIN 8
236 # define DEFAULT_REC_LEFT_GAIN 2
237 # define DEFAULT_REC_RIGHT_GAIN 2
238 #elif CONFIG_CODEC == SWCODEC
240 # define DEFAULT_REC_MIC_GAIN 16
241 # define DEFAULT_REC_LEFT_GAIN 0
242 # define DEFAULT_REC_RIGHT_GAIN 0
243 # elif defined(HAVE_TLV320)
244 # define DEFAULT_REC_MIC_GAIN 0
245 # define DEFAULT_REC_LEFT_GAIN 0
246 # define DEFAULT_REC_RIGHT_GAIN 0
247 # elif defined(HAVE_WM8975)
248 # define DEFAULT_REC_MIC_GAIN 16
249 # define DEFAULT_REC_LEFT_GAIN 0
250 # define DEFAULT_REC_RIGHT_GAIN 0
251 # elif defined(HAVE_WM8758)
252 # define DEFAULT_REC_MIC_GAIN 16
253 # define DEFAULT_REC_LEFT_GAIN 0
254 # define DEFAULT_REC_RIGHT_GAIN 0
255 # elif defined(HAVE_WM8731)
256 # define DEFAULT_REC_MIC_GAIN 16
257 # define DEFAULT_REC_LEFT_GAIN 0
258 # define DEFAULT_REC_RIGHT_GAIN 0
262 #endif /* HAVE_RECORDING */
264 static void formatter_unit_0_is_off(char *buffer
, size_t buffer_size
,
265 int val
, const char *unit
)
268 strcpy(buffer
, str(LANG_OFF
));
270 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
273 static int32_t getlang_unit_0_is_off(int value
, int unit
)
278 return TALK_ID(value
,unit
);
281 static void formatter_unit_0_is_skip_track(char *buffer
, size_t buffer_size
,
282 int val
, const char *unit
)
286 strcpy(buffer
, str(LANG_SKIP_TRACK
));
287 else if (val
% 60 == 0)
288 snprintf(buffer
, buffer_size
, "%d min", val
/60);
290 snprintf(buffer
, buffer_size
, "%d s", val
);
293 static int32_t getlang_unit_0_is_skip_track(int value
, int unit
)
297 return LANG_SKIP_TRACK
;
298 else if (value
% 60 == 0)
299 return TALK_ID(value
/60, UNIT_MIN
);
301 return TALK_ID(value
, UNIT_SEC
);
304 #ifdef HAVE_BACKLIGHT
305 static void backlight_formatter(char *buffer
, size_t buffer_size
,
306 int val
, const char *unit
)
309 strcpy(buffer
, str(LANG_OFF
));
311 strcpy(buffer
, str(LANG_ON
));
313 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
315 static int32_t backlight_getlang(int value
, int unit
)
322 return TALK_ID(value
, unit
);
326 #ifndef HAVE_WHEEL_ACCELERATION
327 static void scanaccel_formatter(char *buffer
, size_t buffer_size
,
328 int val
, const char *unit
)
332 strcpy(buffer
, str(LANG_OFF
));
334 snprintf(buffer
, buffer_size
, "2x/%ds", val
);
338 #if CONFIG_CODEC == SWCODEC
339 static void crossfeed_cross_set(int val
)
342 dsp_set_crossfeed_cross_params(global_settings
.crossfeed_cross_gain
,
343 global_settings
.crossfeed_hf_attenuation
,
344 global_settings
.crossfeed_hf_cutoff
);
347 static void db_format(char* buffer
, size_t buffer_size
, int value
,
352 snprintf(buffer
, buffer_size
, "%s%d.%d %s", value
< 0 ? "-" : "",
353 v
/ 10, v
% 10, unit
);
356 static int32_t get_dec_talkid(int value
, int unit
)
358 return TALK_ID_DECIMAL(value
, 1, unit
);
361 static int32_t get_precut_talkid(int value
, int unit
)
363 return TALK_ID_DECIMAL(-value
, 1, unit
);
367 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
368 static void set_mdb_enable(bool value
)
370 sound_set_mdb_enable((int)value
);
372 static void set_superbass(bool value
)
374 sound_set_superbass((int)value
);
378 #ifdef HAVE_LCD_CHARCELLS
379 static void jumpscroll_format(char* buffer
, size_t buffer_size
, int value
,
386 strcpy(buffer
, str(LANG_OFF
));
389 strcpy(buffer
, str(LANG_ONE_TIME
));
394 snprintf(buffer
, buffer_size
, "%d", value
);
397 strcpy(buffer
, str(LANG_ALWAYS
));
401 static int32_t jumpscroll_getlang(int value
, int unit
)
408 return LANG_ONE_TIME
;
412 return TALK_ID(value
, unit
);
418 #endif /* HAVE_LCD_CHARCELLS */
420 #ifdef HAVE_QUICKSCREEN
421 static int find_setting_by_name(char*name
)
424 const struct settings_list
*setting
;
425 while (i
<nb_settings
)
427 setting
= &settings
[i
];
428 if (setting
->cfg_name
&& !strcmp(setting
->cfg_name
, name
))
436 static void qs_load_from_cfg(void* var
, char*value
)
438 *(int*)var
= find_setting_by_name(value
);
440 static char* qs_write_to_cfg(void* setting
, char*buf
, int buf_len
)
442 const struct settings_list
*var
= &settings
[*(int*)setting
];
443 strncpy(buf
, var
->cfg_name
, buf_len
);
446 static bool qs_is_changed(void* setting
, void* defaultval
)
448 int i
= *(int*)setting
;
449 if (i
< 0 || i
>= nb_settings
)
451 const struct settings_list
*var
= &settings
[i
];
452 return var
!= find_setting(defaultval
, NULL
);
454 static void qs_set_default(void* setting
, void* defaultval
)
456 find_setting(defaultval
, (int*)setting
);
459 #ifdef HAVE_TOUCHSCREEN
460 static void tsc_load_from_cfg(void* setting
, char*value
)
462 struct touchscreen_parameter
*var
= (struct touchscreen_parameter
*) setting
;
464 /* Replacement for sscanf(value, "%d ..., &var->A, ...); */
465 int vals
[7], count
= 0;
466 while(*value
!= 0 && count
< 7)
472 vals
[count
++] = atoi(value
);
473 while(!isspace(*value
))
483 var
->divider
= vals
[6];
486 static char* tsc_write_to_cfg(void* setting
, char*buf
, int buf_len
)
488 const struct touchscreen_parameter
*var
= (const struct touchscreen_parameter
*) setting
;
489 snprintf(buf
, buf_len
, "%d %d %d %d %d %d %d", var
->A
, var
->B
, var
->C
, var
->D
, var
->E
, var
->F
, var
->divider
);
492 static bool tsc_is_changed(void* setting
, void* defaultval
)
494 return memcmp(setting
, defaultval
, sizeof(struct touchscreen_parameter
)) != 0;
496 static void tsc_set_default(void* setting
, void* defaultval
)
498 memcpy(setting
, defaultval
, sizeof(struct touchscreen_parameter
));
501 const struct settings_list settings
[] = {
503 SOUND_SETTING(F_NO_WRAP
,volume
, LANG_VOLUME
, "volume", SOUND_VOLUME
),
504 SOUND_SETTING(0, balance
, LANG_BALANCE
, "balance", SOUND_BALANCE
),
505 SOUND_SETTING(F_NO_WRAP
,bass
, LANG_BASS
, "bass", SOUND_BASS
),
506 SOUND_SETTING(F_NO_WRAP
,treble
, LANG_TREBLE
, "treble", SOUND_TREBLE
),
508 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
509 SOUND_SETTING(0,loudness
, LANG_LOUDNESS
, "loudness", SOUND_LOUDNESS
),
510 STRINGCHOICE_SETTING(F_SOUNDSETTING
,avc
,LANG_AUTOVOL
,0,"auto volume",
511 "off,20ms,2,4,8,", sound_set_avc
, 5,
512 LANG_OFF
,TALK_ID(20, UNIT_MS
),TALK_ID(2, UNIT_SEC
),
513 TALK_ID(4, UNIT_SEC
),TALK_ID(8, UNIT_SEC
)),
514 OFFON_SETTING(F_SOUNDSETTING
, superbass
, LANG_SUPERBASS
, false, "superbass",
518 CHOICE_SETTING(F_SOUNDSETTING
, channel_config
, LANG_CHANNEL_CONFIGURATION
,
520 "stereo,mono,custom,mono left,mono right,karaoke",
521 sound_set_channels
, 6,
522 ID2P(LANG_CHANNEL_STEREO
), ID2P(LANG_CHANNEL_MONO
),
523 ID2P(LANG_CHANNEL_CUSTOM
), ID2P(LANG_CHANNEL_LEFT
),
524 ID2P(LANG_CHANNEL_RIGHT
), ID2P(LANG_CHANNEL_KARAOKE
)),
525 SOUND_SETTING(F_SOUNDSETTING
, stereo_width
, LANG_STEREO_WIDTH
,
526 "stereo_width", SOUND_STEREO_WIDTH
),
528 OFFON_SETTING(0, playlist_shuffle
, LANG_SHUFFLE
, false, "shuffle", NULL
),
529 SYSTEM_SETTING(NVRAM(4), resume_index
, -1),
530 SYSTEM_SETTING(NVRAM(4), resume_offset
, -1),
531 CHOICE_SETTING(0, repeat_mode
, LANG_REPEAT
, REPEAT_OFF
, "repeat",
532 "off,all,one,shuffle"
533 #ifdef AB_REPEAT_ENABLE
537 #ifdef AB_REPEAT_ENABLE
542 ID2P(LANG_OFF
), ID2P(LANG_ALL
), ID2P(LANG_REPEAT_ONE
),
544 #ifdef AB_REPEAT_ENABLE
545 ,ID2P(LANG_REPEAT_AB
)
547 ), /* CHOICE_SETTING( repeat_mode ) */
549 #ifdef HAVE_LCD_CONTRAST
550 /* its easier to leave this one un-macro()ed for the time being */
551 { F_T_INT
|F_DEF_ISFUNC
|F_INT_SETTING
, &global_settings
.contrast
,
552 LANG_CONTRAST
, FUNCTYPE(lcd_default_contrast
), "contrast", NULL
, {
553 .int_setting
= (struct int_setting
[]) {
554 { lcd_set_contrast
, UNIT_INT
, MIN_CONTRAST_SETTING
,
555 MAX_CONTRAST_SETTING
, 1, NULL
, NULL
}}}},
557 #ifdef HAVE_BACKLIGHT
558 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout
, LANG_BACKLIGHT
, 15,
559 "backlight timeout", off_on
, UNIT_SEC
, backlight_formatter
,
560 backlight_getlang
, backlight_set_timeout
, 20,
561 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
563 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout_plugged
,
564 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
565 "backlight timeout plugged", off_on
, UNIT_SEC
,
566 backlight_formatter
, backlight_getlang
,
567 backlight_set_timeout_plugged
, 20,
568 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
570 #endif /* HAVE_BACKLIGHT */
571 #ifdef HAVE_LCD_BITMAP
572 #ifdef HAVE_LCD_INVERT
573 BOOL_SETTING(0, invert
, LANG_INVERT
, false ,"invert", off_on
,
574 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
, lcd_set_invert_display
),
577 OFFON_SETTING(0, flip_display
, LANG_FLIP_DISPLAY
, false, "flip display",
581 CHOICE_SETTING(F_TEMPVAR
|F_THEMESETTING
, cursor_style
, LANG_INVERT_CURSOR
,
582 #ifdef HAVE_LCD_COLOR
584 "pointer,bar (inverse),bar (color),bar (gradient)", NULL
, 4,
585 ID2P(LANG_INVERT_CURSOR_POINTER
),
586 ID2P(LANG_INVERT_CURSOR_BAR
),
587 ID2P(LANG_INVERT_CURSOR_COLOR
),
588 ID2P(LANG_INVERT_CURSOR_GRADIENT
)),
590 1, "selector type", "pointer,bar (inverse)", NULL
, 2,
591 ID2P(LANG_INVERT_CURSOR_POINTER
),
592 ID2P(LANG_INVERT_CURSOR_BAR
)),
594 OFFON_SETTING(F_THEMESETTING
|F_TEMPVAR
, statusbar
,
595 LANG_STATUS_BAR
, true,"statusbar", gui_statusbar_changed
),
596 OFFON_SETTING(0,scrollbar
, LANG_SCROLL_BAR
, true,"scrollbar", NULL
),
597 #if CONFIG_KEYPAD == RECORDER_PAD
598 OFFON_SETTING(0,buttonbar
, LANG_BUTTON_BAR
,true,"buttonbar", NULL
),
600 CHOICE_SETTING(0, volume_type
, LANG_VOLUME_DISPLAY
, 0,
601 "volume display", graphic_numeric
, NULL
, 2,
602 ID2P(LANG_DISPLAY_GRAPHIC
),
603 ID2P(LANG_DISPLAY_NUMERIC
)),
604 CHOICE_SETTING(0, battery_display
, LANG_BATTERY_DISPLAY
, 0,
605 "battery display", graphic_numeric
, NULL
, 2,
606 ID2P(LANG_DISPLAY_GRAPHIC
), ID2P(LANG_DISPLAY_NUMERIC
)),
608 CHOICE_SETTING(0, timeformat
, LANG_TIMEFORMAT
, 0,
609 "time format", "24hour,12hour", NULL
, 2,
610 ID2P(LANG_24_HOUR_CLOCK
), ID2P(LANG_12_HOUR_CLOCK
)),
612 #endif /* HAVE_LCD_BITMAP */
613 OFFON_SETTING(0,show_icons
, LANG_SHOW_ICONS
,true,"show icons", NULL
),
615 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, poweroff
, LANG_POWEROFF_IDLE
, 10,
616 "idle poweroff", "off", UNIT_MIN
, formatter_unit_0_is_off
,
617 getlang_unit_0_is_off
, set_poweroff_timeout
, 15,
618 0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
619 SYSTEM_SETTING(NVRAM(4), runtime
, 0),
620 SYSTEM_SETTING(NVRAM(4), topruntime
, 0),
621 INT_SETTING(F_BANFROMQS
, max_files_in_playlist
,
622 LANG_MAX_FILES_IN_PLAYLIST
,
628 "max files in playlist", UNIT_INT
, 1000, 32000, 1000,
630 INT_SETTING(F_BANFROMQS
, max_files_in_dir
, LANG_MAX_FILES_IN_DIR
,
636 "max files in dir", UNIT_INT
, 50, 10000, 50,
638 #if BATTERY_CAPACITY_INC > 0
639 INT_SETTING(0, battery_capacity
, LANG_BATTERY_CAPACITY
,
640 BATTERY_CAPACITY_DEFAULT
, "battery capacity", UNIT_MAH
,
641 BATTERY_CAPACITY_MIN
, BATTERY_CAPACITY_MAX
,
642 BATTERY_CAPACITY_INC
, NULL
, NULL
, NULL
),
645 OFFON_SETTING(NVRAM(1), car_adapter_mode
,
646 LANG_CAR_ADAPTER_MODE
, false, "car adapter mode", NULL
),
648 #ifdef IPOD_ACCESSORY_PROTOCOL
649 CHOICE_SETTING(0, serial_bitrate
, LANG_SERIAL_BITRATE
, 0, "serial bitrate",
650 "auto,9600,19200,38400,57600", iap_bitrate_set
, 5, ID2P(LANG_SERIAL_BITRATE_AUTO
),
651 ID2P(LANG_SERIAL_BITRATE_9600
),ID2P(LANG_SERIAL_BITRATE_19200
),
652 ID2P(LANG_SERIAL_BITRATE_38400
),ID2P(LANG_SERIAL_BITRATE_57600
)),
654 #ifdef HAVE_ACCESSORY_SUPPLY
655 OFFON_SETTING(0, accessory_supply
, LANG_ACCESSORY_SUPPLY
,
656 true, "accessory power supply", accessory_supply_set
),
660 OFFON_SETTING(0,fm_force_mono
, LANG_FM_MONO_MODE
,
661 false, "force fm mono", toggle_mono_mode
),
662 SYSTEM_SETTING(NVRAM(4),last_frequency
,0),
665 #if BATTERY_TYPES_COUNT > 1
666 CHOICE_SETTING(0, battery_type
, LANG_BATTERY_TYPE
, 0, "battery type",
667 "alkaline,nimh", NULL
, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE
),
668 ID2P(LANG_BATTERY_TYPE_NIMH
)),
670 #ifdef HAVE_REMOTE_LCD
672 INT_SETTING(0, remote_contrast
, LANG_CONTRAST
,
673 DEFAULT_REMOTE_CONTRAST_SETTING
, "remote contrast", UNIT_INT
,
674 MIN_REMOTE_CONTRAST_SETTING
, MAX_REMOTE_CONTRAST_SETTING
, 1,
675 NULL
, NULL
, lcd_remote_set_contrast
),
676 BOOL_SETTING(0, remote_invert
, LANG_INVERT
, false ,"remote invert", off_on
,
677 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
,
678 lcd_remote_set_invert_display
),
679 OFFON_SETTING(0,remote_flip_display
, LANG_FLIP_DISPLAY
,
680 false,"remote flip display", NULL
),
681 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout
,
682 LANG_BACKLIGHT
, 5, "remote backlight timeout", off_on
,
683 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
684 remote_backlight_set_timeout
, 20,
685 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
687 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout_plugged
,
688 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
689 "remote backlight timeout plugged", off_on
, UNIT_SEC
,
690 backlight_formatter
, backlight_getlang
,
691 remote_backlight_set_timeout_plugged
, 20,
692 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
694 #ifdef HAVE_REMOTE_LCD_TICKING
695 OFFON_SETTING(0, remote_reduce_ticking
, LANG_REDUCE_TICKING
,
696 false,"remote reduce ticking", NULL
),
700 #ifdef HAVE_BACKLIGHT
701 OFFON_SETTING(0, bl_filter_first_keypress
,
702 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
703 "backlight filters first keypress", NULL
),
704 #ifdef HAVE_REMOTE_LCD
705 OFFON_SETTING(0, remote_bl_filter_first_keypress
,
706 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
707 "backlight filters first remote keypress", NULL
),
709 #endif /* HAVE_BACKLIGHT */
711 /** End of old RTC config block **/
713 #ifdef HAVE_BACKLIGHT
714 OFFON_SETTING(0, caption_backlight
, LANG_CAPTION_BACKLIGHT
,
715 false, "caption backlight", NULL
),
716 #ifdef HAVE_REMOTE_LCD
717 OFFON_SETTING(0, remote_caption_backlight
, LANG_CAPTION_BACKLIGHT
,
718 false, "remote caption backlight", NULL
),
720 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
721 INT_SETTING(F_NO_WRAP
, brightness
, LANG_BRIGHTNESS
,
722 DEFAULT_BRIGHTNESS_SETTING
, "brightness",UNIT_INT
,
723 MIN_BRIGHTNESS_SETTING
, MAX_BRIGHTNESS_SETTING
, 1,
724 NULL
, NULL
, backlight_set_brightness
),
726 /* backlight fading */
727 #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
728 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_in
,
729 LANG_BACKLIGHT_FADE_IN
, 300, "backlight fade in", "off",
730 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
731 backlight_set_fade_in
, 7, 0,100,200,300,500,1000,2000),
732 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_out
,
733 LANG_BACKLIGHT_FADE_OUT
, 2000, "backlight fade out", "off",
734 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
735 backlight_set_fade_out
, 10,
736 0,100,200,300,500,1000,2000,3000,5000,10000),
737 #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
738 OFFON_SETTING(0, backlight_fade_in
, LANG_BACKLIGHT_FADE_IN
,
739 true, "backlight fade in", backlight_set_fade_in
),
740 OFFON_SETTING(0, backlight_fade_out
, LANG_BACKLIGHT_FADE_OUT
,
741 true, "backlight fade out", backlight_set_fade_out
),
743 #endif /* HAVE_BACKLIGHT */
744 INT_SETTING(F_PADTITLE
, scroll_speed
, LANG_SCROLL_SPEED
, 9,"scroll speed",
745 UNIT_INT
, 0, 15, 1, NULL
, NULL
, lcd_scroll_speed
),
746 INT_SETTING(F_PADTITLE
, scroll_delay
, LANG_SCROLL_DELAY
, 1000,
747 "scroll delay", UNIT_MS
, 0, 2500, 100, NULL
,
748 NULL
, lcd_scroll_delay
),
749 INT_SETTING(0, bidir_limit
, LANG_BIDIR_SCROLL
, 50, "bidir limit",
750 UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
, lcd_bidir_scroll
),
751 #ifdef HAVE_REMOTE_LCD
752 INT_SETTING(0, remote_scroll_speed
, LANG_SCROLL_SPEED
, 9,
753 "remote scroll speed", UNIT_INT
, 0,15, 1,
754 NULL
, NULL
, lcd_remote_scroll_speed
),
755 INT_SETTING(0, remote_scroll_step
, LANG_SCROLL_STEP
, 6,
756 "remote scroll step", UNIT_PIXEL
, 1, LCD_REMOTE_WIDTH
, 1, NULL
,
757 NULL
, lcd_remote_scroll_step
),
758 INT_SETTING(0, remote_scroll_delay
, LANG_SCROLL_DELAY
, 1000,
759 "remote scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
760 lcd_remote_scroll_delay
),
761 INT_SETTING(0, remote_bidir_limit
, LANG_BIDIR_SCROLL
, 50,
762 "remote bidir limit", UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
,
763 lcd_remote_bidir_scroll
),
765 #ifdef HAVE_LCD_BITMAP
766 OFFON_SETTING(0, offset_out_of_view
, LANG_SCREEN_SCROLL_VIEW
,
767 false, "Screen Scrolls Out Of View",
768 gui_list_screen_scroll_out_of_view
),
769 INT_SETTING(F_PADTITLE
, scroll_step
, LANG_SCROLL_STEP
, 6, "scroll step",
770 UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
, lcd_scroll_step
),
771 INT_SETTING(F_PADTITLE
, screen_scroll_step
, LANG_SCREEN_SCROLL_STEP
, 16,
772 "screen scroll step", UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
,
773 gui_list_screen_scroll_step
),
774 #endif /* HAVE_LCD_BITMAP */
775 #ifdef HAVE_LCD_CHARCELLS
776 INT_SETTING(0, jump_scroll
, LANG_JUMP_SCROLL
, 0, "jump scroll", UNIT_INT
, 0,
777 5, 1, jumpscroll_format
, jumpscroll_getlang
, lcd_jump_scroll
),
778 INT_SETTING(0, jump_scroll_delay
, LANG_JUMP_SCROLL_DELAY
, 500,
779 "jump scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
780 lcd_jump_scroll_delay
),
782 OFFON_SETTING(0,scroll_paginated
,LANG_SCROLL_PAGINATED
,
783 false,"scroll paginated",NULL
),
784 #ifdef HAVE_LCD_COLOR
786 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.fg_color
,-1,
787 INT(DEFAULT_THEME_FOREGROUND
),"foreground color",NULL
,UNUSED
},
788 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.bg_color
,-1,
789 INT(DEFAULT_THEME_BACKGROUND
),"background color",NULL
,UNUSED
},
790 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lss_color
,-1,
791 INT(DEFAULT_THEME_SELECTOR_START
),"line selector start color",NULL
,
793 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lse_color
,-1,
794 INT(DEFAULT_THEME_SELECTOR_END
),"line selector end color",NULL
,UNUSED
},
795 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lst_color
,-1,
796 INT(DEFAULT_THEME_SELECTOR_TEXT
),"line selector text color",NULL
,
801 OFFON_SETTING(0,play_selected
,LANG_PLAY_SELECTED
,true,"play selected",NULL
),
802 OFFON_SETTING(0,party_mode
,LANG_PARTY_MODE
,false,"party mode",NULL
),
803 OFFON_SETTING(0,fade_on_stop
,LANG_FADE_ON_STOP
,true,"volume fade",NULL
),
804 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, ff_rewind_min_step
,
805 LANG_FFRW_STEP
, 1, "scan min step", NULL
, UNIT_SEC
,
806 NULL
, NULL
, NULL
, 14, 1,2,3,4,5,6,8,10,15,20,25,30,45,60),
807 CHOICE_SETTING(0, ff_rewind_accel
, LANG_FFRW_ACCEL
, 2,
808 "seek acceleration", "very fast,fast,normal,slow,very slow", NULL
, 5,
809 ID2P(LANG_VERY_FAST
), ID2P(LANG_FAST
), ID2P(LANG_NORMAL
),
810 ID2P(LANG_SLOW
) , ID2P(LANG_VERY_SLOW
)),
811 #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE)
812 STRINGCHOICE_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0,"antiskip",
813 "5s,15s,30s,1min,2min,3min,5min,10min", NULL
, 8,
814 TALK_ID(5, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
815 TALK_ID(30, UNIT_SEC
), TALK_ID(1, UNIT_MIN
),
816 TALK_ID(2, UNIT_MIN
), TALK_ID(3, UNIT_MIN
),
817 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
)),
818 #elif defined(HAVE_DISK_STORAGE)
819 INT_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0, "antiskip",
820 UNIT_SEC
, 0, 7, 1, NULL
, NULL
, audio_set_buffer_margin
),
823 #ifdef HAVE_DISK_STORAGE
824 INT_SETTING(0, disk_spindown
, LANG_SPINDOWN
, 5, "disk spindown",
825 UNIT_SEC
, 3, 254, 1, NULL
, NULL
, storage_spindown
),
826 #endif /* HAVE_DISK_STORAGE */
828 CHOICE_SETTING(0, dirfilter
, LANG_FILTER
, SHOW_SUPPORTED
, "show files",
829 "all,supported,music,playlists", NULL
, 4, ID2P(LANG_ALL
),
830 ID2P(LANG_FILTER_SUPPORTED
), ID2P(LANG_FILTER_MUSIC
),
831 ID2P(LANG_PLAYLISTS
)),
833 OFFON_SETTING(0, sort_case
, LANG_SORT_CASE
, false, "sort case", NULL
),
834 CHOICE_SETTING(0, sort_dir
, LANG_SORT_DIR
, 0 ,
835 "sort dirs", "alpha,oldest,newest", NULL
, 3,
836 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
837 ID2P(LANG_SORT_DATE_REVERSE
)),
838 CHOICE_SETTING(0, sort_file
, LANG_SORT_FILE
, 0 ,
839 "sort files", "alpha,oldest,newest,type", NULL
, 4,
840 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
841 ID2P(LANG_SORT_DATE_REVERSE
) , ID2P(LANG_SORT_TYPE
)),
842 CHOICE_SETTING(0, interpret_numbers
, LANG_SORT_INTERPRET_NUMBERS
, 1,
843 "sort interpret number", "digits,numbers",NULL
, 2,
844 ID2P(LANG_SORT_INTERPRET_AS_DIGIT
),
845 ID2P(LANG_SORT_INTERPRET_AS_NUMBERS
)),
846 CHOICE_SETTING(0, show_filename_ext
, LANG_SHOW_FILENAME_EXT
, 3,
847 "show filename exts", "off,on,unknown,view_all", NULL
, 4 ,
848 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_UNKNOWN_TYPES
),
849 ID2P(LANG_EXT_ONLY_VIEW_ALL
)),
850 OFFON_SETTING(0,browse_current
,LANG_FOLLOW
,false,"follow playlist",NULL
),
851 OFFON_SETTING(0,playlist_viewer_icons
,LANG_SHOW_ICONS
,true,
852 "playlist viewer icons",NULL
),
853 OFFON_SETTING(0,playlist_viewer_indices
,LANG_SHOW_INDICES
,true,
854 "playlist viewer indices",NULL
),
855 CHOICE_SETTING(0, playlist_viewer_track_display
, LANG_TRACK_DISPLAY
, 0,
856 "playlist viewer track display","track name,full path",
857 NULL
, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY
),
858 ID2P(LANG_DISPLAY_FULL_PATH
)),
859 CHOICE_SETTING(0, recursive_dir_insert
, LANG_RECURSE_DIRECTORY
, RECURSE_ON
,
860 "recursive directory insert", off_on_ask
, NULL
, 3 ,
861 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_ASK
)),
863 CHOICE_SETTING(0, autocreatebookmark
, LANG_BOOKMARK_SETTINGS_AUTOCREATE
,
864 BOOKMARK_NO
, "autocreate bookmarks",
865 "off,on,ask,recent only - on,recent only - ask", NULL
, 5,
866 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
867 ID2P(LANG_ASK
), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
),
868 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
)),
869 CHOICE_SETTING(0, autoloadbookmark
, LANG_BOOKMARK_SETTINGS_AUTOLOAD
,
870 BOOKMARK_NO
, "autoload bookmarks", off_on_ask
, NULL
, 3,
871 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
873 CHOICE_SETTING(0, usemrb
, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
,
874 BOOKMARK_NO
, "use most-recent-bookmarks",
875 "off,on,unique only", NULL
, 3, ID2P(LANG_SET_BOOL_NO
),
876 ID2P(LANG_SET_BOOL_YES
),
877 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
)),
878 #ifdef HAVE_LCD_BITMAP
880 STRINGCHOICE_SETTING(0, peak_meter_clip_hold
, LANG_PM_CLIP_HOLD
, 16,
881 "peak meter clip hold",
882 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
883 ",3min,5min,10min,20min,45min,90min",
884 peak_meter_set_clip_hold
, 25, LANG_PM_ETERNAL
,
885 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
886 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
887 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
888 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
889 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
890 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
891 TALK_ID(25, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
892 TALK_ID(45, UNIT_SEC
), TALK_ID(60, UNIT_SEC
),
893 TALK_ID(90, UNIT_SEC
), TALK_ID(2, UNIT_MIN
),
894 TALK_ID(3, UNIT_MIN
), TALK_ID(5, UNIT_MIN
),
895 TALK_ID(10, UNIT_MIN
), TALK_ID(20, UNIT_MIN
),
896 TALK_ID(45, UNIT_MIN
), TALK_ID(90, UNIT_MIN
)),
897 STRINGCHOICE_SETTING(0, peak_meter_hold
, LANG_PM_PEAK_HOLD
, 3,
899 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
900 NULL
, 18, LANG_OFF
, TALK_ID(200, UNIT_MS
),
901 TALK_ID(300, UNIT_MS
), TALK_ID(500, UNIT_MS
),
902 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
903 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
904 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
905 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
906 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
907 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
908 TALK_ID(30, UNIT_SEC
), TALK_ID(60, UNIT_SEC
)),
909 INT_SETTING(0, peak_meter_release
, LANG_PM_RELEASE
, 8, "peak meter release",
910 UNIT_PM_TICK
, 1, 0x7e, 1, NULL
, NULL
,NULL
),
911 OFFON_SETTING(0,peak_meter_dbfs
,LANG_PM_DBFS
,true,"peak meter dbfs",NULL
),
912 {F_T_INT
, &global_settings
.peak_meter_min
, LANG_PM_MIN
,INT(60),
913 "peak meter min", NULL
, UNUSED
},
914 {F_T_INT
, &global_settings
.peak_meter_max
, LANG_PM_MAX
,INT(0),
915 "peak meter max", NULL
, UNUSED
},
916 #ifdef HAVE_RECORDING
917 OFFON_SETTING(0, peak_meter_clipcounter
, LANG_PM_CLIPCOUNTER
, false,
918 "peak meter clipcounter", NULL
),
919 #endif /* HAVE_RECORDING */
920 #endif /* HAVE_LCD_BITMAP */
921 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
922 SOUND_SETTING(F_SOUNDSETTING
, mdb_strength
, LANG_MDB_STRENGTH
,
923 "mdb strength", SOUND_MDB_STRENGTH
),
924 SOUND_SETTING(F_SOUNDSETTING
, mdb_harmonics
, LANG_MDB_HARMONICS
,
925 "mdb harmonics", SOUND_MDB_HARMONICS
),
926 SOUND_SETTING(F_SOUNDSETTING
, mdb_center
, LANG_MDB_CENTER
,
927 "mdb center", SOUND_MDB_CENTER
),
928 SOUND_SETTING(F_SOUNDSETTING
, mdb_shape
, LANG_MDB_SHAPE
,
929 "mdb shape", SOUND_MDB_SHAPE
),
930 OFFON_SETTING(F_SOUNDSETTING
, mdb_enable
, LANG_MDB_ENABLE
,
931 false, "mdb enable", set_mdb_enable
),
933 #if CONFIG_CODEC == MAS3507D
934 OFFON_SETTING(F_SOUNDSETTING
, line_in
,LANG_LINE_IN
,false,"line in",NULL
),
937 OFFON_SETTING(F_TEMPVAR
, talk_menu
, LANG_VOICE_MENU
, true, "talk menu", NULL
),
938 CHOICE_SETTING(0, talk_dir
, LANG_VOICE_DIR
, 0,
939 "talk dir", off_number_spell
, NULL
, 3,
940 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
941 ID2P(LANG_VOICE_SPELL
)),
942 OFFON_SETTING(F_TEMPVAR
, talk_dir_clip
, LANG_VOICE_DIR_TALK
, false,
943 "talk dir clip", NULL
),
944 CHOICE_SETTING(0, talk_file
, LANG_VOICE_FILE
, 0,
945 "talk file", off_number_spell
, NULL
, 3,
946 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
947 ID2P(LANG_VOICE_SPELL
)),
948 OFFON_SETTING(F_TEMPVAR
, talk_file_clip
, LANG_VOICE_FILE_TALK
, false,
949 "talk file clip", NULL
),
950 OFFON_SETTING(F_TEMPVAR
, talk_filetype
, LANG_VOICE_FILETYPE
, false,
951 "talk filetype", NULL
),
952 OFFON_SETTING(F_TEMPVAR
, talk_battery_level
, LANG_TALK_BATTERY_LEVEL
, false,
953 "Announce Battery Level", NULL
),
955 #ifdef HAVE_RECORDING
957 STRINGCHOICE_SETTING(F_RECSETTING
, rec_timesplit
, LANG_SPLIT_TIME
, 0,
959 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
960 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
962 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
),
963 TALK_ID(15, UNIT_MIN
), TALK_ID(30, UNIT_MIN
),
964 TALK_ID(60, UNIT_MIN
), TALK_ID(74, UNIT_MIN
),
965 TALK_ID(80, UNIT_MIN
), TALK_ID(2, UNIT_HOUR
),
966 TALK_ID(4, UNIT_HOUR
), TALK_ID(6, UNIT_HOUR
),
967 TALK_ID(8, UNIT_HOUR
), TALK_ID(10, UNIT_HOUR
),
968 TALK_ID(12, UNIT_HOUR
), TALK_ID(18, UNIT_HOUR
),
969 TALK_ID(20, UNIT_HOUR
), TALK_ID(24, UNIT_HOUR
)),
970 STRINGCHOICE_SETTING(F_RECSETTING
, rec_sizesplit
, LANG_SPLIT_SIZE
, 0,
972 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
973 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
975 TALK_ID(5, UNIT_MB
), TALK_ID(10, UNIT_MB
),
976 TALK_ID(15, UNIT_MB
), TALK_ID(32, UNIT_MB
),
977 TALK_ID(64, UNIT_MB
), TALK_ID(75, UNIT_MB
),
978 TALK_ID(100, UNIT_MB
), TALK_ID(128, UNIT_MB
),
979 TALK_ID(256, UNIT_MB
), TALK_ID(512, UNIT_MB
),
980 TALK_ID(650, UNIT_MB
), TALK_ID(700, UNIT_MB
),
981 TALK_ID(1024, UNIT_MB
), TALK_ID(1536, UNIT_MB
),
982 TALK_ID(1792, UNIT_MB
)),
983 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_channels
, LANG_CHANNELS
, INT(0),
984 "rec channels","stereo,mono",UNUSED
},
985 #if CONFIG_CODEC == SWCODEC
986 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_mono_mode
,
987 LANG_RECORDING_MONO_MODE
, INT(0), "rec mono mode","L+R,L,R",UNUSED
},
989 CHOICE_SETTING(F_RECSETTING
, rec_split_type
, LANG_SPLIT_TYPE
, 0,
990 "rec split type", "Split,Stop,Shutdown", NULL
, 3,
991 ID2P(LANG_START_NEW_FILE
), ID2P(LANG_STOP_RECORDING
),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN
)),
992 CHOICE_SETTING(F_RECSETTING
, rec_split_method
, LANG_SPLIT_MEASURE
, 0,
993 "rec split method", "Time,Filesize", NULL
, 2,
994 ID2P(LANG_TIME
), ID2P(LANG_REC_SIZE
)),
995 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_source
, LANG_RECORDING_SOURCE
,
996 INT(0), "rec source",
997 &HAVE_MIC_REC_(",mic")
998 HAVE_LINE_REC_(",line")
999 HAVE_SPDIF_REC_(",spdif")
1000 HAVE_FMRADIO_REC_(",fmradio")[1],
1002 INT_SETTING(F_RECSETTING
, rec_prerecord_time
, LANG_RECORD_PRERECORD_TIME
, 0,
1003 "prerecording time", UNIT_SEC
, 0, 30, 1,
1004 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1006 TEXT_SETTING(F_RECSETTING
, rec_directory
, "rec path",
1007 REC_BASE_DIR
, NULL
, NULL
),
1008 #ifdef HAVE_BACKLIGHT
1009 CHOICE_SETTING(F_RECSETTING
, cliplight
, LANG_CLIP_LIGHT
, 0,
1010 "cliplight", "off,main,both,remote", NULL
,
1011 #ifdef HAVE_REMOTE_LCD
1012 4, ID2P(LANG_OFF
), ID2P(LANG_MAIN_UNIT
),
1013 ID2P(LANG_REMOTE_MAIN
), ID2P(LANG_REMOTE_UNIT
)
1015 2, ID2P(LANG_OFF
), ID2P(LANG_ON
)
1019 #ifdef DEFAULT_REC_MIC_GAIN
1020 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_mic_gain
,
1021 LANG_GAIN
,INT(DEFAULT_REC_MIC_GAIN
),
1022 "rec mic gain",NULL
,UNUSED
},
1023 #endif /* DEFAULT_REC_MIC_GAIN */
1024 #ifdef DEFAULT_REC_LEFT_GAIN
1025 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_left_gain
,
1026 LANG_GAIN_LEFT
,INT(DEFAULT_REC_LEFT_GAIN
),
1027 "rec left gain",NULL
,UNUSED
},
1028 #endif /* DEFAULT_REC_LEFT_GAIN */
1029 #ifdef DEFAULT_REC_RIGHT_GAIN
1030 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_right_gain
,LANG_GAIN_RIGHT
,
1031 INT(DEFAULT_REC_RIGHT_GAIN
),
1032 "rec right gain",NULL
,UNUSED
},
1033 #endif /* DEFAULT_REC_RIGHT_GAIN */
1034 #if CONFIG_CODEC == MAS3587F
1035 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1036 LANG_RECORDING_FREQUENCY
, INT(0),
1037 "rec frequency","44,48,32,22,24,16", UNUSED
},
1038 INT_SETTING(F_RECSETTING
, rec_quality
, LANG_RECORDING_QUALITY
, 5,
1039 "rec quality", UNIT_INT
, 0, 7, 1, NULL
, NULL
, NULL
),
1040 OFFON_SETTING(F_RECSETTING
, rec_editable
, LANG_RECORDING_EDITABLE
, false,
1041 "editable recordings", NULL
),
1042 #endif /* CONFIG_CODEC == MAS3587F */
1043 #if CONFIG_CODEC == SWCODEC
1044 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1045 LANG_RECORDING_FREQUENCY
,INT(REC_FREQ_DEFAULT
),
1046 "rec frequency",REC_FREQ_CFG_VAL_LIST
,UNUSED
},
1047 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_format
,
1048 LANG_RECORDING_FORMAT
,INT(REC_FORMAT_DEFAULT
),
1049 "rec format",REC_FORMAT_CFG_VAL_LIST
,UNUSED
},
1050 /** Encoder settings start - keep these together **/
1052 /* (no settings yet) */
1054 {F_T_INT
|F_RECSETTING
, &global_settings
.mp3_enc_config
.bitrate
,-1,
1055 INT(MP3_ENC_BITRATE_CFG_DEFAULT
),
1056 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST
,UNUSED
},
1058 /* (no settings yet) */
1060 /* (no settings yet) */
1061 /** Encoder settings end **/
1062 #endif /* CONFIG_CODEC == SWCODEC */
1063 /* values for the trigger */
1064 INT_SETTING(F_RECSETTING
, rec_start_thres_db
, LANG_RECORD_START_THRESHOLD
, -35,
1065 "trigger start threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, -1, NULL
, NULL
, NULL
),
1066 INT_SETTING(F_RECSETTING
, rec_start_thres_linear
, LANG_RECORD_START_THRESHOLD
, 5,
1067 "trigger start threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1068 INT_SETTING(F_RECSETTING
, rec_stop_thres_db
, LANG_RECORD_STOP_THRESHOLD
, -45,
1069 "trigger stop threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, -1, NULL
, NULL
, NULL
),
1070 INT_SETTING(F_RECSETTING
, rec_stop_thres_linear
, LANG_RECORD_STOP_THRESHOLD
, 10,
1071 "trigger stop threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1072 TABLE_SETTING(F_RECSETTING
, rec_start_duration
, LANG_MIN_DURATION
, 0,
1073 "trigger start duration",
1074 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1075 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1076 0,1,2,5,10,15,20,25,30,60,120,300,600),
1077 TABLE_SETTING(F_RECSETTING
, rec_stop_postrec
, LANG_MIN_DURATION
, 0,
1078 "trigger stop duration",
1079 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1080 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1081 0,1,2,5,10,15,20,25,30,60,120,300,600),
1082 TABLE_SETTING(F_RECSETTING
, rec_stop_gap
, LANG_RECORD_STOP_GAP
, 1,
1084 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1085 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1086 0,1,2,5,10,15,20,25,30,60,120,300,600),
1087 CHOICE_SETTING(F_RECSETTING
, rec_trigger_mode
, LANG_RECORD_TRIGGER
, TRIG_MODE_OFF
,
1088 "trigger mode","off,once,repeat", NULL
,3,
1089 ID2P(LANG_OFF
), ID2P(LANG_RECORD_TRIG_NOREARM
), ID2P(LANG_REPEAT
)),
1090 CHOICE_SETTING(F_RECSETTING
, rec_trigger_type
, LANG_RECORD_TRIGGER_TYPE
, TRIG_TYPE_STOP
,
1091 "trigger type","stop,pause,nf stp", NULL
,3,
1092 ID2P(LANG_RECORD_TRIGGER_STOP
), ID2P(LANG_PAUSE
), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP
)),
1093 #endif /* HAVE_RECORDING */
1095 #ifdef HAVE_SPDIF_POWER
1096 OFFON_SETTING(F_SOUNDSETTING
, spdif_enable
, LANG_SPDIF_ENABLE
, false,
1097 "spdif enable", spdif_power_enable
),
1099 CHOICE_SETTING(0, next_folder
, LANG_NEXT_FOLDER
, FOLDER_ADVANCE_OFF
,
1100 "folder navigation", "off,on,random",NULL
,3,
1101 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1104 #ifdef HAVE_TAGCACHE
1105 OFFON_SETTING(0, runtimedb
, LANG_RUNTIMEDB_ACTIVE
, false,
1106 "gather runtime data", NULL
),
1109 #if CONFIG_CODEC == SWCODEC
1111 CHOICE_SETTING(F_SOUNDSETTING
, replaygain_type
, LANG_REPLAYGAIN_MODE
,
1112 REPLAYGAIN_SHUFFLE
, "replaygain type",
1113 "track,album,track shuffle,off", NULL
, 4, ID2P(LANG_TRACK_GAIN
),
1114 ID2P(LANG_ALBUM_GAIN
), ID2P(LANG_SHUFFLE_GAIN
), ID2P(LANG_OFF
)),
1115 OFFON_SETTING(F_SOUNDSETTING
, replaygain_noclip
, LANG_REPLAYGAIN_NOCLIP
,
1116 false, "replaygain noclip", NULL
),
1117 INT_SETTING_NOWRAP(F_SOUNDSETTING
, replaygain_preamp
,
1118 LANG_REPLAYGAIN_PREAMP
, 0, "replaygain preamp",
1119 UNIT_DB
, -120, 120, 5, db_format
, get_dec_talkid
, NULL
),
1121 CHOICE_SETTING(0, beep
, LANG_BEEP
, 0, "beep", "off,weak,moderate,strong",
1122 NULL
, 4, ID2P(LANG_OFF
), ID2P(LANG_WEAK
),
1123 ID2P(LANG_MODERATE
), ID2P(LANG_STRONG
)),
1126 CHOICE_SETTING(F_SOUNDSETTING
, crossfade
, LANG_CROSSFADE_ENABLE
, 0,
1128 "off,shuffle,track skip,shuffle and track skip,always", NULL
,
1129 5, ID2P(LANG_OFF
), ID2P(LANG_SHUFFLE
), ID2P(LANG_TRACKSKIP
),
1130 ID2P(LANG_SHUFFLE_TRACKSKIP
), ID2P(LANG_ALWAYS
)),
1131 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_delay
,
1132 LANG_CROSSFADE_FADE_IN_DELAY
, 0,
1133 "crossfade fade in delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
, NULL
),
1134 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_delay
,
1135 LANG_CROSSFADE_FADE_OUT_DELAY
, 0,
1136 "crossfade fade out delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
,NULL
),
1137 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_duration
,
1138 LANG_CROSSFADE_FADE_IN_DURATION
, 2,
1139 "crossfade fade in duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1141 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_duration
,
1142 LANG_CROSSFADE_FADE_OUT_DURATION
, 2,
1143 "crossfade fade out duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1145 CHOICE_SETTING(F_SOUNDSETTING
, crossfade_fade_out_mixmode
,
1146 LANG_CROSSFADE_FADE_OUT_MODE
, 0,
1147 "crossfade fade out mode", "crossfade,mix", NULL
, 2,
1148 ID2P(LANG_CROSSFADE
), ID2P(LANG_MIX
)),
1151 OFFON_SETTING(F_SOUNDSETTING
, crossfeed
, LANG_CROSSFEED
, false,
1152 "crossfeed", dsp_set_crossfeed
),
1153 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_direct_gain
,
1154 LANG_CROSSFEED_DIRECT_GAIN
, -15,
1155 "crossfeed direct gain", UNIT_DB
, -60, 0, 5,
1156 db_format
, get_dec_talkid
,dsp_set_crossfeed_direct_gain
),
1157 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_cross_gain
,
1158 LANG_CROSSFEED_CROSS_GAIN
, -60,
1159 "crossfeed cross gain", UNIT_DB
, -120, -30, 5,
1160 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1161 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_attenuation
,
1162 LANG_CROSSFEED_HF_ATTENUATION
, -160,
1163 "crossfeed hf attenuation", UNIT_DB
, -240, -60, 5,
1164 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1165 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_cutoff
,
1166 LANG_CROSSFEED_HF_CUTOFF
, 700,
1167 "crossfeed hf cutoff", UNIT_HERTZ
, 500, 2000, 100,
1168 NULL
, NULL
, crossfeed_cross_set
),
1171 OFFON_SETTING(F_EQSETTING
, eq_enabled
, LANG_EQUALIZER_ENABLED
, false,
1172 "eq enabled", NULL
),
1173 INT_SETTING_NOWRAP(F_EQSETTING
, eq_precut
, LANG_EQUALIZER_PRECUT
, 0,
1174 "eq precut", UNIT_DB
, 0, 240, 5, eq_precut_format
,
1175 get_precut_talkid
, dsp_set_eq_precut
),
1177 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1178 60, "eq band 0 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1179 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1180 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1181 200, "eq band 1 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1182 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1183 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1184 800, "eq band 2 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1185 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1186 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1187 4000, "eq band 3 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1188 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1189 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1190 12000, "eq band 4 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1191 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1192 /* 0..64 (or 0.0 to 6.4) */
1193 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_q
, LANG_EQUALIZER_BAND_Q
, 7,
1194 "eq band 0 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1195 eq_q_format
, get_dec_talkid
, NULL
),
1196 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_q
, LANG_EQUALIZER_BAND_Q
, 10,
1197 "eq band 1 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1198 eq_q_format
, get_dec_talkid
, NULL
),
1199 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_q
, LANG_EQUALIZER_BAND_Q
, 10,
1200 "eq band 2 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1201 eq_q_format
, get_dec_talkid
, NULL
),
1202 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_q
, LANG_EQUALIZER_BAND_Q
, 10,
1203 "eq band 3 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1204 eq_q_format
, get_dec_talkid
, NULL
),
1205 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_q
, LANG_EQUALIZER_BAND_Q
, 7,
1206 "eq band 4 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1207 eq_q_format
, get_dec_talkid
, NULL
),
1208 /* -240..240 (or -24db to +24db) */
1209 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_gain
, LANG_GAIN
, 0,
1210 "eq band 0 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1211 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1212 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_gain
, LANG_GAIN
, 0,
1213 "eq band 1 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1214 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1215 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_gain
, LANG_GAIN
, 0,
1216 "eq band 2 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1217 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1218 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_gain
, LANG_GAIN
, 0,
1219 "eq band 3 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1220 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1221 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_gain
, LANG_GAIN
, 0,
1222 "eq band 4 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1223 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1226 OFFON_SETTING(F_SOUNDSETTING
, dithering_enabled
, LANG_DITHERING
, false,
1227 "dithering enabled", dsp_dither_enable
),
1230 OFFON_SETTING(F_SOUNDSETTING
, timestretch_enabled
, LANG_TIMESTRETCH
, false,
1231 "timestretch enabled", dsp_timestretch_enable
),
1234 SOUND_SETTING(F_NO_WRAP
, bass_cutoff
, LANG_BASS_CUTOFF
,
1235 "bass cutoff", SOUND_BASS_CUTOFF
),
1236 SOUND_SETTING(F_NO_WRAP
, treble_cutoff
, LANG_TREBLE_CUTOFF
,
1237 "treble cutoff", SOUND_TREBLE_CUTOFF
),
1239 #ifdef HAVE_DIRCACHE
1240 OFFON_SETTING(F_BANFROMQS
,dircache
,LANG_DIRCACHE_ENABLE
,false,"dircache",NULL
),
1241 SYSTEM_SETTING(NVRAM(4),dircache_size
,0),
1244 #ifdef HAVE_TAGCACHE
1245 #ifdef HAVE_TC_RAMCACHE
1246 OFFON_SETTING(F_BANFROMQS
,tagcache_ram
,LANG_TAGCACHE_RAM
,false,"tagcache_ram",NULL
),
1248 OFFON_SETTING(F_BANFROMQS
, tagcache_autoupdate
, LANG_TAGCACHE_AUTOUPDATE
, false,
1249 "tagcache_autoupdate", NULL
),
1251 CHOICE_SETTING(0, default_codepage
, LANG_DEFAULT_CODEPAGE
, 0,
1253 #ifdef HAVE_LCD_BITMAP
1254 /* The order must match with that in unicode.c */
1255 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1256 "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8",
1258 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1259 ID2P(LANG_CODEPAGE_HEBREW
), ID2P(LANG_CODEPAGE_CYRILLIC
),
1260 ID2P(LANG_CODEPAGE_THAI
), ID2P(LANG_CODEPAGE_ARABIC
),
1261 ID2P(LANG_CODEPAGE_TURKISH
),
1262 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1263 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1264 ID2P(LANG_CODEPAGE_JAPANESE
),
1265 ID2P(LANG_CODEPAGE_SIMPLIFIED
), ID2P(LANG_CODEPAGE_KOREAN
),
1266 ID2P(LANG_CODEPAGE_TRADITIONAL
), ID2P(LANG_CODEPAGE_UTF8
)),
1267 #else /* !HAVE_LCD_BITMAP */
1268 /* The order must match with that in unicode.c */
1269 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,utf-8",
1271 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1272 ID2P(LANG_CODEPAGE_CYRILLIC
), ID2P(LANG_CODEPAGE_TURKISH
),
1273 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1274 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1275 ID2P(LANG_CODEPAGE_UTF8
)),
1277 OFFON_SETTING(0, warnon_erase_dynplaylist
, LANG_WARN_ERASEDYNPLAYLIST_MENU
,
1278 true, "warn when erasing dynamic playlist",NULL
),
1280 #ifdef HAVE_BACKLIGHT
1281 #ifdef HAS_BUTTON_HOLD
1282 CHOICE_SETTING(0, backlight_on_button_hold
, LANG_BACKLIGHT_ON_BUTTON_HOLD
,
1283 1, "backlight on button hold", "normal,off,on",
1284 backlight_set_on_button_hold
, 3,
1285 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1288 #ifdef HAVE_LCD_SLEEP_SETTING
1289 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off
,
1290 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF
, 3,
1291 "lcd sleep after backlight off",
1292 "always,never,5,10,15,20,30,45,60,90",
1293 lcd_set_sleep_after_backlight_off
, 10,
1294 LANG_ALWAYS
, LANG_NEVER
, TALK_ID(5, UNIT_SEC
),
1295 TALK_ID(10, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
1296 TALK_ID(20, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1297 TALK_ID(45, UNIT_SEC
),TALK_ID(60, UNIT_SEC
),
1298 TALK_ID(90, UNIT_SEC
)),
1299 #endif /* HAVE_LCD_SLEEP_SETTING */
1300 #endif /* HAVE_BACKLIGHT */
1302 OFFON_SETTING(0, hold_lr_for_scroll_in_list
, -1, true,
1303 "hold_lr_for_scroll_in_list",NULL
),
1304 #ifdef HAVE_LCD_BITMAP
1305 CHOICE_SETTING(0, show_path_in_browser
, LANG_SHOW_PATH
, SHOW_PATH_CURRENT
,
1306 "show path in browser", "off,current directory,full path",
1307 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_SHOW_PATH_CURRENT
),
1308 ID2P(LANG_DISPLAY_FULL_PATH
)),
1312 {F_T_INT
,&global_settings
.rec_agc_preset_mic
,LANG_RECORDING_AGC_PRESET
,
1313 INT(1),"agc mic preset",NULL
,UNUSED
},
1314 {F_T_INT
,&global_settings
.rec_agc_preset_line
,LANG_RECORDING_AGC_PRESET
,
1315 INT(1),"agc line preset",NULL
,UNUSED
},
1316 {F_T_INT
,&global_settings
.rec_agc_maxgain_mic
,-1,INT(104),
1317 "agc maximum mic gain",NULL
,UNUSED
},
1318 {F_T_INT
,&global_settings
.rec_agc_maxgain_line
,-1,INT(96),
1319 "agc maximum line gain",NULL
,UNUSED
},
1320 {F_T_INT
,&global_settings
.rec_agc_cliptime
,LANG_RECORDING_AGC_CLIPTIME
,
1321 INT(1),"agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED
},
1324 #ifdef HAVE_REMOTE_LCD
1325 #ifdef HAS_REMOTE_BUTTON_HOLD
1326 CHOICE_SETTING(0, remote_backlight_on_button_hold
,
1327 LANG_BACKLIGHT_ON_BUTTON_HOLD
, 0,
1328 "remote backlight on button hold",
1329 "normal,off,on", remote_backlight_set_on_button_hold
, 3,
1330 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1333 #ifdef HAVE_HEADPHONE_DETECTION
1334 CHOICE_SETTING(0, unplug_mode
, LANG_HEADPHONE_UNPLUG
, 0,
1335 "pause on headphone unplug", "off,pause,pause and resume",
1336 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_PAUSE
),
1337 ID2P(LANG_HEADPHONE_UNPLUG_RESUME
)),
1338 INT_SETTING(0, unplug_rw
, LANG_HEADPHONE_UNPLUG_RW
, 0,
1339 "rewind duration on pause", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1341 OFFON_SETTING(0, unplug_autoresume
,
1342 LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME
, false,
1343 "disable autoresume if phones not present",NULL
),
1346 CHOICE_SETTING(0, fm_region
, LANG_FM_REGION
, 0,
1347 "fm_region", "eu,us,jp,kr", set_radio_region
, 4,
1348 ID2P(LANG_FM_EUROPE
), ID2P(LANG_FM_US
),
1349 ID2P(LANG_FM_JAPAN
), ID2P(LANG_FM_KOREA
)),
1352 OFFON_SETTING(F_BANFROMQS
, audioscrobbler
, LANG_AUDIOSCROBBLER
, false,
1353 "Last.fm Logging", NULL
),
1355 TEXT_SETTING(0, fmr_file
, "fmr", "",
1356 FMPRESET_PATH
"/", ".fmr"),
1358 #ifdef HAVE_LCD_BITMAP
1359 TEXT_SETTING(F_THEMESETTING
, font_file
, "font",
1360 DEFAULT_FONTNAME
, FONT_DIR
"/", ".fnt"),
1362 TEXT_SETTING(F_THEMESETTING
,wps_file
, "wps",
1363 DEFAULT_WPSNAME
, WPS_DIR
"/", ".wps"),
1364 TEXT_SETTING(0,lang_file
,"lang","",LANG_DIR
"/",".lng"),
1365 #ifdef HAVE_REMOTE_LCD
1366 TEXT_SETTING(F_THEMESETTING
,rwps_file
,"rwps",
1367 DEFAULT_WPSNAME
, WPS_DIR
"/", ".rwps"),
1370 TEXT_SETTING(F_THEMESETTING
,backdrop_file
,"backdrop",
1371 DEFAULT_BACKDROP
, BACKDROP_DIR
"/", ".bmp"),
1373 #ifdef HAVE_LCD_BITMAP
1374 TEXT_SETTING(0,kbd_file
,"kbd","",ROCKBOX_DIR
"/",".kbd"),
1376 #ifdef HAVE_USB_CHARGING_ENABLE
1377 OFFON_SETTING(0,usb_charging
,LANG_USB_CHARGING
,false,"usb charging",NULL
),
1379 OFFON_SETTING(F_BANFROMQS
,cuesheet
,LANG_CUESHEET_ENABLE
,false,"cuesheet support",
1381 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, skip_length
,
1382 LANG_SKIP_LENGTH
, 0, "skip length",
1383 "track,1s,2s,3s,5s,7s,10s,15s,20s,30s,45s,1min,90s,2min,3min,5min,10min,15min",
1384 UNIT_SEC
, formatter_unit_0_is_skip_track
,
1385 getlang_unit_0_is_skip_track
, NULL
,
1386 18, 0,1,2,3,5,7,10,15,20,30,45,60,90,120,180,300,600,900),
1387 CHOICE_SETTING(0, start_in_screen
, LANG_START_SCREEN
, 1,
1388 "start in screen", "previous,root,files,"
1389 #ifdef HAVE_TAGCACHE
1393 #ifdef HAVE_RECORDING
1400 #if defined(HAVE_TAGCACHE)
1401 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1403 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1409 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1411 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1417 ID2P(LANG_PREVIOUS_SCREEN
), ID2P(LANG_MAIN_MENU
),
1418 ID2P(LANG_DIR_BROWSER
),
1419 #ifdef HAVE_TAGCACHE
1420 ID2P(LANG_TAGCACHE
),
1422 ID2P(LANG_RESUME_PLAYBACK
), ID2P(LANG_SETTINGS
),
1423 #ifdef HAVE_RECORDING
1424 ID2P(LANG_RECORDING
),
1427 ID2P(LANG_FM_RADIO
),
1429 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
)
1431 SYSTEM_SETTING(NVRAM(1),last_screen
,-1),
1432 #if defined(HAVE_RTC_ALARM) && \
1433 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1434 {F_T_INT
, &global_settings
.alarm_wake_up_screen
, LANG_ALARM_WAKEUP_SCREEN
,
1435 INT(ALARM_START_WPS
), "alarm wakeup screen", ALARM_SETTING_TEXT
,UNUSED
},
1436 #endif /* HAVE_RTC_ALARM */
1438 /* Customizable icons */
1439 #ifdef HAVE_LCD_BITMAP
1440 TEXT_SETTING(F_THEMESETTING
, icon_file
, "iconset", DEFAULT_ICONSET
,
1441 ICON_DIR
"/", ".bmp"),
1442 TEXT_SETTING(F_THEMESETTING
, viewers_icon_file
, "viewers iconset",
1443 DEFAULT_VIEWERS_ICONSET
,
1444 ICON_DIR
"/", ".bmp"),
1446 #ifdef HAVE_REMOTE_LCD
1447 TEXT_SETTING(F_THEMESETTING
, remote_icon_file
, "remote iconset", "",
1448 ICON_DIR
"/", ".bmp"),
1449 TEXT_SETTING(F_THEMESETTING
, remote_viewers_icon_file
,
1450 "remote viewers iconset", "",
1451 ICON_DIR
"/", ".bmp"),
1452 #endif /* HAVE_REMOTE_LCD */
1453 #ifdef HAVE_LCD_COLOR
1454 TEXT_SETTING(F_THEMESETTING
, colors_file
, "filetype colours", "-",
1455 THEME_DIR
"/", ".colours"),
1457 #ifdef HAVE_BUTTON_LIGHT
1458 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, buttonlight_timeout
,
1459 LANG_BUTTONLIGHT_TIMEOUT
, 5, "button light timeout", off_on
,
1460 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
1461 buttonlight_set_timeout
, 20,
1462 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
1464 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1465 INT_SETTING(F_NO_WRAP
, buttonlight_brightness
, LANG_BUTTONLIGHT_BRIGHTNESS
,
1466 DEFAULT_BRIGHTNESS_SETTING
,
1467 "button light brightness",UNIT_INT
, MIN_BRIGHTNESS_SETTING
,
1468 MAX_BRIGHTNESS_SETTING
, 1, NULL
, NULL
,
1469 buttonlight_set_brightness
),
1471 #ifndef HAVE_WHEEL_ACCELERATION
1472 INT_SETTING(0, list_accel_start_delay
, LANG_LISTACCEL_START_DELAY
,
1473 2, "list_accel_start_delay", UNIT_MS
, 0, 10, 1,
1474 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1475 INT_SETTING(0, list_accel_wait
, LANG_LISTACCEL_ACCEL_SPEED
,
1476 3, "list_accel_wait", UNIT_SEC
, 1, 10, 1,
1477 scanaccel_formatter
, getlang_unit_0_is_off
, NULL
),
1478 #endif /* HAVE_WHEEL_ACCELERATION */
1479 #if CONFIG_CODEC == SWCODEC
1481 CHOICE_SETTING(0, keyclick
, LANG_KEYCLICK
, 0,
1482 "keyclick", "off,weak,moderate,strong", NULL
, 4,
1483 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
),
1485 OFFON_SETTING(0, keyclick_repeats
, LANG_KEYCLICK_REPEATS
, false,
1486 "keyclick repeats", NULL
),
1487 #endif /* CONFIG_CODEC == SWCODEC */
1488 TEXT_SETTING(0, playlist_catalog_dir
, "playlist catalog directory",
1489 PLAYLIST_CATALOG_DEFAULT_DIR
, NULL
, NULL
),
1490 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
1491 CHOICE_SETTING(0, touchpad_sensitivity
, LANG_TOUCHPAD_SENSITIVITY
, 0,
1492 "touchpad sensitivity", "normal,high", touchpad_set_sensitivity
, 2,
1493 ID2P(LANG_NORMAL
), ID2P(LANG_HIGH
)),
1495 #ifdef HAVE_QUICKSCREEN
1496 CUSTOM_SETTING(0, qs_item_left
, LANG_LEFT_QS_ITEM
,
1497 &global_settings
.playlist_shuffle
, "qs left",
1498 qs_load_from_cfg
, qs_write_to_cfg
,
1499 qs_is_changed
, qs_set_default
),
1500 CUSTOM_SETTING(0, qs_item_right
, LANG_RIGHT_QS_ITEM
,
1501 &global_settings
.repeat_mode
, "qs right",
1502 qs_load_from_cfg
, qs_write_to_cfg
,
1503 qs_is_changed
, qs_set_default
),
1504 CUSTOM_SETTING(0, qs_item_bottom
, LANG_BOTTOM_QS_ITEM
,
1505 &global_settings
.dirfilter
, "qs bottom",
1506 qs_load_from_cfg
, qs_write_to_cfg
,
1507 qs_is_changed
, qs_set_default
),
1510 OFFON_SETTING(0, speaker_enabled
, LANG_ENABLE_SPEAKER
, false, "speaker",
1511 audiohw_enable_speaker
),
1513 #ifdef HAVE_TOUCHSCREEN
1514 CHOICE_SETTING(0, touch_mode
, LANG_TOUCHSCREEN_MODE
, TOUCHSCREEN_BUTTON
,
1515 "touchscreen mode", "point,grid", NULL
, 2,
1516 ID2P(LANG_TOUCHSCREEN_POINT
), ID2P(LANG_TOUCHSCREEN_GRID
)),
1517 CUSTOM_SETTING(0, ts_calibration_data
, -1,
1518 &default_calibration_parameters
, "touchscreen calibration",
1519 tsc_load_from_cfg
, tsc_write_to_cfg
,
1520 tsc_is_changed
, tsc_set_default
),
1522 OFFON_SETTING(0, prevent_skip
, LANG_PREVENT_SKIPPING
, false, "prevent track skip", NULL
),
1525 const int nb_settings
= sizeof(settings
)/sizeof(*settings
);
1527 const struct settings_list
* get_settings_list(int*count
)
1529 *count
= nb_settings
;