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 separated list of legal values to write to cfg files.
80 The values correspond to the values 0,1,2,etc. of the setting.
81 NULL if just the number itself should be written to the file.
82 No spaces between the values and the commas!
83 - cb: the callback used by the setting screen.
86 /* Use for int settings which use the set_sound() function to set them */
87 #define SOUND_SETTING(flags,var,lang_id,name,setting) \
88 {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \
89 lang_id, NODEFAULT,name,NULL, \
90 {.sound_setting=(struct sound_setting[]){{setting}}} }
92 /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO
93 or dont save as "off" or "on" in the cfg.
94 cfgvals are comma separated values (without spaces after the comma!) to write
95 for 'false' and 'true' (in this order)
96 yes_id is the lang_id for the 'yes' (or 'on') option in the menu
97 no_id is the lang_id for the 'no' (or 'off') option in the menu
99 #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes_id,no_id,cb)\
100 {flags|F_BOOL_SETTING, &global_settings.var, \
101 lang_id, BOOL(default),name,cfgvals, \
102 {.bool_setting=(struct bool_setting[]){{cb,yes_id,no_id}}} }
104 /* bool setting which does use LANG_YES and _NO and save as "off,on" */
105 #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
106 BOOL_SETTING(flags,var,lang_id,default,name,off_on, \
107 LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb)
109 /* int variable which is NOT saved to .cfg files,
110 (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */
111 #define SYSTEM_SETTING(flags,var,default) \
112 {flags|F_T_INT, &global_status.var,-1, INT(default), \
115 /* setting which stores as a filename (or another string) in the .cfgvals
116 The string must be a char array (which all of our string settings are),
117 not just a char pointer.
118 prefix: The absolute path to not save in the variable, ex /.rockbox/wps_file
119 suffix: The file extention (usually...) e.g .wps_file
120 If the prefix is set (not NULL), then the suffix must be set as well.
122 #define TEXT_SETTING(flags,var,name,default,prefix,suffix) \
123 {flags|F_T_UCHARPTR, &global_settings.var,-1, \
124 CHARPTR(default),name,NULL, \
125 {.filename_setting= \
126 (struct filename_setting[]){ \
127 {prefix,suffix,sizeof(global_settings.var)}}} }
129 /* Used for settings which use the set_option() setting screen.
130 The ... arg is a list of pointers to strings to display in the setting
131 screen. These can either be literal strings, or ID2P(LANG_*) */
132 #define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \
133 {flags|F_CHOICE_SETTING|F_T_INT, &global_settings.var, lang_id, \
134 INT(default), name, cfg_vals, \
135 {.choice_setting = (struct choice_setting[]){ \
136 {cb, count, {.desc = (const unsigned char*[]) \
139 /* Similar to above, except the strings to display are taken from cfg_vals,
140 the ... arg is a list of ID's to talk for the strings, can use TALK_ID()'s */
141 #define STRINGCHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals, \
143 {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS, \
144 &global_settings.var, lang_id, \
145 INT(default), name, cfg_vals, \
146 {.choice_setting = (struct choice_setting[]){ \
147 {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}}
149 /* for settings which use the set_int() setting screen.
150 unit is the UNIT_ define to display/talk.
151 the first one saves a string to the config file,
152 the second one saves the variable value to the config file */
153 #define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \
154 unit, min, max, step, formatter, get_talk_id, cb) \
155 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
156 lang_id, INT(default), name, cfg_vals, \
157 {.int_setting = (struct int_setting[]){ \
158 {cb, unit, min, max, step, formatter, get_talk_id}}}}
159 #define INT_SETTING(flags, var, lang_id, default, name, \
160 unit, min, max, step, formatter, get_talk_id, cb) \
161 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
162 lang_id, INT(default), name, NULL, \
163 {.int_setting = (struct int_setting[]){ \
164 {cb, unit, min, max, step, formatter, get_talk_id}}}}
165 #define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \
166 unit, min, max, step, formatter, get_talk_id, cb) \
167 {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \
168 lang_id, INT(default), name, NULL, \
169 {.int_setting = (struct int_setting[]){ \
170 {cb, unit, min, max, step, formatter, get_talk_id}}}}
172 #define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
173 unit, formatter, get_talk_id, cb, count, ...) \
174 {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \
175 lang_id, INT(default), name, cfg_vals, \
176 {.table_setting = (struct table_setting[]) { \
177 {cb, formatter, get_talk_id, unit, count, \
178 (const int[]){__VA_ARGS__}}}}}
180 #define CUSTOM_SETTING(flags, var, lang_id, default, name, \
181 load_from_cfg, write_to_cfg, \
182 is_change, set_default) \
183 {flags|F_CUSTOM_SETTING|F_T_CUSTOM|F_BANFROMQS, \
184 &global_settings.var, lang_id, \
185 {.custom = (void*)default}, name, NULL, \
186 {.custom_setting = (struct custom_setting[]){ \
187 {load_from_cfg, write_to_cfg, is_change, set_default}}}}
189 #define VIEWPORT_SETTING(var,name) \
190 TEXT_SETTING(F_THEMESETTING,var,name,"-", NULL, NULL)
192 /* some sets of values which are used more than once, to save memory */
193 static const char off_on
[] = "off,on";
194 static const char off_on_ask
[] = "off,on,ask";
195 static const char off_number_spell
[] = "off,number,spell";
196 #ifdef HAVE_LCD_BITMAP
197 static const char graphic_numeric
[] = "graphic,numeric";
200 /* Default theme settings */
201 #define DEFAULT_WPSNAME "cabbiev2"
202 #define DEFAULT_SBS_NAME DEFAULT_WPSNAME
204 #ifdef HAVE_LCD_BITMAP
207 #define DEFAULT_FONTNAME "08-Rockfont"
208 #elif LCD_HEIGHT <= 80
209 #define DEFAULT_FONTNAME "11-Sazanami-Mincho"
210 #elif LCD_HEIGHT <= 220
211 #define DEFAULT_FONTNAME "12-Adobe-Helvetica"
212 #elif LCD_HEIGHT <= 320
213 #define DEFAULT_FONTNAME "15-Adobe-Helvetica"
215 #define DEFAULT_FONTNAME "12-Adobe-Helvetica"
219 #define DEFAULT_FONTNAME ""
222 #ifdef HAVE_LCD_COLOR
223 #define DEFAULT_ICONSET "tango_small"
224 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
226 #define DEFAULT_ICONSET "tango_small_mono"
227 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
228 #else /* monochrome */
229 #define DEFAULT_ICONSET ""
230 #define DEFAULT_VIEWERS_ICONSET ""
233 #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
234 #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
235 #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
236 #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
237 #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
239 #define DEFAULT_BACKDROP "cabbiev2"
241 #ifdef HAVE_RECORDING
242 /* these should be in the config.h files */
243 #if CONFIG_CODEC == MAS3587F
244 # define DEFAULT_REC_MIC_GAIN 8
245 # define DEFAULT_REC_LEFT_GAIN 2
246 # define DEFAULT_REC_RIGHT_GAIN 2
247 #elif CONFIG_CODEC == SWCODEC
249 # define DEFAULT_REC_MIC_GAIN 16
250 # define DEFAULT_REC_LEFT_GAIN 0
251 # define DEFAULT_REC_RIGHT_GAIN 0
252 # elif defined(HAVE_TLV320)
253 # define DEFAULT_REC_MIC_GAIN 0
254 # define DEFAULT_REC_LEFT_GAIN 0
255 # define DEFAULT_REC_RIGHT_GAIN 0
256 # elif defined(HAVE_WM8975)
257 # define DEFAULT_REC_MIC_GAIN 16
258 # define DEFAULT_REC_LEFT_GAIN 0
259 # define DEFAULT_REC_RIGHT_GAIN 0
260 # elif defined(HAVE_WM8758)
261 # define DEFAULT_REC_MIC_GAIN 16
262 # define DEFAULT_REC_LEFT_GAIN 0
263 # define DEFAULT_REC_RIGHT_GAIN 0
264 # elif defined(HAVE_WM8731)
265 # define DEFAULT_REC_MIC_GAIN 16
266 # define DEFAULT_REC_LEFT_GAIN 0
267 # define DEFAULT_REC_RIGHT_GAIN 0
271 #endif /* HAVE_RECORDING */
273 static const char* formatter_unit_0_is_off(char *buffer
, size_t buffer_size
,
274 int val
, const char *unit
)
277 return str(LANG_OFF
);
279 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
283 static int32_t getlang_unit_0_is_off(int value
, int unit
)
288 return TALK_ID(value
,unit
);
291 static const char* formatter_unit_0_is_skip_track(char *buffer
, size_t buffer_size
,
292 int val
, const char *unit
)
296 return str(LANG_SKIP_OUTRO
);
298 return str(LANG_SKIP_TRACK
);
299 else if (val
% 60 == 0)
300 snprintf(buffer
, buffer_size
, "%d min", val
/60);
302 snprintf(buffer
, buffer_size
, "%d s", val
);
306 static int32_t getlang_unit_0_is_skip_track(int value
, int unit
)
310 return LANG_SKIP_OUTRO
;
312 return LANG_SKIP_TRACK
;
313 else if (value
% 60 == 0)
314 return TALK_ID(value
/60, UNIT_MIN
);
316 return TALK_ID(value
, UNIT_SEC
);
319 #ifdef HAVE_BACKLIGHT
320 static const char* backlight_formatter(char *buffer
, size_t buffer_size
,
321 int val
, const char *unit
)
324 return str(LANG_OFF
);
328 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
331 static int32_t backlight_getlang(int value
, int unit
)
338 return TALK_ID(value
, unit
);
342 #ifndef HAVE_WHEEL_ACCELERATION
343 static const char* scanaccel_formatter(char *buffer
, size_t buffer_size
,
344 int val
, const char *unit
)
348 return str(LANG_OFF
);
350 snprintf(buffer
, buffer_size
, "2x/%ds", val
);
355 #if CONFIG_CODEC == SWCODEC
356 static void crossfeed_cross_set(int val
)
359 dsp_set_crossfeed_cross_params(global_settings
.crossfeed_cross_gain
,
360 global_settings
.crossfeed_hf_attenuation
,
361 global_settings
.crossfeed_hf_cutoff
);
364 static void compressor_set(int val
)
367 dsp_set_compressor(global_settings
.compressor_threshold
,
368 global_settings
.compressor_makeup_gain
,
369 global_settings
.compressor_ratio
,
370 global_settings
.compressor_knee
,
371 global_settings
.compressor_release_time
);
374 static const char* db_format(char* buffer
, size_t buffer_size
, int value
,
379 snprintf(buffer
, buffer_size
, "%s%d.%d %s", value
< 0 ? "-" : "",
380 v
/ 10, v
% 10, unit
);
384 static int32_t get_dec_talkid(int value
, int unit
)
386 return TALK_ID_DECIMAL(value
, 1, unit
);
389 static int32_t get_precut_talkid(int value
, int unit
)
391 return TALK_ID_DECIMAL(-value
, 1, unit
);
395 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
396 static void set_mdb_enable(bool value
)
398 sound_set_mdb_enable((int)value
);
400 static void set_superbass(bool value
)
402 sound_set_superbass((int)value
);
406 #ifdef HAVE_LCD_CHARCELLS
407 static const char* jumpscroll_format(char* buffer
, size_t buffer_size
, int value
,
414 return str(LANG_OFF
);
416 return str(LANG_ONE_TIME
);
420 snprintf(buffer
, buffer_size
, "%d", value
);
423 return str(LANG_ALWAYS
);
427 static int32_t jumpscroll_getlang(int value
, int unit
)
434 return LANG_ONE_TIME
;
438 return TALK_ID(value
, unit
);
444 #endif /* HAVE_LCD_CHARCELLS */
446 #ifdef HAVE_QUICKSCREEN
447 static int find_setting_by_name(char*name
)
450 const struct settings_list
*setting
;
451 while (i
<nb_settings
)
453 setting
= &settings
[i
];
454 if (setting
->cfg_name
&& !strcmp(setting
->cfg_name
, name
))
462 static void qs_load_from_cfg(void* var
, char*value
)
464 *(int*)var
= find_setting_by_name(value
);
466 static char* qs_write_to_cfg(void* setting
, char*buf
, int buf_len
)
468 const struct settings_list
*var
= &settings
[*(int*)setting
];
469 strlcpy(buf
, var
->cfg_name
, buf_len
);
472 static bool qs_is_changed(void* setting
, void* defaultval
)
474 int i
= *(int*)setting
;
475 if (i
< 0 || i
>= nb_settings
)
477 const struct settings_list
*var
= &settings
[i
];
478 return var
!= find_setting(defaultval
, NULL
);
480 static void qs_set_default(void* setting
, void* defaultval
)
482 find_setting(defaultval
, (int*)setting
);
485 #ifdef HAVE_TOUCHSCREEN
486 static void tsc_load_from_cfg(void* setting
, char*value
)
488 struct touchscreen_parameter
*var
= (struct touchscreen_parameter
*) setting
;
490 /* Replacement for sscanf(value, "%d ..., &var->A, ...); */
491 int vals
[7], count
= 0;
492 while(*value
!= 0 && count
< 7)
498 vals
[count
++] = atoi(value
);
499 while(!isspace(*value
))
509 var
->divider
= vals
[6];
512 static char* tsc_write_to_cfg(void* setting
, char*buf
, int buf_len
)
514 const struct touchscreen_parameter
*var
= (const struct touchscreen_parameter
*) setting
;
515 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
);
518 static bool tsc_is_changed(void* setting
, void* defaultval
)
520 return memcmp(setting
, defaultval
, sizeof(struct touchscreen_parameter
)) != 0;
522 static void tsc_set_default(void* setting
, void* defaultval
)
524 memcpy(setting
, defaultval
, sizeof(struct touchscreen_parameter
));
527 const struct settings_list settings
[] = {
529 SOUND_SETTING(F_NO_WRAP
,volume
, LANG_VOLUME
, "volume", SOUND_VOLUME
),
530 SOUND_SETTING(0, balance
, LANG_BALANCE
, "balance", SOUND_BALANCE
),
531 SOUND_SETTING(F_NO_WRAP
,bass
, LANG_BASS
, "bass", SOUND_BASS
),
532 SOUND_SETTING(F_NO_WRAP
,treble
, LANG_TREBLE
, "treble", SOUND_TREBLE
),
534 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
535 SOUND_SETTING(0,loudness
, LANG_LOUDNESS
, "loudness", SOUND_LOUDNESS
),
536 STRINGCHOICE_SETTING(F_SOUNDSETTING
,avc
,LANG_AUTOVOL
,0,"auto volume",
537 "off,20ms,2,4,8,", sound_set_avc
, 5,
538 LANG_OFF
,TALK_ID(20, UNIT_MS
),TALK_ID(2, UNIT_SEC
),
539 TALK_ID(4, UNIT_SEC
),TALK_ID(8, UNIT_SEC
)),
540 OFFON_SETTING(F_SOUNDSETTING
, superbass
, LANG_SUPERBASS
, false, "superbass",
544 CHOICE_SETTING(F_SOUNDSETTING
, channel_config
, LANG_CHANNEL_CONFIGURATION
,
546 "stereo,mono,custom,mono left,mono right,karaoke",
547 sound_set_channels
, 6,
548 ID2P(LANG_CHANNEL_STEREO
), ID2P(LANG_CHANNEL_MONO
),
549 ID2P(LANG_CHANNEL_CUSTOM
), ID2P(LANG_CHANNEL_LEFT
),
550 ID2P(LANG_CHANNEL_RIGHT
), ID2P(LANG_CHANNEL_KARAOKE
)),
551 SOUND_SETTING(F_SOUNDSETTING
, stereo_width
, LANG_STEREO_WIDTH
,
552 "stereo_width", SOUND_STEREO_WIDTH
),
554 OFFON_SETTING(0, playlist_shuffle
, LANG_SHUFFLE
, false, "shuffle", NULL
),
555 SYSTEM_SETTING(NVRAM(4), resume_index
, -1),
556 SYSTEM_SETTING(NVRAM(4), resume_offset
, -1),
557 CHOICE_SETTING(0, repeat_mode
, LANG_REPEAT
, REPEAT_OFF
, "repeat",
558 "off,all,one,shuffle"
559 #ifdef AB_REPEAT_ENABLE
563 #ifdef AB_REPEAT_ENABLE
568 ID2P(LANG_OFF
), ID2P(LANG_ALL
), ID2P(LANG_REPEAT_ONE
),
570 #ifdef AB_REPEAT_ENABLE
571 ,ID2P(LANG_REPEAT_AB
)
573 ), /* CHOICE_SETTING( repeat_mode ) */
575 #ifdef HAVE_LCD_CONTRAST
576 /* its easier to leave this one un-macro()ed for the time being */
577 { F_T_INT
|F_DEF_ISFUNC
|F_INT_SETTING
, &global_settings
.contrast
,
578 LANG_CONTRAST
, FUNCTYPE(lcd_default_contrast
), "contrast", NULL
, {
579 .int_setting
= (struct int_setting
[]) {
580 { lcd_set_contrast
, UNIT_INT
, MIN_CONTRAST_SETTING
,
581 MAX_CONTRAST_SETTING
, 1, NULL
, NULL
}}}},
583 #ifdef HAVE_BACKLIGHT
584 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout
, LANG_BACKLIGHT
, 15,
585 "backlight timeout", off_on
, UNIT_SEC
, backlight_formatter
,
586 backlight_getlang
, backlight_set_timeout
, 20,
587 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
589 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout_plugged
,
590 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
591 "backlight timeout plugged", off_on
, UNIT_SEC
,
592 backlight_formatter
, backlight_getlang
,
593 backlight_set_timeout_plugged
, 20,
594 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
596 #endif /* HAVE_BACKLIGHT */
597 #ifdef HAVE_LCD_BITMAP
598 #ifdef HAVE_LCD_INVERT
599 BOOL_SETTING(0, invert
, LANG_INVERT
, false ,"invert", off_on
,
600 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
, lcd_set_invert_display
),
603 OFFON_SETTING(0, flip_display
, LANG_FLIP_DISPLAY
, false, "flip display",
607 CHOICE_SETTING(F_TEMPVAR
|F_THEMESETTING
, cursor_style
, LANG_INVERT_CURSOR
,
608 #ifdef HAVE_LCD_COLOR
610 "pointer,bar (inverse),bar (color),bar (gradient)", NULL
, 4,
611 ID2P(LANG_INVERT_CURSOR_POINTER
),
612 ID2P(LANG_INVERT_CURSOR_BAR
),
613 ID2P(LANG_INVERT_CURSOR_COLOR
),
614 ID2P(LANG_INVERT_CURSOR_GRADIENT
)),
616 1, "selector type", "pointer,bar (inverse)", NULL
, 2,
617 ID2P(LANG_INVERT_CURSOR_POINTER
),
618 ID2P(LANG_INVERT_CURSOR_BAR
)),
620 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, statusbar
,
621 LANG_STATUS_BAR
, STATUSBAR_TOP
, "statusbar","off,top,bottom,custom",
622 NULL
, 4, ID2P(LANG_OFF
), ID2P(LANG_STATUSBAR_TOP
),
623 ID2P(LANG_STATUSBAR_BOTTOM
), ID2P(LANG_STATUSBAR_CUSTOM
)),
624 #ifdef HAVE_REMOTE_LCD
625 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, remote_statusbar
,
626 LANG_REMOTE_STATUSBAR
, STATUSBAR_TOP
, "remote statusbar","off,top,bottom,custom",
627 NULL
, 4, ID2P(LANG_OFF
), ID2P(LANG_STATUSBAR_TOP
),
628 ID2P(LANG_STATUSBAR_BOTTOM
), ID2P(LANG_STATUSBAR_CUSTOM
)),
630 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, scrollbar
,
631 LANG_SCROLL_BAR
, SCROLLBAR_LEFT
, "scrollbar","off,left,right",
632 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_LEFT
), ID2P(LANG_RIGHT
)),
633 INT_SETTING(F_THEMESETTING
, scrollbar_width
, LANG_SCROLLBAR_WIDTH
, 6,
634 "scrollbar width",UNIT_INT
, 3, MAX(LCD_WIDTH
/10,25), 1,
636 #if CONFIG_KEYPAD == RECORDER_PAD
637 OFFON_SETTING(F_THEMESETTING
,buttonbar
, LANG_BUTTON_BAR
,true,"buttonbar", NULL
),
639 CHOICE_SETTING(F_THEMESETTING
, volume_type
, LANG_VOLUME_DISPLAY
, 0,
640 "volume display", graphic_numeric
, NULL
, 2,
641 ID2P(LANG_DISPLAY_GRAPHIC
),
642 ID2P(LANG_DISPLAY_NUMERIC
)),
643 CHOICE_SETTING(F_THEMESETTING
, battery_display
, LANG_BATTERY_DISPLAY
, 0,
644 "battery display", graphic_numeric
, NULL
, 2,
645 ID2P(LANG_DISPLAY_GRAPHIC
), ID2P(LANG_DISPLAY_NUMERIC
)),
647 CHOICE_SETTING(0, timeformat
, LANG_TIMEFORMAT
, 0,
648 "time format", "24hour,12hour", NULL
, 2,
649 ID2P(LANG_24_HOUR_CLOCK
), ID2P(LANG_12_HOUR_CLOCK
)),
651 #endif /* HAVE_LCD_BITMAP */
652 OFFON_SETTING(0,show_icons
, LANG_SHOW_ICONS
,true,"show icons", NULL
),
654 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, poweroff
, LANG_POWEROFF_IDLE
, 10,
655 "idle poweroff", "off", UNIT_MIN
, formatter_unit_0_is_off
,
656 getlang_unit_0_is_off
, set_poweroff_timeout
, 15,
657 0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
658 SYSTEM_SETTING(NVRAM(4), runtime
, 0),
659 SYSTEM_SETTING(NVRAM(4), topruntime
, 0),
660 INT_SETTING(F_BANFROMQS
, max_files_in_playlist
,
661 LANG_MAX_FILES_IN_PLAYLIST
,
667 "max files in playlist", UNIT_INT
, 1000, 32000, 1000,
669 INT_SETTING(F_BANFROMQS
, max_files_in_dir
, LANG_MAX_FILES_IN_DIR
,
675 "max files in dir", UNIT_INT
, 50, 10000, 50,
677 #if BATTERY_CAPACITY_INC > 0
678 INT_SETTING(0, battery_capacity
, LANG_BATTERY_CAPACITY
,
679 BATTERY_CAPACITY_DEFAULT
, "battery capacity", UNIT_MAH
,
680 BATTERY_CAPACITY_MIN
, BATTERY_CAPACITY_MAX
,
681 BATTERY_CAPACITY_INC
, NULL
, NULL
, NULL
),
684 OFFON_SETTING(NVRAM(1), car_adapter_mode
,
685 LANG_CAR_ADAPTER_MODE
, false, "car adapter mode", NULL
),
687 #ifdef IPOD_ACCESSORY_PROTOCOL
688 CHOICE_SETTING(0, serial_bitrate
, LANG_SERIAL_BITRATE
, 0, "serial bitrate",
689 "auto,9600,19200,38400,57600", iap_bitrate_set
, 5, ID2P(LANG_SERIAL_BITRATE_AUTO
),
690 ID2P(LANG_SERIAL_BITRATE_9600
),ID2P(LANG_SERIAL_BITRATE_19200
),
691 ID2P(LANG_SERIAL_BITRATE_38400
),ID2P(LANG_SERIAL_BITRATE_57600
)),
693 #ifdef HAVE_ACCESSORY_SUPPLY
694 OFFON_SETTING(0, accessory_supply
, LANG_ACCESSORY_SUPPLY
,
695 true, "accessory power supply", accessory_supply_set
),
699 OFFON_SETTING(0,fm_force_mono
, LANG_FM_MONO_MODE
,
700 false, "force fm mono", toggle_mono_mode
),
701 SYSTEM_SETTING(NVRAM(4),last_frequency
,0),
704 #if BATTERY_TYPES_COUNT > 1
705 CHOICE_SETTING(0, battery_type
, LANG_BATTERY_TYPE
, 0, "battery type",
706 "alkaline,nimh", NULL
, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE
),
707 ID2P(LANG_BATTERY_TYPE_NIMH
)),
709 #ifdef HAVE_REMOTE_LCD
711 INT_SETTING(0, remote_contrast
, LANG_CONTRAST
,
712 DEFAULT_REMOTE_CONTRAST_SETTING
, "remote contrast", UNIT_INT
,
713 MIN_REMOTE_CONTRAST_SETTING
, MAX_REMOTE_CONTRAST_SETTING
, 1,
714 NULL
, NULL
, lcd_remote_set_contrast
),
715 BOOL_SETTING(0, remote_invert
, LANG_INVERT
, false ,"remote invert", off_on
,
716 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
,
717 lcd_remote_set_invert_display
),
718 OFFON_SETTING(0,remote_flip_display
, LANG_FLIP_DISPLAY
,
719 false,"remote flip display", NULL
),
720 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout
,
721 LANG_BACKLIGHT
, 5, "remote backlight timeout", off_on
,
722 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
723 remote_backlight_set_timeout
, 20,
724 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
726 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout_plugged
,
727 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
728 "remote backlight timeout plugged", off_on
, UNIT_SEC
,
729 backlight_formatter
, backlight_getlang
,
730 remote_backlight_set_timeout_plugged
, 20,
731 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
733 #ifdef HAVE_REMOTE_LCD_TICKING
734 OFFON_SETTING(0, remote_reduce_ticking
, LANG_REDUCE_TICKING
,
735 false,"remote reduce ticking", NULL
),
739 #ifdef HAVE_BACKLIGHT
740 OFFON_SETTING(0, bl_filter_first_keypress
,
741 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
742 "backlight filters first keypress", NULL
),
743 #ifdef HAVE_REMOTE_LCD
744 OFFON_SETTING(0, remote_bl_filter_first_keypress
,
745 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
746 "backlight filters first remote keypress", NULL
),
748 #endif /* HAVE_BACKLIGHT */
750 /** End of old RTC config block **/
752 #ifdef HAVE_BACKLIGHT
753 OFFON_SETTING(0, caption_backlight
, LANG_CAPTION_BACKLIGHT
,
754 false, "caption backlight", NULL
),
755 #ifdef HAVE_REMOTE_LCD
756 OFFON_SETTING(0, remote_caption_backlight
, LANG_CAPTION_BACKLIGHT
,
757 false, "remote caption backlight", NULL
),
759 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
760 INT_SETTING(F_NO_WRAP
, brightness
, LANG_BRIGHTNESS
,
761 DEFAULT_BRIGHTNESS_SETTING
, "brightness",UNIT_INT
,
762 MIN_BRIGHTNESS_SETTING
, MAX_BRIGHTNESS_SETTING
, 1,
763 NULL
, NULL
, backlight_set_brightness
),
765 /* backlight fading */
766 #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
767 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_in
,
768 LANG_BACKLIGHT_FADE_IN
, 300, "backlight fade in", "off",
769 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
770 backlight_set_fade_in
, 7, 0,100,200,300,500,1000,2000),
771 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_out
,
772 LANG_BACKLIGHT_FADE_OUT
, 2000, "backlight fade out", "off",
773 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
774 backlight_set_fade_out
, 10,
775 0,100,200,300,500,1000,2000,3000,5000,10000),
776 #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
777 OFFON_SETTING(0, backlight_fade_in
, LANG_BACKLIGHT_FADE_IN
,
778 true, "backlight fade in", backlight_set_fade_in
),
779 OFFON_SETTING(0, backlight_fade_out
, LANG_BACKLIGHT_FADE_OUT
,
780 true, "backlight fade out", backlight_set_fade_out
),
782 #endif /* HAVE_BACKLIGHT */
783 INT_SETTING(F_PADTITLE
, scroll_speed
, LANG_SCROLL_SPEED
, 9,"scroll speed",
784 UNIT_INT
, 0, 15, 1, NULL
, NULL
, lcd_scroll_speed
),
785 INT_SETTING(F_PADTITLE
, scroll_delay
, LANG_SCROLL_DELAY
, 1000,
786 "scroll delay", UNIT_MS
, 0, 2500, 100, NULL
,
787 NULL
, lcd_scroll_delay
),
788 INT_SETTING(0, bidir_limit
, LANG_BIDIR_SCROLL
, 50, "bidir limit",
789 UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
, lcd_bidir_scroll
),
790 #ifdef HAVE_REMOTE_LCD
791 INT_SETTING(0, remote_scroll_speed
, LANG_SCROLL_SPEED
, 9,
792 "remote scroll speed", UNIT_INT
, 0,15, 1,
793 NULL
, NULL
, lcd_remote_scroll_speed
),
794 INT_SETTING(0, remote_scroll_step
, LANG_SCROLL_STEP
, 6,
795 "remote scroll step", UNIT_PIXEL
, 1, LCD_REMOTE_WIDTH
, 1, NULL
,
796 NULL
, lcd_remote_scroll_step
),
797 INT_SETTING(0, remote_scroll_delay
, LANG_SCROLL_DELAY
, 1000,
798 "remote scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
799 lcd_remote_scroll_delay
),
800 INT_SETTING(0, remote_bidir_limit
, LANG_BIDIR_SCROLL
, 50,
801 "remote bidir limit", UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
,
802 lcd_remote_bidir_scroll
),
804 #ifdef HAVE_LCD_BITMAP
805 OFFON_SETTING(0, offset_out_of_view
, LANG_SCREEN_SCROLL_VIEW
,
806 false, "Screen Scrolls Out Of View",
807 gui_list_screen_scroll_out_of_view
),
808 INT_SETTING(F_PADTITLE
, scroll_step
, LANG_SCROLL_STEP
, 6, "scroll step",
809 UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
, lcd_scroll_step
),
810 INT_SETTING(F_PADTITLE
, screen_scroll_step
, LANG_SCREEN_SCROLL_STEP
, 16,
811 "screen scroll step", UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
,
812 gui_list_screen_scroll_step
),
813 #endif /* HAVE_LCD_BITMAP */
814 #ifdef HAVE_LCD_CHARCELLS
815 INT_SETTING(0, jump_scroll
, LANG_JUMP_SCROLL
, 0, "jump scroll", UNIT_INT
, 0,
816 5, 1, jumpscroll_format
, jumpscroll_getlang
, lcd_jump_scroll
),
817 INT_SETTING(0, jump_scroll_delay
, LANG_JUMP_SCROLL_DELAY
, 500,
818 "jump scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
819 lcd_jump_scroll_delay
),
821 OFFON_SETTING(0,scroll_paginated
,LANG_SCROLL_PAGINATED
,
822 false,"scroll paginated",NULL
),
823 #ifdef HAVE_LCD_COLOR
825 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.fg_color
,-1,
826 INT(DEFAULT_THEME_FOREGROUND
),"foreground color",NULL
,UNUSED
},
827 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.bg_color
,-1,
828 INT(DEFAULT_THEME_BACKGROUND
),"background color",NULL
,UNUSED
},
829 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lss_color
,-1,
830 INT(DEFAULT_THEME_SELECTOR_START
),"line selector start color",NULL
,
832 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lse_color
,-1,
833 INT(DEFAULT_THEME_SELECTOR_END
),"line selector end color",NULL
,UNUSED
},
834 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lst_color
,-1,
835 INT(DEFAULT_THEME_SELECTOR_TEXT
),"line selector text color",NULL
,
840 OFFON_SETTING(0,play_selected
,LANG_PLAY_SELECTED
,true,"play selected",NULL
),
841 OFFON_SETTING(0,party_mode
,LANG_PARTY_MODE
,false,"party mode",NULL
),
842 OFFON_SETTING(0,fade_on_stop
,LANG_FADE_ON_STOP
,true,"volume fade",NULL
),
843 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, ff_rewind_min_step
,
844 LANG_FFRW_STEP
, 1, "scan min step", NULL
, UNIT_SEC
,
845 NULL
, NULL
, NULL
, 14, 1,2,3,4,5,6,8,10,15,20,25,30,45,60),
846 CHOICE_SETTING(0, ff_rewind_accel
, LANG_FFRW_ACCEL
, 2,
847 "seek acceleration", "very fast,fast,normal,slow,very slow", NULL
, 5,
848 ID2P(LANG_VERY_FAST
), ID2P(LANG_FAST
), ID2P(LANG_NORMAL
),
849 ID2P(LANG_SLOW
) , ID2P(LANG_VERY_SLOW
)),
850 #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE)
851 STRINGCHOICE_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0,"antiskip",
852 "5s,15s,30s,1min,2min,3min,5min,10min", NULL
, 8,
853 TALK_ID(5, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
854 TALK_ID(30, UNIT_SEC
), TALK_ID(1, UNIT_MIN
),
855 TALK_ID(2, UNIT_MIN
), TALK_ID(3, UNIT_MIN
),
856 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
)),
857 #elif defined(HAVE_DISK_STORAGE)
858 INT_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0, "antiskip",
859 UNIT_SEC
, 0, 7, 1, NULL
, NULL
, audio_set_buffer_margin
),
862 #ifdef HAVE_DISK_STORAGE
863 INT_SETTING(0, disk_spindown
, LANG_SPINDOWN
, 5, "disk spindown",
864 UNIT_SEC
, 3, 254, 1, NULL
, NULL
, storage_spindown
),
865 #endif /* HAVE_DISK_STORAGE */
867 CHOICE_SETTING(0, dirfilter
, LANG_FILTER
, SHOW_SUPPORTED
, "show files",
868 "all,supported,music,playlists", NULL
, 4, ID2P(LANG_ALL
),
869 ID2P(LANG_FILTER_SUPPORTED
), ID2P(LANG_FILTER_MUSIC
),
870 ID2P(LANG_PLAYLISTS
)),
872 OFFON_SETTING(0, sort_case
, LANG_SORT_CASE
, false, "sort case", NULL
),
873 CHOICE_SETTING(0, sort_dir
, LANG_SORT_DIR
, 0 ,
874 "sort dirs", "alpha,oldest,newest", NULL
, 3,
875 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
876 ID2P(LANG_SORT_DATE_REVERSE
)),
877 CHOICE_SETTING(0, sort_file
, LANG_SORT_FILE
, 0 ,
878 "sort files", "alpha,oldest,newest,type", NULL
, 4,
879 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
880 ID2P(LANG_SORT_DATE_REVERSE
) , ID2P(LANG_SORT_TYPE
)),
881 CHOICE_SETTING(0, interpret_numbers
, LANG_SORT_INTERPRET_NUMBERS
, 1,
882 "sort interpret number", "digits,numbers",NULL
, 2,
883 ID2P(LANG_SORT_INTERPRET_AS_DIGIT
),
884 ID2P(LANG_SORT_INTERPRET_AS_NUMBERS
)),
885 CHOICE_SETTING(0, show_filename_ext
, LANG_SHOW_FILENAME_EXT
, 3,
886 "show filename exts", "off,on,unknown,view_all", NULL
, 4 ,
887 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_UNKNOWN_TYPES
),
888 ID2P(LANG_EXT_ONLY_VIEW_ALL
)),
889 OFFON_SETTING(0,browse_current
,LANG_FOLLOW
,false,"follow playlist",NULL
),
890 OFFON_SETTING(0,playlist_viewer_icons
,LANG_SHOW_ICONS
,true,
891 "playlist viewer icons",NULL
),
892 OFFON_SETTING(0,playlist_viewer_indices
,LANG_SHOW_INDICES
,true,
893 "playlist viewer indices",NULL
),
894 CHOICE_SETTING(0, playlist_viewer_track_display
, LANG_TRACK_DISPLAY
, 0,
895 "playlist viewer track display","track name,full path",
896 NULL
, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY
),
897 ID2P(LANG_DISPLAY_FULL_PATH
)),
898 CHOICE_SETTING(0, recursive_dir_insert
, LANG_RECURSE_DIRECTORY
, RECURSE_ON
,
899 "recursive directory insert", off_on_ask
, NULL
, 3 ,
900 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_ASK
)),
902 CHOICE_SETTING(0, autocreatebookmark
, LANG_BOOKMARK_SETTINGS_AUTOCREATE
,
903 BOOKMARK_NO
, "autocreate bookmarks",
904 "off,on,ask,recent only - on,recent only - ask", NULL
, 5,
905 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
906 ID2P(LANG_ASK
), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
),
907 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
)),
908 CHOICE_SETTING(0, autoloadbookmark
, LANG_BOOKMARK_SETTINGS_AUTOLOAD
,
909 BOOKMARK_NO
, "autoload bookmarks", off_on_ask
, NULL
, 3,
910 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
912 CHOICE_SETTING(0, usemrb
, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
,
913 BOOKMARK_NO
, "use most-recent-bookmarks",
914 "off,on,unique only", NULL
, 3, ID2P(LANG_SET_BOOL_NO
),
915 ID2P(LANG_SET_BOOL_YES
),
916 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
)),
917 #ifdef HAVE_LCD_BITMAP
919 STRINGCHOICE_SETTING(0, peak_meter_clip_hold
, LANG_PM_CLIP_HOLD
, 16,
920 "peak meter clip hold",
921 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
922 ",3min,5min,10min,20min,45min,90min",
923 peak_meter_set_clip_hold
, 25, LANG_PM_ETERNAL
,
924 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
925 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
926 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
927 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
928 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
929 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
930 TALK_ID(25, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
931 TALK_ID(45, UNIT_SEC
), TALK_ID(60, UNIT_SEC
),
932 TALK_ID(90, UNIT_SEC
), TALK_ID(2, UNIT_MIN
),
933 TALK_ID(3, UNIT_MIN
), TALK_ID(5, UNIT_MIN
),
934 TALK_ID(10, UNIT_MIN
), TALK_ID(20, UNIT_MIN
),
935 TALK_ID(45, UNIT_MIN
), TALK_ID(90, UNIT_MIN
)),
936 STRINGCHOICE_SETTING(0, peak_meter_hold
, LANG_PM_PEAK_HOLD
, 3,
938 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
939 NULL
, 18, LANG_OFF
, TALK_ID(200, UNIT_MS
),
940 TALK_ID(300, UNIT_MS
), TALK_ID(500, UNIT_MS
),
941 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
942 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
943 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
944 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
945 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
946 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
947 TALK_ID(30, UNIT_SEC
), TALK_ID(60, UNIT_SEC
)),
948 INT_SETTING(0, peak_meter_release
, LANG_PM_RELEASE
, 8, "peak meter release",
949 UNIT_PM_TICK
, 1, 0x7e, 1, NULL
, NULL
,NULL
),
950 OFFON_SETTING(0,peak_meter_dbfs
,LANG_PM_DBFS
,true,"peak meter dbfs",NULL
),
951 {F_T_INT
, &global_settings
.peak_meter_min
, LANG_PM_MIN
,INT(60),
952 "peak meter min", NULL
, UNUSED
},
953 {F_T_INT
, &global_settings
.peak_meter_max
, LANG_PM_MAX
,INT(0),
954 "peak meter max", NULL
, UNUSED
},
955 #ifdef HAVE_RECORDING
956 OFFON_SETTING(0, peak_meter_clipcounter
, LANG_PM_CLIPCOUNTER
, false,
957 "peak meter clipcounter", NULL
),
958 #endif /* HAVE_RECORDING */
959 #endif /* HAVE_LCD_BITMAP */
960 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
961 SOUND_SETTING(F_SOUNDSETTING
, mdb_strength
, LANG_MDB_STRENGTH
,
962 "mdb strength", SOUND_MDB_STRENGTH
),
963 SOUND_SETTING(F_SOUNDSETTING
, mdb_harmonics
, LANG_MDB_HARMONICS
,
964 "mdb harmonics", SOUND_MDB_HARMONICS
),
965 SOUND_SETTING(F_SOUNDSETTING
, mdb_center
, LANG_MDB_CENTER
,
966 "mdb center", SOUND_MDB_CENTER
),
967 SOUND_SETTING(F_SOUNDSETTING
, mdb_shape
, LANG_MDB_SHAPE
,
968 "mdb shape", SOUND_MDB_SHAPE
),
969 OFFON_SETTING(F_SOUNDSETTING
, mdb_enable
, LANG_MDB_ENABLE
,
970 false, "mdb enable", set_mdb_enable
),
972 #if CONFIG_CODEC == MAS3507D
973 OFFON_SETTING(F_SOUNDSETTING
, line_in
,LANG_LINE_IN
,false,"line in",NULL
),
976 OFFON_SETTING(F_TEMPVAR
, talk_menu
, LANG_VOICE_MENU
, true, "talk menu", NULL
),
977 CHOICE_SETTING(0, talk_dir
, LANG_VOICE_DIR
, 0,
978 "talk dir", off_number_spell
, NULL
, 3,
979 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
980 ID2P(LANG_VOICE_SPELL
)),
981 OFFON_SETTING(F_TEMPVAR
, talk_dir_clip
, LANG_VOICE_DIR_TALK
, false,
982 "talk dir clip", NULL
),
983 CHOICE_SETTING(0, talk_file
, LANG_VOICE_FILE
, 0,
984 "talk file", off_number_spell
, NULL
, 3,
985 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
986 ID2P(LANG_VOICE_SPELL
)),
987 OFFON_SETTING(F_TEMPVAR
, talk_file_clip
, LANG_VOICE_FILE_TALK
, false,
988 "talk file clip", NULL
),
989 OFFON_SETTING(F_TEMPVAR
, talk_filetype
, LANG_VOICE_FILETYPE
, false,
990 "talk filetype", NULL
),
991 OFFON_SETTING(F_TEMPVAR
, talk_battery_level
, LANG_TALK_BATTERY_LEVEL
, false,
992 "Announce Battery Level", NULL
),
994 #ifdef HAVE_RECORDING
996 STRINGCHOICE_SETTING(F_RECSETTING
, rec_timesplit
, LANG_SPLIT_TIME
, 0,
998 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
999 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
1001 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
),
1002 TALK_ID(15, UNIT_MIN
), TALK_ID(30, UNIT_MIN
),
1003 TALK_ID(60, UNIT_MIN
), TALK_ID(74, UNIT_MIN
),
1004 TALK_ID(80, UNIT_MIN
), TALK_ID(2, UNIT_HOUR
),
1005 TALK_ID(4, UNIT_HOUR
), TALK_ID(6, UNIT_HOUR
),
1006 TALK_ID(8, UNIT_HOUR
), TALK_ID(10, UNIT_HOUR
),
1007 TALK_ID(12, UNIT_HOUR
), TALK_ID(18, UNIT_HOUR
),
1008 TALK_ID(20, UNIT_HOUR
), TALK_ID(24, UNIT_HOUR
)),
1009 STRINGCHOICE_SETTING(F_RECSETTING
, rec_sizesplit
, LANG_SPLIT_SIZE
, 0,
1011 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
1012 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
1014 TALK_ID(5, UNIT_MB
), TALK_ID(10, UNIT_MB
),
1015 TALK_ID(15, UNIT_MB
), TALK_ID(32, UNIT_MB
),
1016 TALK_ID(64, UNIT_MB
), TALK_ID(75, UNIT_MB
),
1017 TALK_ID(100, UNIT_MB
), TALK_ID(128, UNIT_MB
),
1018 TALK_ID(256, UNIT_MB
), TALK_ID(512, UNIT_MB
),
1019 TALK_ID(650, UNIT_MB
), TALK_ID(700, UNIT_MB
),
1020 TALK_ID(1024, UNIT_MB
), TALK_ID(1536, UNIT_MB
),
1021 TALK_ID(1792, UNIT_MB
)),
1022 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_channels
, LANG_CHANNELS
, INT(0),
1023 "rec channels","stereo,mono",UNUSED
},
1024 #if CONFIG_CODEC == SWCODEC
1025 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_mono_mode
,
1026 LANG_RECORDING_MONO_MODE
, INT(0), "rec mono mode","L+R,L,R",UNUSED
},
1028 CHOICE_SETTING(F_RECSETTING
, rec_split_type
, LANG_SPLIT_TYPE
, 0,
1029 "rec split type", "Split,Stop,Shutdown", NULL
, 3,
1030 ID2P(LANG_START_NEW_FILE
), ID2P(LANG_STOP_RECORDING
),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN
)),
1031 CHOICE_SETTING(F_RECSETTING
, rec_split_method
, LANG_SPLIT_MEASURE
, 0,
1032 "rec split method", "Time,Filesize", NULL
, 2,
1033 ID2P(LANG_TIME
), ID2P(LANG_REC_SIZE
)),
1034 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_source
, LANG_RECORDING_SOURCE
,
1035 INT(0), "rec source",
1036 &HAVE_MIC_REC_(",mic")
1037 HAVE_LINE_REC_(",line")
1038 HAVE_SPDIF_REC_(",spdif")
1039 HAVE_FMRADIO_REC_(",fmradio")[1],
1041 INT_SETTING(F_RECSETTING
, rec_prerecord_time
, LANG_RECORD_PRERECORD_TIME
, 0,
1042 "prerecording time", UNIT_SEC
, 0, 30, 1,
1043 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1045 TEXT_SETTING(F_RECSETTING
, rec_directory
, "rec path",
1046 REC_BASE_DIR
, NULL
, NULL
),
1047 #ifdef HAVE_BACKLIGHT
1048 CHOICE_SETTING(F_RECSETTING
, cliplight
, LANG_CLIP_LIGHT
, 0,
1049 "cliplight", "off,main,both,remote", NULL
,
1050 #ifdef HAVE_REMOTE_LCD
1051 4, ID2P(LANG_OFF
), ID2P(LANG_MAIN_UNIT
),
1052 ID2P(LANG_REMOTE_MAIN
), ID2P(LANG_REMOTE_UNIT
)
1054 2, ID2P(LANG_OFF
), ID2P(LANG_ON
)
1058 #ifdef DEFAULT_REC_MIC_GAIN
1059 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_mic_gain
,
1060 LANG_GAIN
,INT(DEFAULT_REC_MIC_GAIN
),
1061 "rec mic gain",NULL
,UNUSED
},
1062 #endif /* DEFAULT_REC_MIC_GAIN */
1063 #ifdef DEFAULT_REC_LEFT_GAIN
1064 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_left_gain
,
1065 LANG_GAIN_LEFT
,INT(DEFAULT_REC_LEFT_GAIN
),
1066 "rec left gain",NULL
,UNUSED
},
1067 #endif /* DEFAULT_REC_LEFT_GAIN */
1068 #ifdef DEFAULT_REC_RIGHT_GAIN
1069 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_right_gain
,LANG_GAIN_RIGHT
,
1070 INT(DEFAULT_REC_RIGHT_GAIN
),
1071 "rec right gain",NULL
,UNUSED
},
1072 #endif /* DEFAULT_REC_RIGHT_GAIN */
1073 #if CONFIG_CODEC == MAS3587F
1074 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1075 LANG_RECORDING_FREQUENCY
, INT(0),
1076 "rec frequency","44,48,32,22,24,16", UNUSED
},
1077 INT_SETTING(F_RECSETTING
, rec_quality
, LANG_RECORDING_QUALITY
, 5,
1078 "rec quality", UNIT_INT
, 0, 7, 1, NULL
, NULL
, NULL
),
1079 OFFON_SETTING(F_RECSETTING
, rec_editable
, LANG_RECORDING_EDITABLE
, false,
1080 "editable recordings", NULL
),
1081 #endif /* CONFIG_CODEC == MAS3587F */
1082 #if CONFIG_CODEC == SWCODEC
1083 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1084 LANG_RECORDING_FREQUENCY
,INT(REC_FREQ_DEFAULT
),
1085 "rec frequency",REC_FREQ_CFG_VAL_LIST
,UNUSED
},
1086 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_format
,
1087 LANG_RECORDING_FORMAT
,INT(REC_FORMAT_DEFAULT
),
1088 "rec format",REC_FORMAT_CFG_VAL_LIST
,UNUSED
},
1089 /** Encoder settings start - keep these together **/
1091 /* (no settings yet) */
1093 {F_T_INT
|F_RECSETTING
, &global_settings
.mp3_enc_config
.bitrate
,-1,
1094 INT(MP3_ENC_BITRATE_CFG_DEFAULT
),
1095 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST
,UNUSED
},
1097 /* (no settings yet) */
1099 /* (no settings yet) */
1100 /** Encoder settings end **/
1101 #endif /* CONFIG_CODEC == SWCODEC */
1102 /* values for the trigger */
1103 INT_SETTING(F_RECSETTING
, rec_start_thres_db
, LANG_RECORD_START_THRESHOLD
, -35,
1104 "trigger start threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, 1, NULL
, NULL
, NULL
),
1105 INT_SETTING(F_RECSETTING
, rec_start_thres_linear
, LANG_RECORD_START_THRESHOLD
, 5,
1106 "trigger start threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1107 INT_SETTING(F_RECSETTING
, rec_stop_thres_db
, LANG_RECORD_STOP_THRESHOLD
, -45,
1108 "trigger stop threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, 1, NULL
, NULL
, NULL
),
1109 INT_SETTING(F_RECSETTING
, rec_stop_thres_linear
, LANG_RECORD_STOP_THRESHOLD
, 10,
1110 "trigger stop threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1111 TABLE_SETTING(F_RECSETTING
, rec_start_duration
, LANG_MIN_DURATION
, 0,
1112 "trigger start duration",
1113 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1114 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1115 0,1,2,5,10,15,20,25,30,60,120,300,600),
1116 TABLE_SETTING(F_RECSETTING
, rec_stop_postrec
, LANG_MIN_DURATION
, 0,
1117 "trigger stop duration",
1118 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1119 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1120 0,1,2,5,10,15,20,25,30,60,120,300,600),
1121 TABLE_SETTING(F_RECSETTING
, rec_stop_gap
, LANG_RECORD_STOP_GAP
, 1,
1123 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1124 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1125 0,1,2,5,10,15,20,25,30,60,120,300,600),
1126 CHOICE_SETTING(F_RECSETTING
, rec_trigger_mode
, LANG_RECORD_TRIGGER
, TRIG_MODE_OFF
,
1127 "trigger mode","off,once,repeat", NULL
,3,
1128 ID2P(LANG_OFF
), ID2P(LANG_RECORD_TRIG_NOREARM
), ID2P(LANG_REPEAT
)),
1129 CHOICE_SETTING(F_RECSETTING
, rec_trigger_type
, LANG_RECORD_TRIGGER_TYPE
, TRIG_TYPE_STOP
,
1130 "trigger type","stop,pause,nf stp", NULL
,3,
1131 ID2P(LANG_RECORD_TRIGGER_STOP
), ID2P(LANG_PAUSE
), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP
)),
1132 #endif /* HAVE_RECORDING */
1134 #ifdef HAVE_SPDIF_POWER
1135 OFFON_SETTING(F_SOUNDSETTING
, spdif_enable
, LANG_SPDIF_ENABLE
, false,
1136 "spdif enable", spdif_power_enable
),
1138 CHOICE_SETTING(0, next_folder
, LANG_NEXT_FOLDER
, FOLDER_ADVANCE_OFF
,
1139 "folder navigation", "off,on,random",NULL
,3,
1140 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1143 #ifdef HAVE_TAGCACHE
1144 OFFON_SETTING(0, runtimedb
, LANG_RUNTIMEDB_ACTIVE
, false,
1145 "gather runtime data", NULL
),
1148 #if CONFIG_CODEC == SWCODEC
1150 CHOICE_SETTING(F_SOUNDSETTING
, replaygain_type
, LANG_REPLAYGAIN_MODE
,
1151 REPLAYGAIN_SHUFFLE
, "replaygain type",
1152 "track,album,track shuffle,off", NULL
, 4, ID2P(LANG_TRACK_GAIN
),
1153 ID2P(LANG_ALBUM_GAIN
), ID2P(LANG_SHUFFLE_GAIN
), ID2P(LANG_OFF
)),
1154 OFFON_SETTING(F_SOUNDSETTING
, replaygain_noclip
, LANG_REPLAYGAIN_NOCLIP
,
1155 false, "replaygain noclip", NULL
),
1156 INT_SETTING_NOWRAP(F_SOUNDSETTING
, replaygain_preamp
,
1157 LANG_REPLAYGAIN_PREAMP
, 0, "replaygain preamp",
1158 UNIT_DB
, -120, 120, 5, db_format
, get_dec_talkid
, NULL
),
1160 CHOICE_SETTING(0, beep
, LANG_BEEP
, 0, "beep", "off,weak,moderate,strong",
1161 NULL
, 4, ID2P(LANG_OFF
), ID2P(LANG_WEAK
),
1162 ID2P(LANG_MODERATE
), ID2P(LANG_STRONG
)),
1164 #ifdef HAVE_CROSSFADE
1166 CHOICE_SETTING(F_SOUNDSETTING
, crossfade
, LANG_CROSSFADE_ENABLE
, 0,
1168 "off,auto track change,man track skip,shuffle,shuffle or man track skip,always",
1169 NULL
, 6, ID2P(LANG_OFF
), ID2P(LANG_AUTOTRACKSKIP
),
1170 ID2P(LANG_MANTRACKSKIP
), ID2P(LANG_SHUFFLE
),
1171 ID2P(LANG_SHUFFLE_TRACKSKIP
), ID2P(LANG_ALWAYS
)),
1172 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_delay
,
1173 LANG_CROSSFADE_FADE_IN_DELAY
, 0,
1174 "crossfade fade in delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
, NULL
),
1175 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_delay
,
1176 LANG_CROSSFADE_FADE_OUT_DELAY
, 0,
1177 "crossfade fade out delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
,NULL
),
1178 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_duration
,
1179 LANG_CROSSFADE_FADE_IN_DURATION
, 2,
1180 "crossfade fade in duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1182 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_duration
,
1183 LANG_CROSSFADE_FADE_OUT_DURATION
, 2,
1184 "crossfade fade out duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1186 CHOICE_SETTING(F_SOUNDSETTING
, crossfade_fade_out_mixmode
,
1187 LANG_CROSSFADE_FADE_OUT_MODE
, 0,
1188 "crossfade fade out mode", "crossfade,mix", NULL
, 2,
1189 ID2P(LANG_CROSSFADE
), ID2P(LANG_MIX
)),
1193 OFFON_SETTING(F_SOUNDSETTING
, crossfeed
, LANG_CROSSFEED
, false,
1194 "crossfeed", dsp_set_crossfeed
),
1195 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_direct_gain
,
1196 LANG_CROSSFEED_DIRECT_GAIN
, -15,
1197 "crossfeed direct gain", UNIT_DB
, -60, 0, 5,
1198 db_format
, get_dec_talkid
,dsp_set_crossfeed_direct_gain
),
1199 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_cross_gain
,
1200 LANG_CROSSFEED_CROSS_GAIN
, -60,
1201 "crossfeed cross gain", UNIT_DB
, -120, -30, 5,
1202 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1203 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_attenuation
,
1204 LANG_CROSSFEED_HF_ATTENUATION
, -160,
1205 "crossfeed hf attenuation", UNIT_DB
, -240, -60, 5,
1206 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1207 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_cutoff
,
1208 LANG_CROSSFEED_HF_CUTOFF
, 700,
1209 "crossfeed hf cutoff", UNIT_HERTZ
, 500, 2000, 100,
1210 NULL
, NULL
, crossfeed_cross_set
),
1213 OFFON_SETTING(F_EQSETTING
, eq_enabled
, LANG_EQUALIZER_ENABLED
, false,
1214 "eq enabled", NULL
),
1215 INT_SETTING_NOWRAP(F_EQSETTING
, eq_precut
, LANG_EQUALIZER_PRECUT
, 0,
1216 "eq precut", UNIT_DB
, 0, 240, 5, eq_precut_format
,
1217 get_precut_talkid
, dsp_set_eq_precut
),
1219 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1220 60, "eq band 0 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1221 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1222 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1223 200, "eq band 1 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1224 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1225 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1226 800, "eq band 2 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1227 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1228 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1229 4000, "eq band 3 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1230 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1231 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1232 12000, "eq band 4 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1233 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1234 /* 0..64 (or 0.0 to 6.4) */
1235 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_q
, LANG_EQUALIZER_BAND_Q
, 7,
1236 "eq band 0 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1237 eq_q_format
, get_dec_talkid
, NULL
),
1238 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_q
, LANG_EQUALIZER_BAND_Q
, 10,
1239 "eq band 1 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1240 eq_q_format
, get_dec_talkid
, NULL
),
1241 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_q
, LANG_EQUALIZER_BAND_Q
, 10,
1242 "eq band 2 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1243 eq_q_format
, get_dec_talkid
, NULL
),
1244 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_q
, LANG_EQUALIZER_BAND_Q
, 10,
1245 "eq band 3 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1246 eq_q_format
, get_dec_talkid
, NULL
),
1247 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_q
, LANG_EQUALIZER_BAND_Q
, 7,
1248 "eq band 4 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1249 eq_q_format
, get_dec_talkid
, NULL
),
1250 /* -240..240 (or -24db to +24db) */
1251 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_gain
, LANG_GAIN
, 0,
1252 "eq band 0 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1253 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1254 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_gain
, LANG_GAIN
, 0,
1255 "eq band 1 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1256 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1257 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_gain
, LANG_GAIN
, 0,
1258 "eq band 2 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1259 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1260 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_gain
, LANG_GAIN
, 0,
1261 "eq band 3 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1262 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1263 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_gain
, LANG_GAIN
, 0,
1264 "eq band 4 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1265 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1268 OFFON_SETTING(F_SOUNDSETTING
, dithering_enabled
, LANG_DITHERING
, false,
1269 "dithering enabled", dsp_dither_enable
),
1272 OFFON_SETTING(F_SOUNDSETTING
, timestretch_enabled
, LANG_TIMESTRETCH
, false,
1273 "timestretch enabled", dsp_timestretch_enable
),
1276 INT_SETTING_NOWRAP(F_SOUNDSETTING
, compressor_threshold
,
1277 LANG_COMPRESSOR_THRESHOLD
, 0,
1278 "compressor threshold", UNIT_DB
, 0, -24,
1279 -3, formatter_unit_0_is_off
, getlang_unit_0_is_off
, compressor_set
),
1280 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_makeup_gain
,
1281 LANG_COMPRESSOR_GAIN
, 1, "compressor makeup gain",
1282 "off,auto", compressor_set
, 2,
1283 ID2P(LANG_OFF
), ID2P(LANG_AUTO
)),
1284 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_ratio
,
1285 LANG_COMPRESSOR_RATIO
, 1, "compressor ratio",
1286 "2:1,4:1,6:1,10:1,limit", compressor_set
, 5,
1287 ID2P(LANG_COMPRESSOR_RATIO_2
), ID2P(LANG_COMPRESSOR_RATIO_4
),
1288 ID2P(LANG_COMPRESSOR_RATIO_6
), ID2P(LANG_COMPRESSOR_RATIO_10
),
1289 ID2P(LANG_COMPRESSOR_RATIO_LIMIT
)),
1290 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_knee
,
1291 LANG_COMPRESSOR_KNEE
, 1, "compressor knee",
1292 "hard knee,soft knee", compressor_set
, 2,
1293 ID2P(LANG_COMPRESSOR_HARD_KNEE
), ID2P(LANG_COMPRESSOR_SOFT_KNEE
)),
1294 INT_SETTING_NOWRAP(F_SOUNDSETTING
, compressor_release_time
,
1295 LANG_COMPRESSOR_RELEASE
, 500,
1296 "compressor release time", UNIT_MS
, 100, 1000,
1297 100, NULL
, NULL
, compressor_set
),
1300 SOUND_SETTING(F_NO_WRAP
, bass_cutoff
, LANG_BASS_CUTOFF
,
1301 "bass cutoff", SOUND_BASS_CUTOFF
),
1302 SOUND_SETTING(F_NO_WRAP
, treble_cutoff
, LANG_TREBLE_CUTOFF
,
1303 "treble cutoff", SOUND_TREBLE_CUTOFF
),
1305 #ifdef HAVE_DIRCACHE
1306 OFFON_SETTING(F_BANFROMQS
,dircache
,LANG_DIRCACHE_ENABLE
,false,"dircache",NULL
),
1307 SYSTEM_SETTING(NVRAM(4),dircache_size
,0),
1310 #ifdef HAVE_TAGCACHE
1311 #ifdef HAVE_TC_RAMCACHE
1312 OFFON_SETTING(F_BANFROMQS
,tagcache_ram
,LANG_TAGCACHE_RAM
,false,"tagcache_ram",NULL
),
1314 OFFON_SETTING(F_BANFROMQS
, tagcache_autoupdate
, LANG_TAGCACHE_AUTOUPDATE
, false,
1315 "tagcache_autoupdate", NULL
),
1317 CHOICE_SETTING(0, default_codepage
, LANG_DEFAULT_CODEPAGE
, 0,
1319 #ifdef HAVE_LCD_BITMAP
1320 /* The order must match with that in unicode.c */
1321 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1322 "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8",
1324 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1325 ID2P(LANG_CODEPAGE_HEBREW
), ID2P(LANG_CODEPAGE_CYRILLIC
),
1326 ID2P(LANG_CODEPAGE_THAI
), ID2P(LANG_CODEPAGE_ARABIC
),
1327 ID2P(LANG_CODEPAGE_TURKISH
),
1328 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1329 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1330 ID2P(LANG_CODEPAGE_JAPANESE
),
1331 ID2P(LANG_CODEPAGE_SIMPLIFIED
), ID2P(LANG_CODEPAGE_KOREAN
),
1332 ID2P(LANG_CODEPAGE_TRADITIONAL
), ID2P(LANG_CODEPAGE_UTF8
)),
1333 #else /* !HAVE_LCD_BITMAP */
1334 /* The order must match with that in unicode.c */
1335 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,utf-8",
1337 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1338 ID2P(LANG_CODEPAGE_CYRILLIC
), ID2P(LANG_CODEPAGE_TURKISH
),
1339 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1340 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1341 ID2P(LANG_CODEPAGE_UTF8
)),
1343 OFFON_SETTING(0, warnon_erase_dynplaylist
, LANG_WARN_ERASEDYNPLAYLIST_MENU
,
1344 true, "warn when erasing dynamic playlist",NULL
),
1346 #ifdef HAVE_BACKLIGHT
1347 #ifdef HAS_BUTTON_HOLD
1348 CHOICE_SETTING(0, backlight_on_button_hold
, LANG_BACKLIGHT_ON_BUTTON_HOLD
,
1349 1, "backlight on button hold", "normal,off,on",
1350 backlight_set_on_button_hold
, 3,
1351 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1354 #ifdef HAVE_LCD_SLEEP_SETTING
1355 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off
,
1356 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF
, 3,
1357 "lcd sleep after backlight off",
1358 "always,never,5,10,15,20,30,45,60,90",
1359 lcd_set_sleep_after_backlight_off
, 10,
1360 LANG_ALWAYS
, LANG_NEVER
, TALK_ID(5, UNIT_SEC
),
1361 TALK_ID(10, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
1362 TALK_ID(20, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1363 TALK_ID(45, UNIT_SEC
),TALK_ID(60, UNIT_SEC
),
1364 TALK_ID(90, UNIT_SEC
)),
1365 #endif /* HAVE_LCD_SLEEP_SETTING */
1366 #endif /* HAVE_BACKLIGHT */
1368 OFFON_SETTING(0, hold_lr_for_scroll_in_list
, -1, true,
1369 "hold_lr_for_scroll_in_list",NULL
),
1370 #ifdef HAVE_LCD_BITMAP
1371 CHOICE_SETTING(0, show_path_in_browser
, LANG_SHOW_PATH
, SHOW_PATH_CURRENT
,
1372 "show path in browser", "off,current directory,full path",
1373 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_SHOW_PATH_CURRENT
),
1374 ID2P(LANG_DISPLAY_FULL_PATH
)),
1378 {F_T_INT
,&global_settings
.rec_agc_preset_mic
,LANG_RECORDING_AGC_PRESET
,
1379 INT(1),"agc mic preset",NULL
,UNUSED
},
1380 {F_T_INT
,&global_settings
.rec_agc_preset_line
,LANG_RECORDING_AGC_PRESET
,
1381 INT(1),"agc line preset",NULL
,UNUSED
},
1382 {F_T_INT
,&global_settings
.rec_agc_maxgain_mic
,-1,INT(104),
1383 "agc maximum mic gain",NULL
,UNUSED
},
1384 {F_T_INT
,&global_settings
.rec_agc_maxgain_line
,-1,INT(96),
1385 "agc maximum line gain",NULL
,UNUSED
},
1386 {F_T_INT
,&global_settings
.rec_agc_cliptime
,LANG_RECORDING_AGC_CLIPTIME
,
1387 INT(1),"agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED
},
1390 #ifdef HAVE_REMOTE_LCD
1391 #ifdef HAS_REMOTE_BUTTON_HOLD
1392 CHOICE_SETTING(0, remote_backlight_on_button_hold
,
1393 LANG_BACKLIGHT_ON_BUTTON_HOLD
, 0,
1394 "remote backlight on button hold",
1395 "normal,off,on", remote_backlight_set_on_button_hold
, 3,
1396 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1399 #ifdef HAVE_HEADPHONE_DETECTION
1400 CHOICE_SETTING(0, unplug_mode
, LANG_HEADPHONE_UNPLUG
, 0,
1401 "pause on headphone unplug", "off,pause,pause and resume",
1402 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_PAUSE
),
1403 ID2P(LANG_HEADPHONE_UNPLUG_RESUME
)),
1404 INT_SETTING(0, unplug_rw
, LANG_HEADPHONE_UNPLUG_RW
, 0,
1405 "rewind duration on pause", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1407 OFFON_SETTING(0, unplug_autoresume
,
1408 LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME
, false,
1409 "disable autoresume if phones not present",NULL
),
1412 CHOICE_SETTING(0, fm_region
, LANG_FM_REGION
, 0,
1413 "fm_region", "eu,us,jp,kr,it,wo", set_radio_region
, 6,
1414 ID2P(LANG_FM_EUROPE
), ID2P(LANG_FM_US
),
1415 ID2P(LANG_FM_JAPAN
), ID2P(LANG_FM_KOREA
),
1416 ID2P(LANG_FM_ITALY
), ID2P(LANG_FM_OTHER
)),
1419 OFFON_SETTING(F_BANFROMQS
, audioscrobbler
, LANG_AUDIOSCROBBLER
, false,
1420 "Last.fm Logging", NULL
),
1422 TEXT_SETTING(0, fmr_file
, "fmr", "",
1423 FMPRESET_PATH
"/", ".fmr"),
1425 #ifdef HAVE_LCD_BITMAP
1426 TEXT_SETTING(F_THEMESETTING
, font_file
, "font",
1427 DEFAULT_FONTNAME
, FONT_DIR
"/", ".fnt"),
1429 TEXT_SETTING(F_THEMESETTING
,wps_file
, "wps",
1430 DEFAULT_WPSNAME
, WPS_DIR
"/", ".wps"),
1431 #ifdef HAVE_LCD_BITMAP
1432 TEXT_SETTING(F_THEMESETTING
,sbs_file
, "sbs",
1433 DEFAULT_SBS_NAME
, SBS_DIR
"/", ".sbs"),
1435 #ifdef HAVE_REMOTE_LCD
1436 TEXT_SETTING(F_THEMESETTING
,rwps_file
,"rwps",
1437 DEFAULT_SBS_NAME
, WPS_DIR
"/", ".rwps"),
1438 TEXT_SETTING(F_THEMESETTING
,rsbs_file
, "rsbs",
1439 DEFAULT_WPSNAME
, SBS_DIR
"/", ".rsbs"),
1441 TEXT_SETTING(0,lang_file
,"lang","",LANG_DIR
"/",".lng"),
1443 TEXT_SETTING(F_THEMESETTING
,backdrop_file
,"backdrop",
1444 DEFAULT_BACKDROP
, BACKDROP_DIR
"/", ".bmp"),
1446 #ifdef HAVE_LCD_BITMAP
1447 TEXT_SETTING(0,kbd_file
,"kbd","",ROCKBOX_DIR
"/",".kbd"),
1449 #ifdef HAVE_USB_CHARGING_ENABLE
1450 OFFON_SETTING(0,usb_charging
,LANG_USB_CHARGING
,false,"usb charging",NULL
),
1452 OFFON_SETTING(F_BANFROMQS
,cuesheet
,LANG_CUESHEET_ENABLE
,false,"cuesheet support",
1454 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, skip_length
,
1455 LANG_SKIP_LENGTH
, 0, "skip length",
1456 "outro,track,1s,2s,3s,5s,7s,10s,15s,20s,30s,45s,1min,90s,2min,3min,5min,10min,15min",
1457 UNIT_SEC
, formatter_unit_0_is_skip_track
,
1458 getlang_unit_0_is_skip_track
, NULL
,
1459 19, -1,0,1,2,3,5,7,10,15,20,30,45,60,90,120,180,300,600,900),
1460 CHOICE_SETTING(0, start_in_screen
, LANG_START_SCREEN
, 1,
1461 "start in screen", "previous,root,files,"
1462 #ifdef HAVE_TAGCACHE
1466 #ifdef HAVE_RECORDING
1473 #if defined(HAVE_TAGCACHE)
1474 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1476 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1482 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1484 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1490 ID2P(LANG_PREVIOUS_SCREEN
), ID2P(LANG_MAIN_MENU
),
1491 ID2P(LANG_DIR_BROWSER
),
1492 #ifdef HAVE_TAGCACHE
1493 ID2P(LANG_TAGCACHE
),
1495 ID2P(LANG_RESUME_PLAYBACK
), ID2P(LANG_SETTINGS
),
1496 #ifdef HAVE_RECORDING
1497 ID2P(LANG_RECORDING
),
1500 ID2P(LANG_FM_RADIO
),
1502 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
)
1504 SYSTEM_SETTING(NVRAM(1),last_screen
,-1),
1505 #if defined(HAVE_RTC_ALARM) && \
1506 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1507 {F_T_INT
, &global_settings
.alarm_wake_up_screen
, LANG_ALARM_WAKEUP_SCREEN
,
1508 INT(ALARM_START_WPS
), "alarm wakeup screen", ALARM_SETTING_TEXT
,UNUSED
},
1509 #endif /* HAVE_RTC_ALARM */
1511 /* Customizable icons */
1512 #ifdef HAVE_LCD_BITMAP
1513 TEXT_SETTING(F_THEMESETTING
, icon_file
, "iconset", DEFAULT_ICONSET
,
1514 ICON_DIR
"/", ".bmp"),
1515 TEXT_SETTING(F_THEMESETTING
, viewers_icon_file
, "viewers iconset",
1516 DEFAULT_VIEWERS_ICONSET
,
1517 ICON_DIR
"/", ".bmp"),
1519 #ifdef HAVE_REMOTE_LCD
1520 TEXT_SETTING(F_THEMESETTING
, remote_icon_file
, "remote iconset", "",
1521 ICON_DIR
"/", ".bmp"),
1522 TEXT_SETTING(F_THEMESETTING
, remote_viewers_icon_file
,
1523 "remote viewers iconset", "",
1524 ICON_DIR
"/", ".bmp"),
1525 #endif /* HAVE_REMOTE_LCD */
1526 #ifdef HAVE_LCD_COLOR
1527 TEXT_SETTING(F_THEMESETTING
, colors_file
, "filetype colours", "-",
1528 THEME_DIR
"/", ".colours"),
1530 #ifdef HAVE_BUTTON_LIGHT
1531 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, buttonlight_timeout
,
1532 LANG_BUTTONLIGHT_TIMEOUT
, 5, "button light timeout", off_on
,
1533 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
1534 buttonlight_set_timeout
, 20,
1535 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
1537 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1538 INT_SETTING(F_NO_WRAP
, buttonlight_brightness
, LANG_BUTTONLIGHT_BRIGHTNESS
,
1539 DEFAULT_BRIGHTNESS_SETTING
,
1540 "button light brightness",UNIT_INT
, MIN_BRIGHTNESS_SETTING
,
1541 MAX_BRIGHTNESS_SETTING
, 1, NULL
, NULL
,
1542 buttonlight_set_brightness
),
1544 #ifndef HAVE_WHEEL_ACCELERATION
1545 INT_SETTING(0, list_accel_start_delay
, LANG_LISTACCEL_START_DELAY
,
1546 2, "list_accel_start_delay", UNIT_MS
, 0, 10, 1,
1547 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1548 INT_SETTING(0, list_accel_wait
, LANG_LISTACCEL_ACCEL_SPEED
,
1549 3, "list_accel_wait", UNIT_SEC
, 1, 10, 1,
1550 scanaccel_formatter
, getlang_unit_0_is_off
, NULL
),
1551 #endif /* HAVE_WHEEL_ACCELERATION */
1552 #if CONFIG_CODEC == SWCODEC
1554 CHOICE_SETTING(0, keyclick
, LANG_KEYCLICK
, 0,
1555 "keyclick", "off,weak,moderate,strong", NULL
, 4,
1556 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
),
1558 OFFON_SETTING(0, keyclick_repeats
, LANG_KEYCLICK_REPEATS
, false,
1559 "keyclick repeats", NULL
),
1560 #endif /* CONFIG_CODEC == SWCODEC */
1561 TEXT_SETTING(0, playlist_catalog_dir
, "playlist catalog directory",
1562 PLAYLIST_CATALOG_DEFAULT_DIR
, NULL
, NULL
),
1563 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
1564 CHOICE_SETTING(0, touchpad_sensitivity
, LANG_TOUCHPAD_SENSITIVITY
, 0,
1565 "touchpad sensitivity", "normal,high", touchpad_set_sensitivity
, 2,
1566 ID2P(LANG_NORMAL
), ID2P(LANG_HIGH
)),
1568 #ifdef HAVE_QUICKSCREEN
1569 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_TOP
], LANG_TOP_QS_ITEM
,
1570 &global_settings
.dirfilter
, "qs top",
1571 qs_load_from_cfg
, qs_write_to_cfg
,
1572 qs_is_changed
, qs_set_default
),
1573 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_LEFT
], LANG_LEFT_QS_ITEM
,
1574 &global_settings
.playlist_shuffle
, "qs left",
1575 qs_load_from_cfg
, qs_write_to_cfg
,
1576 qs_is_changed
, qs_set_default
),
1577 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_RIGHT
], LANG_RIGHT_QS_ITEM
,
1578 &global_settings
.repeat_mode
, "qs right",
1579 qs_load_from_cfg
, qs_write_to_cfg
,
1580 qs_is_changed
, qs_set_default
),
1581 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_BOTTOM
], LANG_BOTTOM_QS_ITEM
,
1582 &global_settings
.dirfilter
, "qs bottom",
1583 qs_load_from_cfg
, qs_write_to_cfg
,
1584 qs_is_changed
, qs_set_default
),
1587 OFFON_SETTING(0, speaker_enabled
, LANG_ENABLE_SPEAKER
, false, "speaker",
1588 audiohw_enable_speaker
),
1590 #ifdef HAVE_TOUCHSCREEN
1591 CHOICE_SETTING(0, touch_mode
, LANG_TOUCHSCREEN_MODE
, TOUCHSCREEN_BUTTON
,
1592 "touchscreen mode", "point,grid", NULL
, 2,
1593 ID2P(LANG_TOUCHSCREEN_POINT
), ID2P(LANG_TOUCHSCREEN_GRID
)),
1594 CUSTOM_SETTING(0, ts_calibration_data
, -1,
1595 &default_calibration_parameters
, "touchscreen calibration",
1596 tsc_load_from_cfg
, tsc_write_to_cfg
,
1597 tsc_is_changed
, tsc_set_default
),
1599 OFFON_SETTING(0, prevent_skip
, LANG_PREVENT_SKIPPING
, false, "prevent track skip", NULL
),
1601 #ifdef HAVE_PITCHSCREEN
1602 OFFON_SETTING(0, pitch_mode_semitone
, LANG_SEMITONE
, false,
1603 "Semitone pitch change", NULL
),
1604 #if CONFIG_CODEC == SWCODEC
1605 OFFON_SETTING(0, pitch_mode_timestretch
, LANG_TIMESTRETCH
, false,
1606 "Timestretch mode", NULL
),
1610 #ifdef USB_ENABLE_HID
1611 OFFON_SETTING(0, usb_hid
, LANG_USB_HID
, true, "usb hid", usb_set_hid
),
1612 CHOICE_SETTING(0, usb_keypad_mode
, LANG_USB_KEYPAD_MODE
, 0,
1613 "usb keypad mode", "multimedia,presentation,browser"
1614 #ifdef HAVE_USB_HID_MOUSE
1618 #ifdef HAVE_USB_HID_MOUSE
1623 ID2P(LANG_MULTIMEDIA_MODE
), ID2P(LANG_PRESENTATION_MODE
),
1624 ID2P(LANG_BROWSER_MODE
)
1625 #ifdef HAVE_USB_HID_MOUSE
1626 , ID2P(LANG_MOUSE_MODE
)
1628 ), /* CHOICE_SETTING( usb_keypad_mode ) */
1631 /* Customizable list */
1632 #ifdef HAVE_LCD_BITMAP
1633 VIEWPORT_SETTING(ui_vp_config
, "ui viewport"),
1634 #ifdef HAVE_REMOTE_LCD
1635 VIEWPORT_SETTING(remote_ui_vp_config
, "remote ui viewport"),
1639 #ifdef HAVE_MORSE_INPUT
1640 OFFON_SETTING(0, morse_input
, LANG_MORSE_INPUT
, false, "morse input", NULL
),
1644 const int nb_settings
= sizeof(settings
)/sizeof(*settings
);
1646 const struct settings_list
* get_settings_list(int*count
)
1648 *count
= nb_settings
;