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 ****************************************************************************/
24 #include "string-extra.h"
31 #include "backlight.h"
34 #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() */
63 #define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT)
64 /** NOTE: NVRAM_CONFIG_VERSION is in settings_list.h
65 and you may need to update it if you edit this file */
67 #define UNUSED {.RESERVED=NULL}
68 #define INT(a) {.int_ = a}
69 #define UINT(a) {.uint_ = a}
70 #define BOOL(a) {.bool_ = a}
71 #define CHARPTR(a) {.charptr = a}
72 #define UCHARPTR(a) {.ucharptr = a}
73 #define FUNCTYPE(a) {.func = a}
74 #define NODEFAULT INT(0)
76 /* in all the following macros the args are:
77 - flags: bitwise | or the F_ bits in settings_list.h
78 - var: pointer to the variable being changed (usually in global_settings)
79 - lang_id: LANG_* id to display in menus and setting screens for the setting
80 - default: the default value for the variable, set if settings are reset
81 - name: the name of the setting in config files
82 - cfg_vals: comma separated list of legal values to write to cfg files.
83 The values correspond to the values 0,1,2,etc. of the setting.
84 NULL if just the number itself should be written to the file.
85 No spaces between the values and the commas!
86 - cb: the callback used by the setting screen.
89 /* Use for int settings which use the set_sound() function to set them */
90 #define SOUND_SETTING(flags,var,lang_id,name,setting) \
91 {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \
92 lang_id, NODEFAULT,name,NULL, \
93 {.sound_setting=(struct sound_setting[]){{setting}}} }
95 /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO
96 or dont save as "off" or "on" in the cfg.
97 cfgvals are comma separated values (without spaces after the comma!) to write
98 for 'false' and 'true' (in this order)
99 yes_id is the lang_id for the 'yes' (or 'on') option in the menu
100 no_id is the lang_id for the 'no' (or 'off') option in the menu
102 #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes_id,no_id,cb)\
103 {flags|F_BOOL_SETTING, &global_settings.var, \
104 lang_id, BOOL(default),name,cfgvals, \
105 {.bool_setting=(struct bool_setting[]){{cb,yes_id,no_id}}} }
107 /* bool setting which does use LANG_YES and _NO and save as "off,on" */
108 #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
109 BOOL_SETTING(flags,var,lang_id,default,name,off_on, \
110 LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb)
112 /* int variable which is NOT saved to .cfg files,
113 (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */
114 #define SYSTEM_SETTING(flags,var,default) \
115 {flags|F_T_INT, &global_status.var,-1, INT(default), \
118 /* setting which stores as a filename (or another string) in the .cfgvals
119 The string must be a char array (which all of our string settings are),
120 not just a char pointer.
121 prefix: The absolute path to not save in the variable, ex /.rockbox/wps_file
122 suffix: The file extention (usually...) e.g .wps_file
123 If the prefix is set (not NULL), then the suffix must be set as well.
125 #define TEXT_SETTING(flags,var,name,default,prefix,suffix) \
126 {flags|F_T_UCHARPTR, &global_settings.var,-1, \
127 CHARPTR(default),name,NULL, \
128 {.filename_setting= \
129 (struct filename_setting[]){ \
130 {prefix,suffix,sizeof(global_settings.var)}}} }
132 /* Used for settings which use the set_option() setting screen.
133 The ... arg is a list of pointers to strings to display in the setting
134 screen. These can either be literal strings, or ID2P(LANG_*) */
135 #define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \
136 {flags|F_CHOICE_SETTING|F_T_INT, &global_settings.var, lang_id, \
137 INT(default), name, cfg_vals, \
138 {.choice_setting = (struct choice_setting[]){ \
139 {cb, count, {.desc = (const unsigned char*[]) \
142 /* Similar to above, except the strings to display are taken from cfg_vals,
143 the ... arg is a list of ID's to talk for the strings, can use TALK_ID()'s */
144 #define STRINGCHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals, \
146 {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS, \
147 &global_settings.var, lang_id, \
148 INT(default), name, cfg_vals, \
149 {.choice_setting = (struct choice_setting[]){ \
150 {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}}
152 /* for settings which use the set_int() setting screen.
153 unit is the UNIT_ define to display/talk.
154 the first one saves a string to the config file,
155 the second one saves the variable value to the config file */
156 #define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \
157 unit, min, max, step, formatter, get_talk_id, cb) \
158 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
159 lang_id, INT(default), name, cfg_vals, \
160 {.int_setting = (struct int_setting[]){ \
161 {cb, unit, min, max, step, formatter, get_talk_id}}}}
162 #define INT_SETTING(flags, var, lang_id, default, name, \
163 unit, min, max, step, formatter, get_talk_id, cb) \
164 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
165 lang_id, INT(default), name, NULL, \
166 {.int_setting = (struct int_setting[]){ \
167 {cb, unit, min, max, step, formatter, get_talk_id}}}}
168 #define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \
169 unit, min, max, step, formatter, get_talk_id, cb) \
170 {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \
171 lang_id, INT(default), name, NULL, \
172 {.int_setting = (struct int_setting[]){ \
173 {cb, unit, min, max, step, formatter, get_talk_id}}}}
175 #define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
176 unit, formatter, get_talk_id, cb, count, ...) \
177 {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \
178 lang_id, INT(default), name, cfg_vals, \
179 {.table_setting = (struct table_setting[]) { \
180 {cb, formatter, get_talk_id, unit, count, \
181 (const int[]){__VA_ARGS__}}}}}
183 #define CUSTOM_SETTING(flags, var, lang_id, default, name, \
184 load_from_cfg, write_to_cfg, \
185 is_change, set_default) \
186 {flags|F_CUSTOM_SETTING|F_T_CUSTOM|F_BANFROMQS, \
187 &global_settings.var, lang_id, \
188 {.custom = (void*)default}, name, NULL, \
189 {.custom_setting = (struct custom_setting[]){ \
190 {load_from_cfg, write_to_cfg, is_change, set_default}}}}
192 #define VIEWPORT_SETTING(var,name) \
193 TEXT_SETTING(F_THEMESETTING,var,name,"-", NULL, NULL)
195 /* some sets of values which are used more than once, to save memory */
196 static const char off_on
[] = "off,on";
197 static const char off_on_ask
[] = "off,on,ask";
198 static const char off_number_spell
[] = "off,number,spell";
199 #ifdef HAVE_LCD_BITMAP
200 static const char graphic_numeric
[] = "graphic,numeric";
203 /* Default theme settings */
204 #define DEFAULT_WPSNAME "cabbiev2"
205 #define DEFAULT_SBSNAME "-"
206 #define DEFAULT_FMS_NAME "-"
208 #ifdef HAVE_LCD_BITMAP
211 #define DEFAULT_FONT_HEIGHT 8
212 #define DEFAULT_FONTNAME "08-Rockfont"
213 #elif LCD_HEIGHT <= 80
214 #define DEFAULT_FONT_HEIGHT 11
215 #define DEFAULT_FONTNAME "11-Sazanami-Mincho"
216 #elif LCD_HEIGHT <= 220
217 #define DEFAULT_FONT_HEIGHT 12
218 #elif LCD_HEIGHT <= 320
219 #define DEFAULT_FONT_HEIGHT 15
220 #elif LCD_HEIGHT <= 400
221 #define DEFAULT_FONT_HEIGHT 16
222 #elif LCD_HEIGHT <= 480 && LCD_WIDTH < 800
223 #define DEFAULT_FONT_HEIGHT 27
225 #define DEFAULT_FONT_HEIGHT 35
227 #define DEFAULT_GLYPHS 250
228 #define MIN_GLYPHS 50
229 #define MAX_GLYPHS 65540
232 #define DEFAULT_FONT_HEIGHT 12
235 #ifndef DEFAULT_FONTNAME
236 /* ugly expansion needed */
237 #define _EXPAND2(x) #x
238 #define _EXPAND(x) _EXPAND2(x)
239 #define DEFAULT_FONTNAME _EXPAND(DEFAULT_FONT_HEIGHT) "-Adobe-Helvetica"
242 #ifdef HAVE_LCD_COLOR
243 #if DEFAULT_FONT_HEIGHT >= 31
244 #define DEFAULT_ICONSET "tango_icons.32x32"
245 #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.32x32"
246 #elif DEFAULT_FONT_HEIGHT >= 23
247 #define DEFAULT_ICONSET "tango_icons.24x24"
248 #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.24x24"
249 #elif DEFAULT_FONT_HEIGHT >= 15
250 #define DEFAULT_ICONSET "tango_icons.16x16"
251 #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.16x16"
253 #define DEFAULT_ICONSET "tango_icons.12x12"
254 #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.12x12"
256 #elif LCD_DEPTH > 1 /* greyscale */
257 #define DEFAULT_ICONSET "tango_small_mono"
258 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
259 #else /* monochrome */
260 #define DEFAULT_ICONSET ""
261 #define DEFAULT_VIEWERS_ICONSET ""
264 #ifdef HAVE_REMOTE_LCD
265 #if LCD_REMOTE_HEIGHT <= 64
266 #define DEFAULT_REMOTE_FONTNAME "08-Rockfont"
268 #define DEFAULT_REMOTE_FONTNAME "-"
270 #endif /* HAVE_REMOTE_LCD */
272 #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
273 #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
274 #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
275 #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
276 #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
278 #define DEFAULT_BACKDROP BACKDROP_DIR "/cabbiev2.bmp"
280 #ifdef HAVE_RECORDING
281 /* these should be in the config.h files */
282 #if CONFIG_CODEC == MAS3587F
283 # define DEFAULT_REC_MIC_GAIN 8
284 # define DEFAULT_REC_LEFT_GAIN 2
285 # define DEFAULT_REC_RIGHT_GAIN 2
286 #elif CONFIG_CODEC == SWCODEC
288 # define DEFAULT_REC_MIC_GAIN 16
289 # define DEFAULT_REC_LEFT_GAIN 0
290 # define DEFAULT_REC_RIGHT_GAIN 0
291 # elif defined(HAVE_TLV320)
292 # define DEFAULT_REC_MIC_GAIN 0
293 # define DEFAULT_REC_LEFT_GAIN 0
294 # define DEFAULT_REC_RIGHT_GAIN 0
295 # elif defined(HAVE_WM8975)
296 # define DEFAULT_REC_MIC_GAIN 16
297 # define DEFAULT_REC_LEFT_GAIN 0
298 # define DEFAULT_REC_RIGHT_GAIN 0
299 # elif defined(HAVE_WM8758)
300 # define DEFAULT_REC_MIC_GAIN 16
301 # define DEFAULT_REC_LEFT_GAIN 0
302 # define DEFAULT_REC_RIGHT_GAIN 0
303 # elif defined(HAVE_WM8731)
304 # define DEFAULT_REC_MIC_GAIN 16
305 # define DEFAULT_REC_LEFT_GAIN 0
306 # define DEFAULT_REC_RIGHT_GAIN 0
310 #endif /* HAVE_RECORDING */
312 #ifdef HAVE_TOUCHSCREEN
314 static const char* list_pad_formatter(char *buffer
, size_t buffer_size
,
315 int val
, const char *unit
)
319 case -1: return str(LANG_AUTOMATIC
);
320 case 0: return str(LANG_OFF
);
323 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
327 static int32_t list_pad_getlang(int value
, int unit
)
331 case -1: return LANG_AUTOMATIC
;
332 case 0: return LANG_OFF
;
333 default: return TALK_ID(value
, unit
);
337 #endif /* HAVE_TOUCHSCREEN */
338 static const char* formatter_unit_0_is_off(char *buffer
, size_t buffer_size
,
339 int val
, const char *unit
)
342 return str(LANG_OFF
);
344 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
348 static int32_t getlang_unit_0_is_off(int value
, int unit
)
353 return TALK_ID(value
,unit
);
356 static const char* formatter_unit_0_is_skip_track(char *buffer
, size_t buffer_size
,
357 int val
, const char *unit
)
361 return str(LANG_SKIP_OUTRO
);
363 return str(LANG_SKIP_TRACK
);
364 else if (val
% 60 == 0)
365 snprintf(buffer
, buffer_size
, "%d min", val
/60);
367 snprintf(buffer
, buffer_size
, "%d s", val
);
371 static int32_t getlang_unit_0_is_skip_track(int value
, int unit
)
375 return LANG_SKIP_OUTRO
;
377 return LANG_SKIP_TRACK
;
378 else if (value
% 60 == 0)
379 return TALK_ID(value
/60, UNIT_MIN
);
381 return TALK_ID(value
, UNIT_SEC
);
384 #ifdef HAVE_BACKLIGHT
386 #define DEFAULT_BACKLIGHT_TIMEOUT 0
388 #define DEFAULT_BACKLIGHT_TIMEOUT 15
390 static const char* backlight_formatter(char *buffer
, size_t buffer_size
,
391 int val
, const char *unit
)
394 return str(LANG_OFF
);
398 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
401 static int32_t backlight_getlang(int value
, int unit
)
408 return TALK_ID(value
, unit
);
412 #ifndef HAVE_WHEEL_ACCELERATION
413 static const char* scanaccel_formatter(char *buffer
, size_t buffer_size
,
414 int val
, const char *unit
)
418 return str(LANG_OFF
);
420 snprintf(buffer
, buffer_size
, "Speed up every %ds", val
);
425 #if CONFIG_CODEC == SWCODEC
426 static void crossfeed_cross_set(int val
)
429 dsp_set_crossfeed_cross_params(global_settings
.crossfeed_cross_gain
,
430 global_settings
.crossfeed_hf_attenuation
,
431 global_settings
.crossfeed_hf_cutoff
);
434 static void compressor_set(int val
)
437 dsp_set_compressor();
440 static const char* db_format(char* buffer
, size_t buffer_size
, int value
,
445 snprintf(buffer
, buffer_size
, "%s%d.%d %s", value
< 0 ? "-" : "",
446 v
/ 10, v
% 10, unit
);
450 static int32_t get_dec_talkid(int value
, int unit
)
452 return TALK_ID_DECIMAL(value
, 1, unit
);
455 static int32_t get_precut_talkid(int value
, int unit
)
457 return TALK_ID_DECIMAL(-value
, 1, unit
);
461 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
462 static void set_mdb_enable(bool value
)
464 sound_set_mdb_enable((int)value
);
466 static void set_superbass(bool value
)
468 sound_set_superbass((int)value
);
472 #ifdef HAVE_QUICKSCREEN
473 static int find_setting_by_name(char*name
)
476 const struct settings_list
*setting
;
477 if (!strcmp(name
, "-"))
479 while (i
<nb_settings
)
481 setting
= &settings
[i
];
482 if (setting
->cfg_name
&& !strcmp(setting
->cfg_name
, name
))
490 static void qs_load_from_cfg(void* var
, char*value
)
492 *(int*)var
= find_setting_by_name(value
);
494 static char* qs_write_to_cfg(void* setting
, char*buf
, int buf_len
)
496 int index
= *(int*)setting
;
497 if (index
< 0 || index
>= nb_settings
- 1)
499 strlcpy(buf
, "-", buf_len
);
502 const struct settings_list
*var
= &settings
[index
];
503 strlcpy(buf
, var
->cfg_name
, buf_len
);
506 static bool qs_is_changed(void* setting
, void* defaultval
)
508 int i
= *(int*)setting
;
509 if (i
< 0 || i
>= nb_settings
)
511 const struct settings_list
*var
= &settings
[i
];
512 return var
!= find_setting(defaultval
, NULL
);
514 static void qs_set_default(void* setting
, void* defaultval
)
516 if (defaultval
== NULL
)
518 find_setting(defaultval
, (int*)setting
);
521 #ifdef HAVE_TOUCHSCREEN
523 #if defined(APPLICATION) \
524 || defined(ONDA_VX747) \
525 || defined(ONDA_VX767) \
526 || defined(ONDA_VX747P) \
527 || defined(ONDA_VX777)
529 #define DEFAULT_TOUCHSCREEN_MODE TOUCHSCREEN_POINT
531 #define DEFAULT_TOUCHSCREEN_MODE TOUCHSCREEN_BUTTON
534 static void tsc_load_from_cfg(void* setting
, char*value
)
536 struct touchscreen_parameter
*var
= (struct touchscreen_parameter
*) setting
;
538 /* Replacement for sscanf(value, "%d ..., &var->A, ...); */
539 int vals
[7], count
= 0;
540 while(*value
!= 0 && count
< 7)
546 vals
[count
++] = atoi(value
);
547 while(!isspace(*value
))
557 var
->divider
= vals
[6];
560 static char* tsc_write_to_cfg(void* setting
, char*buf
, int buf_len
)
562 const struct touchscreen_parameter
*var
= (const struct touchscreen_parameter
*) setting
;
563 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
);
566 static bool tsc_is_changed(void* setting
, void* defaultval
)
568 return memcmp(setting
, defaultval
, sizeof(struct touchscreen_parameter
)) != 0;
570 static void tsc_set_default(void* setting
, void* defaultval
)
572 memcpy(setting
, defaultval
, sizeof(struct touchscreen_parameter
));
575 static const char* sleeptimer_formatter(char* buffer
, size_t buffer_size
,
576 int value
, const char* unit
)
579 snprintf(buffer
, buffer_size
, "%d:%02d", value
/ 60, value
% 60);
583 static const char* hotkey_formatter(char* buffer
, size_t buffer_size
, int value
,
589 return str(get_hotkey_lang_id(value
));
591 static int32_t hotkey_getlang(int value
, int unit
)
594 return get_hotkey_lang_id(value
);
596 #endif /* HAVE_HOTKEY */
597 const struct settings_list settings
[] = {
599 SOUND_SETTING(F_NO_WRAP
,volume
, LANG_VOLUME
, "volume", SOUND_VOLUME
),
600 SOUND_SETTING(0, balance
, LANG_BALANCE
, "balance", SOUND_BALANCE
),
602 #ifdef AUDIOHW_HAVE_BASS
603 SOUND_SETTING(F_NO_WRAP
,bass
, LANG_BASS
, "bass", SOUND_BASS
),
605 #ifdef AUDIOHW_HAVE_TREBLE
606 SOUND_SETTING(F_NO_WRAP
,treble
, LANG_TREBLE
, "treble", SOUND_TREBLE
),
608 /* Hardware EQ tone controls */
609 #ifdef AUDIOHW_HAVE_EQ
610 /* Band gain is generic */
611 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND1
].gain
,
612 LANG_HW_EQ_GAIN
, "tone band1 gain", SOUND_EQ_BAND1_GAIN
),
613 #ifdef AUDIOHW_HAVE_EQ_BAND2
614 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND2
].gain
,
615 LANG_HW_EQ_GAIN
, "tone band2 gain", SOUND_EQ_BAND2_GAIN
),
616 #endif /* AUDIOHW_HAVE_EQ_BAND2 */
617 #ifdef AUDIOHW_HAVE_EQ_BAND3
618 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND3
].gain
,
619 LANG_HW_EQ_GAIN
, "tone band3 gain", SOUND_EQ_BAND3_GAIN
),
620 #endif /* AUDIOHW_HAVE_EQ_BAND3 */
621 #ifdef AUDIOHW_HAVE_EQ_BAND4
622 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND4
].gain
,
623 LANG_HW_EQ_GAIN
, "tone band4 gain", SOUND_EQ_BAND4_GAIN
),
624 #endif /* AUDIOHW_HAVE_EQ_BAND4 */
625 #ifdef AUDIOHW_HAVE_EQ_BAND5
626 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND5
].gain
,
627 LANG_HW_EQ_GAIN
, "tone band5 gain", SOUND_EQ_BAND5_GAIN
),
628 #endif /* AUDIOHW_HAVE_EQ_BAND5 */
630 /* Frequencies vary with samplerate but at least the user has an idea
631 * about the bands and it will be correct with normal playback rates. */
633 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
634 hw_eq_bands
[AUDIOHW_EQ_BAND1
].frequency
,
635 LANG_HW_EQ_FREQUENCY
, 0,"tone band1 frequency",
636 "80 Hz,105 Hz,135 Hz,175 Hz",
637 sound_set_hw_eq_band1_frequency
, 4,
638 TALK_ID(80, UNIT_HERTZ
), TALK_ID(105, UNIT_HERTZ
),
639 TALK_ID(135, UNIT_HERTZ
), TALK_ID(175, UNIT_HERTZ
)),
641 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
642 hw_eq_bands
[AUDIOHW_EQ_BAND2
].frequency
,
643 LANG_HW_EQ_FREQUENCY
, 0,"tone band2 frequency",
644 "230 Hz,300 Hz,385 Hz,500 Hz",
645 sound_set_hw_eq_band2_frequency
, 4,
646 TALK_ID(230, UNIT_HERTZ
), TALK_ID(300, UNIT_HERTZ
),
647 TALK_ID(385, UNIT_HERTZ
), TALK_ID(500, UNIT_HERTZ
)),
648 CHOICE_SETTING(F_SOUNDSETTING
, hw_eq_bands
[AUDIOHW_EQ_BAND2
].width
,
649 LANG_HW_EQ_WIDTH
, 0, "tone band2 width", "narrow,wide",
650 sound_set_hw_eq_band2_width
, 2,
651 ID2P(LANG_HW_EQ_WIDTH_NARROW
), ID2P(LANG_HW_EQ_WIDTH_WIDE
)),
653 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
654 hw_eq_bands
[AUDIOHW_EQ_BAND3
].frequency
,
655 LANG_HW_EQ_FREQUENCY
, 0, "tone band3 frequency",
656 "650 Hz,850 Hz,1.1 kHz,1.4 kHz",
657 sound_set_hw_eq_band3_frequency
, 4,
658 TALK_ID(650, UNIT_HERTZ
), TALK_ID(850, UNIT_HERTZ
),
659 TALK_ID_DECIMAL(11, 1, UNIT_KHZ
),
660 TALK_ID_DECIMAL(14, 1, UNIT_KHZ
)),
661 CHOICE_SETTING(F_SOUNDSETTING
,hw_eq_bands
[AUDIOHW_EQ_BAND3
].width
,
662 LANG_HW_EQ_WIDTH
, 0, "tone band3 width", "narrow,wide",
663 sound_set_hw_eq_band3_width
, 2,
664 ID2P(LANG_HW_EQ_WIDTH_NARROW
), ID2P(LANG_HW_EQ_WIDTH_WIDE
)),
666 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
667 hw_eq_bands
[AUDIOHW_EQ_BAND4
].frequency
,
668 LANG_HW_EQ_FREQUENCY
, 0, "tone band4 frequency",
669 "1.8 kHz,2.4 kHz,3.2 kHz,4.1 kHz",
670 sound_set_hw_eq_band4_frequency
, 4,
671 TALK_ID_DECIMAL(18, 1, UNIT_KHZ
),
672 TALK_ID_DECIMAL(24, 1, UNIT_KHZ
),
673 TALK_ID_DECIMAL(32, 1, UNIT_KHZ
),
674 TALK_ID_DECIMAL(41, 1, UNIT_KHZ
)),
675 CHOICE_SETTING(F_SOUNDSETTING
, hw_eq_bands
[AUDIOHW_EQ_BAND4
].width
,
676 LANG_HW_EQ_WIDTH
, 0, "tone band4 width", "narrow,wide",
677 sound_set_hw_eq_band4_width
, 2,
678 ID2P(LANG_HW_EQ_WIDTH_NARROW
), ID2P(LANG_HW_EQ_WIDTH_WIDE
)),
680 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
681 hw_eq_bands
[AUDIOHW_EQ_BAND5
].frequency
,
682 LANG_HW_EQ_FREQUENCY
, 0, "tone band5 frequency",
683 "5.3 kHz,6.9 kHz,9.0 kHz,11.7 kHz",
684 sound_set_hw_eq_band5_frequency
, 4,
685 TALK_ID_DECIMAL(53, 1, UNIT_KHZ
),
686 TALK_ID_DECIMAL(69, 1, UNIT_KHZ
),
687 TALK_ID_DECIMAL(90, 1, UNIT_KHZ
),
688 TALK_ID_DECIMAL(117, 1, UNIT_KHZ
)),
689 #endif /* HAVE_WM8978 */
690 #endif /* AUDIOHW_HAVE_EQ */
691 /* 3-d enhancement effect */
692 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
693 SOUND_SETTING(0,loudness
, LANG_LOUDNESS
, "loudness", SOUND_LOUDNESS
),
694 STRINGCHOICE_SETTING(F_SOUNDSETTING
,avc
,LANG_AUTOVOL
,0,"auto volume",
695 "off,20ms,2,4,8,", sound_set_avc
, 5,
696 LANG_OFF
,TALK_ID(20, UNIT_MS
),TALK_ID(2, UNIT_SEC
),
697 TALK_ID(4, UNIT_SEC
),TALK_ID(8, UNIT_SEC
)),
698 OFFON_SETTING(F_SOUNDSETTING
, superbass
, LANG_SUPERBASS
, false, "superbass",
702 CHOICE_SETTING(F_SOUNDSETTING
, channel_config
, LANG_CHANNEL_CONFIGURATION
,
704 "stereo,mono,custom,mono left,mono right,karaoke",
705 sound_set_channels
, 6,
706 ID2P(LANG_CHANNEL_STEREO
), ID2P(LANG_CHANNEL_MONO
),
707 ID2P(LANG_CHANNEL_CUSTOM
), ID2P(LANG_CHANNEL_LEFT
),
708 ID2P(LANG_CHANNEL_RIGHT
), ID2P(LANG_CHANNEL_KARAOKE
)),
709 SOUND_SETTING(F_SOUNDSETTING
, stereo_width
, LANG_STEREO_WIDTH
,
710 "stereo_width", SOUND_STEREO_WIDTH
),
711 #ifdef AUDIOHW_HAVE_DEPTH_3D
712 SOUND_SETTING(0,depth_3d
, LANG_DEPTH_3D
, "3-d enhancement",
716 OFFON_SETTING(0, playlist_shuffle
, LANG_SHUFFLE
, false, "shuffle", NULL
),
717 SYSTEM_SETTING(NVRAM(4), resume_index
, -1),
718 SYSTEM_SETTING(NVRAM(4), resume_offset
, -1),
719 CHOICE_SETTING(0, repeat_mode
, LANG_REPEAT
, REPEAT_OFF
, "repeat",
720 "off,all,one,shuffle"
721 #ifdef AB_REPEAT_ENABLE
725 #ifdef AB_REPEAT_ENABLE
730 ID2P(LANG_OFF
), ID2P(LANG_ALL
), ID2P(LANG_REPEAT_ONE
),
732 #ifdef AB_REPEAT_ENABLE
733 ,ID2P(LANG_REPEAT_AB
)
735 ), /* CHOICE_SETTING( repeat_mode ) */
737 #ifdef HAVE_LCD_CONTRAST
738 /* its easier to leave this one un-macro()ed for the time being */
739 { F_T_INT
|F_DEF_ISFUNC
|F_INT_SETTING
, &global_settings
.contrast
,
740 LANG_CONTRAST
, FUNCTYPE(lcd_default_contrast
), "contrast", NULL
, {
741 .int_setting
= (struct int_setting
[]) {
742 { lcd_set_contrast
, UNIT_INT
, MIN_CONTRAST_SETTING
,
743 MAX_CONTRAST_SETTING
, 1, NULL
, NULL
}}}},
745 #ifdef HAVE_BACKLIGHT
746 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout
, LANG_BACKLIGHT
,
747 DEFAULT_BACKLIGHT_TIMEOUT
,
748 "backlight timeout", off_on
, UNIT_SEC
, backlight_formatter
,
749 backlight_getlang
, backlight_set_timeout
, 20,
750 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
752 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout_plugged
,
753 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
754 "backlight timeout plugged", off_on
, UNIT_SEC
,
755 backlight_formatter
, backlight_getlang
,
756 backlight_set_timeout_plugged
, 20,
757 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
759 #endif /* HAVE_BACKLIGHT */
760 #ifdef HAVE_LCD_BITMAP
761 #ifdef HAVE_LCD_INVERT
762 BOOL_SETTING(0, invert
, LANG_INVERT
, false ,"invert", off_on
,
763 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
, lcd_set_invert_display
),
766 OFFON_SETTING(0, flip_display
, LANG_FLIP_DISPLAY
, false, "flip display",
770 CHOICE_SETTING(F_TEMPVAR
|F_THEMESETTING
, cursor_style
, LANG_INVERT_CURSOR
,
771 #ifdef HAVE_LCD_COLOR
773 "pointer,bar (inverse),bar (color),bar (gradient)", NULL
, 4,
774 ID2P(LANG_INVERT_CURSOR_POINTER
),
775 ID2P(LANG_INVERT_CURSOR_BAR
),
776 ID2P(LANG_INVERT_CURSOR_COLOR
),
777 ID2P(LANG_INVERT_CURSOR_GRADIENT
)),
779 1, "selector type", "pointer,bar (inverse)", NULL
, 2,
780 ID2P(LANG_INVERT_CURSOR_POINTER
),
781 ID2P(LANG_INVERT_CURSOR_BAR
)),
783 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, statusbar
,
784 LANG_STATUS_BAR
, STATUSBAR_TOP
, "statusbar","off,top,bottom",
785 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_STATUSBAR_TOP
),
786 ID2P(LANG_STATUSBAR_BOTTOM
)),
787 #ifdef HAVE_REMOTE_LCD
788 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, remote_statusbar
,
789 LANG_REMOTE_STATUSBAR
, STATUSBAR_TOP
, "remote statusbar","off,top,bottom",
790 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_STATUSBAR_TOP
),
791 ID2P(LANG_STATUSBAR_BOTTOM
)),
793 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, scrollbar
,
794 LANG_SCROLL_BAR
, SCROLLBAR_LEFT
, "scrollbar","off,left,right",
795 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_LEFT
), ID2P(LANG_RIGHT
)),
796 INT_SETTING(F_THEMESETTING
, scrollbar_width
, LANG_SCROLLBAR_WIDTH
, 6,
797 "scrollbar width",UNIT_INT
, 3, MAX(LCD_WIDTH
/10,25), 1,
799 #ifdef HAVE_TOUCHSCREEN
800 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, list_line_padding
, LANG_LIST_LINE_PADDING
,
801 -1, "list padding", "auto,off", UNIT_PIXEL
, list_pad_formatter
,
802 list_pad_getlang
, NULL
, 16,
803 -1,0,2,4,6,8,10,12,16,20,24,28,32,38,44,50),
805 #if CONFIG_KEYPAD == RECORDER_PAD
806 OFFON_SETTING(F_THEMESETTING
,buttonbar
, LANG_BUTTON_BAR
,true,"buttonbar", NULL
),
808 CHOICE_SETTING(F_THEMESETTING
, volume_type
, LANG_VOLUME_DISPLAY
, 0,
809 "volume display", graphic_numeric
, NULL
, 2,
810 ID2P(LANG_DISPLAY_GRAPHIC
),
811 ID2P(LANG_DISPLAY_NUMERIC
)),
812 CHOICE_SETTING(F_THEMESETTING
, battery_display
, LANG_BATTERY_DISPLAY
, 0,
813 "battery display", graphic_numeric
, NULL
, 2,
814 ID2P(LANG_DISPLAY_GRAPHIC
), ID2P(LANG_DISPLAY_NUMERIC
)),
816 CHOICE_SETTING(0, timeformat
, LANG_TIMEFORMAT
, 0,
817 "time format", "24hour,12hour", NULL
, 2,
818 ID2P(LANG_24_HOUR_CLOCK
), ID2P(LANG_12_HOUR_CLOCK
)),
820 #endif /* HAVE_LCD_BITMAP */
821 OFFON_SETTING(0,show_icons
, LANG_SHOW_ICONS
,true,"show icons", NULL
),
823 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, poweroff
, LANG_POWEROFF_IDLE
, 10,
824 "idle poweroff", "off", UNIT_MIN
, formatter_unit_0_is_off
,
825 getlang_unit_0_is_off
, set_poweroff_timeout
, 15,
826 0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
827 SYSTEM_SETTING(NVRAM(4), runtime
, 0),
828 SYSTEM_SETTING(NVRAM(4), topruntime
, 0),
829 INT_SETTING(F_BANFROMQS
, max_files_in_playlist
,
830 LANG_MAX_FILES_IN_PLAYLIST
,
836 "max files in playlist", UNIT_INT
, 1000, 32000, 1000,
838 INT_SETTING(F_BANFROMQS
, max_files_in_dir
, LANG_MAX_FILES_IN_DIR
,
844 "max files in dir", UNIT_INT
, 50, 10000, 50,
846 /* use this setting for user code even if there's no exchangable battery
848 #ifdef BATTERY_CAPACITY_DEFAULT
849 /* define min/max/inc for this file if there's only one battery */
850 #ifndef BATTERY_CAPACITY_MIN
851 #define BATTERY_CAPACITY_MIN BATTERY_CAPACITY_DEFAULT
852 #define BATTERY_CAPACITY_MAX BATTERY_CAPACITY_DEFAULT
853 #define BATTERY_CAPACITY_INC 0
855 #if defined(IPOD_VIDEO) && !defined(SIMULATOR)
856 /* its easier to leave this one un-macro()ed for the time being */
857 { F_T_INT
|F_DEF_ISFUNC
|F_INT_SETTING
, &global_settings
.battery_capacity
,
858 LANG_BATTERY_CAPACITY
, FUNCTYPE(battery_default_capacity
),
859 "battery capacity", NULL
, {
860 .int_setting
= (struct int_setting
[]) {
861 { set_battery_capacity
, UNIT_MAH
, BATTERY_CAPACITY_MIN
,
862 BATTERY_CAPACITY_MAX
, BATTERY_CAPACITY_INC
, NULL
, NULL
}}}},
863 #else /* IPOD_VIDEO */
864 INT_SETTING(0, battery_capacity
, LANG_BATTERY_CAPACITY
,
865 BATTERY_CAPACITY_DEFAULT
, "battery capacity", UNIT_MAH
,
866 BATTERY_CAPACITY_MIN
, BATTERY_CAPACITY_MAX
,
867 BATTERY_CAPACITY_INC
, NULL
, NULL
, set_battery_capacity
),
868 #endif /* IPOD_VIDEO */
871 OFFON_SETTING(NVRAM(1), car_adapter_mode
,
872 LANG_CAR_ADAPTER_MODE
, false, "car adapter mode", NULL
),
874 #ifdef IPOD_ACCESSORY_PROTOCOL
875 CHOICE_SETTING(0, serial_bitrate
, LANG_SERIAL_BITRATE
, 0, "serial bitrate",
876 "auto,9600,19200,38400,57600", iap_bitrate_set
, 5, ID2P(LANG_SERIAL_BITRATE_AUTO
),
877 ID2P(LANG_SERIAL_BITRATE_9600
),ID2P(LANG_SERIAL_BITRATE_19200
),
878 ID2P(LANG_SERIAL_BITRATE_38400
),ID2P(LANG_SERIAL_BITRATE_57600
)),
880 #ifdef HAVE_ACCESSORY_SUPPLY
881 OFFON_SETTING(0, accessory_supply
, LANG_ACCESSORY_SUPPLY
,
882 true, "accessory power supply", accessory_supply_set
),
884 #ifdef HAVE_LINEOUT_POWEROFF
885 OFFON_SETTING(0, lineout_active
, LANG_LINEOUT_ONOFF
,
886 true, "lineout", lineout_set
),
890 OFFON_SETTING(0,fm_force_mono
, LANG_FM_MONO_MODE
,
891 false, "force fm mono", toggle_mono_mode
),
892 SYSTEM_SETTING(NVRAM(4),last_frequency
,0),
895 #if BATTERY_TYPES_COUNT > 1
896 CHOICE_SETTING(0, battery_type
, LANG_BATTERY_TYPE
, 0, "battery type",
897 "alkaline,nimh", NULL
, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE
),
898 ID2P(LANG_BATTERY_TYPE_NIMH
)),
900 #ifdef HAVE_REMOTE_LCD
902 INT_SETTING(0, remote_contrast
, LANG_CONTRAST
,
903 DEFAULT_REMOTE_CONTRAST_SETTING
, "remote contrast", UNIT_INT
,
904 MIN_REMOTE_CONTRAST_SETTING
, MAX_REMOTE_CONTRAST_SETTING
, 1,
905 NULL
, NULL
, lcd_remote_set_contrast
),
906 BOOL_SETTING(0, remote_invert
, LANG_INVERT
, false ,"remote invert", off_on
,
907 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
,
908 lcd_remote_set_invert_display
),
909 OFFON_SETTING(0,remote_flip_display
, LANG_FLIP_DISPLAY
,
910 false,"remote flip display", NULL
),
911 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout
,
912 LANG_BACKLIGHT
, 5, "remote backlight timeout", off_on
,
913 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
914 remote_backlight_set_timeout
, 20,
915 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
917 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout_plugged
,
918 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
919 "remote backlight timeout plugged", off_on
, UNIT_SEC
,
920 backlight_formatter
, backlight_getlang
,
921 remote_backlight_set_timeout_plugged
, 20,
922 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
924 #ifdef HAVE_REMOTE_LCD_TICKING
925 OFFON_SETTING(0, remote_reduce_ticking
, LANG_REDUCE_TICKING
,
926 false,"remote reduce ticking", NULL
),
930 #ifdef HAVE_BACKLIGHT
931 OFFON_SETTING(0, bl_filter_first_keypress
,
932 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
933 "backlight filters first keypress", NULL
),
934 #ifdef HAVE_REMOTE_LCD
935 OFFON_SETTING(0, remote_bl_filter_first_keypress
,
936 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
937 "backlight filters first remote keypress", NULL
),
939 #endif /* HAVE_BACKLIGHT */
941 /** End of old RTC config block **/
943 #ifdef HAVE_BACKLIGHT
944 OFFON_SETTING(0, caption_backlight
, LANG_CAPTION_BACKLIGHT
,
945 false, "caption backlight", NULL
),
946 #ifdef HAVE_REMOTE_LCD
947 OFFON_SETTING(0, remote_caption_backlight
, LANG_CAPTION_BACKLIGHT
,
948 false, "remote caption backlight", NULL
),
950 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
951 INT_SETTING(F_NO_WRAP
, brightness
, LANG_BRIGHTNESS
,
952 DEFAULT_BRIGHTNESS_SETTING
, "brightness",UNIT_INT
,
953 MIN_BRIGHTNESS_SETTING
, MAX_BRIGHTNESS_SETTING
, 1,
954 NULL
, NULL
, backlight_set_brightness
),
956 /* backlight fading */
957 #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
958 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_in
,
959 LANG_BACKLIGHT_FADE_IN
, 300, "backlight fade in", "off",
960 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
961 backlight_set_fade_in
, 7, 0,100,200,300,500,1000,2000),
962 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_out
,
963 LANG_BACKLIGHT_FADE_OUT
, 2000, "backlight fade out", "off",
964 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
965 backlight_set_fade_out
, 10,
966 0,100,200,300,500,1000,2000,3000,5000,10000),
967 #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
968 OFFON_SETTING(0, backlight_fade_in
, LANG_BACKLIGHT_FADE_IN
,
969 true, "backlight fade in", backlight_set_fade_in
),
970 OFFON_SETTING(0, backlight_fade_out
, LANG_BACKLIGHT_FADE_OUT
,
971 true, "backlight fade out", backlight_set_fade_out
),
973 #endif /* HAVE_BACKLIGHT */
974 INT_SETTING(F_PADTITLE
, scroll_speed
, LANG_SCROLL_SPEED
, 9,"scroll speed",
975 UNIT_INT
, 0, 15, 1, NULL
, NULL
, lcd_scroll_speed
),
976 INT_SETTING(F_PADTITLE
, scroll_delay
, LANG_SCROLL_DELAY
, 1000,
977 "scroll delay", UNIT_MS
, 0, 2500, 100, NULL
,
978 NULL
, lcd_scroll_delay
),
979 INT_SETTING(0, bidir_limit
, LANG_BIDIR_SCROLL
, 50, "bidir limit",
980 UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
, lcd_bidir_scroll
),
981 #ifdef HAVE_REMOTE_LCD
982 INT_SETTING(0, remote_scroll_speed
, LANG_SCROLL_SPEED
, 9,
983 "remote scroll speed", UNIT_INT
, 0,15, 1,
984 NULL
, NULL
, lcd_remote_scroll_speed
),
985 INT_SETTING(0, remote_scroll_step
, LANG_SCROLL_STEP
, 6,
986 "remote scroll step", UNIT_PIXEL
, 1, LCD_REMOTE_WIDTH
, 1, NULL
,
987 NULL
, lcd_remote_scroll_step
),
988 INT_SETTING(0, remote_scroll_delay
, LANG_SCROLL_DELAY
, 1000,
989 "remote scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
990 lcd_remote_scroll_delay
),
991 INT_SETTING(0, remote_bidir_limit
, LANG_BIDIR_SCROLL
, 50,
992 "remote bidir limit", UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
,
993 lcd_remote_bidir_scroll
),
995 #ifdef HAVE_LCD_BITMAP
996 OFFON_SETTING(0, offset_out_of_view
, LANG_SCREEN_SCROLL_VIEW
,
997 false, "Screen Scrolls Out Of View",
998 gui_list_screen_scroll_out_of_view
),
999 INT_SETTING(F_PADTITLE
, scroll_step
, LANG_SCROLL_STEP
, 6, "scroll step",
1000 UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
, lcd_scroll_step
),
1001 INT_SETTING(F_PADTITLE
, screen_scroll_step
, LANG_SCREEN_SCROLL_STEP
, 16,
1002 "screen scroll step", UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
,
1003 gui_list_screen_scroll_step
),
1004 #endif /* HAVE_LCD_BITMAP */
1005 OFFON_SETTING(0,scroll_paginated
,LANG_SCROLL_PAGINATED
,
1006 false,"scroll paginated",NULL
),
1007 #ifdef HAVE_LCD_COLOR
1009 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.fg_color
,-1,
1010 INT(DEFAULT_THEME_FOREGROUND
),"foreground color",NULL
,UNUSED
},
1011 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.bg_color
,-1,
1012 INT(DEFAULT_THEME_BACKGROUND
),"background color",NULL
,UNUSED
},
1013 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lss_color
,-1,
1014 INT(DEFAULT_THEME_SELECTOR_START
),"line selector start color",NULL
,
1016 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lse_color
,-1,
1017 INT(DEFAULT_THEME_SELECTOR_END
),"line selector end color",NULL
,UNUSED
},
1018 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lst_color
,-1,
1019 INT(DEFAULT_THEME_SELECTOR_TEXT
),"line selector text color",NULL
,
1024 OFFON_SETTING(0,play_selected
,LANG_PLAY_SELECTED
,true,"play selected",NULL
),
1025 OFFON_SETTING(0,party_mode
,LANG_PARTY_MODE
,false,"party mode",NULL
),
1026 OFFON_SETTING(0,fade_on_stop
,LANG_FADE_ON_STOP
,true,"volume fade",NULL
),
1027 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, ff_rewind_min_step
,
1028 LANG_FFRW_STEP
, 1, "scan min step", NULL
, UNIT_SEC
,
1029 NULL
, NULL
, NULL
, 14, 1,2,3,4,5,6,8,10,15,20,25,30,45,60),
1030 CHOICE_SETTING(0, ff_rewind_accel
, LANG_FFRW_ACCEL
, 2,
1031 "seek acceleration", "very fast,fast,normal,slow,very slow", NULL
, 5,
1032 ID2P(LANG_VERY_FAST
), ID2P(LANG_FAST
), ID2P(LANG_NORMAL
),
1033 ID2P(LANG_SLOW
) , ID2P(LANG_VERY_SLOW
)),
1034 #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE)
1035 STRINGCHOICE_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0,"antiskip",
1036 "5s,15s,30s,1min,2min,3min,5min,10min", NULL
, 8,
1037 TALK_ID(5, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
1038 TALK_ID(30, UNIT_SEC
), TALK_ID(1, UNIT_MIN
),
1039 TALK_ID(2, UNIT_MIN
), TALK_ID(3, UNIT_MIN
),
1040 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
)),
1041 #elif defined(HAVE_DISK_STORAGE)
1042 INT_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0, "antiskip",
1043 UNIT_SEC
, 0, 7, 1, NULL
, NULL
, audio_set_buffer_margin
),
1046 #ifdef HAVE_DISK_STORAGE
1047 INT_SETTING(0, disk_spindown
, LANG_SPINDOWN
, 5, "disk spindown",
1048 UNIT_SEC
, 3, 254, 1, NULL
, NULL
, storage_spindown
),
1049 #endif /* HAVE_DISK_STORAGE */
1051 TEXT_SETTING(0, start_directory
, "start directory", "/", NULL
, NULL
),
1052 CHOICE_SETTING(0, dirfilter
, LANG_FILTER
, SHOW_SUPPORTED
, "show files",
1053 "all,supported,music,playlists", NULL
, 4, ID2P(LANG_ALL
),
1054 ID2P(LANG_FILTER_SUPPORTED
), ID2P(LANG_FILTER_MUSIC
),
1055 ID2P(LANG_PLAYLISTS
)),
1057 OFFON_SETTING(0, sort_case
, LANG_SORT_CASE
, false, "sort case", NULL
),
1058 CHOICE_SETTING(0, sort_dir
, LANG_SORT_DIR
, 0 ,
1059 "sort dirs", "alpha,oldest,newest", NULL
, 3,
1060 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
1061 ID2P(LANG_SORT_DATE_REVERSE
)),
1062 CHOICE_SETTING(0, sort_file
, LANG_SORT_FILE
, 0 ,
1063 "sort files", "alpha,oldest,newest,type", NULL
, 4,
1064 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
1065 ID2P(LANG_SORT_DATE_REVERSE
) , ID2P(LANG_SORT_TYPE
)),
1066 CHOICE_SETTING(0, interpret_numbers
, LANG_SORT_INTERPRET_NUMBERS
, 1,
1067 "sort interpret number", "digits,numbers",NULL
, 2,
1068 ID2P(LANG_SORT_INTERPRET_AS_DIGIT
),
1069 ID2P(LANG_SORT_INTERPRET_AS_NUMBERS
)),
1070 CHOICE_SETTING(0, show_filename_ext
, LANG_SHOW_FILENAME_EXT
, 3,
1071 "show filename exts", "off,on,unknown,view_all", NULL
, 4 ,
1072 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_UNKNOWN_TYPES
),
1073 ID2P(LANG_EXT_ONLY_VIEW_ALL
)),
1074 OFFON_SETTING(0,browse_current
,LANG_FOLLOW
,false,"follow playlist",NULL
),
1075 OFFON_SETTING(0,playlist_viewer_icons
,LANG_SHOW_ICONS
,true,
1076 "playlist viewer icons",NULL
),
1077 OFFON_SETTING(0,playlist_viewer_indices
,LANG_SHOW_INDICES
,true,
1078 "playlist viewer indices",NULL
),
1079 CHOICE_SETTING(0, playlist_viewer_track_display
, LANG_TRACK_DISPLAY
, 0,
1080 "playlist viewer track display","track name,full path",
1081 NULL
, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY
),
1082 ID2P(LANG_DISPLAY_FULL_PATH
)),
1083 CHOICE_SETTING(0, recursive_dir_insert
, LANG_RECURSE_DIRECTORY
, RECURSE_ON
,
1084 "recursive directory insert", off_on_ask
, NULL
, 3 ,
1085 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_ASK
)),
1087 CHOICE_SETTING(0, autocreatebookmark
, LANG_BOOKMARK_SETTINGS_AUTOCREATE
,
1088 BOOKMARK_NO
, "autocreate bookmarks",
1089 "off,on,ask,recent only - on,recent only - ask", NULL
, 5,
1090 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1091 ID2P(LANG_ASK
), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
),
1092 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
)),
1093 OFFON_SETTING(0, autoupdatebookmark
, LANG_BOOKMARK_SETTINGS_AUTOUPDATE
,
1094 false, "autoupdate bookmarks", NULL
),
1095 CHOICE_SETTING(0, autoloadbookmark
, LANG_BOOKMARK_SETTINGS_AUTOLOAD
,
1096 BOOKMARK_NO
, "autoload bookmarks", off_on_ask
, NULL
, 3,
1097 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1099 CHOICE_SETTING(0, usemrb
, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
,
1100 BOOKMARK_NO
, "use most-recent-bookmarks",
1101 "off,on,unique only", NULL
, 3, ID2P(LANG_SET_BOOL_NO
),
1102 ID2P(LANG_SET_BOOL_YES
),
1103 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
)),
1104 #ifdef HAVE_LCD_BITMAP
1106 STRINGCHOICE_SETTING(0, peak_meter_clip_hold
, LANG_PM_CLIP_HOLD
, 16,
1107 "peak meter clip hold",
1108 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
1109 ",3min,5min,10min,20min,45min,90min",
1110 peak_meter_set_clip_hold
, 25, LANG_PM_ETERNAL
,
1111 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
1112 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
1113 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
1114 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
1115 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
1116 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
1117 TALK_ID(25, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1118 TALK_ID(45, UNIT_SEC
), TALK_ID(60, UNIT_SEC
),
1119 TALK_ID(90, UNIT_SEC
), TALK_ID(2, UNIT_MIN
),
1120 TALK_ID(3, UNIT_MIN
), TALK_ID(5, UNIT_MIN
),
1121 TALK_ID(10, UNIT_MIN
), TALK_ID(20, UNIT_MIN
),
1122 TALK_ID(45, UNIT_MIN
), TALK_ID(90, UNIT_MIN
)),
1123 STRINGCHOICE_SETTING(0, peak_meter_hold
, LANG_PM_PEAK_HOLD
, 3,
1125 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
1126 NULL
, 18, LANG_OFF
, TALK_ID(200, UNIT_MS
),
1127 TALK_ID(300, UNIT_MS
), TALK_ID(500, UNIT_MS
),
1128 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
1129 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
1130 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
1131 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
1132 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
1133 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
1134 TALK_ID(30, UNIT_SEC
), TALK_ID(60, UNIT_SEC
)),
1135 INT_SETTING(0, peak_meter_release
, LANG_PM_RELEASE
, 8, "peak meter release",
1136 UNIT_PM_TICK
, 1, 0x7e, 1, NULL
, NULL
,NULL
),
1137 OFFON_SETTING(0,peak_meter_dbfs
,LANG_PM_DBFS
,true,"peak meter dbfs",NULL
),
1138 {F_T_INT
, &global_settings
.peak_meter_min
, LANG_PM_MIN
,INT(60),
1139 "peak meter min", NULL
, UNUSED
},
1140 {F_T_INT
, &global_settings
.peak_meter_max
, LANG_PM_MAX
,INT(0),
1141 "peak meter max", NULL
, UNUSED
},
1142 #ifdef HAVE_RECORDING
1143 OFFON_SETTING(0, peak_meter_clipcounter
, LANG_PM_CLIPCOUNTER
, false,
1144 "peak meter clipcounter", NULL
),
1145 #endif /* HAVE_RECORDING */
1146 #endif /* HAVE_LCD_BITMAP */
1147 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
1148 SOUND_SETTING(F_SOUNDSETTING
, mdb_strength
, LANG_MDB_STRENGTH
,
1149 "mdb strength", SOUND_MDB_STRENGTH
),
1150 SOUND_SETTING(F_SOUNDSETTING
, mdb_harmonics
, LANG_MDB_HARMONICS
,
1151 "mdb harmonics", SOUND_MDB_HARMONICS
),
1152 SOUND_SETTING(F_SOUNDSETTING
, mdb_center
, LANG_MDB_CENTER
,
1153 "mdb center", SOUND_MDB_CENTER
),
1154 SOUND_SETTING(F_SOUNDSETTING
, mdb_shape
, LANG_MDB_SHAPE
,
1155 "mdb shape", SOUND_MDB_SHAPE
),
1156 OFFON_SETTING(F_SOUNDSETTING
, mdb_enable
, LANG_MDB_ENABLE
,
1157 false, "mdb enable", set_mdb_enable
),
1159 #if CONFIG_CODEC == MAS3507D
1160 OFFON_SETTING(F_SOUNDSETTING
, line_in
,LANG_LINE_IN
,false,"line in",NULL
),
1163 OFFON_SETTING(F_TEMPVAR
, talk_menu
, LANG_VOICE_MENU
, true, "talk menu", NULL
),
1164 CHOICE_SETTING(0, talk_dir
, LANG_VOICE_DIR
, 0,
1165 "talk dir", off_number_spell
, NULL
, 3,
1166 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
1167 ID2P(LANG_VOICE_SPELL
)),
1168 OFFON_SETTING(F_TEMPVAR
, talk_dir_clip
, LANG_VOICE_DIR_TALK
, false,
1169 "talk dir clip", NULL
),
1170 CHOICE_SETTING(0, talk_file
, LANG_VOICE_FILE
, 0,
1171 "talk file", off_number_spell
, NULL
, 3,
1172 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
1173 ID2P(LANG_VOICE_SPELL
)),
1174 OFFON_SETTING(F_TEMPVAR
, talk_file_clip
, LANG_VOICE_FILE_TALK
, false,
1175 "talk file clip", NULL
),
1176 OFFON_SETTING(F_TEMPVAR
, talk_filetype
, LANG_VOICE_FILETYPE
, false,
1177 "talk filetype", NULL
),
1178 OFFON_SETTING(F_TEMPVAR
, talk_battery_level
, LANG_TALK_BATTERY_LEVEL
, false,
1179 "Announce Battery Level", NULL
),
1181 #ifdef HAVE_RECORDING
1183 STRINGCHOICE_SETTING(F_RECSETTING
, rec_timesplit
, LANG_SPLIT_TIME
, 0,
1185 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
1186 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
1188 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
),
1189 TALK_ID(15, UNIT_MIN
), TALK_ID(30, UNIT_MIN
),
1190 TALK_ID(60, UNIT_MIN
), TALK_ID(74, UNIT_MIN
),
1191 TALK_ID(80, UNIT_MIN
), TALK_ID(2, UNIT_HOUR
),
1192 TALK_ID(4, UNIT_HOUR
), TALK_ID(6, UNIT_HOUR
),
1193 TALK_ID(8, UNIT_HOUR
), TALK_ID(10, UNIT_HOUR
),
1194 TALK_ID(12, UNIT_HOUR
), TALK_ID(18, UNIT_HOUR
),
1195 TALK_ID(20, UNIT_HOUR
), TALK_ID(24, UNIT_HOUR
)),
1196 STRINGCHOICE_SETTING(F_RECSETTING
, rec_sizesplit
, LANG_SPLIT_SIZE
, 0,
1198 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
1199 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
1201 TALK_ID(5, UNIT_MB
), TALK_ID(10, UNIT_MB
),
1202 TALK_ID(15, UNIT_MB
), TALK_ID(32, UNIT_MB
),
1203 TALK_ID(64, UNIT_MB
), TALK_ID(75, UNIT_MB
),
1204 TALK_ID(100, UNIT_MB
), TALK_ID(128, UNIT_MB
),
1205 TALK_ID(256, UNIT_MB
), TALK_ID(512, UNIT_MB
),
1206 TALK_ID(650, UNIT_MB
), TALK_ID(700, UNIT_MB
),
1207 TALK_ID(1024, UNIT_MB
), TALK_ID(1536, UNIT_MB
),
1208 TALK_ID(1792, UNIT_MB
)),
1209 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_channels
, LANG_CHANNELS
, INT(0),
1210 "rec channels","stereo,mono",UNUSED
},
1211 #if CONFIG_CODEC == SWCODEC
1212 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_mono_mode
,
1213 LANG_RECORDING_MONO_MODE
, INT(0), "rec mono mode","L+R,L,R",UNUSED
},
1215 CHOICE_SETTING(F_RECSETTING
, rec_split_type
, LANG_SPLIT_TYPE
, 0,
1216 "rec split type", "Split,Stop,Shutdown", NULL
, 3,
1217 ID2P(LANG_START_NEW_FILE
), ID2P(LANG_STOP_RECORDING
),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN
)),
1218 CHOICE_SETTING(F_RECSETTING
, rec_split_method
, LANG_SPLIT_MEASURE
, 0,
1219 "rec split method", "Time,Filesize", NULL
, 2,
1220 ID2P(LANG_TIME
), ID2P(LANG_FILESIZE
)),
1221 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_source
, LANG_RECORDING_SOURCE
,
1222 INT(0), "rec source",
1223 &HAVE_MIC_REC_(",mic")
1224 HAVE_LINE_REC_(",line")
1225 HAVE_SPDIF_REC_(",spdif")
1226 HAVE_FMRADIO_REC_(",fmradio")[1],
1228 INT_SETTING(F_RECSETTING
, rec_prerecord_time
, LANG_RECORD_PRERECORD_TIME
, 0,
1229 "prerecording time", UNIT_SEC
, 0, 30, 1,
1230 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1232 TEXT_SETTING(F_RECSETTING
, rec_directory
, "rec path",
1233 REC_BASE_DIR
, NULL
, NULL
),
1234 #ifdef HAVE_BACKLIGHT
1235 CHOICE_SETTING(F_RECSETTING
, cliplight
, LANG_CLIP_LIGHT
, 0,
1236 "cliplight", "off,main,both,remote", NULL
,
1237 #ifdef HAVE_REMOTE_LCD
1238 4, ID2P(LANG_OFF
), ID2P(LANG_MAIN_UNIT
),
1239 ID2P(LANG_REMOTE_MAIN
), ID2P(LANG_REMOTE_UNIT
)
1241 2, ID2P(LANG_OFF
), ID2P(LANG_ON
)
1245 #ifdef DEFAULT_REC_MIC_GAIN
1246 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_mic_gain
,
1247 LANG_GAIN
,INT(DEFAULT_REC_MIC_GAIN
),
1248 "rec mic gain",NULL
,UNUSED
},
1249 #endif /* DEFAULT_REC_MIC_GAIN */
1250 #ifdef DEFAULT_REC_LEFT_GAIN
1251 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_left_gain
,
1252 LANG_GAIN_LEFT
,INT(DEFAULT_REC_LEFT_GAIN
),
1253 "rec left gain",NULL
,UNUSED
},
1254 #endif /* DEFAULT_REC_LEFT_GAIN */
1255 #ifdef DEFAULT_REC_RIGHT_GAIN
1256 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_right_gain
,LANG_GAIN_RIGHT
,
1257 INT(DEFAULT_REC_RIGHT_GAIN
),
1258 "rec right gain",NULL
,UNUSED
},
1259 #endif /* DEFAULT_REC_RIGHT_GAIN */
1260 #if CONFIG_CODEC == MAS3587F
1261 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1262 LANG_RECORDING_FREQUENCY
, INT(0),
1263 "rec frequency","44,48,32,22,24,16", UNUSED
},
1264 INT_SETTING(F_RECSETTING
, rec_quality
, LANG_RECORDING_QUALITY
, 5,
1265 "rec quality", UNIT_INT
, 0, 7, 1, NULL
, NULL
, NULL
),
1266 OFFON_SETTING(F_RECSETTING
, rec_editable
, LANG_RECORDING_EDITABLE
, false,
1267 "editable recordings", NULL
),
1268 #endif /* CONFIG_CODEC == MAS3587F */
1269 #if CONFIG_CODEC == SWCODEC
1270 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1271 LANG_RECORDING_FREQUENCY
,INT(REC_FREQ_DEFAULT
),
1272 "rec frequency",REC_FREQ_CFG_VAL_LIST
,UNUSED
},
1273 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_format
,
1274 LANG_RECORDING_FORMAT
,INT(REC_FORMAT_DEFAULT
),
1275 "rec format",REC_FORMAT_CFG_VAL_LIST
,UNUSED
},
1276 /** Encoder settings start - keep these together **/
1278 /* (no settings yet) */
1280 {F_T_INT
|F_RECSETTING
, &global_settings
.mp3_enc_config
.bitrate
,-1,
1281 INT(MP3_ENC_BITRATE_CFG_DEFAULT
),
1282 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST
,UNUSED
},
1284 /* (no settings yet) */
1286 /* (no settings yet) */
1287 /** Encoder settings end **/
1288 #endif /* CONFIG_CODEC == SWCODEC */
1289 /* values for the trigger */
1290 INT_SETTING(F_RECSETTING
, rec_start_thres_db
, LANG_RECORD_START_THRESHOLD
, -35,
1291 "trigger start threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, 1, NULL
, NULL
, NULL
),
1292 INT_SETTING(F_RECSETTING
, rec_start_thres_linear
, LANG_RECORD_START_THRESHOLD
, 5,
1293 "trigger start threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1294 INT_SETTING(F_RECSETTING
, rec_stop_thres_db
, LANG_RECORD_STOP_THRESHOLD
, -45,
1295 "trigger stop threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, 1, NULL
, NULL
, NULL
),
1296 INT_SETTING(F_RECSETTING
, rec_stop_thres_linear
, LANG_RECORD_STOP_THRESHOLD
, 10,
1297 "trigger stop threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1298 TABLE_SETTING(F_RECSETTING
, rec_start_duration
, LANG_MIN_DURATION
, 0,
1299 "trigger start duration",
1300 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1301 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1302 0,1,2,5,10,15,20,25,30,60,120,300,600),
1303 TABLE_SETTING(F_RECSETTING
, rec_stop_postrec
, LANG_MIN_DURATION
, 0,
1304 "trigger stop duration",
1305 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1306 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1307 0,1,2,5,10,15,20,25,30,60,120,300,600),
1308 TABLE_SETTING(F_RECSETTING
, rec_stop_gap
, LANG_RECORD_STOP_GAP
, 1,
1310 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1311 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1312 0,1,2,5,10,15,20,25,30,60,120,300,600),
1313 CHOICE_SETTING(F_RECSETTING
, rec_trigger_mode
, LANG_RECORD_TRIGGER
, TRIG_MODE_OFF
,
1314 "trigger mode","off,once,repeat", NULL
,3,
1315 ID2P(LANG_OFF
), ID2P(LANG_RECORD_TRIG_NOREARM
), ID2P(LANG_REPEAT
)),
1316 CHOICE_SETTING(F_RECSETTING
, rec_trigger_type
, LANG_RECORD_TRIGGER_TYPE
, TRIG_TYPE_STOP
,
1317 "trigger type","stop,pause,nf stp", NULL
,3,
1318 ID2P(LANG_RECORD_TRIGGER_STOP
), ID2P(LANG_PAUSE
), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP
)),
1319 #endif /* HAVE_RECORDING */
1321 #ifdef HAVE_HISTOGRAM
1322 /* TO DO: additional restictions of following REP items? */
1323 TABLE_SETTING(F_RECSETTING
, histogram_interval
, LANG_HISTOGRAM_INTERVAL
, 0,
1324 "histogram interval","0s,1s,2s,4s",
1325 UNIT_SEC
, NULL
, NULL
, NULL
, 4, 0,1,2,4),
1326 #endif /* HAVE_HISTOGRAM */
1328 #ifdef HAVE_SPDIF_POWER
1329 OFFON_SETTING(F_SOUNDSETTING
, spdif_enable
, LANG_SPDIF_ENABLE
, false,
1330 "spdif enable", spdif_power_enable
),
1332 CHOICE_SETTING(0, next_folder
, LANG_NEXT_FOLDER
, FOLDER_ADVANCE_OFF
,
1333 "folder navigation", "off,on,random",NULL
,3,
1334 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1337 #ifdef HAVE_TAGCACHE
1338 #if CONFIG_CODEC == SWCODEC
1339 BOOL_SETTING(0, autoresume_enable
, LANG_AUTORESUME
, false,
1340 "autoresume enable", off_on
,
1341 LANG_SET_BOOL_YES
, LANG_SET_BOOL_NO
, NULL
),
1342 CHOICE_SETTING(0, autoresume_automatic
, LANG_AUTORESUME_AUTOMATIC
,
1343 AUTORESUME_NEXTTRACK_NEVER
,
1344 "autoresume next track", "never,all,custom",
1346 ID2P(LANG_SET_BOOL_NO
),
1348 ID2P(LANG_AUTORESUME_CUSTOM
)),
1349 TEXT_SETTING(0, autoresume_paths
, "autoresume next track paths",
1350 "/podcast:/podcasts", NULL
, NULL
),
1353 OFFON_SETTING(0, runtimedb
, LANG_RUNTIMEDB_ACTIVE
, false,
1354 "gather runtime data", NULL
),
1357 #if CONFIG_CODEC == SWCODEC
1359 CHOICE_SETTING(F_SOUNDSETTING
, replaygain_type
, LANG_REPLAYGAIN_MODE
,
1360 REPLAYGAIN_SHUFFLE
, "replaygain type",
1361 "track,album,track shuffle,off", NULL
, 4, ID2P(LANG_TRACK_GAIN
),
1362 ID2P(LANG_ALBUM_GAIN
), ID2P(LANG_SHUFFLE_GAIN
), ID2P(LANG_OFF
)),
1363 OFFON_SETTING(F_SOUNDSETTING
, replaygain_noclip
, LANG_REPLAYGAIN_NOCLIP
,
1364 false, "replaygain noclip", NULL
),
1365 INT_SETTING_NOWRAP(F_SOUNDSETTING
, replaygain_preamp
,
1366 LANG_REPLAYGAIN_PREAMP
, 0, "replaygain preamp",
1367 UNIT_DB
, -120, 120, 5, db_format
, get_dec_talkid
, NULL
),
1369 CHOICE_SETTING(0, beep
, LANG_BEEP
, 0, "beep", "off,weak,moderate,strong",
1370 NULL
, 4, ID2P(LANG_OFF
), ID2P(LANG_WEAK
),
1371 ID2P(LANG_MODERATE
), ID2P(LANG_STRONG
)),
1373 #ifdef HAVE_CROSSFADE
1375 CHOICE_SETTING(F_SOUNDSETTING
, crossfade
, LANG_CROSSFADE_ENABLE
, 0,
1377 "off,auto track change,man track skip,shuffle,shuffle or man track skip,always",
1378 NULL
, 6, ID2P(LANG_OFF
), ID2P(LANG_AUTOTRACKSKIP
),
1379 ID2P(LANG_MANTRACKSKIP
), ID2P(LANG_SHUFFLE
),
1380 ID2P(LANG_SHUFFLE_TRACKSKIP
), ID2P(LANG_ALWAYS
)),
1381 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_delay
,
1382 LANG_CROSSFADE_FADE_IN_DELAY
, 0,
1383 "crossfade fade in delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
, NULL
),
1384 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_delay
,
1385 LANG_CROSSFADE_FADE_OUT_DELAY
, 0,
1386 "crossfade fade out delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
,NULL
),
1387 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_duration
,
1388 LANG_CROSSFADE_FADE_IN_DURATION
, 2,
1389 "crossfade fade in duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1391 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_duration
,
1392 LANG_CROSSFADE_FADE_OUT_DURATION
, 2,
1393 "crossfade fade out duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1395 CHOICE_SETTING(F_SOUNDSETTING
, crossfade_fade_out_mixmode
,
1396 LANG_CROSSFADE_FADE_OUT_MODE
, 0,
1397 "crossfade fade out mode", "crossfade,mix", NULL
, 2,
1398 ID2P(LANG_CROSSFADE
), ID2P(LANG_MIX
)),
1402 OFFON_SETTING(F_SOUNDSETTING
, crossfeed
, LANG_CROSSFEED
, false,
1403 "crossfeed", dsp_set_crossfeed
),
1404 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_direct_gain
,
1405 LANG_CROSSFEED_DIRECT_GAIN
, -15,
1406 "crossfeed direct gain", UNIT_DB
, -60, 0, 5,
1407 db_format
, get_dec_talkid
,dsp_set_crossfeed_direct_gain
),
1408 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_cross_gain
,
1409 LANG_CROSSFEED_CROSS_GAIN
, -60,
1410 "crossfeed cross gain", UNIT_DB
, -120, -30, 5,
1411 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1412 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_attenuation
,
1413 LANG_CROSSFEED_HF_ATTENUATION
, -160,
1414 "crossfeed hf attenuation", UNIT_DB
, -240, -60, 5,
1415 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1416 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_cutoff
,
1417 LANG_CROSSFEED_HF_CUTOFF
, 700,
1418 "crossfeed hf cutoff", UNIT_HERTZ
, 500, 2000, 100,
1419 NULL
, NULL
, crossfeed_cross_set
),
1422 OFFON_SETTING(F_EQSETTING
, eq_enabled
, LANG_EQUALIZER_ENABLED
, false,
1423 "eq enabled", NULL
),
1424 INT_SETTING_NOWRAP(F_EQSETTING
, eq_precut
, LANG_EQUALIZER_PRECUT
, 0,
1425 "eq precut", UNIT_DB
, 0, 240, 5, eq_precut_format
,
1426 get_precut_talkid
, dsp_set_eq_precut
),
1428 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1429 60, "eq band 0 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1430 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1431 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1432 200, "eq band 1 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1433 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1434 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1435 800, "eq band 2 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1436 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1437 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1438 4000, "eq band 3 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1439 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1440 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1441 12000, "eq band 4 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1442 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1443 /* 0..64 (or 0.0 to 6.4) */
1444 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_q
, LANG_EQUALIZER_BAND_Q
, 7,
1445 "eq band 0 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1446 eq_q_format
, get_dec_talkid
, NULL
),
1447 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_q
, LANG_EQUALIZER_BAND_Q
, 10,
1448 "eq band 1 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1449 eq_q_format
, get_dec_talkid
, NULL
),
1450 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_q
, LANG_EQUALIZER_BAND_Q
, 10,
1451 "eq band 2 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1452 eq_q_format
, get_dec_talkid
, NULL
),
1453 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_q
, LANG_EQUALIZER_BAND_Q
, 10,
1454 "eq band 3 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1455 eq_q_format
, get_dec_talkid
, NULL
),
1456 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_q
, LANG_EQUALIZER_BAND_Q
, 7,
1457 "eq band 4 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1458 eq_q_format
, get_dec_talkid
, NULL
),
1459 /* -240..240 (or -24db to +24db) */
1460 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_gain
, LANG_GAIN
, 0,
1461 "eq band 0 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1462 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1463 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_gain
, LANG_GAIN
, 0,
1464 "eq band 1 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1465 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1466 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_gain
, LANG_GAIN
, 0,
1467 "eq band 2 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1468 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1469 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_gain
, LANG_GAIN
, 0,
1470 "eq band 3 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1471 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1472 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_gain
, LANG_GAIN
, 0,
1473 "eq band 4 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1474 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1477 OFFON_SETTING(F_SOUNDSETTING
, dithering_enabled
, LANG_DITHERING
, false,
1478 "dithering enabled", dsp_dither_enable
),
1480 #ifdef HAVE_PITCHSCREEN
1482 OFFON_SETTING(F_SOUNDSETTING
, timestretch_enabled
, LANG_TIMESTRETCH
, false,
1483 "timestretch enabled", dsp_timestretch_enable
),
1487 INT_SETTING_NOWRAP(F_SOUNDSETTING
, compressor_threshold
,
1488 LANG_COMPRESSOR_THRESHOLD
, 0,
1489 "compressor threshold", UNIT_DB
, 0, -24,
1490 -3, formatter_unit_0_is_off
, getlang_unit_0_is_off
, compressor_set
),
1491 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_makeup_gain
,
1492 LANG_COMPRESSOR_GAIN
, 1, "compressor makeup gain",
1493 "off,auto", compressor_set
, 2,
1494 ID2P(LANG_OFF
), ID2P(LANG_AUTO
)),
1495 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_ratio
,
1496 LANG_COMPRESSOR_RATIO
, 1, "compressor ratio",
1497 "2:1,4:1,6:1,10:1,limit", compressor_set
, 5,
1498 ID2P(LANG_COMPRESSOR_RATIO_2
), ID2P(LANG_COMPRESSOR_RATIO_4
),
1499 ID2P(LANG_COMPRESSOR_RATIO_6
), ID2P(LANG_COMPRESSOR_RATIO_10
),
1500 ID2P(LANG_COMPRESSOR_RATIO_LIMIT
)),
1501 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_knee
,
1502 LANG_COMPRESSOR_KNEE
, 1, "compressor knee",
1503 "hard knee,soft knee", compressor_set
, 2,
1504 ID2P(LANG_COMPRESSOR_HARD_KNEE
), ID2P(LANG_COMPRESSOR_SOFT_KNEE
)),
1505 INT_SETTING_NOWRAP(F_SOUNDSETTING
, compressor_release_time
,
1506 LANG_COMPRESSOR_RELEASE
, 500,
1507 "compressor release time", UNIT_MS
, 100, 1000,
1508 100, NULL
, NULL
, compressor_set
),
1510 #ifdef AUDIOHW_HAVE_BASS_CUTOFF
1511 SOUND_SETTING(F_NO_WRAP
, bass_cutoff
, LANG_BASS_CUTOFF
,
1512 "bass cutoff", SOUND_BASS_CUTOFF
),
1514 #ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
1515 SOUND_SETTING(F_NO_WRAP
, treble_cutoff
, LANG_TREBLE_CUTOFF
,
1516 "treble cutoff", SOUND_TREBLE_CUTOFF
),
1518 #ifdef HAVE_DIRCACHE
1519 /*enable dircache for all targets > 2MB of RAM by default*/
1520 OFFON_SETTING(F_BANFROMQS
,dircache
,LANG_DIRCACHE_ENABLE
,true,"dircache",NULL
),
1521 SYSTEM_SETTING(NVRAM(4),dircache_size
,0),
1524 #ifdef HAVE_TAGCACHE
1525 #ifdef HAVE_TC_RAMCACHE
1526 OFFON_SETTING(F_BANFROMQS
,tagcache_ram
,LANG_TAGCACHE_RAM
,false,"tagcache_ram",NULL
),
1528 OFFON_SETTING(F_BANFROMQS
, tagcache_autoupdate
, LANG_TAGCACHE_AUTOUPDATE
, false,
1529 "tagcache_autoupdate", NULL
),
1531 CHOICE_SETTING(0, default_codepage
, LANG_DEFAULT_CODEPAGE
, 0,
1533 #ifdef HAVE_LCD_BITMAP
1534 /* The order must match with that in unicode.c */
1535 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1536 "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8",
1538 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1539 ID2P(LANG_CODEPAGE_HEBREW
), ID2P(LANG_CODEPAGE_CYRILLIC
),
1540 ID2P(LANG_CODEPAGE_THAI
), ID2P(LANG_CODEPAGE_ARABIC
),
1541 ID2P(LANG_CODEPAGE_TURKISH
),
1542 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1543 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1544 ID2P(LANG_CODEPAGE_JAPANESE
),
1545 ID2P(LANG_CODEPAGE_SIMPLIFIED
), ID2P(LANG_CODEPAGE_KOREAN
),
1546 ID2P(LANG_CODEPAGE_TRADITIONAL
), ID2P(LANG_CODEPAGE_UTF8
)),
1547 #else /* !HAVE_LCD_BITMAP */
1548 /* The order must match with that in unicode.c */
1549 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,utf-8",
1551 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1552 ID2P(LANG_CODEPAGE_CYRILLIC
), ID2P(LANG_CODEPAGE_TURKISH
),
1553 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1554 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1555 ID2P(LANG_CODEPAGE_UTF8
)),
1557 OFFON_SETTING(0, warnon_erase_dynplaylist
, LANG_WARN_ERASEDYNPLAYLIST_MENU
,
1558 true, "warn when erasing dynamic playlist",NULL
),
1560 #ifdef HAVE_BACKLIGHT
1561 #ifdef HAS_BUTTON_HOLD
1562 CHOICE_SETTING(0, backlight_on_button_hold
, LANG_BACKLIGHT_ON_BUTTON_HOLD
,
1563 1, "backlight on button hold", "normal,off,on",
1564 backlight_set_on_button_hold
, 3,
1565 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1568 #ifdef HAVE_LCD_SLEEP_SETTING
1569 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off
,
1570 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF
, 3,
1571 "lcd sleep after backlight off",
1572 "always,never,5,10,15,20,30,45,60,90",
1573 lcd_set_sleep_after_backlight_off
, 10,
1574 LANG_ALWAYS
, LANG_NEVER
, TALK_ID(5, UNIT_SEC
),
1575 TALK_ID(10, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
1576 TALK_ID(20, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1577 TALK_ID(45, UNIT_SEC
),TALK_ID(60, UNIT_SEC
),
1578 TALK_ID(90, UNIT_SEC
)),
1579 #endif /* HAVE_LCD_SLEEP_SETTING */
1580 #endif /* HAVE_BACKLIGHT */
1582 OFFON_SETTING(0, hold_lr_for_scroll_in_list
, -1, true,
1583 "hold_lr_for_scroll_in_list",NULL
),
1584 #ifdef HAVE_LCD_BITMAP
1585 CHOICE_SETTING(0, show_path_in_browser
, LANG_SHOW_PATH
, SHOW_PATH_CURRENT
,
1586 "show path in browser", "off,current directory,full path",
1587 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_SHOW_PATH_CURRENT
),
1588 ID2P(LANG_DISPLAY_FULL_PATH
)),
1592 {F_T_INT
,&global_settings
.rec_agc_preset_mic
,LANG_RECORDING_AGC_PRESET
,
1593 INT(1),"agc mic preset",NULL
,UNUSED
},
1594 {F_T_INT
,&global_settings
.rec_agc_preset_line
,LANG_RECORDING_AGC_PRESET
,
1595 INT(1),"agc line preset",NULL
,UNUSED
},
1596 {F_T_INT
,&global_settings
.rec_agc_maxgain_mic
,-1,INT(104),
1597 "agc maximum mic gain",NULL
,UNUSED
},
1598 {F_T_INT
,&global_settings
.rec_agc_maxgain_line
,-1,INT(96),
1599 "agc maximum line gain",NULL
,UNUSED
},
1600 {F_T_INT
,&global_settings
.rec_agc_cliptime
,LANG_RECORDING_AGC_CLIPTIME
,
1601 INT(1),"agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED
},
1604 #ifdef HAVE_REMOTE_LCD
1605 #ifdef HAS_REMOTE_BUTTON_HOLD
1606 CHOICE_SETTING(0, remote_backlight_on_button_hold
,
1607 LANG_BACKLIGHT_ON_BUTTON_HOLD
, 0,
1608 "remote backlight on button hold",
1609 "normal,off,on", remote_backlight_set_on_button_hold
, 3,
1610 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1613 #ifdef HAVE_HEADPHONE_DETECTION
1614 CHOICE_SETTING(0, unplug_mode
, LANG_HEADPHONE_UNPLUG
, 0,
1615 "pause on headphone unplug", "off,pause,pause and resume",
1616 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_PAUSE
),
1617 ID2P(LANG_HEADPHONE_UNPLUG_RESUME
)),
1618 OFFON_SETTING(0, unplug_autoresume
,
1619 LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME
, false,
1620 "disable autoresume if phones not present",NULL
),
1622 INT_SETTING(0, pause_rewind
, LANG_PAUSE_REWIND
, 0,
1623 "rewind duration on pause", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1626 CHOICE_SETTING(0, fm_region
, LANG_FM_REGION
, 0,
1627 "fm_region", "eu,us,jp,kr,it,wo", set_radio_region
, 6,
1628 ID2P(LANG_FM_EUROPE
), ID2P(LANG_FM_US
),
1629 ID2P(LANG_FM_JAPAN
), ID2P(LANG_FM_KOREA
),
1630 ID2P(LANG_FM_ITALY
), ID2P(LANG_FM_OTHER
)),
1633 OFFON_SETTING(F_BANFROMQS
, audioscrobbler
, LANG_AUDIOSCROBBLER
, false,
1634 "Last.fm Logging", NULL
),
1636 TEXT_SETTING(0, fmr_file
, "fmr", "-",
1637 FMPRESET_PATH
"/", ".fmr"),
1638 TEXT_SETTING(F_THEMESETTING
,fms_file
, "fms",
1639 DEFAULT_FMS_NAME
, SBS_DIR
"/", ".fms"),
1640 #ifdef HAVE_REMOTE_LCD
1641 TEXT_SETTING(F_THEMESETTING
,rfms_file
, "rfms",
1642 DEFAULT_FMS_NAME
, SBS_DIR
"/", ".rfms"),
1644 #endif /* CONFIG_TUNER */
1645 #ifdef HAVE_LCD_BITMAP
1646 TEXT_SETTING(F_THEMESETTING
, font_file
, "font",
1647 DEFAULT_FONTNAME
, FONT_DIR
"/", ".fnt"),
1648 INT_SETTING(0, glyphs_to_cache
, LANG_GLYPHS
, DEFAULT_GLYPHS
,
1649 "glyphs", UNIT_INT
, MIN_GLYPHS
, MAX_GLYPHS
, 10,
1652 #ifdef HAVE_REMOTE_LCD
1653 TEXT_SETTING(F_THEMESETTING
, remote_font_file
, "remote font",
1654 DEFAULT_REMOTE_FONTNAME
, FONT_DIR
"/", ".fnt"),
1656 TEXT_SETTING(F_THEMESETTING
,wps_file
, "wps",
1657 DEFAULT_WPSNAME
, WPS_DIR
"/", ".wps"),
1658 #ifdef HAVE_LCD_BITMAP
1659 TEXT_SETTING(F_THEMESETTING
,sbs_file
, "sbs",
1660 DEFAULT_SBSNAME
, SBS_DIR
"/", ".sbs"),
1662 #ifdef HAVE_REMOTE_LCD
1663 TEXT_SETTING(F_THEMESETTING
,rwps_file
,"rwps",
1664 DEFAULT_WPSNAME
, WPS_DIR
"/", ".rwps"),
1665 TEXT_SETTING(F_THEMESETTING
,rsbs_file
, "rsbs",
1666 DEFAULT_SBSNAME
, SBS_DIR
"/", ".rsbs"),
1668 TEXT_SETTING(0,lang_file
,"lang","",LANG_DIR
"/",".lng"),
1670 TEXT_SETTING(F_THEMESETTING
,backdrop_file
,"backdrop",
1671 DEFAULT_BACKDROP
, NULL
, NULL
),
1673 #ifdef HAVE_LCD_BITMAP
1674 TEXT_SETTING(0,kbd_file
,"kbd","-",ROCKBOX_DIR
"/",".kbd"),
1676 #ifdef HAVE_USB_CHARGING_ENABLE
1677 CHOICE_SETTING(0, usb_charging
, LANG_USB_CHARGING
, 1, "usb charging",
1678 "off,on,force", NULL
, 3, ID2P(LANG_SET_BOOL_NO
),
1679 ID2P(LANG_SET_BOOL_YES
), ID2P(LANG_FORCE
)),
1681 OFFON_SETTING(F_BANFROMQS
,cuesheet
,LANG_CUESHEET_ENABLE
,false,"cuesheet support",
1683 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, skip_length
,
1684 LANG_SKIP_LENGTH
, 0, "skip length",
1685 "outro,track,1s,2s,3s,5s,7s,10s,15s,20s,30s,45s,1min,90s,2min,3min,5min,10min,15min",
1686 UNIT_SEC
, formatter_unit_0_is_skip_track
,
1687 getlang_unit_0_is_skip_track
, NULL
,
1688 19, -1,0,1,2,3,5,7,10,15,20,30,45,60,90,120,180,300,600,900),
1689 CHOICE_SETTING(0, start_in_screen
, LANG_START_SCREEN
, 1,
1690 "start in screen", "previous,root,files,"
1691 #ifdef HAVE_TAGCACHE
1692 #define START_DB_COUNT 1
1695 #define START_DB_COUNT 0
1698 #ifdef HAVE_RECORDING
1699 #define START_REC_COUNT 1
1702 #define START_REC_COUNT 0
1705 #define START_TUNER_COUNT 1
1708 #define START_TUNER_COUNT 0
1711 #ifdef HAVE_PICTUREFLOW_INTEGRATION
1712 #define START_PF_COUNT 1
1715 #define START_PF_COUNT 0
1718 (6 + START_DB_COUNT
+ START_REC_COUNT
+ START_TUNER_COUNT
+ START_PF_COUNT
),
1719 ID2P(LANG_PREVIOUS_SCREEN
), ID2P(LANG_MAIN_MENU
),
1720 ID2P(LANG_DIR_BROWSER
),
1721 #ifdef HAVE_TAGCACHE
1722 ID2P(LANG_TAGCACHE
),
1724 ID2P(LANG_RESUME_PLAYBACK
), ID2P(LANG_SETTINGS
),
1725 #ifdef HAVE_RECORDING
1726 ID2P(LANG_RECORDING
),
1729 ID2P(LANG_FM_RADIO
),
1731 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
)
1732 #ifdef HAVE_PICTUREFLOW_INTEGRATION
1733 ,ID2P(LANG_ONPLAY_PICTUREFLOW
)
1736 SYSTEM_SETTING(NVRAM(1),last_screen
,-1),
1737 #if defined(HAVE_RTC_ALARM) && \
1738 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1739 {F_T_INT
, &global_settings
.alarm_wake_up_screen
, LANG_ALARM_WAKEUP_SCREEN
,
1740 INT(ALARM_START_WPS
), "alarm wakeup screen", ALARM_SETTING_TEXT
,UNUSED
},
1741 #endif /* HAVE_RTC_ALARM */
1743 /* Customizable icons */
1744 #ifdef HAVE_LCD_BITMAP
1745 TEXT_SETTING(F_THEMESETTING
, icon_file
, "iconset", DEFAULT_ICONSET
,
1746 ICON_DIR
"/", ".bmp"),
1747 TEXT_SETTING(F_THEMESETTING
, viewers_icon_file
, "viewers iconset",
1748 DEFAULT_VIEWERS_ICONSET
,
1749 ICON_DIR
"/", ".bmp"),
1751 #ifdef HAVE_REMOTE_LCD
1752 TEXT_SETTING(F_THEMESETTING
, remote_icon_file
, "remote iconset", "-",
1753 ICON_DIR
"/", ".bmp"),
1754 TEXT_SETTING(F_THEMESETTING
, remote_viewers_icon_file
,
1755 "remote viewers iconset", "-",
1756 ICON_DIR
"/", ".bmp"),
1757 #endif /* HAVE_REMOTE_LCD */
1758 #ifdef HAVE_LCD_COLOR
1759 TEXT_SETTING(F_THEMESETTING
, colors_file
, "filetype colours", "-",
1760 THEME_DIR
"/", ".colours"),
1762 #ifdef HAVE_BUTTON_LIGHT
1763 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, buttonlight_timeout
,
1764 LANG_BUTTONLIGHT_TIMEOUT
, 5, "button light timeout", off_on
,
1765 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
1766 buttonlight_set_timeout
, 20,
1767 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
1769 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1770 INT_SETTING(F_NO_WRAP
, buttonlight_brightness
, LANG_BUTTONLIGHT_BRIGHTNESS
,
1771 DEFAULT_BRIGHTNESS_SETTING
,
1772 "button light brightness",UNIT_INT
, MIN_BRIGHTNESS_SETTING
,
1773 MAX_BRIGHTNESS_SETTING
, 1, NULL
, NULL
,
1774 buttonlight_set_brightness
),
1776 #ifndef HAVE_WHEEL_ACCELERATION
1777 INT_SETTING(0, list_accel_start_delay
, LANG_LISTACCEL_START_DELAY
,
1778 2, "list_accel_start_delay", UNIT_SEC
, 0, 10, 1,
1779 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1780 INT_SETTING(0, list_accel_wait
, LANG_LISTACCEL_ACCEL_SPEED
,
1781 3, "list_accel_wait", UNIT_SEC
, 1, 10, 1,
1782 scanaccel_formatter
, getlang_unit_0_is_off
, NULL
),
1783 #endif /* HAVE_WHEEL_ACCELERATION */
1784 #if CONFIG_CODEC == SWCODEC
1786 #ifdef HAVE_HARDWARE_CLICK
1787 CHOICE_SETTING(0, keyclick
, LANG_KEYCLICK_SOFTWARE
, 0,
1788 "keyclick", "off,weak,moderate,strong", NULL
, 4,
1789 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
),
1791 OFFON_SETTING(0, keyclick_repeats
, LANG_KEYCLICK_REPEATS
, false,
1792 "keyclick repeats", NULL
),
1793 OFFON_SETTING(0, keyclick_hardware
, LANG_KEYCLICK_HARDWARE
, false,
1794 "hardware keyclick", NULL
),
1796 CHOICE_SETTING(0, keyclick
, LANG_KEYCLICK
, 0,
1797 "keyclick", "off,weak,moderate,strong", NULL
, 4,
1798 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
),
1800 OFFON_SETTING(0, keyclick_repeats
, LANG_KEYCLICK_REPEATS
, false,
1801 "keyclick repeats", NULL
),
1803 #endif /* CONFIG_CODEC == SWCODEC */
1804 TEXT_SETTING(0, playlist_catalog_dir
, "playlist catalog directory",
1805 PLAYLIST_CATALOG_DEFAULT_DIR
, NULL
, NULL
),
1806 INT_SETTING(0, sleeptimer_duration
, LANG_SLEEP_TIMER_DURATION
, 30,
1807 "sleeptimer duration",
1808 UNIT_MIN
, 5, 300, 5, sleeptimer_formatter
, NULL
, NULL
),
1809 OFFON_SETTING(0, sleeptimer_on_startup
, LANG_SLEEP_TIMER_ON_POWER_UP
, false,
1810 "sleeptimer on startup", NULL
),
1811 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
1812 CHOICE_SETTING(0, touchpad_sensitivity
, LANG_TOUCHPAD_SENSITIVITY
, 0,
1813 "touchpad sensitivity", "normal,high", touchpad_set_sensitivity
, 2,
1814 ID2P(LANG_NORMAL
), ID2P(LANG_HIGH
)),
1816 #ifdef HAVE_QUICKSCREEN
1817 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_TOP
], LANG_TOP_QS_ITEM
,
1819 qs_load_from_cfg
, qs_write_to_cfg
,
1820 qs_is_changed
, qs_set_default
),
1821 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_LEFT
], LANG_LEFT_QS_ITEM
,
1822 &global_settings
.playlist_shuffle
, "qs left",
1823 qs_load_from_cfg
, qs_write_to_cfg
,
1824 qs_is_changed
, qs_set_default
),
1825 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_RIGHT
], LANG_RIGHT_QS_ITEM
,
1826 &global_settings
.repeat_mode
, "qs right",
1827 qs_load_from_cfg
, qs_write_to_cfg
,
1828 qs_is_changed
, qs_set_default
),
1829 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_BOTTOM
], LANG_BOTTOM_QS_ITEM
,
1831 qs_load_from_cfg
, qs_write_to_cfg
,
1832 qs_is_changed
, qs_set_default
),
1835 OFFON_SETTING(0, speaker_enabled
, LANG_ENABLE_SPEAKER
, false, "speaker",
1836 audiohw_enable_speaker
),
1838 #ifdef HAVE_TOUCHSCREEN
1839 CHOICE_SETTING(0, touch_mode
, LANG_TOUCHSCREEN_MODE
, DEFAULT_TOUCHSCREEN_MODE
,
1840 "touchscreen mode", "point,grid", NULL
, 2,
1841 ID2P(LANG_TOUCHSCREEN_POINT
), ID2P(LANG_TOUCHSCREEN_GRID
)),
1842 CUSTOM_SETTING(0, ts_calibration_data
, -1,
1843 &default_calibration_parameters
, "touchscreen calibration",
1844 tsc_load_from_cfg
, tsc_write_to_cfg
,
1845 tsc_is_changed
, tsc_set_default
),
1847 OFFON_SETTING(0, prevent_skip
, LANG_PREVENT_SKIPPING
, false, "prevent track skip", NULL
),
1849 #ifdef HAVE_PITCHSCREEN
1850 OFFON_SETTING(0, pitch_mode_semitone
, LANG_SEMITONE
, false,
1851 "Semitone pitch change", NULL
),
1852 #if CONFIG_CODEC == SWCODEC
1853 OFFON_SETTING(0, pitch_mode_timestretch
, LANG_TIMESTRETCH
, false,
1854 "Timestretch mode", NULL
),
1858 #ifdef USB_ENABLE_HID
1859 OFFON_SETTING(0, usb_hid
, LANG_USB_HID
, true, "usb hid", usb_set_hid
),
1860 CHOICE_SETTING(0, usb_keypad_mode
, LANG_USB_KEYPAD_MODE
, 0,
1861 "usb keypad mode", "multimedia,presentation,browser"
1862 #ifdef HAVE_USB_HID_MOUSE
1866 #ifdef HAVE_USB_HID_MOUSE
1871 ID2P(LANG_MULTIMEDIA_MODE
), ID2P(LANG_PRESENTATION_MODE
),
1872 ID2P(LANG_BROWSER_MODE
)
1873 #ifdef HAVE_USB_HID_MOUSE
1874 , ID2P(LANG_MOUSE_MODE
)
1876 ), /* CHOICE_SETTING( usb_keypad_mode ) */
1879 #if defined(USB_ENABLE_STORAGE) && defined(HAVE_MULTIDRIVE)
1880 OFFON_SETTING(0, usb_skip_first_drive
, LANG_USB_SKIP_FIRST_DRIVE
, false, "usb skip first drive", usb_set_skip_first_drive
),
1883 /* Customizable list */
1884 #ifdef HAVE_LCD_BITMAP
1885 VIEWPORT_SETTING(ui_vp_config
, "ui viewport"),
1886 #ifdef HAVE_REMOTE_LCD
1887 VIEWPORT_SETTING(remote_ui_vp_config
, "remote ui viewport"),
1891 #ifdef HAVE_MORSE_INPUT
1892 OFFON_SETTING(0, morse_input
, LANG_MORSE_INPUT
, false, "morse input", NULL
),
1896 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, hotkey_wps
,
1897 LANG_HOTKEY_WPS
, HOTKEY_VIEW_PLAYLIST
, "hotkey wps",
1898 "off,view playlist,show track info,pitchscreen,open with,delete"
1899 #ifdef HAVE_PICTUREFLOW_INTEGRATION
1902 ,UNIT_INT
, hotkey_formatter
, hotkey_getlang
, NULL
,
1903 #ifdef HAVE_PICTUREFLOW_INTEGRATION
1909 HOTKEY_VIEW_PLAYLIST
, HOTKEY_SHOW_TRACK_INFO
, HOTKEY_PITCHSCREEN
,
1910 HOTKEY_OPEN_WITH
, HOTKEY_DELETE
1911 #ifdef HAVE_PICTUREFLOW_INTEGRATION
1912 , HOTKEY_PICTUREFLOW
1915 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, hotkey_tree
,
1916 LANG_HOTKEY_FILE_BROWSER
, HOTKEY_OFF
, "hotkey tree",
1917 "off,open with,delete,insert,insert shuffled",
1918 UNIT_INT
, hotkey_formatter
, hotkey_getlang
, NULL
, 5, HOTKEY_OFF
,
1919 HOTKEY_OPEN_WITH
, HOTKEY_DELETE
, HOTKEY_INSERT
, HOTKEY_INSERT_SHUFFLED
),
1922 #if CONFIG_CODEC == SWCODEC
1923 INT_SETTING(0, resume_rewind
, LANG_RESUME_REWIND
, 0,
1924 "resume rewind", UNIT_SEC
, 0, 60, 5,
1929 const int nb_settings
= sizeof(settings
)/sizeof(*settings
);
1931 const struct settings_list
* get_settings_list(int*count
)
1933 *count
= nb_settings
;