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