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