fuzev2: prevent button light flickering when accessing µSD
[kugel-rb.git] / apps / settings_list.c
blob1bc783219f8efa737d312e4c53e6ed11af23eac1
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
22 #include "config.h"
23 #include <stdbool.h>
24 #include "string-extra.h"
25 #include "system.h"
26 #include "storage.h"
27 #include "lang.h"
28 #include "talk.h"
29 #include "lcd.h"
30 #include "button.h"
31 #include "backlight.h"
32 #include "settings.h"
33 #include "settings_list.h"
34 #include "usb.h"
35 #include "sound.h"
36 #include "dsp.h"
37 #include "audio.h"
38 #include "power.h"
39 #include "powermgmt.h"
40 #include "kernel.h"
41 #include "lcd-remote.h"
42 #include "list.h"
43 #include "rbunicode.h"
44 #ifdef HAVE_LCD_BITMAP
45 #include "peakmeter.h"
46 #endif
47 #include "menus/eq_menu.h"
48 #if CONFIG_TUNER
49 #include "radio.h"
50 #endif
51 #ifdef IPOD_ACCESSORY_PROTOCOL
52 #include "iap.h"
53 #endif
54 #include "statusbar.h"
55 #ifdef HAVE_TOUCHSCREEN
56 #include "touchscreen.h"
57 #include "ctype.h" /* For isspace() */
58 #endif
59 #ifdef HAVE_HOTKEY
60 #include "onplay.h"
61 #endif
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), \
116 NULL, NULL, UNUSED}
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*[]) \
140 {__VA_ARGS__}}}}}}
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, \
145 cb,count,...) \
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";
201 #endif
203 /* Default theme settings */
204 #define DEFAULT_WPSNAME "cabbiev2"
205 #define DEFAULT_SBSNAME "-"
206 #define DEFAULT_FMS_NAME DEFAULT_WPSNAME
208 #ifdef HAVE_LCD_BITMAP
210 #if LCD_HEIGHT <= 64
211 #define DEFAULT_FONTNAME "08-Rockfont"
212 #elif LCD_HEIGHT <= 80
213 #define DEFAULT_FONTNAME "11-Sazanami-Mincho"
214 #elif LCD_HEIGHT <= 220
215 #define DEFAULT_FONTNAME "12-Adobe-Helvetica"
216 #elif LCD_HEIGHT <= 320
217 #define DEFAULT_FONTNAME "15-Adobe-Helvetica"
218 #else
219 #define DEFAULT_FONTNAME "12-Adobe-Helvetica"
220 #endif
222 #else
223 #define DEFAULT_FONTNAME ""
224 #endif
226 #ifdef HAVE_LCD_COLOR
227 #define DEFAULT_ICONSET "tango_small"
228 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
229 #elif LCD_DEPTH >= 2
230 #define DEFAULT_ICONSET "tango_small_mono"
231 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
232 #else /* monochrome */
233 #define DEFAULT_ICONSET ""
234 #define DEFAULT_VIEWERS_ICONSET ""
235 #endif
237 #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
238 #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
239 #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
240 #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
241 #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
243 #define DEFAULT_BACKDROP "cabbiev2"
245 #ifdef HAVE_RECORDING
246 /* these should be in the config.h files */
247 #if CONFIG_CODEC == MAS3587F
248 # define DEFAULT_REC_MIC_GAIN 8
249 # define DEFAULT_REC_LEFT_GAIN 2
250 # define DEFAULT_REC_RIGHT_GAIN 2
251 #elif CONFIG_CODEC == SWCODEC
252 # ifdef HAVE_UDA1380
253 # define DEFAULT_REC_MIC_GAIN 16
254 # define DEFAULT_REC_LEFT_GAIN 0
255 # define DEFAULT_REC_RIGHT_GAIN 0
256 # elif defined(HAVE_TLV320)
257 # define DEFAULT_REC_MIC_GAIN 0
258 # define DEFAULT_REC_LEFT_GAIN 0
259 # define DEFAULT_REC_RIGHT_GAIN 0
260 # elif defined(HAVE_WM8975)
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_WM8758)
265 # define DEFAULT_REC_MIC_GAIN 16
266 # define DEFAULT_REC_LEFT_GAIN 0
267 # define DEFAULT_REC_RIGHT_GAIN 0
268 # elif defined(HAVE_WM8731)
269 # define DEFAULT_REC_MIC_GAIN 16
270 # define DEFAULT_REC_LEFT_GAIN 0
271 # define DEFAULT_REC_RIGHT_GAIN 0
272 # endif
273 #endif
275 #endif /* HAVE_RECORDING */
277 static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size,
278 int val, const char *unit)
280 if (val == 0)
281 return str(LANG_OFF);
282 else
283 snprintf(buffer, buffer_size, "%d %s", val, unit);
284 return buffer;
287 static int32_t getlang_unit_0_is_off(int value, int unit)
289 if (value == 0)
290 return LANG_OFF;
291 else
292 return TALK_ID(value,unit);
295 static const char* formatter_unit_0_is_skip_track(char *buffer, size_t buffer_size,
296 int val, const char *unit)
298 (void)unit;
299 if (val == -1)
300 return str(LANG_SKIP_OUTRO);
301 else if (val == 0)
302 return str(LANG_SKIP_TRACK);
303 else if (val % 60 == 0)
304 snprintf(buffer, buffer_size, "%d min", val/60);
305 else
306 snprintf(buffer, buffer_size, "%d s", val);
307 return buffer;
310 static int32_t getlang_unit_0_is_skip_track(int value, int unit)
312 (void)unit;
313 if (value == -1)
314 return LANG_SKIP_OUTRO;
315 else if (value == 0)
316 return LANG_SKIP_TRACK;
317 else if (value % 60 == 0)
318 return TALK_ID(value/60, UNIT_MIN);
319 else
320 return TALK_ID(value, UNIT_SEC);
323 #ifdef HAVE_BACKLIGHT
324 #ifdef SIMULATOR
325 #define DEFAULT_BACKLIGHT_TIMEOUT 0
326 #else
327 #define DEFAULT_BACKLIGHT_TIMEOUT 15
328 #endif
329 static const char* backlight_formatter(char *buffer, size_t buffer_size,
330 int val, const char *unit)
332 if (val == -1)
333 return str(LANG_OFF);
334 else if (val == 0)
335 return str(LANG_ON);
336 else
337 snprintf(buffer, buffer_size, "%d %s", val, unit);
338 return buffer;
340 static int32_t backlight_getlang(int value, int unit)
342 if (value == -1)
343 return LANG_OFF;
344 else if (value == 0)
345 return LANG_ON;
346 else
347 return TALK_ID(value, unit);
349 #endif
351 #ifndef HAVE_WHEEL_ACCELERATION
352 static const char* scanaccel_formatter(char *buffer, size_t buffer_size,
353 int val, const char *unit)
355 (void)unit;
356 if (val == 0)
357 return str(LANG_OFF);
358 else
359 snprintf(buffer, buffer_size, "2x/%ds", val);
360 return buffer;
362 #endif
364 #if CONFIG_CODEC == SWCODEC
365 static void crossfeed_cross_set(int val)
367 (void)val;
368 dsp_set_crossfeed_cross_params(global_settings.crossfeed_cross_gain,
369 global_settings.crossfeed_hf_attenuation,
370 global_settings.crossfeed_hf_cutoff);
373 static void compressor_set(int val)
375 (void)val;
376 dsp_set_compressor(global_settings.compressor_threshold,
377 global_settings.compressor_makeup_gain,
378 global_settings.compressor_ratio,
379 global_settings.compressor_knee,
380 global_settings.compressor_release_time);
383 static const char* db_format(char* buffer, size_t buffer_size, int value,
384 const char* unit)
386 int v = abs(value);
388 snprintf(buffer, buffer_size, "%s%d.%d %s", value < 0 ? "-" : "",
389 v / 10, v % 10, unit);
390 return buffer;
393 static int32_t get_dec_talkid(int value, int unit)
395 return TALK_ID_DECIMAL(value, 1, unit);
398 static int32_t get_precut_talkid(int value, int unit)
400 return TALK_ID_DECIMAL(-value, 1, unit);
403 #endif
404 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
405 static void set_mdb_enable(bool value)
407 sound_set_mdb_enable((int)value);
409 static void set_superbass(bool value)
411 sound_set_superbass((int)value);
413 #endif
415 #ifdef HAVE_LCD_CHARCELLS
416 static const char* jumpscroll_format(char* buffer, size_t buffer_size, int value,
417 const char* unit)
419 (void)unit;
420 switch (value)
422 case 0:
423 return str(LANG_OFF);
424 case 1:
425 return str(LANG_ONE_TIME);
426 case 2:
427 case 3:
428 case 4:
429 snprintf(buffer, buffer_size, "%d", value);
430 break;
431 case 5:
432 return str(LANG_ALWAYS);
434 return buffer;
436 static int32_t jumpscroll_getlang(int value, int unit)
438 switch (value)
440 case 0:
441 return LANG_OFF;
442 case 1:
443 return LANG_ONE_TIME;
444 case 2:
445 case 3:
446 case 4:
447 return TALK_ID(value, unit);
448 case 5:
449 return LANG_ALWAYS;
451 return -1;
453 #endif /* HAVE_LCD_CHARCELLS */
455 #ifdef HAVE_QUICKSCREEN
456 static int find_setting_by_name(char*name)
458 int i = 0;
459 const struct settings_list *setting;
460 while (i<nb_settings)
462 setting = &settings[i];
463 if (setting->cfg_name && !strcmp(setting->cfg_name, name))
465 return i;
467 i++;
469 return -1;
471 static void qs_load_from_cfg(void* var, char*value)
473 *(int*)var = find_setting_by_name(value);
475 static char* qs_write_to_cfg(void* setting, char*buf, int buf_len)
477 const struct settings_list *var = &settings[*(int*)setting];
478 strlcpy(buf, var->cfg_name, buf_len);
479 return buf;
481 static bool qs_is_changed(void* setting, void* defaultval)
483 int i = *(int*)setting;
484 if (i < 0 || i >= nb_settings)
485 return false;
486 const struct settings_list *var = &settings[i];
487 return var != find_setting(defaultval, NULL);
489 static void qs_set_default(void* setting, void* defaultval)
491 find_setting(defaultval, (int*)setting);
493 #endif
494 #ifdef HAVE_TOUCHSCREEN
495 static void tsc_load_from_cfg(void* setting, char*value)
497 struct touchscreen_parameter *var = (struct touchscreen_parameter*) setting;
499 /* Replacement for sscanf(value, "%d ..., &var->A, ...); */
500 int vals[7], count = 0;
501 while(*value != 0 && count < 7)
503 if(isspace(*value))
504 value++;
505 else
507 vals[count++] = atoi(value);
508 while(!isspace(*value))
509 value++;
512 var->A = vals[0];
513 var->B = vals[1];
514 var->C = vals[2];
515 var->D = vals[3];
516 var->E = vals[4];
517 var->F = vals[5];
518 var->divider = vals[6];
521 static char* tsc_write_to_cfg(void* setting, char*buf, int buf_len)
523 const struct touchscreen_parameter *var = (const struct touchscreen_parameter*) setting;
524 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);
525 return buf;
527 static bool tsc_is_changed(void* setting, void* defaultval)
529 return memcmp(setting, defaultval, sizeof(struct touchscreen_parameter)) != 0;
531 static void tsc_set_default(void* setting, void* defaultval)
533 memcpy(setting, defaultval, sizeof(struct touchscreen_parameter));
535 #endif
536 #ifdef HAVE_HOTKEY
537 static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value,
538 const char* unit)
540 (void)buffer;
541 (void)buffer_size;
542 (void)unit;
543 return str(get_hotkey_lang_id(value));
545 static int32_t hotkey_getlang(int value, int unit)
547 (void)unit;
548 return get_hotkey_lang_id(value);
550 #endif /* HAVE_HOTKEY */
551 const struct settings_list settings[] = {
552 /* sound settings */
553 SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME),
554 SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE),
555 SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS),
556 SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE),
558 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
559 SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS),
560 STRINGCHOICE_SETTING(F_SOUNDSETTING,avc,LANG_AUTOVOL,0,"auto volume",
561 "off,20ms,2,4,8,", sound_set_avc, 5,
562 LANG_OFF,TALK_ID(20, UNIT_MS),TALK_ID(2, UNIT_SEC),
563 TALK_ID(4, UNIT_SEC),TALK_ID(8, UNIT_SEC)),
564 OFFON_SETTING(F_SOUNDSETTING, superbass, LANG_SUPERBASS, false, "superbass",
565 set_superbass),
566 #endif
568 CHOICE_SETTING(F_SOUNDSETTING, channel_config, LANG_CHANNEL_CONFIGURATION,
569 0,"channels",
570 "stereo,mono,custom,mono left,mono right,karaoke",
571 sound_set_channels, 6,
572 ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO),
573 ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT),
574 ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)),
575 SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH,
576 "stereo_width", SOUND_STEREO_WIDTH),
577 /* playback */
578 OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL),
579 SYSTEM_SETTING(NVRAM(4), resume_index, -1),
580 SYSTEM_SETTING(NVRAM(4), resume_offset, -1),
581 CHOICE_SETTING(0, repeat_mode, LANG_REPEAT, REPEAT_OFF, "repeat",
582 "off,all,one,shuffle"
583 #ifdef AB_REPEAT_ENABLE
584 ",ab"
585 #endif
586 , NULL,
587 #ifdef AB_REPEAT_ENABLE
589 #else
591 #endif
592 ID2P(LANG_OFF), ID2P(LANG_ALL), ID2P(LANG_REPEAT_ONE),
593 ID2P(LANG_SHUFFLE)
594 #ifdef AB_REPEAT_ENABLE
595 ,ID2P(LANG_REPEAT_AB)
596 #endif
597 ), /* CHOICE_SETTING( repeat_mode ) */
598 /* LCD */
599 #ifdef HAVE_LCD_CONTRAST
600 /* its easier to leave this one un-macro()ed for the time being */
601 { F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.contrast,
602 LANG_CONTRAST, FUNCTYPE(lcd_default_contrast), "contrast", NULL , {
603 .int_setting = (struct int_setting[]) {
604 { lcd_set_contrast, UNIT_INT, MIN_CONTRAST_SETTING,
605 MAX_CONTRAST_SETTING, 1, NULL, NULL }}}},
606 #endif
607 #ifdef HAVE_BACKLIGHT
608 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_timeout, LANG_BACKLIGHT,
609 DEFAULT_BACKLIGHT_TIMEOUT,
610 "backlight timeout", off_on, UNIT_SEC, backlight_formatter,
611 backlight_getlang, backlight_set_timeout, 20,
612 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
613 #if CONFIG_CHARGING
614 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_timeout_plugged,
615 LANG_BACKLIGHT_ON_WHEN_CHARGING, 10,
616 "backlight timeout plugged", off_on, UNIT_SEC,
617 backlight_formatter, backlight_getlang,
618 backlight_set_timeout_plugged, 20,
619 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
620 #endif
621 #endif /* HAVE_BACKLIGHT */
622 #ifdef HAVE_LCD_BITMAP
623 #ifdef HAVE_LCD_INVERT
624 BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on,
625 LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_set_invert_display),
626 #endif
627 #ifdef HAVE_LCD_FLIP
628 OFFON_SETTING(0, flip_display, LANG_FLIP_DISPLAY, false, "flip display",
629 NULL),
630 #endif
631 /* display */
632 CHOICE_SETTING(F_TEMPVAR|F_THEMESETTING, cursor_style, LANG_INVERT_CURSOR,
633 #ifdef HAVE_LCD_COLOR
634 3, "selector type",
635 "pointer,bar (inverse),bar (color),bar (gradient)", NULL, 4,
636 ID2P(LANG_INVERT_CURSOR_POINTER),
637 ID2P(LANG_INVERT_CURSOR_BAR),
638 ID2P(LANG_INVERT_CURSOR_COLOR),
639 ID2P(LANG_INVERT_CURSOR_GRADIENT)),
640 #else
641 1, "selector type", "pointer,bar (inverse)", NULL, 2,
642 ID2P(LANG_INVERT_CURSOR_POINTER),
643 ID2P(LANG_INVERT_CURSOR_BAR)),
644 #endif
645 CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, statusbar,
646 LANG_STATUS_BAR, STATUSBAR_TOP, "statusbar","off,top,bottom",
647 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP),
648 ID2P(LANG_STATUSBAR_BOTTOM)),
649 #ifdef HAVE_REMOTE_LCD
650 CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, remote_statusbar,
651 LANG_REMOTE_STATUSBAR, STATUSBAR_TOP, "remote statusbar","off,top,bottom",
652 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP),
653 ID2P(LANG_STATUSBAR_BOTTOM)),
654 #endif
655 CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar,
656 LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right",
657 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_LEFT), ID2P(LANG_RIGHT)),
658 INT_SETTING(F_THEMESETTING, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6,
659 "scrollbar width",UNIT_INT, 3, MAX(LCD_WIDTH/10,25), 1,
660 NULL, NULL, NULL),
661 #if CONFIG_KEYPAD == RECORDER_PAD
662 OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
663 #endif
664 CHOICE_SETTING(F_THEMESETTING, volume_type, LANG_VOLUME_DISPLAY, 0,
665 "volume display", graphic_numeric, NULL, 2,
666 ID2P(LANG_DISPLAY_GRAPHIC),
667 ID2P(LANG_DISPLAY_NUMERIC)),
668 CHOICE_SETTING(F_THEMESETTING, battery_display, LANG_BATTERY_DISPLAY, 0,
669 "battery display", graphic_numeric, NULL, 2,
670 ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
671 #if CONFIG_RTC
672 CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0,
673 "time format", "24hour,12hour", NULL, 2,
674 ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)),
675 #endif
676 #endif /* HAVE_LCD_BITMAP */
677 OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL),
678 /* system */
679 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, poweroff, LANG_POWEROFF_IDLE, 10,
680 "idle poweroff", "off", UNIT_MIN, formatter_unit_0_is_off,
681 getlang_unit_0_is_off, set_poweroff_timeout, 15,
682 0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
683 SYSTEM_SETTING(NVRAM(4), runtime, 0),
684 SYSTEM_SETTING(NVRAM(4), topruntime, 0),
685 INT_SETTING(F_BANFROMQS, max_files_in_playlist,
686 LANG_MAX_FILES_IN_PLAYLIST,
687 #if MEM > 1
688 10000,
689 #else
690 400,
691 #endif
692 "max files in playlist", UNIT_INT, 1000, 32000, 1000,
693 NULL, NULL, NULL),
694 INT_SETTING(F_BANFROMQS, max_files_in_dir, LANG_MAX_FILES_IN_DIR,
695 #if MEM > 1
696 1000,
697 #else
698 200,
699 #endif
700 "max files in dir", UNIT_INT, 50, 10000, 50,
701 NULL, NULL, NULL),
702 #if BATTERY_CAPACITY_INC > 0
703 INT_SETTING(0, battery_capacity, LANG_BATTERY_CAPACITY,
704 BATTERY_CAPACITY_DEFAULT, "battery capacity", UNIT_MAH,
705 BATTERY_CAPACITY_MIN, BATTERY_CAPACITY_MAX,
706 BATTERY_CAPACITY_INC, NULL, NULL, NULL),
707 #endif
708 #if CONFIG_CHARGING
709 OFFON_SETTING(NVRAM(1), car_adapter_mode,
710 LANG_CAR_ADAPTER_MODE, false, "car adapter mode", NULL),
711 #endif
712 #ifdef IPOD_ACCESSORY_PROTOCOL
713 CHOICE_SETTING(0, serial_bitrate, LANG_SERIAL_BITRATE, 0, "serial bitrate",
714 "auto,9600,19200,38400,57600", iap_bitrate_set, 5, ID2P(LANG_SERIAL_BITRATE_AUTO),
715 ID2P(LANG_SERIAL_BITRATE_9600),ID2P(LANG_SERIAL_BITRATE_19200),
716 ID2P(LANG_SERIAL_BITRATE_38400),ID2P(LANG_SERIAL_BITRATE_57600)),
717 #endif
718 #ifdef HAVE_ACCESSORY_SUPPLY
719 OFFON_SETTING(0, accessory_supply, LANG_ACCESSORY_SUPPLY,
720 true, "accessory power supply", accessory_supply_set),
721 #endif
722 #ifdef HAVE_LINEOUT_POWEROFF
723 OFFON_SETTING(0, lineout_active, LANG_LINEOUT_ONOFF,
724 true, "lineout", lineout_set),
725 #endif
726 /* tuner */
727 #if CONFIG_TUNER
728 OFFON_SETTING(0,fm_force_mono, LANG_FM_MONO_MODE,
729 false, "force fm mono", toggle_mono_mode),
730 SYSTEM_SETTING(NVRAM(4),last_frequency,0),
731 #endif
733 #if BATTERY_TYPES_COUNT > 1
734 CHOICE_SETTING(0, battery_type, LANG_BATTERY_TYPE, 0, "battery type",
735 "alkaline,nimh", NULL, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE),
736 ID2P(LANG_BATTERY_TYPE_NIMH)),
737 #endif
738 #ifdef HAVE_REMOTE_LCD
739 /* remote lcd */
740 INT_SETTING(0, remote_contrast, LANG_CONTRAST,
741 DEFAULT_REMOTE_CONTRAST_SETTING, "remote contrast", UNIT_INT,
742 MIN_REMOTE_CONTRAST_SETTING, MAX_REMOTE_CONTRAST_SETTING, 1,
743 NULL, NULL, lcd_remote_set_contrast),
744 BOOL_SETTING(0, remote_invert, LANG_INVERT, false ,"remote invert", off_on,
745 LANG_INVERT_LCD_INVERSE, LANG_NORMAL,
746 lcd_remote_set_invert_display),
747 OFFON_SETTING(0,remote_flip_display, LANG_FLIP_DISPLAY,
748 false,"remote flip display", NULL),
749 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, remote_backlight_timeout,
750 LANG_BACKLIGHT, 5, "remote backlight timeout", off_on,
751 UNIT_SEC, backlight_formatter, backlight_getlang,
752 remote_backlight_set_timeout, 20,
753 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
754 #if CONFIG_CHARGING
755 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, remote_backlight_timeout_plugged,
756 LANG_BACKLIGHT_ON_WHEN_CHARGING, 10,
757 "remote backlight timeout plugged", off_on, UNIT_SEC,
758 backlight_formatter, backlight_getlang,
759 remote_backlight_set_timeout_plugged, 20,
760 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
761 #endif
762 #ifdef HAVE_REMOTE_LCD_TICKING
763 OFFON_SETTING(0, remote_reduce_ticking, LANG_REDUCE_TICKING,
764 false,"remote reduce ticking", NULL),
765 #endif
766 #endif
768 #ifdef HAVE_BACKLIGHT
769 OFFON_SETTING(0, bl_filter_first_keypress,
770 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
771 "backlight filters first keypress", NULL),
772 #ifdef HAVE_REMOTE_LCD
773 OFFON_SETTING(0, remote_bl_filter_first_keypress,
774 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
775 "backlight filters first remote keypress", NULL),
776 #endif
777 #endif /* HAVE_BACKLIGHT */
779 /** End of old RTC config block **/
781 #ifdef HAVE_BACKLIGHT
782 OFFON_SETTING(0, caption_backlight, LANG_CAPTION_BACKLIGHT,
783 false, "caption backlight", NULL),
784 #ifdef HAVE_REMOTE_LCD
785 OFFON_SETTING(0, remote_caption_backlight, LANG_CAPTION_BACKLIGHT,
786 false, "remote caption backlight", NULL),
787 #endif
788 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
789 INT_SETTING(F_NO_WRAP, brightness, LANG_BRIGHTNESS,
790 DEFAULT_BRIGHTNESS_SETTING, "brightness",UNIT_INT,
791 MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1,
792 NULL, NULL, backlight_set_brightness),
793 #endif
794 /* backlight fading */
795 #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
796 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_fade_in,
797 LANG_BACKLIGHT_FADE_IN, 300, "backlight fade in", "off",
798 UNIT_MS, formatter_unit_0_is_off, getlang_unit_0_is_off,
799 backlight_set_fade_in, 7, 0,100,200,300,500,1000,2000),
800 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_fade_out,
801 LANG_BACKLIGHT_FADE_OUT, 2000, "backlight fade out", "off",
802 UNIT_MS, formatter_unit_0_is_off, getlang_unit_0_is_off,
803 backlight_set_fade_out, 10,
804 0,100,200,300,500,1000,2000,3000,5000,10000),
805 #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
806 OFFON_SETTING(0, backlight_fade_in, LANG_BACKLIGHT_FADE_IN,
807 true, "backlight fade in", backlight_set_fade_in),
808 OFFON_SETTING(0, backlight_fade_out, LANG_BACKLIGHT_FADE_OUT,
809 true, "backlight fade out", backlight_set_fade_out),
810 #endif
811 #endif /* HAVE_BACKLIGHT */
812 INT_SETTING(F_PADTITLE, scroll_speed, LANG_SCROLL_SPEED, 9,"scroll speed",
813 UNIT_INT, 0, 15, 1, NULL, NULL, lcd_scroll_speed),
814 INT_SETTING(F_PADTITLE, scroll_delay, LANG_SCROLL_DELAY, 1000,
815 "scroll delay", UNIT_MS, 0, 2500, 100, NULL,
816 NULL, lcd_scroll_delay),
817 INT_SETTING(0, bidir_limit, LANG_BIDIR_SCROLL, 50, "bidir limit",
818 UNIT_PERCENT, 0, 200, 25, NULL, NULL, lcd_bidir_scroll),
819 #ifdef HAVE_REMOTE_LCD
820 INT_SETTING(0, remote_scroll_speed, LANG_SCROLL_SPEED, 9,
821 "remote scroll speed", UNIT_INT, 0,15, 1,
822 NULL, NULL, lcd_remote_scroll_speed),
823 INT_SETTING(0, remote_scroll_step, LANG_SCROLL_STEP, 6,
824 "remote scroll step", UNIT_PIXEL, 1, LCD_REMOTE_WIDTH, 1, NULL,
825 NULL, lcd_remote_scroll_step),
826 INT_SETTING(0, remote_scroll_delay, LANG_SCROLL_DELAY, 1000,
827 "remote scroll delay", UNIT_MS, 0, 2500, 100, NULL, NULL,
828 lcd_remote_scroll_delay),
829 INT_SETTING(0, remote_bidir_limit, LANG_BIDIR_SCROLL, 50,
830 "remote bidir limit", UNIT_PERCENT, 0, 200, 25, NULL, NULL,
831 lcd_remote_bidir_scroll),
832 #endif
833 #ifdef HAVE_LCD_BITMAP
834 OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW,
835 false, "Screen Scrolls Out Of View",
836 gui_list_screen_scroll_out_of_view),
837 INT_SETTING(F_PADTITLE, scroll_step, LANG_SCROLL_STEP, 6, "scroll step",
838 UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, lcd_scroll_step),
839 INT_SETTING(F_PADTITLE, screen_scroll_step, LANG_SCREEN_SCROLL_STEP, 16,
840 "screen scroll step", UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL,
841 gui_list_screen_scroll_step),
842 #endif /* HAVE_LCD_BITMAP */
843 #ifdef HAVE_LCD_CHARCELLS
844 INT_SETTING(0, jump_scroll, LANG_JUMP_SCROLL, 0, "jump scroll", UNIT_INT, 0,
845 5, 1, jumpscroll_format, jumpscroll_getlang, lcd_jump_scroll),
846 INT_SETTING(0, jump_scroll_delay, LANG_JUMP_SCROLL_DELAY, 500,
847 "jump scroll delay", UNIT_MS, 0, 2500, 100, NULL, NULL,
848 lcd_jump_scroll_delay),
849 #endif
850 OFFON_SETTING(0,scroll_paginated,LANG_SCROLL_PAGINATED,
851 false,"scroll paginated",NULL),
852 #ifdef HAVE_LCD_COLOR
854 {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.fg_color,-1,
855 INT(DEFAULT_THEME_FOREGROUND),"foreground color",NULL,UNUSED},
856 {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.bg_color,-1,
857 INT(DEFAULT_THEME_BACKGROUND),"background color",NULL,UNUSED},
858 {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lss_color,-1,
859 INT(DEFAULT_THEME_SELECTOR_START),"line selector start color",NULL,
860 UNUSED},
861 {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lse_color,-1,
862 INT(DEFAULT_THEME_SELECTOR_END),"line selector end color",NULL,UNUSED},
863 {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lst_color,-1,
864 INT(DEFAULT_THEME_SELECTOR_TEXT),"line selector text color",NULL,
865 UNUSED},
867 #endif
868 /* more playback */
869 OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL),
870 OFFON_SETTING(0,party_mode,LANG_PARTY_MODE,false,"party mode",NULL),
871 OFFON_SETTING(0,fade_on_stop,LANG_FADE_ON_STOP,true,"volume fade",NULL),
872 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, ff_rewind_min_step,
873 LANG_FFRW_STEP, 1, "scan min step", NULL, UNIT_SEC,
874 NULL, NULL, NULL, 14, 1,2,3,4,5,6,8,10,15,20,25,30,45,60),
875 CHOICE_SETTING(0, ff_rewind_accel, LANG_FFRW_ACCEL, 2,
876 "seek acceleration", "very fast,fast,normal,slow,very slow", NULL, 5,
877 ID2P(LANG_VERY_FAST), ID2P(LANG_FAST), ID2P(LANG_NORMAL),
878 ID2P(LANG_SLOW) , ID2P(LANG_VERY_SLOW)),
879 #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE)
880 STRINGCHOICE_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0,"antiskip",
881 "5s,15s,30s,1min,2min,3min,5min,10min", NULL, 8,
882 TALK_ID(5, UNIT_SEC), TALK_ID(15, UNIT_SEC),
883 TALK_ID(30, UNIT_SEC), TALK_ID(1, UNIT_MIN),
884 TALK_ID(2, UNIT_MIN), TALK_ID(3, UNIT_MIN),
885 TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN)),
886 #elif defined(HAVE_DISK_STORAGE)
887 INT_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0, "antiskip",
888 UNIT_SEC, 0, 7, 1, NULL, NULL, audio_set_buffer_margin),
889 #endif
890 /* disk */
891 #ifdef HAVE_DISK_STORAGE
892 INT_SETTING(0, disk_spindown, LANG_SPINDOWN, 5, "disk spindown",
893 UNIT_SEC, 3, 254, 1, NULL, NULL, storage_spindown),
894 #endif /* HAVE_DISK_STORAGE */
895 /* browser */
896 CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files",
897 "all,supported,music,playlists", NULL, 4, ID2P(LANG_ALL),
898 ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC),
899 ID2P(LANG_PLAYLISTS)),
900 /* file sorting */
901 OFFON_SETTING(0, sort_case, LANG_SORT_CASE, false, "sort case", NULL),
902 CHOICE_SETTING(0, sort_dir, LANG_SORT_DIR, 0 ,
903 "sort dirs", "alpha,oldest,newest", NULL, 3,
904 ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE),
905 ID2P(LANG_SORT_DATE_REVERSE)),
906 CHOICE_SETTING(0, sort_file, LANG_SORT_FILE, 0 ,
907 "sort files", "alpha,oldest,newest,type", NULL, 4,
908 ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE),
909 ID2P(LANG_SORT_DATE_REVERSE) , ID2P(LANG_SORT_TYPE)),
910 CHOICE_SETTING(0, interpret_numbers, LANG_SORT_INTERPRET_NUMBERS, 1,
911 "sort interpret number", "digits,numbers",NULL, 2,
912 ID2P(LANG_SORT_INTERPRET_AS_DIGIT),
913 ID2P(LANG_SORT_INTERPRET_AS_NUMBERS)),
914 CHOICE_SETTING(0, show_filename_ext, LANG_SHOW_FILENAME_EXT, 3,
915 "show filename exts", "off,on,unknown,view_all", NULL , 4 ,
916 ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_UNKNOWN_TYPES),
917 ID2P(LANG_EXT_ONLY_VIEW_ALL)),
918 OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL),
919 OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true,
920 "playlist viewer icons",NULL),
921 OFFON_SETTING(0,playlist_viewer_indices,LANG_SHOW_INDICES,true,
922 "playlist viewer indices",NULL),
923 CHOICE_SETTING(0, playlist_viewer_track_display, LANG_TRACK_DISPLAY, 0,
924 "playlist viewer track display","track name,full path",
925 NULL, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY),
926 ID2P(LANG_DISPLAY_FULL_PATH)),
927 CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_ON,
928 "recursive directory insert", off_on_ask, NULL , 3 ,
929 ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_ASK)),
930 /* bookmarks */
931 CHOICE_SETTING(0, autocreatebookmark, LANG_BOOKMARK_SETTINGS_AUTOCREATE,
932 BOOKMARK_NO, "autocreate bookmarks",
933 "off,on,ask,recent only - on,recent only - ask", NULL, 5,
934 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
935 ID2P(LANG_ASK), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES),
936 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK)),
937 CHOICE_SETTING(0, autoloadbookmark, LANG_BOOKMARK_SETTINGS_AUTOLOAD,
938 BOOKMARK_NO, "autoload bookmarks", off_on_ask, NULL, 3,
939 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
940 ID2P(LANG_ASK)),
941 CHOICE_SETTING(0, usemrb, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS,
942 BOOKMARK_NO, "use most-recent-bookmarks",
943 "off,on,unique only", NULL, 3, ID2P(LANG_SET_BOOL_NO),
944 ID2P(LANG_SET_BOOL_YES),
945 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY)),
946 #ifdef HAVE_LCD_BITMAP
947 /* peak meter */
948 STRINGCHOICE_SETTING(0, peak_meter_clip_hold, LANG_PM_CLIP_HOLD, 16,
949 "peak meter clip hold",
950 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
951 ",3min,5min,10min,20min,45min,90min",
952 peak_meter_set_clip_hold, 25, LANG_PM_ETERNAL,
953 TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC),
954 TALK_ID(3, UNIT_SEC), TALK_ID(4, UNIT_SEC),
955 TALK_ID(5, UNIT_SEC), TALK_ID(6, UNIT_SEC),
956 TALK_ID(7, UNIT_SEC), TALK_ID(8, UNIT_SEC),
957 TALK_ID(9, UNIT_SEC), TALK_ID(10, UNIT_SEC),
958 TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC),
959 TALK_ID(25, UNIT_SEC), TALK_ID(30, UNIT_SEC),
960 TALK_ID(45, UNIT_SEC), TALK_ID(60, UNIT_SEC),
961 TALK_ID(90, UNIT_SEC), TALK_ID(2, UNIT_MIN),
962 TALK_ID(3, UNIT_MIN), TALK_ID(5, UNIT_MIN),
963 TALK_ID(10, UNIT_MIN), TALK_ID(20, UNIT_MIN),
964 TALK_ID(45, UNIT_MIN), TALK_ID(90, UNIT_MIN)),
965 STRINGCHOICE_SETTING(0, peak_meter_hold, LANG_PM_PEAK_HOLD, 3,
966 "peak meter hold",
967 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
968 NULL, 18, LANG_OFF, TALK_ID(200, UNIT_MS),
969 TALK_ID(300, UNIT_MS), TALK_ID(500, UNIT_MS),
970 TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC),
971 TALK_ID(3, UNIT_SEC), TALK_ID(4, UNIT_SEC),
972 TALK_ID(5, UNIT_SEC), TALK_ID(6, UNIT_SEC),
973 TALK_ID(7, UNIT_SEC), TALK_ID(8, UNIT_SEC),
974 TALK_ID(9, UNIT_SEC), TALK_ID(10, UNIT_SEC),
975 TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC),
976 TALK_ID(30, UNIT_SEC), TALK_ID(60, UNIT_SEC)),
977 INT_SETTING(0, peak_meter_release, LANG_PM_RELEASE, 8, "peak meter release",
978 UNIT_PM_TICK, 1, 0x7e, 1, NULL, NULL,NULL),
979 OFFON_SETTING(0,peak_meter_dbfs,LANG_PM_DBFS,true,"peak meter dbfs",NULL),
980 {F_T_INT, &global_settings.peak_meter_min, LANG_PM_MIN,INT(60),
981 "peak meter min", NULL, UNUSED},
982 {F_T_INT, &global_settings.peak_meter_max, LANG_PM_MAX,INT(0),
983 "peak meter max", NULL, UNUSED},
984 #ifdef HAVE_RECORDING
985 OFFON_SETTING(0, peak_meter_clipcounter, LANG_PM_CLIPCOUNTER, false,
986 "peak meter clipcounter", NULL),
987 #endif /* HAVE_RECORDING */
988 #endif /* HAVE_LCD_BITMAP */
989 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
990 SOUND_SETTING(F_SOUNDSETTING, mdb_strength, LANG_MDB_STRENGTH,
991 "mdb strength", SOUND_MDB_STRENGTH),
992 SOUND_SETTING(F_SOUNDSETTING, mdb_harmonics, LANG_MDB_HARMONICS,
993 "mdb harmonics", SOUND_MDB_HARMONICS),
994 SOUND_SETTING(F_SOUNDSETTING, mdb_center, LANG_MDB_CENTER,
995 "mdb center", SOUND_MDB_CENTER),
996 SOUND_SETTING(F_SOUNDSETTING, mdb_shape, LANG_MDB_SHAPE,
997 "mdb shape", SOUND_MDB_SHAPE),
998 OFFON_SETTING(F_SOUNDSETTING, mdb_enable, LANG_MDB_ENABLE,
999 false, "mdb enable", set_mdb_enable),
1000 #endif
1001 #if CONFIG_CODEC == MAS3507D
1002 OFFON_SETTING(F_SOUNDSETTING, line_in,LANG_LINE_IN,false,"line in",NULL),
1003 #endif
1004 /* voice */
1005 OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL),
1006 CHOICE_SETTING(0, talk_dir, LANG_VOICE_DIR, 0,
1007 "talk dir", off_number_spell, NULL, 3,
1008 ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
1009 ID2P(LANG_VOICE_SPELL)),
1010 OFFON_SETTING(F_TEMPVAR, talk_dir_clip, LANG_VOICE_DIR_TALK, false,
1011 "talk dir clip", NULL),
1012 CHOICE_SETTING(0, talk_file, LANG_VOICE_FILE, 0,
1013 "talk file", off_number_spell, NULL, 3,
1014 ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
1015 ID2P(LANG_VOICE_SPELL)),
1016 OFFON_SETTING(F_TEMPVAR, talk_file_clip, LANG_VOICE_FILE_TALK, false,
1017 "talk file clip", NULL),
1018 OFFON_SETTING(F_TEMPVAR, talk_filetype, LANG_VOICE_FILETYPE, false,
1019 "talk filetype", NULL),
1020 OFFON_SETTING(F_TEMPVAR, talk_battery_level, LANG_TALK_BATTERY_LEVEL, false,
1021 "Announce Battery Level", NULL),
1023 #ifdef HAVE_RECORDING
1024 /* recording */
1025 STRINGCHOICE_SETTING(F_RECSETTING, rec_timesplit, LANG_SPLIT_TIME, 0,
1026 "rec timesplit",
1027 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
1028 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
1029 NULL, 16, LANG_OFF,
1030 TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN),
1031 TALK_ID(15, UNIT_MIN), TALK_ID(30, UNIT_MIN),
1032 TALK_ID(60, UNIT_MIN), TALK_ID(74, UNIT_MIN),
1033 TALK_ID(80, UNIT_MIN), TALK_ID(2, UNIT_HOUR),
1034 TALK_ID(4, UNIT_HOUR), TALK_ID(6, UNIT_HOUR),
1035 TALK_ID(8, UNIT_HOUR), TALK_ID(10, UNIT_HOUR),
1036 TALK_ID(12, UNIT_HOUR), TALK_ID(18, UNIT_HOUR),
1037 TALK_ID(20, UNIT_HOUR), TALK_ID(24, UNIT_HOUR)),
1038 STRINGCHOICE_SETTING(F_RECSETTING, rec_sizesplit, LANG_SPLIT_SIZE, 0,
1039 "rec sizesplit",
1040 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
1041 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
1042 NULL, 16, LANG_OFF,
1043 TALK_ID(5, UNIT_MB), TALK_ID(10, UNIT_MB),
1044 TALK_ID(15, UNIT_MB), TALK_ID(32, UNIT_MB),
1045 TALK_ID(64, UNIT_MB), TALK_ID(75, UNIT_MB),
1046 TALK_ID(100, UNIT_MB), TALK_ID(128, UNIT_MB),
1047 TALK_ID(256, UNIT_MB), TALK_ID(512, UNIT_MB),
1048 TALK_ID(650, UNIT_MB), TALK_ID(700, UNIT_MB),
1049 TALK_ID(1024, UNIT_MB), TALK_ID(1536, UNIT_MB),
1050 TALK_ID(1792, UNIT_MB)),
1051 {F_T_INT|F_RECSETTING, &global_settings.rec_channels, LANG_CHANNELS, INT(0),
1052 "rec channels","stereo,mono",UNUSED},
1053 #if CONFIG_CODEC == SWCODEC
1054 {F_T_INT|F_RECSETTING, &global_settings.rec_mono_mode,
1055 LANG_RECORDING_MONO_MODE, INT(0), "rec mono mode","L+R,L,R",UNUSED},
1056 #endif
1057 CHOICE_SETTING(F_RECSETTING, rec_split_type, LANG_SPLIT_TYPE, 0,
1058 "rec split type", "Split,Stop,Shutdown", NULL, 3,
1059 ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN)),
1060 CHOICE_SETTING(F_RECSETTING, rec_split_method, LANG_SPLIT_MEASURE, 0,
1061 "rec split method", "Time,Filesize", NULL, 2,
1062 ID2P(LANG_TIME), ID2P(LANG_REC_SIZE)),
1063 {F_T_INT|F_RECSETTING, &global_settings.rec_source, LANG_RECORDING_SOURCE,
1064 INT(0), "rec source",
1065 &HAVE_MIC_REC_(",mic")
1066 HAVE_LINE_REC_(",line")
1067 HAVE_SPDIF_REC_(",spdif")
1068 HAVE_FMRADIO_REC_(",fmradio")[1],
1069 UNUSED},
1070 INT_SETTING(F_RECSETTING, rec_prerecord_time, LANG_RECORD_PRERECORD_TIME, 0,
1071 "prerecording time", UNIT_SEC, 0, 30, 1,
1072 formatter_unit_0_is_off, getlang_unit_0_is_off, NULL),
1074 TEXT_SETTING(F_RECSETTING, rec_directory, "rec path",
1075 REC_BASE_DIR, NULL, NULL),
1076 #ifdef HAVE_BACKLIGHT
1077 CHOICE_SETTING(F_RECSETTING, cliplight, LANG_CLIP_LIGHT, 0,
1078 "cliplight", "off,main,both,remote", NULL,
1079 #ifdef HAVE_REMOTE_LCD
1080 4, ID2P(LANG_OFF), ID2P(LANG_MAIN_UNIT),
1081 ID2P(LANG_REMOTE_MAIN), ID2P(LANG_REMOTE_UNIT)
1082 #else
1083 2, ID2P(LANG_OFF), ID2P(LANG_ON)
1084 #endif
1086 #endif
1087 #ifdef DEFAULT_REC_MIC_GAIN
1088 {F_T_INT|F_RECSETTING,&global_settings.rec_mic_gain,
1089 LANG_GAIN,INT(DEFAULT_REC_MIC_GAIN),
1090 "rec mic gain",NULL,UNUSED},
1091 #endif /* DEFAULT_REC_MIC_GAIN */
1092 #ifdef DEFAULT_REC_LEFT_GAIN
1093 {F_T_INT|F_RECSETTING,&global_settings.rec_left_gain,
1094 LANG_GAIN_LEFT,INT(DEFAULT_REC_LEFT_GAIN),
1095 "rec left gain",NULL,UNUSED},
1096 #endif /* DEFAULT_REC_LEFT_GAIN */
1097 #ifdef DEFAULT_REC_RIGHT_GAIN
1098 {F_T_INT|F_RECSETTING,&global_settings.rec_right_gain,LANG_GAIN_RIGHT,
1099 INT(DEFAULT_REC_RIGHT_GAIN),
1100 "rec right gain",NULL,UNUSED},
1101 #endif /* DEFAULT_REC_RIGHT_GAIN */
1102 #if CONFIG_CODEC == MAS3587F
1103 {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
1104 LANG_RECORDING_FREQUENCY, INT(0),
1105 "rec frequency","44,48,32,22,24,16", UNUSED},
1106 INT_SETTING(F_RECSETTING, rec_quality, LANG_RECORDING_QUALITY, 5,
1107 "rec quality", UNIT_INT, 0, 7, 1, NULL, NULL, NULL),
1108 OFFON_SETTING(F_RECSETTING, rec_editable, LANG_RECORDING_EDITABLE, false,
1109 "editable recordings", NULL),
1110 #endif /* CONFIG_CODEC == MAS3587F */
1111 #if CONFIG_CODEC == SWCODEC
1112 {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
1113 LANG_RECORDING_FREQUENCY,INT(REC_FREQ_DEFAULT),
1114 "rec frequency",REC_FREQ_CFG_VAL_LIST,UNUSED},
1115 {F_T_INT|F_RECSETTING,&global_settings.rec_format,
1116 LANG_RECORDING_FORMAT,INT(REC_FORMAT_DEFAULT),
1117 "rec format",REC_FORMAT_CFG_VAL_LIST,UNUSED},
1118 /** Encoder settings start - keep these together **/
1119 /* aiff_enc */
1120 /* (no settings yet) */
1121 /* mp3_enc */
1122 {F_T_INT|F_RECSETTING, &global_settings.mp3_enc_config.bitrate,-1,
1123 INT(MP3_ENC_BITRATE_CFG_DEFAULT),
1124 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST,UNUSED},
1125 /* wav_enc */
1126 /* (no settings yet) */
1127 /* wavpack_enc */
1128 /* (no settings yet) */
1129 /** Encoder settings end **/
1130 #endif /* CONFIG_CODEC == SWCODEC */
1131 /* values for the trigger */
1132 INT_SETTING(F_RECSETTING, rec_start_thres_db, LANG_RECORD_START_THRESHOLD, -35,
1133 "trigger start threshold dB", UNIT_DB, VOLUME_MIN/10, 0, 1, NULL, NULL, NULL),
1134 INT_SETTING(F_RECSETTING, rec_start_thres_linear, LANG_RECORD_START_THRESHOLD, 5,
1135 "trigger start threshold linear", UNIT_PERCENT, 0, 100, 1, NULL, NULL, NULL),
1136 INT_SETTING(F_RECSETTING, rec_stop_thres_db, LANG_RECORD_STOP_THRESHOLD, -45,
1137 "trigger stop threshold dB", UNIT_DB, VOLUME_MIN/10, 0, 1, NULL, NULL, NULL),
1138 INT_SETTING(F_RECSETTING, rec_stop_thres_linear, LANG_RECORD_STOP_THRESHOLD, 10,
1139 "trigger stop threshold linear", UNIT_PERCENT, 0, 100, 1, NULL, NULL, NULL),
1140 TABLE_SETTING(F_RECSETTING, rec_start_duration, LANG_MIN_DURATION, 0,
1141 "trigger start duration",
1142 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1143 UNIT_SEC, NULL, NULL, NULL, 13,
1144 0,1,2,5,10,15,20,25,30,60,120,300,600),
1145 TABLE_SETTING(F_RECSETTING, rec_stop_postrec, LANG_MIN_DURATION, 0,
1146 "trigger stop duration",
1147 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1148 UNIT_SEC, NULL, NULL, NULL, 13,
1149 0,1,2,5,10,15,20,25,30,60,120,300,600),
1150 TABLE_SETTING(F_RECSETTING, rec_stop_gap, LANG_RECORD_STOP_GAP, 1,
1151 "trigger min gap",
1152 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1153 UNIT_SEC, NULL, NULL, NULL, 13,
1154 0,1,2,5,10,15,20,25,30,60,120,300,600),
1155 CHOICE_SETTING(F_RECSETTING, rec_trigger_mode, LANG_RECORD_TRIGGER, TRIG_MODE_OFF,
1156 "trigger mode","off,once,repeat", NULL ,3,
1157 ID2P(LANG_OFF), ID2P(LANG_RECORD_TRIG_NOREARM), ID2P(LANG_REPEAT)),
1158 CHOICE_SETTING(F_RECSETTING, rec_trigger_type, LANG_RECORD_TRIGGER_TYPE, TRIG_TYPE_STOP,
1159 "trigger type","stop,pause,nf stp", NULL ,3,
1160 ID2P(LANG_RECORD_TRIGGER_STOP), ID2P(LANG_PAUSE), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP)),
1161 #ifdef HAVE_RECORDING_HISTOGRAM
1162 /* TO DO: additional restictions of following REP items? */
1163 TABLE_SETTING(F_RECSETTING, rec_histogram_interval, LANG_RECORDING_HISTOGRAM_INTERVAL, 0,
1164 "histogram interval","0s,1s,2s,4s",
1165 UNIT_SEC, NULL, NULL, NULL, 4, 0,1,2,4),
1166 #endif /* HAVE_RECORDING_HISTOGRAM */
1168 #endif /* HAVE_RECORDING */
1170 #ifdef HAVE_SPDIF_POWER
1171 OFFON_SETTING(F_SOUNDSETTING, spdif_enable, LANG_SPDIF_ENABLE, false,
1172 "spdif enable", spdif_power_enable),
1173 #endif
1174 CHOICE_SETTING(0, next_folder, LANG_NEXT_FOLDER, FOLDER_ADVANCE_OFF,
1175 "folder navigation", "off,on,random",NULL ,3,
1176 ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
1177 ID2P(LANG_RANDOM)),
1179 #ifdef HAVE_TAGCACHE
1180 OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false,
1181 "gather runtime data", NULL),
1182 #endif
1184 #if CONFIG_CODEC == SWCODEC
1185 /* replay gain */
1186 CHOICE_SETTING(F_SOUNDSETTING, replaygain_type, LANG_REPLAYGAIN_MODE,
1187 REPLAYGAIN_SHUFFLE, "replaygain type",
1188 "track,album,track shuffle,off", NULL, 4, ID2P(LANG_TRACK_GAIN),
1189 ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN), ID2P(LANG_OFF)),
1190 OFFON_SETTING(F_SOUNDSETTING, replaygain_noclip, LANG_REPLAYGAIN_NOCLIP,
1191 false, "replaygain noclip", NULL),
1192 INT_SETTING_NOWRAP(F_SOUNDSETTING, replaygain_preamp,
1193 LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp",
1194 UNIT_DB, -120, 120, 5, db_format, get_dec_talkid, NULL),
1196 CHOICE_SETTING(0, beep, LANG_BEEP, 0, "beep", "off,weak,moderate,strong",
1197 NULL, 4, ID2P(LANG_OFF), ID2P(LANG_WEAK),
1198 ID2P(LANG_MODERATE), ID2P(LANG_STRONG)),
1200 #ifdef HAVE_CROSSFADE
1201 /* crossfade */
1202 CHOICE_SETTING(F_SOUNDSETTING, crossfade, LANG_CROSSFADE_ENABLE, 0,
1203 "crossfade",
1204 "off,auto track change,man track skip,shuffle,shuffle or man track skip,always",
1205 NULL, 6, ID2P(LANG_OFF), ID2P(LANG_AUTOTRACKSKIP),
1206 ID2P(LANG_MANTRACKSKIP), ID2P(LANG_SHUFFLE),
1207 ID2P(LANG_SHUFFLE_TRACKSKIP), ID2P(LANG_ALWAYS)),
1208 INT_SETTING(F_SOUNDSETTING, crossfade_fade_in_delay,
1209 LANG_CROSSFADE_FADE_IN_DELAY, 0,
1210 "crossfade fade in delay", UNIT_SEC, 0, 7, 1, NULL, NULL, NULL),
1211 INT_SETTING(F_SOUNDSETTING, crossfade_fade_out_delay,
1212 LANG_CROSSFADE_FADE_OUT_DELAY, 0,
1213 "crossfade fade out delay", UNIT_SEC, 0, 7, 1, NULL, NULL,NULL),
1214 INT_SETTING(F_SOUNDSETTING, crossfade_fade_in_duration,
1215 LANG_CROSSFADE_FADE_IN_DURATION, 2,
1216 "crossfade fade in duration", UNIT_SEC, 0, 15, 1, NULL, NULL,
1217 NULL),
1218 INT_SETTING(F_SOUNDSETTING, crossfade_fade_out_duration,
1219 LANG_CROSSFADE_FADE_OUT_DURATION, 2,
1220 "crossfade fade out duration", UNIT_SEC, 0, 15, 1, NULL, NULL,
1221 NULL),
1222 CHOICE_SETTING(F_SOUNDSETTING, crossfade_fade_out_mixmode,
1223 LANG_CROSSFADE_FADE_OUT_MODE, 0,
1224 "crossfade fade out mode", "crossfade,mix", NULL, 2,
1225 ID2P(LANG_CROSSFADE), ID2P(LANG_MIX)),
1226 #endif
1228 /* crossfeed */
1229 OFFON_SETTING(F_SOUNDSETTING, crossfeed, LANG_CROSSFEED, false,
1230 "crossfeed", dsp_set_crossfeed),
1231 INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_direct_gain,
1232 LANG_CROSSFEED_DIRECT_GAIN, -15,
1233 "crossfeed direct gain", UNIT_DB, -60, 0, 5,
1234 db_format, get_dec_talkid,dsp_set_crossfeed_direct_gain),
1235 INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_cross_gain,
1236 LANG_CROSSFEED_CROSS_GAIN, -60,
1237 "crossfeed cross gain", UNIT_DB, -120, -30, 5,
1238 db_format, get_dec_talkid, crossfeed_cross_set),
1239 INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_hf_attenuation,
1240 LANG_CROSSFEED_HF_ATTENUATION, -160,
1241 "crossfeed hf attenuation", UNIT_DB, -240, -60, 5,
1242 db_format, get_dec_talkid, crossfeed_cross_set),
1243 INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_hf_cutoff,
1244 LANG_CROSSFEED_HF_CUTOFF, 700,
1245 "crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100,
1246 NULL, NULL, crossfeed_cross_set),
1248 /* equalizer */
1249 OFFON_SETTING(F_EQSETTING, eq_enabled, LANG_EQUALIZER_ENABLED, false,
1250 "eq enabled", NULL),
1251 INT_SETTING_NOWRAP(F_EQSETTING, eq_precut, LANG_EQUALIZER_PRECUT, 0,
1252 "eq precut", UNIT_DB, 0, 240, 5, eq_precut_format,
1253 get_precut_talkid, dsp_set_eq_precut),
1254 /* 0..32768 Hz */
1255 INT_SETTING_NOWRAP(F_EQSETTING, eq_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF,
1256 60, "eq band 0 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
1257 EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
1258 INT_SETTING_NOWRAP(F_EQSETTING, eq_band1_cutoff, LANG_EQUALIZER_BAND_CENTER,
1259 200, "eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
1260 EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
1261 INT_SETTING_NOWRAP(F_EQSETTING, eq_band2_cutoff, LANG_EQUALIZER_BAND_CENTER,
1262 800, "eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
1263 EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
1264 INT_SETTING_NOWRAP(F_EQSETTING, eq_band3_cutoff, LANG_EQUALIZER_BAND_CENTER,
1265 4000, "eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
1266 EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
1267 INT_SETTING_NOWRAP(F_EQSETTING, eq_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF,
1268 12000, "eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
1269 EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
1270 /* 0..64 (or 0.0 to 6.4) */
1271 INT_SETTING_NOWRAP(F_EQSETTING, eq_band0_q, LANG_EQUALIZER_BAND_Q, 7,
1272 "eq band 0 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
1273 eq_q_format, get_dec_talkid, NULL),
1274 INT_SETTING_NOWRAP(F_EQSETTING, eq_band1_q, LANG_EQUALIZER_BAND_Q, 10,
1275 "eq band 1 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
1276 eq_q_format, get_dec_talkid, NULL),
1277 INT_SETTING_NOWRAP(F_EQSETTING, eq_band2_q, LANG_EQUALIZER_BAND_Q, 10,
1278 "eq band 2 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
1279 eq_q_format, get_dec_talkid, NULL),
1280 INT_SETTING_NOWRAP(F_EQSETTING, eq_band3_q, LANG_EQUALIZER_BAND_Q, 10,
1281 "eq band 3 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
1282 eq_q_format, get_dec_talkid, NULL),
1283 INT_SETTING_NOWRAP(F_EQSETTING, eq_band4_q, LANG_EQUALIZER_BAND_Q, 7,
1284 "eq band 4 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
1285 eq_q_format, get_dec_talkid, NULL),
1286 /* -240..240 (or -24db to +24db) */
1287 INT_SETTING_NOWRAP(F_EQSETTING, eq_band0_gain, LANG_GAIN, 0,
1288 "eq band 0 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
1289 EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
1290 INT_SETTING_NOWRAP(F_EQSETTING, eq_band1_gain, LANG_GAIN, 0,
1291 "eq band 1 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
1292 EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
1293 INT_SETTING_NOWRAP(F_EQSETTING, eq_band2_gain, LANG_GAIN, 0,
1294 "eq band 2 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
1295 EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
1296 INT_SETTING_NOWRAP(F_EQSETTING, eq_band3_gain, LANG_GAIN, 0,
1297 "eq band 3 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
1298 EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
1299 INT_SETTING_NOWRAP(F_EQSETTING, eq_band4_gain, LANG_GAIN, 0,
1300 "eq band 4 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
1301 EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
1303 /* dithering */
1304 OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false,
1305 "dithering enabled", dsp_dither_enable),
1307 /* timestretch */
1308 OFFON_SETTING(F_SOUNDSETTING, timestretch_enabled, LANG_TIMESTRETCH, false,
1309 "timestretch enabled", dsp_timestretch_enable),
1311 /* compressor */
1312 INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_threshold,
1313 LANG_COMPRESSOR_THRESHOLD, 0,
1314 "compressor threshold", UNIT_DB, 0, -24,
1315 -3, formatter_unit_0_is_off, getlang_unit_0_is_off, compressor_set),
1316 CHOICE_SETTING(F_SOUNDSETTING|F_NO_WRAP, compressor_makeup_gain,
1317 LANG_COMPRESSOR_GAIN, 1, "compressor makeup gain",
1318 "off,auto", compressor_set, 2,
1319 ID2P(LANG_OFF), ID2P(LANG_AUTO)),
1320 CHOICE_SETTING(F_SOUNDSETTING|F_NO_WRAP, compressor_ratio,
1321 LANG_COMPRESSOR_RATIO, 1, "compressor ratio",
1322 "2:1,4:1,6:1,10:1,limit", compressor_set, 5,
1323 ID2P(LANG_COMPRESSOR_RATIO_2), ID2P(LANG_COMPRESSOR_RATIO_4),
1324 ID2P(LANG_COMPRESSOR_RATIO_6), ID2P(LANG_COMPRESSOR_RATIO_10),
1325 ID2P(LANG_COMPRESSOR_RATIO_LIMIT)),
1326 CHOICE_SETTING(F_SOUNDSETTING|F_NO_WRAP, compressor_knee,
1327 LANG_COMPRESSOR_KNEE, 1, "compressor knee",
1328 "hard knee,soft knee", compressor_set, 2,
1329 ID2P(LANG_COMPRESSOR_HARD_KNEE), ID2P(LANG_COMPRESSOR_SOFT_KNEE)),
1330 INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_release_time,
1331 LANG_COMPRESSOR_RELEASE, 500,
1332 "compressor release time", UNIT_MS, 100, 1000,
1333 100, NULL, NULL, compressor_set),
1334 #endif
1335 #ifdef HAVE_WM8758
1336 SOUND_SETTING(F_NO_WRAP, bass_cutoff, LANG_BASS_CUTOFF,
1337 "bass cutoff", SOUND_BASS_CUTOFF),
1338 SOUND_SETTING(F_NO_WRAP, treble_cutoff, LANG_TREBLE_CUTOFF,
1339 "treble cutoff", SOUND_TREBLE_CUTOFF),
1340 #endif
1341 #ifdef HAVE_DIRCACHE
1342 OFFON_SETTING(F_BANFROMQS,dircache,LANG_DIRCACHE_ENABLE,false,"dircache",NULL),
1343 SYSTEM_SETTING(NVRAM(4),dircache_size,0),
1344 #endif
1346 #ifdef HAVE_TAGCACHE
1347 #ifdef HAVE_TC_RAMCACHE
1348 OFFON_SETTING(F_BANFROMQS,tagcache_ram,LANG_TAGCACHE_RAM,false,"tagcache_ram",NULL),
1349 #endif
1350 OFFON_SETTING(F_BANFROMQS, tagcache_autoupdate, LANG_TAGCACHE_AUTOUPDATE, false,
1351 "tagcache_autoupdate", NULL),
1352 #endif
1353 CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
1354 "default codepage",
1355 #ifdef HAVE_LCD_BITMAP
1356 /* The order must match with that in unicode.c */
1357 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1358 "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8",
1359 set_codepage, 14,
1360 ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
1361 ID2P(LANG_CODEPAGE_HEBREW), ID2P(LANG_CODEPAGE_CYRILLIC),
1362 ID2P(LANG_CODEPAGE_THAI), ID2P(LANG_CODEPAGE_ARABIC),
1363 ID2P(LANG_CODEPAGE_TURKISH),
1364 ID2P(LANG_CODEPAGE_LATIN_EXTENDED),
1365 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN),
1366 ID2P(LANG_CODEPAGE_JAPANESE),
1367 ID2P(LANG_CODEPAGE_SIMPLIFIED), ID2P(LANG_CODEPAGE_KOREAN),
1368 ID2P(LANG_CODEPAGE_TRADITIONAL), ID2P(LANG_CODEPAGE_UTF8)),
1369 #else /* !HAVE_LCD_BITMAP */
1370 /* The order must match with that in unicode.c */
1371 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,utf-8",
1372 set_codepage, 7,
1373 ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
1374 ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH),
1375 ID2P(LANG_CODEPAGE_LATIN_EXTENDED),
1376 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN),
1377 ID2P(LANG_CODEPAGE_UTF8)),
1378 #endif
1379 OFFON_SETTING(0, warnon_erase_dynplaylist, LANG_WARN_ERASEDYNPLAYLIST_MENU,
1380 true, "warn when erasing dynamic playlist",NULL),
1382 #ifdef HAVE_BACKLIGHT
1383 #ifdef HAS_BUTTON_HOLD
1384 CHOICE_SETTING(0, backlight_on_button_hold, LANG_BACKLIGHT_ON_BUTTON_HOLD,
1385 1, "backlight on button hold", "normal,off,on",
1386 backlight_set_on_button_hold, 3,
1387 ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
1388 #endif
1390 #ifdef HAVE_LCD_SLEEP_SETTING
1391 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off,
1392 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF, 3,
1393 "lcd sleep after backlight off",
1394 "always,never,5,10,15,20,30,45,60,90",
1395 lcd_set_sleep_after_backlight_off, 10,
1396 LANG_ALWAYS, LANG_NEVER, TALK_ID(5, UNIT_SEC),
1397 TALK_ID(10, UNIT_SEC), TALK_ID(15, UNIT_SEC),
1398 TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC),
1399 TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC),
1400 TALK_ID(90, UNIT_SEC)),
1401 #endif /* HAVE_LCD_SLEEP_SETTING */
1402 #endif /* HAVE_BACKLIGHT */
1404 OFFON_SETTING(0, hold_lr_for_scroll_in_list, -1, true,
1405 "hold_lr_for_scroll_in_list",NULL),
1406 #ifdef HAVE_LCD_BITMAP
1407 CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_CURRENT,
1408 "show path in browser", "off,current directory,full path",
1409 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT),
1410 ID2P(LANG_DISPLAY_FULL_PATH)),
1411 #endif
1413 #ifdef HAVE_AGC
1414 {F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORDING_AGC_PRESET,
1415 INT(1),"agc mic preset",NULL,UNUSED},
1416 {F_T_INT,&global_settings.rec_agc_preset_line,LANG_RECORDING_AGC_PRESET,
1417 INT(1),"agc line preset",NULL,UNUSED},
1418 {F_T_INT,&global_settings.rec_agc_maxgain_mic,-1,INT(104),
1419 "agc maximum mic gain",NULL,UNUSED},
1420 {F_T_INT,&global_settings.rec_agc_maxgain_line,-1,INT(96),
1421 "agc maximum line gain",NULL,UNUSED},
1422 {F_T_INT,&global_settings.rec_agc_cliptime,LANG_RECORDING_AGC_CLIPTIME,
1423 INT(1),"agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED},
1424 #endif
1426 #ifdef HAVE_REMOTE_LCD
1427 #ifdef HAS_REMOTE_BUTTON_HOLD
1428 CHOICE_SETTING(0, remote_backlight_on_button_hold,
1429 LANG_BACKLIGHT_ON_BUTTON_HOLD, 0,
1430 "remote backlight on button hold",
1431 "normal,off,on", remote_backlight_set_on_button_hold, 3,
1432 ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
1433 #endif
1434 #endif
1435 #ifdef HAVE_HEADPHONE_DETECTION
1436 CHOICE_SETTING(0, unplug_mode, LANG_HEADPHONE_UNPLUG, 0,
1437 "pause on headphone unplug", "off,pause,pause and resume",
1438 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_PAUSE),
1439 ID2P(LANG_HEADPHONE_UNPLUG_RESUME)),
1440 INT_SETTING(0, unplug_rw, LANG_HEADPHONE_UNPLUG_RW, 0,
1441 "rewind duration on pause", UNIT_SEC, 0, 15, 1, NULL, NULL,
1442 NULL),
1443 OFFON_SETTING(0, unplug_autoresume,
1444 LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME, false,
1445 "disable autoresume if phones not present",NULL),
1446 #endif
1447 #if CONFIG_TUNER
1448 CHOICE_SETTING(0, fm_region, LANG_FM_REGION, 0,
1449 "fm_region", "eu,us,jp,kr,it,wo", set_radio_region, 6,
1450 ID2P(LANG_FM_EUROPE), ID2P(LANG_FM_US),
1451 ID2P(LANG_FM_JAPAN), ID2P(LANG_FM_KOREA),
1452 ID2P(LANG_FM_ITALY), ID2P(LANG_FM_OTHER)),
1453 #endif
1455 OFFON_SETTING(F_BANFROMQS, audioscrobbler, LANG_AUDIOSCROBBLER, false,
1456 "Last.fm Logging", NULL),
1457 #if CONFIG_TUNER
1458 TEXT_SETTING(0, fmr_file, "fmr", "-",
1459 FMPRESET_PATH "/", ".fmr"),
1460 TEXT_SETTING(F_THEMESETTING,fms_file, "fms",
1461 DEFAULT_FMS_NAME, SBS_DIR "/", ".fms"),
1462 #ifdef HAVE_REMOTE_LCD
1463 TEXT_SETTING(F_THEMESETTING,rfms_file, "rfms",
1464 DEFAULT_FMS_NAME, SBS_DIR "/", ".rfms"),
1465 #endif
1466 #endif /* CONFIG_TUNER */
1467 #ifdef HAVE_LCD_BITMAP
1468 TEXT_SETTING(F_THEMESETTING, font_file, "font",
1469 DEFAULT_FONTNAME, FONT_DIR "/", ".fnt"),
1470 #endif
1471 #ifdef HAVE_REMOTE_LCD
1472 TEXT_SETTING(F_THEMESETTING, remote_font_file, "remote font",
1473 "-", FONT_DIR "/", ".fnt"),
1474 #endif
1475 TEXT_SETTING(F_THEMESETTING,wps_file, "wps",
1476 DEFAULT_WPSNAME, WPS_DIR "/", ".wps"),
1477 #ifdef HAVE_LCD_BITMAP
1478 TEXT_SETTING(F_THEMESETTING,sbs_file, "sbs",
1479 DEFAULT_SBSNAME, SBS_DIR "/", ".sbs"),
1480 #endif
1481 #ifdef HAVE_REMOTE_LCD
1482 TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps",
1483 DEFAULT_WPSNAME, WPS_DIR "/", ".rwps"),
1484 TEXT_SETTING(F_THEMESETTING,rsbs_file, "rsbs",
1485 DEFAULT_SBSNAME, SBS_DIR "/", ".rsbs"),
1486 #endif
1487 TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"),
1488 #if LCD_DEPTH > 1
1489 TEXT_SETTING(F_THEMESETTING,backdrop_file,"backdrop",
1490 DEFAULT_BACKDROP, BACKDROP_DIR "/", ".bmp"),
1491 #endif
1492 #ifdef HAVE_LCD_BITMAP
1493 TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"),
1494 #endif
1495 #ifdef HAVE_USB_CHARGING_ENABLE
1496 OFFON_SETTING(0,usb_charging,LANG_USB_CHARGING,false,"usb charging",NULL),
1497 #endif
1498 OFFON_SETTING(F_BANFROMQS,cuesheet,LANG_CUESHEET_ENABLE,false,"cuesheet support",
1499 NULL),
1500 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, skip_length,
1501 LANG_SKIP_LENGTH, 0, "skip length",
1502 "outro,track,1s,2s,3s,5s,7s,10s,15s,20s,30s,45s,1min,90s,2min,3min,5min,10min,15min",
1503 UNIT_SEC, formatter_unit_0_is_skip_track,
1504 getlang_unit_0_is_skip_track, NULL,
1505 19, -1,0,1,2,3,5,7,10,15,20,30,45,60,90,120,180,300,600,900),
1506 CHOICE_SETTING(0, start_in_screen, LANG_START_SCREEN, 1,
1507 "start in screen", "previous,root,files,"
1508 #ifdef HAVE_TAGCACHE
1509 "db,"
1510 #endif
1511 "wps,menu,"
1512 #ifdef HAVE_RECORDING
1513 "recording,"
1514 #endif
1515 #if CONFIG_TUNER
1516 "radio,"
1517 #endif
1518 "bookmarks" ,NULL,
1519 #if defined(HAVE_TAGCACHE)
1520 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1522 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1524 #else
1526 #endif
1527 #else
1528 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1530 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1532 #else
1534 #endif
1535 #endif
1536 ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU),
1537 ID2P(LANG_DIR_BROWSER),
1538 #ifdef HAVE_TAGCACHE
1539 ID2P(LANG_TAGCACHE),
1540 #endif
1541 ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_SETTINGS),
1542 #ifdef HAVE_RECORDING
1543 ID2P(LANG_RECORDING),
1544 #endif
1545 #if CONFIG_TUNER
1546 ID2P(LANG_FM_RADIO),
1547 #endif
1548 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS)
1550 SYSTEM_SETTING(NVRAM(1),last_screen,-1),
1551 #if defined(HAVE_RTC_ALARM) && \
1552 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1553 {F_T_INT, &global_settings.alarm_wake_up_screen, LANG_ALARM_WAKEUP_SCREEN,
1554 INT(ALARM_START_WPS), "alarm wakeup screen", ALARM_SETTING_TEXT,UNUSED},
1555 #endif /* HAVE_RTC_ALARM */
1557 /* Customizable icons */
1558 #ifdef HAVE_LCD_BITMAP
1559 TEXT_SETTING(F_THEMESETTING, icon_file, "iconset", DEFAULT_ICONSET,
1560 ICON_DIR "/", ".bmp"),
1561 TEXT_SETTING(F_THEMESETTING, viewers_icon_file, "viewers iconset",
1562 DEFAULT_VIEWERS_ICONSET,
1563 ICON_DIR "/", ".bmp"),
1564 #endif
1565 #ifdef HAVE_REMOTE_LCD
1566 TEXT_SETTING(F_THEMESETTING, remote_icon_file, "remote iconset", "-",
1567 ICON_DIR "/", ".bmp"),
1568 TEXT_SETTING(F_THEMESETTING, remote_viewers_icon_file,
1569 "remote viewers iconset", "-",
1570 ICON_DIR "/", ".bmp"),
1571 #endif /* HAVE_REMOTE_LCD */
1572 #ifdef HAVE_LCD_COLOR
1573 TEXT_SETTING(F_THEMESETTING, colors_file, "filetype colours", "-",
1574 THEME_DIR "/", ".colours"),
1575 #endif
1576 #ifdef HAVE_BUTTON_LIGHT
1577 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, buttonlight_timeout,
1578 LANG_BUTTONLIGHT_TIMEOUT, 5, "button light timeout", off_on,
1579 UNIT_SEC, backlight_formatter, backlight_getlang,
1580 buttonlight_set_timeout, 20,
1581 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
1582 #endif
1583 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1584 INT_SETTING(F_NO_WRAP, buttonlight_brightness, LANG_BUTTONLIGHT_BRIGHTNESS,
1585 DEFAULT_BRIGHTNESS_SETTING,
1586 "button light brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING,
1587 MAX_BRIGHTNESS_SETTING, 1, NULL, NULL,
1588 buttonlight_set_brightness),
1589 #endif
1590 #ifndef HAVE_WHEEL_ACCELERATION
1591 INT_SETTING(0, list_accel_start_delay, LANG_LISTACCEL_START_DELAY,
1592 2, "list_accel_start_delay", UNIT_MS, 0, 10, 1,
1593 formatter_unit_0_is_off, getlang_unit_0_is_off, NULL),
1594 INT_SETTING(0, list_accel_wait, LANG_LISTACCEL_ACCEL_SPEED,
1595 3, "list_accel_wait", UNIT_SEC, 1, 10, 1,
1596 scanaccel_formatter, getlang_unit_0_is_off, NULL),
1597 #endif /* HAVE_WHEEL_ACCELERATION */
1598 #if CONFIG_CODEC == SWCODEC
1599 /* keyclick */
1600 CHOICE_SETTING(0, keyclick, LANG_KEYCLICK, 0,
1601 "keyclick", "off,weak,moderate,strong", NULL, 4,
1602 ID2P(LANG_OFF), ID2P(LANG_WEAK), ID2P(LANG_MODERATE),
1603 ID2P(LANG_STRONG)),
1604 OFFON_SETTING(0, keyclick_repeats, LANG_KEYCLICK_REPEATS, false,
1605 "keyclick repeats", NULL),
1606 #endif /* CONFIG_CODEC == SWCODEC */
1607 TEXT_SETTING(0, playlist_catalog_dir, "playlist catalog directory",
1608 PLAYLIST_CATALOG_DEFAULT_DIR, NULL, NULL),
1609 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
1610 CHOICE_SETTING(0, touchpad_sensitivity, LANG_TOUCHPAD_SENSITIVITY, 0,
1611 "touchpad sensitivity", "normal,high", touchpad_set_sensitivity, 2,
1612 ID2P(LANG_NORMAL), ID2P(LANG_HIGH)),
1613 #endif
1614 #ifdef HAVE_QUICKSCREEN
1615 CUSTOM_SETTING(0, qs_items[QUICKSCREEN_TOP], LANG_TOP_QS_ITEM,
1616 &global_settings.dirfilter, "qs top",
1617 qs_load_from_cfg, qs_write_to_cfg,
1618 qs_is_changed, qs_set_default),
1619 CUSTOM_SETTING(0, qs_items[QUICKSCREEN_LEFT], LANG_LEFT_QS_ITEM,
1620 &global_settings.playlist_shuffle, "qs left",
1621 qs_load_from_cfg, qs_write_to_cfg,
1622 qs_is_changed, qs_set_default),
1623 CUSTOM_SETTING(0, qs_items[QUICKSCREEN_RIGHT], LANG_RIGHT_QS_ITEM,
1624 &global_settings.repeat_mode, "qs right",
1625 qs_load_from_cfg, qs_write_to_cfg,
1626 qs_is_changed, qs_set_default),
1627 CUSTOM_SETTING(0, qs_items[QUICKSCREEN_BOTTOM], LANG_BOTTOM_QS_ITEM,
1628 &global_settings.dirfilter, "qs bottom",
1629 qs_load_from_cfg, qs_write_to_cfg,
1630 qs_is_changed, qs_set_default),
1631 #endif
1632 #ifdef HAVE_SPEAKER
1633 OFFON_SETTING(0, speaker_enabled, LANG_ENABLE_SPEAKER, false, "speaker",
1634 audiohw_enable_speaker),
1635 #endif
1636 #ifdef HAVE_TOUCHSCREEN
1637 CHOICE_SETTING(0, touch_mode, LANG_TOUCHSCREEN_MODE, TOUCHSCREEN_BUTTON,
1638 "touchscreen mode", "point,grid", NULL, 2,
1639 ID2P(LANG_TOUCHSCREEN_POINT), ID2P(LANG_TOUCHSCREEN_GRID)),
1640 CUSTOM_SETTING(0, ts_calibration_data, -1,
1641 &default_calibration_parameters, "touchscreen calibration",
1642 tsc_load_from_cfg, tsc_write_to_cfg,
1643 tsc_is_changed, tsc_set_default),
1644 #endif
1645 OFFON_SETTING(0, prevent_skip, LANG_PREVENT_SKIPPING, false, "prevent track skip", NULL),
1647 #ifdef HAVE_PITCHSCREEN
1648 OFFON_SETTING(0, pitch_mode_semitone, LANG_SEMITONE, false,
1649 "Semitone pitch change", NULL),
1650 #if CONFIG_CODEC == SWCODEC
1651 OFFON_SETTING(0, pitch_mode_timestretch, LANG_TIMESTRETCH, false,
1652 "Timestretch mode", NULL),
1653 #endif
1654 #endif
1656 #ifdef USB_ENABLE_HID
1657 OFFON_SETTING(0, usb_hid, LANG_USB_HID, true, "usb hid", usb_set_hid),
1658 CHOICE_SETTING(0, usb_keypad_mode, LANG_USB_KEYPAD_MODE, 0,
1659 "usb keypad mode", "multimedia,presentation,browser"
1660 #ifdef HAVE_USB_HID_MOUSE
1661 ",mouse"
1662 #endif
1663 , NULL,
1664 #ifdef HAVE_USB_HID_MOUSE
1666 #else
1668 #endif
1669 ID2P(LANG_MULTIMEDIA_MODE), ID2P(LANG_PRESENTATION_MODE),
1670 ID2P(LANG_BROWSER_MODE)
1671 #ifdef HAVE_USB_HID_MOUSE
1672 , ID2P(LANG_MOUSE_MODE)
1673 #endif
1674 ), /* CHOICE_SETTING( usb_keypad_mode ) */
1675 #endif
1677 /* Customizable list */
1678 #ifdef HAVE_LCD_BITMAP
1679 VIEWPORT_SETTING(ui_vp_config, "ui viewport"),
1680 #ifdef HAVE_REMOTE_LCD
1681 VIEWPORT_SETTING(remote_ui_vp_config, "remote ui viewport"),
1682 #endif
1683 #endif
1685 #ifdef HAVE_MORSE_INPUT
1686 OFFON_SETTING(0, morse_input, LANG_MORSE_INPUT, false, "morse input", NULL),
1687 #endif
1689 #ifdef HAVE_HOTKEY
1690 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_wps,
1691 LANG_HOTKEY_WPS, HOTKEY_VIEW_PLAYLIST, "hotkey wps",
1692 "off,view playlist,show track info,pitchscreen,open with,delete",
1693 UNIT_INT, hotkey_formatter, hotkey_getlang, NULL, 6, HOTKEY_OFF,
1694 HOTKEY_VIEW_PLAYLIST, HOTKEY_SHOW_TRACK_INFO, HOTKEY_PITCHSCREEN,
1695 HOTKEY_OPEN_WITH, HOTKEY_DELETE),
1696 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_tree,
1697 LANG_HOTKEY_FILE_BROWSER, HOTKEY_OFF, "hotkey tree",
1698 "off,open with,delete,insert,insert shuffled",
1699 UNIT_INT, hotkey_formatter, hotkey_getlang, NULL, 5, HOTKEY_OFF,
1700 HOTKEY_OPEN_WITH, HOTKEY_DELETE, HOTKEY_INSERT, HOTKEY_INSERT_SHUFFLED),
1701 #endif
1703 #if CONFIG_CODEC == SWCODEC
1704 INT_SETTING(0, resume_rewind, LANG_RESUME_REWIND, 0,
1705 "resume rewind", UNIT_SEC, 0, 60, 5,
1706 NULL, NULL, NULL),
1707 #endif
1710 const int nb_settings = sizeof(settings)/sizeof(*settings);
1712 const struct settings_list* get_settings_list(int*count)
1714 *count = nb_settings;
1715 return settings;