1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 Jonathan Gordon
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
24 #include "string-extra.h"
31 #include "backlight.h"
34 #include "settings_list.h"
39 #include "powermgmt.h"
41 #include "lcd-remote.h"
43 #include "rbunicode.h"
44 #ifdef HAVE_LCD_BITMAP
45 #include "peakmeter.h"
47 #include "menus/eq_menu.h"
51 #ifdef IPOD_ACCESSORY_PROTOCOL
54 #include "statusbar.h"
55 #ifdef HAVE_TOUCHSCREEN
56 #include "touchscreen.h"
57 #include "ctype.h" /* For isspace() */
63 #define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT)
64 /** NOTE: NVRAM_CONFIG_VERSION is in settings_list.h
65 and you may need to update it if you edit this file */
67 #define UNUSED {.RESERVED=NULL}
68 #define INT(a) {.int_ = a}
69 #define UINT(a) {.uint_ = a}
70 #define BOOL(a) {.bool_ = a}
71 #define CHARPTR(a) {.charptr = a}
72 #define UCHARPTR(a) {.ucharptr = a}
73 #define FUNCTYPE(a) {.func = a}
74 #define NODEFAULT INT(0)
76 /* in all the following macros the args are:
77 - flags: bitwise | or the F_ bits in settings_list.h
78 - var: pointer to the variable being changed (usually in global_settings)
79 - lang_id: LANG_* id to display in menus and setting screens for the setting
80 - default: the default value for the variable, set if settings are reset
81 - name: the name of the setting in config files
82 - cfg_vals: comma separated list of legal values to write to cfg files.
83 The values correspond to the values 0,1,2,etc. of the setting.
84 NULL if just the number itself should be written to the file.
85 No spaces between the values and the commas!
86 - cb: the callback used by the setting screen.
89 /* Use for int settings which use the set_sound() function to set them */
90 #define SOUND_SETTING(flags,var,lang_id,name,setting) \
91 {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \
92 lang_id, NODEFAULT,name,NULL, \
93 {.sound_setting=(struct sound_setting[]){{setting}}} }
95 /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO
96 or dont save as "off" or "on" in the cfg.
97 cfgvals are comma separated values (without spaces after the comma!) to write
98 for 'false' and 'true' (in this order)
99 yes_id is the lang_id for the 'yes' (or 'on') option in the menu
100 no_id is the lang_id for the 'no' (or 'off') option in the menu
102 #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes_id,no_id,cb)\
103 {flags|F_BOOL_SETTING, &global_settings.var, \
104 lang_id, BOOL(default),name,cfgvals, \
105 {.bool_setting=(struct bool_setting[]){{cb,yes_id,no_id}}} }
107 /* bool setting which does use LANG_YES and _NO and save as "off,on" */
108 #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
109 BOOL_SETTING(flags,var,lang_id,default,name,off_on, \
110 LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb)
112 /* int variable which is NOT saved to .cfg files,
113 (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */
114 #define SYSTEM_SETTING(flags,var,default) \
115 {flags|F_T_INT, &global_status.var,-1, INT(default), \
118 /* setting which stores as a filename (or another string) in the .cfgvals
119 The string must be a char array (which all of our string settings are),
120 not just a char pointer.
121 prefix: The absolute path to not save in the variable, ex /.rockbox/wps_file
122 suffix: The file extention (usually...) e.g .wps_file
123 If the prefix is set (not NULL), then the suffix must be set as well.
125 #define TEXT_SETTING(flags,var,name,default,prefix,suffix) \
126 {flags|F_T_UCHARPTR, &global_settings.var,-1, \
127 CHARPTR(default),name,NULL, \
128 {.filename_setting= \
129 (struct filename_setting[]){ \
130 {prefix,suffix,sizeof(global_settings.var)}}} }
132 /* Used for settings which use the set_option() setting screen.
133 The ... arg is a list of pointers to strings to display in the setting
134 screen. These can either be literal strings, or ID2P(LANG_*) */
135 #define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \
136 {flags|F_CHOICE_SETTING|F_T_INT, &global_settings.var, lang_id, \
137 INT(default), name, cfg_vals, \
138 {.choice_setting = (struct choice_setting[]){ \
139 {cb, count, {.desc = (const unsigned char*[]) \
142 /* Similar to above, except the strings to display are taken from cfg_vals,
143 the ... arg is a list of ID's to talk for the strings, can use TALK_ID()'s */
144 #define STRINGCHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals, \
146 {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS, \
147 &global_settings.var, lang_id, \
148 INT(default), name, cfg_vals, \
149 {.choice_setting = (struct choice_setting[]){ \
150 {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}}
152 /* for settings which use the set_int() setting screen.
153 unit is the UNIT_ define to display/talk.
154 the first one saves a string to the config file,
155 the second one saves the variable value to the config file */
156 #define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \
157 unit, min, max, step, formatter, get_talk_id, cb) \
158 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
159 lang_id, INT(default), name, cfg_vals, \
160 {.int_setting = (struct int_setting[]){ \
161 {cb, unit, min, max, step, formatter, get_talk_id}}}}
162 #define INT_SETTING(flags, var, lang_id, default, name, \
163 unit, min, max, step, formatter, get_talk_id, cb) \
164 {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \
165 lang_id, INT(default), name, NULL, \
166 {.int_setting = (struct int_setting[]){ \
167 {cb, unit, min, max, step, formatter, get_talk_id}}}}
168 #define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \
169 unit, min, max, step, formatter, get_talk_id, cb) \
170 {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \
171 lang_id, INT(default), name, NULL, \
172 {.int_setting = (struct int_setting[]){ \
173 {cb, unit, min, max, step, formatter, get_talk_id}}}}
175 #define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
176 unit, formatter, get_talk_id, cb, count, ...) \
177 {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \
178 lang_id, INT(default), name, cfg_vals, \
179 {.table_setting = (struct table_setting[]) { \
180 {cb, formatter, get_talk_id, unit, count, \
181 (const int[]){__VA_ARGS__}}}}}
183 #define CUSTOM_SETTING(flags, var, lang_id, default, name, \
184 load_from_cfg, write_to_cfg, \
185 is_change, set_default) \
186 {flags|F_CUSTOM_SETTING|F_T_CUSTOM|F_BANFROMQS, \
187 &global_settings.var, lang_id, \
188 {.custom = (void*)default}, name, NULL, \
189 {.custom_setting = (struct custom_setting[]){ \
190 {load_from_cfg, write_to_cfg, is_change, set_default}}}}
192 #define VIEWPORT_SETTING(var,name) \
193 TEXT_SETTING(F_THEMESETTING,var,name,"-", NULL, NULL)
195 /* some sets of values which are used more than once, to save memory */
196 static const char off_on
[] = "off,on";
197 static const char off_on_ask
[] = "off,on,ask";
198 static const char off_number_spell
[] = "off,number,spell";
199 #ifdef HAVE_LCD_BITMAP
200 static const char graphic_numeric
[] = "graphic,numeric";
203 /* Default theme settings */
204 #define DEFAULT_WPSNAME "cabbiev2"
205 #define DEFAULT_SBSNAME "-"
206 #define DEFAULT_FMS_NAME DEFAULT_WPSNAME
208 #ifdef HAVE_LCD_BITMAP
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"
219 #define DEFAULT_FONTNAME "12-Adobe-Helvetica"
223 #define DEFAULT_FONTNAME ""
226 #ifdef HAVE_REMOTE_LCD
227 #if LCD_REMOTE_HEIGHT <= 64
228 #define DEFAULT_REMOTE_FONTNAME "08-Rockfont"
230 #define DEFAULT_REMOTE_FONTNAME "-"
232 #endif /* HAVE_REMOTE_LCD */
234 #ifdef HAVE_LCD_COLOR
235 #define DEFAULT_ICONSET "tango_small"
236 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers"
238 #define DEFAULT_ICONSET "tango_small_mono"
239 #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
240 #else /* monochrome */
241 #define DEFAULT_ICONSET ""
242 #define DEFAULT_VIEWERS_ICONSET ""
245 #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
246 #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
247 #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
248 #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
249 #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
251 #define DEFAULT_BACKDROP "cabbiev2"
253 #ifdef HAVE_RECORDING
254 /* these should be in the config.h files */
255 #if CONFIG_CODEC == MAS3587F
256 # define DEFAULT_REC_MIC_GAIN 8
257 # define DEFAULT_REC_LEFT_GAIN 2
258 # define DEFAULT_REC_RIGHT_GAIN 2
259 #elif CONFIG_CODEC == SWCODEC
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_TLV320)
265 # define DEFAULT_REC_MIC_GAIN 0
266 # define DEFAULT_REC_LEFT_GAIN 0
267 # define DEFAULT_REC_RIGHT_GAIN 0
268 # elif defined(HAVE_WM8975)
269 # define DEFAULT_REC_MIC_GAIN 16
270 # define DEFAULT_REC_LEFT_GAIN 0
271 # define DEFAULT_REC_RIGHT_GAIN 0
272 # elif defined(HAVE_WM8758)
273 # define DEFAULT_REC_MIC_GAIN 16
274 # define DEFAULT_REC_LEFT_GAIN 0
275 # define DEFAULT_REC_RIGHT_GAIN 0
276 # elif defined(HAVE_WM8731)
277 # define DEFAULT_REC_MIC_GAIN 16
278 # define DEFAULT_REC_LEFT_GAIN 0
279 # define DEFAULT_REC_RIGHT_GAIN 0
283 #endif /* HAVE_RECORDING */
285 static const char* formatter_unit_0_is_off(char *buffer
, size_t buffer_size
,
286 int val
, const char *unit
)
289 return str(LANG_OFF
);
291 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
295 static int32_t getlang_unit_0_is_off(int value
, int unit
)
300 return TALK_ID(value
,unit
);
303 static const char* formatter_unit_0_is_skip_track(char *buffer
, size_t buffer_size
,
304 int val
, const char *unit
)
308 return str(LANG_SKIP_OUTRO
);
310 return str(LANG_SKIP_TRACK
);
311 else if (val
% 60 == 0)
312 snprintf(buffer
, buffer_size
, "%d min", val
/60);
314 snprintf(buffer
, buffer_size
, "%d s", val
);
318 static int32_t getlang_unit_0_is_skip_track(int value
, int unit
)
322 return LANG_SKIP_OUTRO
;
324 return LANG_SKIP_TRACK
;
325 else if (value
% 60 == 0)
326 return TALK_ID(value
/60, UNIT_MIN
);
328 return TALK_ID(value
, UNIT_SEC
);
331 #ifdef HAVE_BACKLIGHT
333 #define DEFAULT_BACKLIGHT_TIMEOUT 0
335 #define DEFAULT_BACKLIGHT_TIMEOUT 15
337 static const char* backlight_formatter(char *buffer
, size_t buffer_size
,
338 int val
, const char *unit
)
341 return str(LANG_OFF
);
345 snprintf(buffer
, buffer_size
, "%d %s", val
, unit
);
348 static int32_t backlight_getlang(int value
, int unit
)
355 return TALK_ID(value
, unit
);
359 #ifndef HAVE_WHEEL_ACCELERATION
360 static const char* scanaccel_formatter(char *buffer
, size_t buffer_size
,
361 int val
, const char *unit
)
365 return str(LANG_OFF
);
367 snprintf(buffer
, buffer_size
, "2x/%ds", val
);
372 #if CONFIG_CODEC == SWCODEC
373 static void crossfeed_cross_set(int val
)
376 dsp_set_crossfeed_cross_params(global_settings
.crossfeed_cross_gain
,
377 global_settings
.crossfeed_hf_attenuation
,
378 global_settings
.crossfeed_hf_cutoff
);
381 static void compressor_set(int val
)
384 dsp_set_compressor(global_settings
.compressor_threshold
,
385 global_settings
.compressor_makeup_gain
,
386 global_settings
.compressor_ratio
,
387 global_settings
.compressor_knee
,
388 global_settings
.compressor_release_time
);
391 static const char* db_format(char* buffer
, size_t buffer_size
, int value
,
396 snprintf(buffer
, buffer_size
, "%s%d.%d %s", value
< 0 ? "-" : "",
397 v
/ 10, v
% 10, unit
);
401 static int32_t get_dec_talkid(int value
, int unit
)
403 return TALK_ID_DECIMAL(value
, 1, unit
);
406 static int32_t get_precut_talkid(int value
, int unit
)
408 return TALK_ID_DECIMAL(-value
, 1, unit
);
412 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
413 static void set_mdb_enable(bool value
)
415 sound_set_mdb_enable((int)value
);
417 static void set_superbass(bool value
)
419 sound_set_superbass((int)value
);
423 #ifdef HAVE_LCD_CHARCELLS
424 static const char* jumpscroll_format(char* buffer
, size_t buffer_size
, int value
,
431 return str(LANG_OFF
);
433 return str(LANG_ONE_TIME
);
437 snprintf(buffer
, buffer_size
, "%d", value
);
440 return str(LANG_ALWAYS
);
444 static int32_t jumpscroll_getlang(int value
, int unit
)
451 return LANG_ONE_TIME
;
455 return TALK_ID(value
, unit
);
461 #endif /* HAVE_LCD_CHARCELLS */
463 #ifdef HAVE_QUICKSCREEN
464 static int find_setting_by_name(char*name
)
467 const struct settings_list
*setting
;
468 while (i
<nb_settings
)
470 setting
= &settings
[i
];
471 if (setting
->cfg_name
&& !strcmp(setting
->cfg_name
, name
))
479 static void qs_load_from_cfg(void* var
, char*value
)
481 *(int*)var
= find_setting_by_name(value
);
483 static char* qs_write_to_cfg(void* setting
, char*buf
, int buf_len
)
485 const struct settings_list
*var
= &settings
[*(int*)setting
];
486 strlcpy(buf
, var
->cfg_name
, buf_len
);
489 static bool qs_is_changed(void* setting
, void* defaultval
)
491 int i
= *(int*)setting
;
492 if (i
< 0 || i
>= nb_settings
)
494 const struct settings_list
*var
= &settings
[i
];
495 return var
!= find_setting(defaultval
, NULL
);
497 static void qs_set_default(void* setting
, void* defaultval
)
499 find_setting(defaultval
, (int*)setting
);
502 #ifdef HAVE_TOUCHSCREEN
503 static void tsc_load_from_cfg(void* setting
, char*value
)
505 struct touchscreen_parameter
*var
= (struct touchscreen_parameter
*) setting
;
507 /* Replacement for sscanf(value, "%d ..., &var->A, ...); */
508 int vals
[7], count
= 0;
509 while(*value
!= 0 && count
< 7)
515 vals
[count
++] = atoi(value
);
516 while(!isspace(*value
))
526 var
->divider
= vals
[6];
529 static char* tsc_write_to_cfg(void* setting
, char*buf
, int buf_len
)
531 const struct touchscreen_parameter
*var
= (const struct touchscreen_parameter
*) setting
;
532 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
);
535 static bool tsc_is_changed(void* setting
, void* defaultval
)
537 return memcmp(setting
, defaultval
, sizeof(struct touchscreen_parameter
)) != 0;
539 static void tsc_set_default(void* setting
, void* defaultval
)
541 memcpy(setting
, defaultval
, sizeof(struct touchscreen_parameter
));
545 static const char* hotkey_formatter(char* buffer
, size_t buffer_size
, int value
,
551 return str(get_hotkey_lang_id(value
));
553 static int32_t hotkey_getlang(int value
, int unit
)
556 return get_hotkey_lang_id(value
);
558 #endif /* HAVE_HOTKEY */
559 const struct settings_list settings
[] = {
561 SOUND_SETTING(F_NO_WRAP
,volume
, LANG_VOLUME
, "volume", SOUND_VOLUME
),
562 SOUND_SETTING(0, balance
, LANG_BALANCE
, "balance", SOUND_BALANCE
),
564 #ifdef AUDIOHW_HAVE_BASS
565 SOUND_SETTING(F_NO_WRAP
,bass
, LANG_BASS
, "bass", SOUND_BASS
),
567 #ifdef AUDIOHW_HAVE_TREBLE
568 SOUND_SETTING(F_NO_WRAP
,treble
, LANG_TREBLE
, "treble", SOUND_TREBLE
),
570 /* Hardware EQ tone controls */
571 #ifdef AUDIOHW_HAVE_EQ
572 /* Band gain is generic */
573 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND1
].gain
,
574 LANG_HW_EQ_GAIN
, "tone band1 gain", SOUND_EQ_BAND1_GAIN
),
575 #ifdef AUDIOHW_HAVE_EQ_BAND2
576 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND2
].gain
,
577 LANG_HW_EQ_GAIN
, "tone band2 gain", SOUND_EQ_BAND2_GAIN
),
578 #endif /* AUDIOHW_HAVE_EQ_BAND2 */
579 #ifdef AUDIOHW_HAVE_EQ_BAND3
580 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND3
].gain
,
581 LANG_HW_EQ_GAIN
, "tone band3 gain", SOUND_EQ_BAND3_GAIN
),
582 #endif /* AUDIOHW_HAVE_EQ_BAND3 */
583 #ifdef AUDIOHW_HAVE_EQ_BAND4
584 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND4
].gain
,
585 LANG_HW_EQ_GAIN
, "tone band4 gain", SOUND_EQ_BAND4_GAIN
),
586 #endif /* AUDIOHW_HAVE_EQ_BAND4 */
587 #ifdef AUDIOHW_HAVE_EQ_BAND5
588 SOUND_SETTING(F_NO_WRAP
, hw_eq_bands
[AUDIOHW_EQ_BAND5
].gain
,
589 LANG_HW_EQ_GAIN
, "tone band5 gain", SOUND_EQ_BAND5_GAIN
),
590 #endif /* AUDIOHW_HAVE_EQ_BAND5 */
592 /* Frequencies vary with samplerate but at least the user has an idea
593 * about the bands and it will be correct with normal playback rates. */
595 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
596 hw_eq_bands
[AUDIOHW_EQ_BAND1
].frequency
,
597 LANG_HW_EQ_FREQUENCY
, 0,"tone band1 frequency",
598 "80 Hz,105 Hz,135 Hz,175 Hz",
599 sound_set_hw_eq_band1_frequency
, 4,
600 TALK_ID(80, UNIT_HERTZ
), TALK_ID(105, UNIT_HERTZ
),
601 TALK_ID(135, UNIT_HERTZ
), TALK_ID(175, UNIT_HERTZ
)),
603 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
604 hw_eq_bands
[AUDIOHW_EQ_BAND2
].frequency
,
605 LANG_HW_EQ_FREQUENCY
, 0,"tone band2 frequency",
606 "230 Hz,300 Hz,385 Hz,500 Hz",
607 sound_set_hw_eq_band2_frequency
, 4,
608 TALK_ID(230, UNIT_HERTZ
), TALK_ID(300, UNIT_HERTZ
),
609 TALK_ID(385, UNIT_HERTZ
), TALK_ID(500, UNIT_HERTZ
)),
610 CHOICE_SETTING(F_SOUNDSETTING
, hw_eq_bands
[AUDIOHW_EQ_BAND2
].width
,
611 LANG_HW_EQ_WIDTH
, 0, "tone band2 width", "narrow,wide",
612 sound_set_hw_eq_band2_width
, 2,
613 ID2P(LANG_HW_EQ_WIDTH_NARROW
), ID2P(LANG_HW_EQ_WIDTH_WIDE
)),
615 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
616 hw_eq_bands
[AUDIOHW_EQ_BAND3
].frequency
,
617 LANG_HW_EQ_FREQUENCY
, 0, "tone band3 frequency",
618 "650 Hz,850 Hz,1.1 kHz,1.4 kHz",
619 sound_set_hw_eq_band3_frequency
, 4,
620 TALK_ID(650, UNIT_HERTZ
), TALK_ID(850, UNIT_HERTZ
),
621 TALK_ID_DECIMAL(11, 1, UNIT_KHZ
),
622 TALK_ID_DECIMAL(14, 1, UNIT_KHZ
)),
623 CHOICE_SETTING(F_SOUNDSETTING
,hw_eq_bands
[AUDIOHW_EQ_BAND3
].width
,
624 LANG_HW_EQ_WIDTH
, 0, "tone band3 width", "narrow,wide",
625 sound_set_hw_eq_band3_width
, 2,
626 ID2P(LANG_HW_EQ_WIDTH_NARROW
), ID2P(LANG_HW_EQ_WIDTH_WIDE
)),
628 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
629 hw_eq_bands
[AUDIOHW_EQ_BAND4
].frequency
,
630 LANG_HW_EQ_FREQUENCY
, 0, "tone band4 frequency",
631 "1.8 kHz,2.4 kHz,3.2 kHz,4.1 kHz",
632 sound_set_hw_eq_band4_frequency
, 4,
633 TALK_ID_DECIMAL(18, 1, UNIT_KHZ
),
634 TALK_ID_DECIMAL(24, 1, UNIT_KHZ
),
635 TALK_ID_DECIMAL(32, 1, UNIT_KHZ
),
636 TALK_ID_DECIMAL(41, 1, UNIT_KHZ
)),
637 CHOICE_SETTING(F_SOUNDSETTING
, hw_eq_bands
[AUDIOHW_EQ_BAND4
].width
,
638 LANG_HW_EQ_WIDTH
, 0, "tone band4 width", "narrow,wide",
639 sound_set_hw_eq_band4_width
, 2,
640 ID2P(LANG_HW_EQ_WIDTH_NARROW
), ID2P(LANG_HW_EQ_WIDTH_WIDE
)),
642 STRINGCHOICE_SETTING(F_SOUNDSETTING
,
643 hw_eq_bands
[AUDIOHW_EQ_BAND5
].frequency
,
644 LANG_HW_EQ_FREQUENCY
, 0, "tone band5 frequency",
645 "5.3 kHz,6.9 kHz,9.0 kHz,11.7 kHz",
646 sound_set_hw_eq_band5_frequency
, 4,
647 TALK_ID_DECIMAL(53, 1, UNIT_KHZ
),
648 TALK_ID_DECIMAL(69, 1, UNIT_KHZ
),
649 TALK_ID_DECIMAL(90, 1, UNIT_KHZ
),
650 TALK_ID_DECIMAL(117, 1, UNIT_KHZ
)),
651 #endif /* HAVE_WM8978 */
652 #endif /* AUDIOHW_HAVE_EQ */
653 /* 3-d enhancement effect */
654 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
655 SOUND_SETTING(0,loudness
, LANG_LOUDNESS
, "loudness", SOUND_LOUDNESS
),
656 STRINGCHOICE_SETTING(F_SOUNDSETTING
,avc
,LANG_AUTOVOL
,0,"auto volume",
657 "off,20ms,2,4,8,", sound_set_avc
, 5,
658 LANG_OFF
,TALK_ID(20, UNIT_MS
),TALK_ID(2, UNIT_SEC
),
659 TALK_ID(4, UNIT_SEC
),TALK_ID(8, UNIT_SEC
)),
660 OFFON_SETTING(F_SOUNDSETTING
, superbass
, LANG_SUPERBASS
, false, "superbass",
664 CHOICE_SETTING(F_SOUNDSETTING
, channel_config
, LANG_CHANNEL_CONFIGURATION
,
666 "stereo,mono,custom,mono left,mono right,karaoke",
667 sound_set_channels
, 6,
668 ID2P(LANG_CHANNEL_STEREO
), ID2P(LANG_CHANNEL_MONO
),
669 ID2P(LANG_CHANNEL_CUSTOM
), ID2P(LANG_CHANNEL_LEFT
),
670 ID2P(LANG_CHANNEL_RIGHT
), ID2P(LANG_CHANNEL_KARAOKE
)),
671 SOUND_SETTING(F_SOUNDSETTING
, stereo_width
, LANG_STEREO_WIDTH
,
672 "stereo_width", SOUND_STEREO_WIDTH
),
673 #ifdef AUDIOHW_HAVE_DEPTH_3D
674 SOUND_SETTING(0,depth_3d
, LANG_DEPTH_3D
, "3-d enhancement",
678 OFFON_SETTING(0, playlist_shuffle
, LANG_SHUFFLE
, false, "shuffle", NULL
),
679 SYSTEM_SETTING(NVRAM(4), resume_index
, -1),
680 SYSTEM_SETTING(NVRAM(4), resume_offset
, -1),
681 CHOICE_SETTING(0, repeat_mode
, LANG_REPEAT
, REPEAT_OFF
, "repeat",
682 "off,all,one,shuffle"
683 #ifdef AB_REPEAT_ENABLE
687 #ifdef AB_REPEAT_ENABLE
692 ID2P(LANG_OFF
), ID2P(LANG_ALL
), ID2P(LANG_REPEAT_ONE
),
694 #ifdef AB_REPEAT_ENABLE
695 ,ID2P(LANG_REPEAT_AB
)
697 ), /* CHOICE_SETTING( repeat_mode ) */
699 #ifdef HAVE_LCD_CONTRAST
700 /* its easier to leave this one un-macro()ed for the time being */
701 { F_T_INT
|F_DEF_ISFUNC
|F_INT_SETTING
, &global_settings
.contrast
,
702 LANG_CONTRAST
, FUNCTYPE(lcd_default_contrast
), "contrast", NULL
, {
703 .int_setting
= (struct int_setting
[]) {
704 { lcd_set_contrast
, UNIT_INT
, MIN_CONTRAST_SETTING
,
705 MAX_CONTRAST_SETTING
, 1, NULL
, NULL
}}}},
707 #ifdef HAVE_BACKLIGHT
708 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout
, LANG_BACKLIGHT
,
709 DEFAULT_BACKLIGHT_TIMEOUT
,
710 "backlight timeout", off_on
, UNIT_SEC
, backlight_formatter
,
711 backlight_getlang
, backlight_set_timeout
, 20,
712 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
714 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_timeout_plugged
,
715 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
716 "backlight timeout plugged", off_on
, UNIT_SEC
,
717 backlight_formatter
, backlight_getlang
,
718 backlight_set_timeout_plugged
, 20,
719 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
721 #endif /* HAVE_BACKLIGHT */
722 #ifdef HAVE_LCD_BITMAP
723 #ifdef HAVE_LCD_INVERT
724 BOOL_SETTING(0, invert
, LANG_INVERT
, false ,"invert", off_on
,
725 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
, lcd_set_invert_display
),
728 OFFON_SETTING(0, flip_display
, LANG_FLIP_DISPLAY
, false, "flip display",
732 CHOICE_SETTING(F_TEMPVAR
|F_THEMESETTING
, cursor_style
, LANG_INVERT_CURSOR
,
733 #ifdef HAVE_LCD_COLOR
735 "pointer,bar (inverse),bar (color),bar (gradient)", NULL
, 4,
736 ID2P(LANG_INVERT_CURSOR_POINTER
),
737 ID2P(LANG_INVERT_CURSOR_BAR
),
738 ID2P(LANG_INVERT_CURSOR_COLOR
),
739 ID2P(LANG_INVERT_CURSOR_GRADIENT
)),
741 1, "selector type", "pointer,bar (inverse)", NULL
, 2,
742 ID2P(LANG_INVERT_CURSOR_POINTER
),
743 ID2P(LANG_INVERT_CURSOR_BAR
)),
745 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, statusbar
,
746 LANG_STATUS_BAR
, STATUSBAR_TOP
, "statusbar","off,top,bottom",
747 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_STATUSBAR_TOP
),
748 ID2P(LANG_STATUSBAR_BOTTOM
)),
749 #ifdef HAVE_REMOTE_LCD
750 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, remote_statusbar
,
751 LANG_REMOTE_STATUSBAR
, STATUSBAR_TOP
, "remote statusbar","off,top,bottom",
752 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_STATUSBAR_TOP
),
753 ID2P(LANG_STATUSBAR_BOTTOM
)),
755 CHOICE_SETTING(F_THEMESETTING
|F_TEMPVAR
, scrollbar
,
756 LANG_SCROLL_BAR
, SCROLLBAR_LEFT
, "scrollbar","off,left,right",
757 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_LEFT
), ID2P(LANG_RIGHT
)),
758 INT_SETTING(F_THEMESETTING
, scrollbar_width
, LANG_SCROLLBAR_WIDTH
, 6,
759 "scrollbar width",UNIT_INT
, 3, MAX(LCD_WIDTH
/10,25), 1,
761 #if CONFIG_KEYPAD == RECORDER_PAD
762 OFFON_SETTING(F_THEMESETTING
,buttonbar
, LANG_BUTTON_BAR
,true,"buttonbar", NULL
),
764 CHOICE_SETTING(F_THEMESETTING
, volume_type
, LANG_VOLUME_DISPLAY
, 0,
765 "volume display", graphic_numeric
, NULL
, 2,
766 ID2P(LANG_DISPLAY_GRAPHIC
),
767 ID2P(LANG_DISPLAY_NUMERIC
)),
768 CHOICE_SETTING(F_THEMESETTING
, battery_display
, LANG_BATTERY_DISPLAY
, 0,
769 "battery display", graphic_numeric
, NULL
, 2,
770 ID2P(LANG_DISPLAY_GRAPHIC
), ID2P(LANG_DISPLAY_NUMERIC
)),
772 CHOICE_SETTING(0, timeformat
, LANG_TIMEFORMAT
, 0,
773 "time format", "24hour,12hour", NULL
, 2,
774 ID2P(LANG_24_HOUR_CLOCK
), ID2P(LANG_12_HOUR_CLOCK
)),
776 #endif /* HAVE_LCD_BITMAP */
777 OFFON_SETTING(0,show_icons
, LANG_SHOW_ICONS
,true,"show icons", NULL
),
779 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, poweroff
, LANG_POWEROFF_IDLE
, 10,
780 "idle poweroff", "off", UNIT_MIN
, formatter_unit_0_is_off
,
781 getlang_unit_0_is_off
, set_poweroff_timeout
, 15,
782 0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
783 SYSTEM_SETTING(NVRAM(4), runtime
, 0),
784 SYSTEM_SETTING(NVRAM(4), topruntime
, 0),
785 INT_SETTING(F_BANFROMQS
, max_files_in_playlist
,
786 LANG_MAX_FILES_IN_PLAYLIST
,
792 "max files in playlist", UNIT_INT
, 1000, 32000, 1000,
794 INT_SETTING(F_BANFROMQS
, max_files_in_dir
, LANG_MAX_FILES_IN_DIR
,
800 "max files in dir", UNIT_INT
, 50, 10000, 50,
802 #if BATTERY_CAPACITY_INC > 0
803 INT_SETTING(0, battery_capacity
, LANG_BATTERY_CAPACITY
,
804 BATTERY_CAPACITY_DEFAULT
, "battery capacity", UNIT_MAH
,
805 BATTERY_CAPACITY_MIN
, BATTERY_CAPACITY_MAX
,
806 BATTERY_CAPACITY_INC
, NULL
, NULL
, NULL
),
809 OFFON_SETTING(NVRAM(1), car_adapter_mode
,
810 LANG_CAR_ADAPTER_MODE
, false, "car adapter mode", NULL
),
812 #ifdef IPOD_ACCESSORY_PROTOCOL
813 CHOICE_SETTING(0, serial_bitrate
, LANG_SERIAL_BITRATE
, 0, "serial bitrate",
814 "auto,9600,19200,38400,57600", iap_bitrate_set
, 5, ID2P(LANG_SERIAL_BITRATE_AUTO
),
815 ID2P(LANG_SERIAL_BITRATE_9600
),ID2P(LANG_SERIAL_BITRATE_19200
),
816 ID2P(LANG_SERIAL_BITRATE_38400
),ID2P(LANG_SERIAL_BITRATE_57600
)),
818 #ifdef HAVE_ACCESSORY_SUPPLY
819 OFFON_SETTING(0, accessory_supply
, LANG_ACCESSORY_SUPPLY
,
820 true, "accessory power supply", accessory_supply_set
),
822 #ifdef HAVE_LINEOUT_POWEROFF
823 OFFON_SETTING(0, lineout_active
, LANG_LINEOUT_ONOFF
,
824 true, "lineout", lineout_set
),
828 OFFON_SETTING(0,fm_force_mono
, LANG_FM_MONO_MODE
,
829 false, "force fm mono", toggle_mono_mode
),
830 SYSTEM_SETTING(NVRAM(4),last_frequency
,0),
833 #if BATTERY_TYPES_COUNT > 1
834 CHOICE_SETTING(0, battery_type
, LANG_BATTERY_TYPE
, 0, "battery type",
835 "alkaline,nimh", NULL
, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE
),
836 ID2P(LANG_BATTERY_TYPE_NIMH
)),
838 #ifdef HAVE_REMOTE_LCD
840 INT_SETTING(0, remote_contrast
, LANG_CONTRAST
,
841 DEFAULT_REMOTE_CONTRAST_SETTING
, "remote contrast", UNIT_INT
,
842 MIN_REMOTE_CONTRAST_SETTING
, MAX_REMOTE_CONTRAST_SETTING
, 1,
843 NULL
, NULL
, lcd_remote_set_contrast
),
844 BOOL_SETTING(0, remote_invert
, LANG_INVERT
, false ,"remote invert", off_on
,
845 LANG_INVERT_LCD_INVERSE
, LANG_NORMAL
,
846 lcd_remote_set_invert_display
),
847 OFFON_SETTING(0,remote_flip_display
, LANG_FLIP_DISPLAY
,
848 false,"remote flip display", NULL
),
849 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout
,
850 LANG_BACKLIGHT
, 5, "remote backlight timeout", off_on
,
851 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
852 remote_backlight_set_timeout
, 20,
853 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
855 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, remote_backlight_timeout_plugged
,
856 LANG_BACKLIGHT_ON_WHEN_CHARGING
, 10,
857 "remote backlight timeout plugged", off_on
, UNIT_SEC
,
858 backlight_formatter
, backlight_getlang
,
859 remote_backlight_set_timeout_plugged
, 20,
860 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
862 #ifdef HAVE_REMOTE_LCD_TICKING
863 OFFON_SETTING(0, remote_reduce_ticking
, LANG_REDUCE_TICKING
,
864 false,"remote reduce ticking", NULL
),
868 #ifdef HAVE_BACKLIGHT
869 OFFON_SETTING(0, bl_filter_first_keypress
,
870 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
871 "backlight filters first keypress", NULL
),
872 #ifdef HAVE_REMOTE_LCD
873 OFFON_SETTING(0, remote_bl_filter_first_keypress
,
874 LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
, false,
875 "backlight filters first remote keypress", NULL
),
877 #endif /* HAVE_BACKLIGHT */
879 /** End of old RTC config block **/
881 #ifdef HAVE_BACKLIGHT
882 OFFON_SETTING(0, caption_backlight
, LANG_CAPTION_BACKLIGHT
,
883 false, "caption backlight", NULL
),
884 #ifdef HAVE_REMOTE_LCD
885 OFFON_SETTING(0, remote_caption_backlight
, LANG_CAPTION_BACKLIGHT
,
886 false, "remote caption backlight", NULL
),
888 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
889 INT_SETTING(F_NO_WRAP
, brightness
, LANG_BRIGHTNESS
,
890 DEFAULT_BRIGHTNESS_SETTING
, "brightness",UNIT_INT
,
891 MIN_BRIGHTNESS_SETTING
, MAX_BRIGHTNESS_SETTING
, 1,
892 NULL
, NULL
, backlight_set_brightness
),
894 /* backlight fading */
895 #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
896 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_in
,
897 LANG_BACKLIGHT_FADE_IN
, 300, "backlight fade in", "off",
898 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
899 backlight_set_fade_in
, 7, 0,100,200,300,500,1000,2000),
900 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, backlight_fade_out
,
901 LANG_BACKLIGHT_FADE_OUT
, 2000, "backlight fade out", "off",
902 UNIT_MS
, formatter_unit_0_is_off
, getlang_unit_0_is_off
,
903 backlight_set_fade_out
, 10,
904 0,100,200,300,500,1000,2000,3000,5000,10000),
905 #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
906 OFFON_SETTING(0, backlight_fade_in
, LANG_BACKLIGHT_FADE_IN
,
907 true, "backlight fade in", backlight_set_fade_in
),
908 OFFON_SETTING(0, backlight_fade_out
, LANG_BACKLIGHT_FADE_OUT
,
909 true, "backlight fade out", backlight_set_fade_out
),
911 #endif /* HAVE_BACKLIGHT */
912 INT_SETTING(F_PADTITLE
, scroll_speed
, LANG_SCROLL_SPEED
, 9,"scroll speed",
913 UNIT_INT
, 0, 15, 1, NULL
, NULL
, lcd_scroll_speed
),
914 INT_SETTING(F_PADTITLE
, scroll_delay
, LANG_SCROLL_DELAY
, 1000,
915 "scroll delay", UNIT_MS
, 0, 2500, 100, NULL
,
916 NULL
, lcd_scroll_delay
),
917 INT_SETTING(0, bidir_limit
, LANG_BIDIR_SCROLL
, 50, "bidir limit",
918 UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
, lcd_bidir_scroll
),
919 #ifdef HAVE_REMOTE_LCD
920 INT_SETTING(0, remote_scroll_speed
, LANG_SCROLL_SPEED
, 9,
921 "remote scroll speed", UNIT_INT
, 0,15, 1,
922 NULL
, NULL
, lcd_remote_scroll_speed
),
923 INT_SETTING(0, remote_scroll_step
, LANG_SCROLL_STEP
, 6,
924 "remote scroll step", UNIT_PIXEL
, 1, LCD_REMOTE_WIDTH
, 1, NULL
,
925 NULL
, lcd_remote_scroll_step
),
926 INT_SETTING(0, remote_scroll_delay
, LANG_SCROLL_DELAY
, 1000,
927 "remote scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
928 lcd_remote_scroll_delay
),
929 INT_SETTING(0, remote_bidir_limit
, LANG_BIDIR_SCROLL
, 50,
930 "remote bidir limit", UNIT_PERCENT
, 0, 200, 25, NULL
, NULL
,
931 lcd_remote_bidir_scroll
),
933 #ifdef HAVE_LCD_BITMAP
934 OFFON_SETTING(0, offset_out_of_view
, LANG_SCREEN_SCROLL_VIEW
,
935 false, "Screen Scrolls Out Of View",
936 gui_list_screen_scroll_out_of_view
),
937 INT_SETTING(F_PADTITLE
, scroll_step
, LANG_SCROLL_STEP
, 6, "scroll step",
938 UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
, lcd_scroll_step
),
939 INT_SETTING(F_PADTITLE
, screen_scroll_step
, LANG_SCREEN_SCROLL_STEP
, 16,
940 "screen scroll step", UNIT_PIXEL
, 1, LCD_WIDTH
, 1, NULL
, NULL
,
941 gui_list_screen_scroll_step
),
942 #endif /* HAVE_LCD_BITMAP */
943 #ifdef HAVE_LCD_CHARCELLS
944 INT_SETTING(0, jump_scroll
, LANG_JUMP_SCROLL
, 0, "jump scroll", UNIT_INT
, 0,
945 5, 1, jumpscroll_format
, jumpscroll_getlang
, lcd_jump_scroll
),
946 INT_SETTING(0, jump_scroll_delay
, LANG_JUMP_SCROLL_DELAY
, 500,
947 "jump scroll delay", UNIT_MS
, 0, 2500, 100, NULL
, NULL
,
948 lcd_jump_scroll_delay
),
950 OFFON_SETTING(0,scroll_paginated
,LANG_SCROLL_PAGINATED
,
951 false,"scroll paginated",NULL
),
952 #ifdef HAVE_LCD_COLOR
954 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.fg_color
,-1,
955 INT(DEFAULT_THEME_FOREGROUND
),"foreground color",NULL
,UNUSED
},
956 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.bg_color
,-1,
957 INT(DEFAULT_THEME_BACKGROUND
),"background color",NULL
,UNUSED
},
958 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lss_color
,-1,
959 INT(DEFAULT_THEME_SELECTOR_START
),"line selector start color",NULL
,
961 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lse_color
,-1,
962 INT(DEFAULT_THEME_SELECTOR_END
),"line selector end color",NULL
,UNUSED
},
963 {F_T_INT
|F_RGB
|F_THEMESETTING
,&global_settings
.lst_color
,-1,
964 INT(DEFAULT_THEME_SELECTOR_TEXT
),"line selector text color",NULL
,
969 OFFON_SETTING(0,play_selected
,LANG_PLAY_SELECTED
,true,"play selected",NULL
),
970 OFFON_SETTING(0,party_mode
,LANG_PARTY_MODE
,false,"party mode",NULL
),
971 OFFON_SETTING(0,fade_on_stop
,LANG_FADE_ON_STOP
,true,"volume fade",NULL
),
972 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, ff_rewind_min_step
,
973 LANG_FFRW_STEP
, 1, "scan min step", NULL
, UNIT_SEC
,
974 NULL
, NULL
, NULL
, 14, 1,2,3,4,5,6,8,10,15,20,25,30,45,60),
975 CHOICE_SETTING(0, ff_rewind_accel
, LANG_FFRW_ACCEL
, 2,
976 "seek acceleration", "very fast,fast,normal,slow,very slow", NULL
, 5,
977 ID2P(LANG_VERY_FAST
), ID2P(LANG_FAST
), ID2P(LANG_NORMAL
),
978 ID2P(LANG_SLOW
) , ID2P(LANG_VERY_SLOW
)),
979 #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE)
980 STRINGCHOICE_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0,"antiskip",
981 "5s,15s,30s,1min,2min,3min,5min,10min", NULL
, 8,
982 TALK_ID(5, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
983 TALK_ID(30, UNIT_SEC
), TALK_ID(1, UNIT_MIN
),
984 TALK_ID(2, UNIT_MIN
), TALK_ID(3, UNIT_MIN
),
985 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
)),
986 #elif defined(HAVE_DISK_STORAGE)
987 INT_SETTING(0, buffer_margin
, LANG_MP3BUFFER_MARGIN
, 0, "antiskip",
988 UNIT_SEC
, 0, 7, 1, NULL
, NULL
, audio_set_buffer_margin
),
991 #ifdef HAVE_DISK_STORAGE
992 INT_SETTING(0, disk_spindown
, LANG_SPINDOWN
, 5, "disk spindown",
993 UNIT_SEC
, 3, 254, 1, NULL
, NULL
, storage_spindown
),
994 #endif /* HAVE_DISK_STORAGE */
996 CHOICE_SETTING(0, dirfilter
, LANG_FILTER
, SHOW_SUPPORTED
, "show files",
997 "all,supported,music,playlists", NULL
, 4, ID2P(LANG_ALL
),
998 ID2P(LANG_FILTER_SUPPORTED
), ID2P(LANG_FILTER_MUSIC
),
999 ID2P(LANG_PLAYLISTS
)),
1001 OFFON_SETTING(0, sort_case
, LANG_SORT_CASE
, false, "sort case", NULL
),
1002 CHOICE_SETTING(0, sort_dir
, LANG_SORT_DIR
, 0 ,
1003 "sort dirs", "alpha,oldest,newest", NULL
, 3,
1004 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
1005 ID2P(LANG_SORT_DATE_REVERSE
)),
1006 CHOICE_SETTING(0, sort_file
, LANG_SORT_FILE
, 0 ,
1007 "sort files", "alpha,oldest,newest,type", NULL
, 4,
1008 ID2P(LANG_SORT_ALPHA
), ID2P(LANG_SORT_DATE
),
1009 ID2P(LANG_SORT_DATE_REVERSE
) , ID2P(LANG_SORT_TYPE
)),
1010 CHOICE_SETTING(0, interpret_numbers
, LANG_SORT_INTERPRET_NUMBERS
, 1,
1011 "sort interpret number", "digits,numbers",NULL
, 2,
1012 ID2P(LANG_SORT_INTERPRET_AS_DIGIT
),
1013 ID2P(LANG_SORT_INTERPRET_AS_NUMBERS
)),
1014 CHOICE_SETTING(0, show_filename_ext
, LANG_SHOW_FILENAME_EXT
, 3,
1015 "show filename exts", "off,on,unknown,view_all", NULL
, 4 ,
1016 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_UNKNOWN_TYPES
),
1017 ID2P(LANG_EXT_ONLY_VIEW_ALL
)),
1018 OFFON_SETTING(0,browse_current
,LANG_FOLLOW
,false,"follow playlist",NULL
),
1019 OFFON_SETTING(0,playlist_viewer_icons
,LANG_SHOW_ICONS
,true,
1020 "playlist viewer icons",NULL
),
1021 OFFON_SETTING(0,playlist_viewer_indices
,LANG_SHOW_INDICES
,true,
1022 "playlist viewer indices",NULL
),
1023 CHOICE_SETTING(0, playlist_viewer_track_display
, LANG_TRACK_DISPLAY
, 0,
1024 "playlist viewer track display","track name,full path",
1025 NULL
, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY
),
1026 ID2P(LANG_DISPLAY_FULL_PATH
)),
1027 CHOICE_SETTING(0, recursive_dir_insert
, LANG_RECURSE_DIRECTORY
, RECURSE_ON
,
1028 "recursive directory insert", off_on_ask
, NULL
, 3 ,
1029 ID2P(LANG_OFF
), ID2P(LANG_ON
), ID2P(LANG_ASK
)),
1031 CHOICE_SETTING(0, autocreatebookmark
, LANG_BOOKMARK_SETTINGS_AUTOCREATE
,
1032 BOOKMARK_NO
, "autocreate bookmarks",
1033 "off,on,ask,recent only - on,recent only - ask", NULL
, 5,
1034 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1035 ID2P(LANG_ASK
), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
),
1036 ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
)),
1037 CHOICE_SETTING(0, autoloadbookmark
, LANG_BOOKMARK_SETTINGS_AUTOLOAD
,
1038 BOOKMARK_NO
, "autoload bookmarks", off_on_ask
, NULL
, 3,
1039 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1041 CHOICE_SETTING(0, usemrb
, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
,
1042 BOOKMARK_NO
, "use most-recent-bookmarks",
1043 "off,on,unique only", NULL
, 3, ID2P(LANG_SET_BOOL_NO
),
1044 ID2P(LANG_SET_BOOL_YES
),
1045 ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
)),
1046 #ifdef HAVE_LCD_BITMAP
1048 STRINGCHOICE_SETTING(0, peak_meter_clip_hold
, LANG_PM_CLIP_HOLD
, 16,
1049 "peak meter clip hold",
1050 "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
1051 ",3min,5min,10min,20min,45min,90min",
1052 peak_meter_set_clip_hold
, 25, LANG_PM_ETERNAL
,
1053 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
1054 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
1055 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
1056 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
1057 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
1058 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
1059 TALK_ID(25, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1060 TALK_ID(45, UNIT_SEC
), TALK_ID(60, UNIT_SEC
),
1061 TALK_ID(90, UNIT_SEC
), TALK_ID(2, UNIT_MIN
),
1062 TALK_ID(3, UNIT_MIN
), TALK_ID(5, UNIT_MIN
),
1063 TALK_ID(10, UNIT_MIN
), TALK_ID(20, UNIT_MIN
),
1064 TALK_ID(45, UNIT_MIN
), TALK_ID(90, UNIT_MIN
)),
1065 STRINGCHOICE_SETTING(0, peak_meter_hold
, LANG_PM_PEAK_HOLD
, 3,
1067 "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
1068 NULL
, 18, LANG_OFF
, TALK_ID(200, UNIT_MS
),
1069 TALK_ID(300, UNIT_MS
), TALK_ID(500, UNIT_MS
),
1070 TALK_ID(1, UNIT_SEC
), TALK_ID(2, UNIT_SEC
),
1071 TALK_ID(3, UNIT_SEC
), TALK_ID(4, UNIT_SEC
),
1072 TALK_ID(5, UNIT_SEC
), TALK_ID(6, UNIT_SEC
),
1073 TALK_ID(7, UNIT_SEC
), TALK_ID(8, UNIT_SEC
),
1074 TALK_ID(9, UNIT_SEC
), TALK_ID(10, UNIT_SEC
),
1075 TALK_ID(15, UNIT_SEC
), TALK_ID(20, UNIT_SEC
),
1076 TALK_ID(30, UNIT_SEC
), TALK_ID(60, UNIT_SEC
)),
1077 INT_SETTING(0, peak_meter_release
, LANG_PM_RELEASE
, 8, "peak meter release",
1078 UNIT_PM_TICK
, 1, 0x7e, 1, NULL
, NULL
,NULL
),
1079 OFFON_SETTING(0,peak_meter_dbfs
,LANG_PM_DBFS
,true,"peak meter dbfs",NULL
),
1080 {F_T_INT
, &global_settings
.peak_meter_min
, LANG_PM_MIN
,INT(60),
1081 "peak meter min", NULL
, UNUSED
},
1082 {F_T_INT
, &global_settings
.peak_meter_max
, LANG_PM_MAX
,INT(0),
1083 "peak meter max", NULL
, UNUSED
},
1084 #ifdef HAVE_RECORDING
1085 OFFON_SETTING(0, peak_meter_clipcounter
, LANG_PM_CLIPCOUNTER
, false,
1086 "peak meter clipcounter", NULL
),
1087 #endif /* HAVE_RECORDING */
1088 #endif /* HAVE_LCD_BITMAP */
1089 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
1090 SOUND_SETTING(F_SOUNDSETTING
, mdb_strength
, LANG_MDB_STRENGTH
,
1091 "mdb strength", SOUND_MDB_STRENGTH
),
1092 SOUND_SETTING(F_SOUNDSETTING
, mdb_harmonics
, LANG_MDB_HARMONICS
,
1093 "mdb harmonics", SOUND_MDB_HARMONICS
),
1094 SOUND_SETTING(F_SOUNDSETTING
, mdb_center
, LANG_MDB_CENTER
,
1095 "mdb center", SOUND_MDB_CENTER
),
1096 SOUND_SETTING(F_SOUNDSETTING
, mdb_shape
, LANG_MDB_SHAPE
,
1097 "mdb shape", SOUND_MDB_SHAPE
),
1098 OFFON_SETTING(F_SOUNDSETTING
, mdb_enable
, LANG_MDB_ENABLE
,
1099 false, "mdb enable", set_mdb_enable
),
1101 #if CONFIG_CODEC == MAS3507D
1102 OFFON_SETTING(F_SOUNDSETTING
, line_in
,LANG_LINE_IN
,false,"line in",NULL
),
1105 OFFON_SETTING(F_TEMPVAR
, talk_menu
, LANG_VOICE_MENU
, true, "talk menu", NULL
),
1106 CHOICE_SETTING(0, talk_dir
, LANG_VOICE_DIR
, 0,
1107 "talk dir", off_number_spell
, NULL
, 3,
1108 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
1109 ID2P(LANG_VOICE_SPELL
)),
1110 OFFON_SETTING(F_TEMPVAR
, talk_dir_clip
, LANG_VOICE_DIR_TALK
, false,
1111 "talk dir clip", NULL
),
1112 CHOICE_SETTING(0, talk_file
, LANG_VOICE_FILE
, 0,
1113 "talk file", off_number_spell
, NULL
, 3,
1114 ID2P(LANG_OFF
), ID2P(LANG_VOICE_NUMBER
),
1115 ID2P(LANG_VOICE_SPELL
)),
1116 OFFON_SETTING(F_TEMPVAR
, talk_file_clip
, LANG_VOICE_FILE_TALK
, false,
1117 "talk file clip", NULL
),
1118 OFFON_SETTING(F_TEMPVAR
, talk_filetype
, LANG_VOICE_FILETYPE
, false,
1119 "talk filetype", NULL
),
1120 OFFON_SETTING(F_TEMPVAR
, talk_battery_level
, LANG_TALK_BATTERY_LEVEL
, false,
1121 "Announce Battery Level", NULL
),
1123 #ifdef HAVE_RECORDING
1125 STRINGCHOICE_SETTING(F_RECSETTING
, rec_timesplit
, LANG_SPLIT_TIME
, 0,
1127 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
1128 "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
1130 TALK_ID(5, UNIT_MIN
), TALK_ID(10, UNIT_MIN
),
1131 TALK_ID(15, UNIT_MIN
), TALK_ID(30, UNIT_MIN
),
1132 TALK_ID(60, UNIT_MIN
), TALK_ID(74, UNIT_MIN
),
1133 TALK_ID(80, UNIT_MIN
), TALK_ID(2, UNIT_HOUR
),
1134 TALK_ID(4, UNIT_HOUR
), TALK_ID(6, UNIT_HOUR
),
1135 TALK_ID(8, UNIT_HOUR
), TALK_ID(10, UNIT_HOUR
),
1136 TALK_ID(12, UNIT_HOUR
), TALK_ID(18, UNIT_HOUR
),
1137 TALK_ID(20, UNIT_HOUR
), TALK_ID(24, UNIT_HOUR
)),
1138 STRINGCHOICE_SETTING(F_RECSETTING
, rec_sizesplit
, LANG_SPLIT_SIZE
, 0,
1140 "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
1141 "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
1143 TALK_ID(5, UNIT_MB
), TALK_ID(10, UNIT_MB
),
1144 TALK_ID(15, UNIT_MB
), TALK_ID(32, UNIT_MB
),
1145 TALK_ID(64, UNIT_MB
), TALK_ID(75, UNIT_MB
),
1146 TALK_ID(100, UNIT_MB
), TALK_ID(128, UNIT_MB
),
1147 TALK_ID(256, UNIT_MB
), TALK_ID(512, UNIT_MB
),
1148 TALK_ID(650, UNIT_MB
), TALK_ID(700, UNIT_MB
),
1149 TALK_ID(1024, UNIT_MB
), TALK_ID(1536, UNIT_MB
),
1150 TALK_ID(1792, UNIT_MB
)),
1151 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_channels
, LANG_CHANNELS
, INT(0),
1152 "rec channels","stereo,mono",UNUSED
},
1153 #if CONFIG_CODEC == SWCODEC
1154 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_mono_mode
,
1155 LANG_RECORDING_MONO_MODE
, INT(0), "rec mono mode","L+R,L,R",UNUSED
},
1157 CHOICE_SETTING(F_RECSETTING
, rec_split_type
, LANG_SPLIT_TYPE
, 0,
1158 "rec split type", "Split,Stop,Shutdown", NULL
, 3,
1159 ID2P(LANG_START_NEW_FILE
), ID2P(LANG_STOP_RECORDING
),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN
)),
1160 CHOICE_SETTING(F_RECSETTING
, rec_split_method
, LANG_SPLIT_MEASURE
, 0,
1161 "rec split method", "Time,Filesize", NULL
, 2,
1162 ID2P(LANG_TIME
), ID2P(LANG_REC_SIZE
)),
1163 {F_T_INT
|F_RECSETTING
, &global_settings
.rec_source
, LANG_RECORDING_SOURCE
,
1164 INT(0), "rec source",
1165 &HAVE_MIC_REC_(",mic")
1166 HAVE_LINE_REC_(",line")
1167 HAVE_SPDIF_REC_(",spdif")
1168 HAVE_FMRADIO_REC_(",fmradio")[1],
1170 INT_SETTING(F_RECSETTING
, rec_prerecord_time
, LANG_RECORD_PRERECORD_TIME
, 0,
1171 "prerecording time", UNIT_SEC
, 0, 30, 1,
1172 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1174 TEXT_SETTING(F_RECSETTING
, rec_directory
, "rec path",
1175 REC_BASE_DIR
, NULL
, NULL
),
1176 #ifdef HAVE_BACKLIGHT
1177 CHOICE_SETTING(F_RECSETTING
, cliplight
, LANG_CLIP_LIGHT
, 0,
1178 "cliplight", "off,main,both,remote", NULL
,
1179 #ifdef HAVE_REMOTE_LCD
1180 4, ID2P(LANG_OFF
), ID2P(LANG_MAIN_UNIT
),
1181 ID2P(LANG_REMOTE_MAIN
), ID2P(LANG_REMOTE_UNIT
)
1183 2, ID2P(LANG_OFF
), ID2P(LANG_ON
)
1187 #ifdef DEFAULT_REC_MIC_GAIN
1188 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_mic_gain
,
1189 LANG_GAIN
,INT(DEFAULT_REC_MIC_GAIN
),
1190 "rec mic gain",NULL
,UNUSED
},
1191 #endif /* DEFAULT_REC_MIC_GAIN */
1192 #ifdef DEFAULT_REC_LEFT_GAIN
1193 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_left_gain
,
1194 LANG_GAIN_LEFT
,INT(DEFAULT_REC_LEFT_GAIN
),
1195 "rec left gain",NULL
,UNUSED
},
1196 #endif /* DEFAULT_REC_LEFT_GAIN */
1197 #ifdef DEFAULT_REC_RIGHT_GAIN
1198 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_right_gain
,LANG_GAIN_RIGHT
,
1199 INT(DEFAULT_REC_RIGHT_GAIN
),
1200 "rec right gain",NULL
,UNUSED
},
1201 #endif /* DEFAULT_REC_RIGHT_GAIN */
1202 #if CONFIG_CODEC == MAS3587F
1203 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1204 LANG_RECORDING_FREQUENCY
, INT(0),
1205 "rec frequency","44,48,32,22,24,16", UNUSED
},
1206 INT_SETTING(F_RECSETTING
, rec_quality
, LANG_RECORDING_QUALITY
, 5,
1207 "rec quality", UNIT_INT
, 0, 7, 1, NULL
, NULL
, NULL
),
1208 OFFON_SETTING(F_RECSETTING
, rec_editable
, LANG_RECORDING_EDITABLE
, false,
1209 "editable recordings", NULL
),
1210 #endif /* CONFIG_CODEC == MAS3587F */
1211 #if CONFIG_CODEC == SWCODEC
1212 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_frequency
,
1213 LANG_RECORDING_FREQUENCY
,INT(REC_FREQ_DEFAULT
),
1214 "rec frequency",REC_FREQ_CFG_VAL_LIST
,UNUSED
},
1215 {F_T_INT
|F_RECSETTING
,&global_settings
.rec_format
,
1216 LANG_RECORDING_FORMAT
,INT(REC_FORMAT_DEFAULT
),
1217 "rec format",REC_FORMAT_CFG_VAL_LIST
,UNUSED
},
1218 /** Encoder settings start - keep these together **/
1220 /* (no settings yet) */
1222 {F_T_INT
|F_RECSETTING
, &global_settings
.mp3_enc_config
.bitrate
,-1,
1223 INT(MP3_ENC_BITRATE_CFG_DEFAULT
),
1224 "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST
,UNUSED
},
1226 /* (no settings yet) */
1228 /* (no settings yet) */
1229 /** Encoder settings end **/
1230 #endif /* CONFIG_CODEC == SWCODEC */
1231 /* values for the trigger */
1232 INT_SETTING(F_RECSETTING
, rec_start_thres_db
, LANG_RECORD_START_THRESHOLD
, -35,
1233 "trigger start threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, 1, NULL
, NULL
, NULL
),
1234 INT_SETTING(F_RECSETTING
, rec_start_thres_linear
, LANG_RECORD_START_THRESHOLD
, 5,
1235 "trigger start threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1236 INT_SETTING(F_RECSETTING
, rec_stop_thres_db
, LANG_RECORD_STOP_THRESHOLD
, -45,
1237 "trigger stop threshold dB", UNIT_DB
, VOLUME_MIN
/10, 0, 1, NULL
, NULL
, NULL
),
1238 INT_SETTING(F_RECSETTING
, rec_stop_thres_linear
, LANG_RECORD_STOP_THRESHOLD
, 10,
1239 "trigger stop threshold linear", UNIT_PERCENT
, 0, 100, 1, NULL
, NULL
, NULL
),
1240 TABLE_SETTING(F_RECSETTING
, rec_start_duration
, LANG_MIN_DURATION
, 0,
1241 "trigger start duration",
1242 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1243 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1244 0,1,2,5,10,15,20,25,30,60,120,300,600),
1245 TABLE_SETTING(F_RECSETTING
, rec_stop_postrec
, LANG_MIN_DURATION
, 0,
1246 "trigger stop duration",
1247 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1248 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1249 0,1,2,5,10,15,20,25,30,60,120,300,600),
1250 TABLE_SETTING(F_RECSETTING
, rec_stop_gap
, LANG_RECORD_STOP_GAP
, 1,
1252 "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
1253 UNIT_SEC
, NULL
, NULL
, NULL
, 13,
1254 0,1,2,5,10,15,20,25,30,60,120,300,600),
1255 CHOICE_SETTING(F_RECSETTING
, rec_trigger_mode
, LANG_RECORD_TRIGGER
, TRIG_MODE_OFF
,
1256 "trigger mode","off,once,repeat", NULL
,3,
1257 ID2P(LANG_OFF
), ID2P(LANG_RECORD_TRIG_NOREARM
), ID2P(LANG_REPEAT
)),
1258 CHOICE_SETTING(F_RECSETTING
, rec_trigger_type
, LANG_RECORD_TRIGGER_TYPE
, TRIG_TYPE_STOP
,
1259 "trigger type","stop,pause,nf stp", NULL
,3,
1260 ID2P(LANG_RECORD_TRIGGER_STOP
), ID2P(LANG_PAUSE
), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP
)),
1261 #ifdef HAVE_RECORDING_HISTOGRAM
1262 /* TO DO: additional restictions of following REP items? */
1263 TABLE_SETTING(F_RECSETTING
, rec_histogram_interval
, LANG_RECORDING_HISTOGRAM_INTERVAL
, 0,
1264 "histogram interval","0s,1s,2s,4s",
1265 UNIT_SEC
, NULL
, NULL
, NULL
, 4, 0,1,2,4),
1266 #endif /* HAVE_RECORDING_HISTOGRAM */
1268 #endif /* HAVE_RECORDING */
1270 #ifdef HAVE_SPDIF_POWER
1271 OFFON_SETTING(F_SOUNDSETTING
, spdif_enable
, LANG_SPDIF_ENABLE
, false,
1272 "spdif enable", spdif_power_enable
),
1274 CHOICE_SETTING(0, next_folder
, LANG_NEXT_FOLDER
, FOLDER_ADVANCE_OFF
,
1275 "folder navigation", "off,on,random",NULL
,3,
1276 ID2P(LANG_SET_BOOL_NO
), ID2P(LANG_SET_BOOL_YES
),
1279 #ifdef HAVE_TAGCACHE
1280 OFFON_SETTING(0, runtimedb
, LANG_RUNTIMEDB_ACTIVE
, false,
1281 "gather runtime data", NULL
),
1284 #if CONFIG_CODEC == SWCODEC
1286 CHOICE_SETTING(F_SOUNDSETTING
, replaygain_type
, LANG_REPLAYGAIN_MODE
,
1287 REPLAYGAIN_SHUFFLE
, "replaygain type",
1288 "track,album,track shuffle,off", NULL
, 4, ID2P(LANG_TRACK_GAIN
),
1289 ID2P(LANG_ALBUM_GAIN
), ID2P(LANG_SHUFFLE_GAIN
), ID2P(LANG_OFF
)),
1290 OFFON_SETTING(F_SOUNDSETTING
, replaygain_noclip
, LANG_REPLAYGAIN_NOCLIP
,
1291 false, "replaygain noclip", NULL
),
1292 INT_SETTING_NOWRAP(F_SOUNDSETTING
, replaygain_preamp
,
1293 LANG_REPLAYGAIN_PREAMP
, 0, "replaygain preamp",
1294 UNIT_DB
, -120, 120, 5, db_format
, get_dec_talkid
, NULL
),
1296 CHOICE_SETTING(0, beep
, LANG_BEEP
, 0, "beep", "off,weak,moderate,strong",
1297 NULL
, 4, ID2P(LANG_OFF
), ID2P(LANG_WEAK
),
1298 ID2P(LANG_MODERATE
), ID2P(LANG_STRONG
)),
1300 #ifdef HAVE_CROSSFADE
1302 CHOICE_SETTING(F_SOUNDSETTING
, crossfade
, LANG_CROSSFADE_ENABLE
, 0,
1304 "off,auto track change,man track skip,shuffle,shuffle or man track skip,always",
1305 NULL
, 6, ID2P(LANG_OFF
), ID2P(LANG_AUTOTRACKSKIP
),
1306 ID2P(LANG_MANTRACKSKIP
), ID2P(LANG_SHUFFLE
),
1307 ID2P(LANG_SHUFFLE_TRACKSKIP
), ID2P(LANG_ALWAYS
)),
1308 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_delay
,
1309 LANG_CROSSFADE_FADE_IN_DELAY
, 0,
1310 "crossfade fade in delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
, NULL
),
1311 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_delay
,
1312 LANG_CROSSFADE_FADE_OUT_DELAY
, 0,
1313 "crossfade fade out delay", UNIT_SEC
, 0, 7, 1, NULL
, NULL
,NULL
),
1314 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_in_duration
,
1315 LANG_CROSSFADE_FADE_IN_DURATION
, 2,
1316 "crossfade fade in duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1318 INT_SETTING(F_SOUNDSETTING
, crossfade_fade_out_duration
,
1319 LANG_CROSSFADE_FADE_OUT_DURATION
, 2,
1320 "crossfade fade out duration", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1322 CHOICE_SETTING(F_SOUNDSETTING
, crossfade_fade_out_mixmode
,
1323 LANG_CROSSFADE_FADE_OUT_MODE
, 0,
1324 "crossfade fade out mode", "crossfade,mix", NULL
, 2,
1325 ID2P(LANG_CROSSFADE
), ID2P(LANG_MIX
)),
1329 OFFON_SETTING(F_SOUNDSETTING
, crossfeed
, LANG_CROSSFEED
, false,
1330 "crossfeed", dsp_set_crossfeed
),
1331 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_direct_gain
,
1332 LANG_CROSSFEED_DIRECT_GAIN
, -15,
1333 "crossfeed direct gain", UNIT_DB
, -60, 0, 5,
1334 db_format
, get_dec_talkid
,dsp_set_crossfeed_direct_gain
),
1335 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_cross_gain
,
1336 LANG_CROSSFEED_CROSS_GAIN
, -60,
1337 "crossfeed cross gain", UNIT_DB
, -120, -30, 5,
1338 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1339 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_attenuation
,
1340 LANG_CROSSFEED_HF_ATTENUATION
, -160,
1341 "crossfeed hf attenuation", UNIT_DB
, -240, -60, 5,
1342 db_format
, get_dec_talkid
, crossfeed_cross_set
),
1343 INT_SETTING_NOWRAP(F_SOUNDSETTING
, crossfeed_hf_cutoff
,
1344 LANG_CROSSFEED_HF_CUTOFF
, 700,
1345 "crossfeed hf cutoff", UNIT_HERTZ
, 500, 2000, 100,
1346 NULL
, NULL
, crossfeed_cross_set
),
1349 OFFON_SETTING(F_EQSETTING
, eq_enabled
, LANG_EQUALIZER_ENABLED
, false,
1350 "eq enabled", NULL
),
1351 INT_SETTING_NOWRAP(F_EQSETTING
, eq_precut
, LANG_EQUALIZER_PRECUT
, 0,
1352 "eq precut", UNIT_DB
, 0, 240, 5, eq_precut_format
,
1353 get_precut_talkid
, dsp_set_eq_precut
),
1355 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1356 60, "eq band 0 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1357 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1358 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1359 200, "eq band 1 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1360 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1361 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1362 800, "eq band 2 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1363 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1364 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_cutoff
, LANG_EQUALIZER_BAND_CENTER
,
1365 4000, "eq band 3 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1366 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1367 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_cutoff
, LANG_EQUALIZER_BAND_CUTOFF
,
1368 12000, "eq band 4 cutoff", UNIT_HERTZ
, EQ_CUTOFF_MIN
,
1369 EQ_CUTOFF_MAX
, EQ_CUTOFF_STEP
, NULL
, NULL
, NULL
),
1370 /* 0..64 (or 0.0 to 6.4) */
1371 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_q
, LANG_EQUALIZER_BAND_Q
, 7,
1372 "eq band 0 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1373 eq_q_format
, get_dec_talkid
, NULL
),
1374 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_q
, LANG_EQUALIZER_BAND_Q
, 10,
1375 "eq band 1 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1376 eq_q_format
, get_dec_talkid
, NULL
),
1377 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_q
, LANG_EQUALIZER_BAND_Q
, 10,
1378 "eq band 2 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1379 eq_q_format
, get_dec_talkid
, NULL
),
1380 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_q
, LANG_EQUALIZER_BAND_Q
, 10,
1381 "eq band 3 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1382 eq_q_format
, get_dec_talkid
, NULL
),
1383 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_q
, LANG_EQUALIZER_BAND_Q
, 7,
1384 "eq band 4 q", UNIT_INT
, EQ_Q_MIN
, EQ_Q_MAX
, EQ_Q_STEP
,
1385 eq_q_format
, get_dec_talkid
, NULL
),
1386 /* -240..240 (or -24db to +24db) */
1387 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band0_gain
, LANG_GAIN
, 0,
1388 "eq band 0 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1389 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1390 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band1_gain
, LANG_GAIN
, 0,
1391 "eq band 1 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1392 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1393 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band2_gain
, LANG_GAIN
, 0,
1394 "eq band 2 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1395 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1396 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band3_gain
, LANG_GAIN
, 0,
1397 "eq band 3 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1398 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1399 INT_SETTING_NOWRAP(F_EQSETTING
, eq_band4_gain
, LANG_GAIN
, 0,
1400 "eq band 4 gain", UNIT_DB
, EQ_GAIN_MIN
, EQ_GAIN_MAX
,
1401 EQ_GAIN_STEP
, db_format
, get_dec_talkid
, NULL
),
1404 OFFON_SETTING(F_SOUNDSETTING
, dithering_enabled
, LANG_DITHERING
, false,
1405 "dithering enabled", dsp_dither_enable
),
1408 OFFON_SETTING(F_SOUNDSETTING
, timestretch_enabled
, LANG_TIMESTRETCH
, false,
1409 "timestretch enabled", dsp_timestretch_enable
),
1412 INT_SETTING_NOWRAP(F_SOUNDSETTING
, compressor_threshold
,
1413 LANG_COMPRESSOR_THRESHOLD
, 0,
1414 "compressor threshold", UNIT_DB
, 0, -24,
1415 -3, formatter_unit_0_is_off
, getlang_unit_0_is_off
, compressor_set
),
1416 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_makeup_gain
,
1417 LANG_COMPRESSOR_GAIN
, 1, "compressor makeup gain",
1418 "off,auto", compressor_set
, 2,
1419 ID2P(LANG_OFF
), ID2P(LANG_AUTO
)),
1420 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_ratio
,
1421 LANG_COMPRESSOR_RATIO
, 1, "compressor ratio",
1422 "2:1,4:1,6:1,10:1,limit", compressor_set
, 5,
1423 ID2P(LANG_COMPRESSOR_RATIO_2
), ID2P(LANG_COMPRESSOR_RATIO_4
),
1424 ID2P(LANG_COMPRESSOR_RATIO_6
), ID2P(LANG_COMPRESSOR_RATIO_10
),
1425 ID2P(LANG_COMPRESSOR_RATIO_LIMIT
)),
1426 CHOICE_SETTING(F_SOUNDSETTING
|F_NO_WRAP
, compressor_knee
,
1427 LANG_COMPRESSOR_KNEE
, 1, "compressor knee",
1428 "hard knee,soft knee", compressor_set
, 2,
1429 ID2P(LANG_COMPRESSOR_HARD_KNEE
), ID2P(LANG_COMPRESSOR_SOFT_KNEE
)),
1430 INT_SETTING_NOWRAP(F_SOUNDSETTING
, compressor_release_time
,
1431 LANG_COMPRESSOR_RELEASE
, 500,
1432 "compressor release time", UNIT_MS
, 100, 1000,
1433 100, NULL
, NULL
, compressor_set
),
1435 #ifdef AUDIOHW_HAVE_BASS_CUTOFF
1436 SOUND_SETTING(F_NO_WRAP
, bass_cutoff
, LANG_BASS_CUTOFF
,
1437 "bass cutoff", SOUND_BASS_CUTOFF
),
1439 #ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
1440 SOUND_SETTING(F_NO_WRAP
, treble_cutoff
, LANG_TREBLE_CUTOFF
,
1441 "treble cutoff", SOUND_TREBLE_CUTOFF
),
1443 #ifdef HAVE_DIRCACHE
1444 OFFON_SETTING(F_BANFROMQS
,dircache
,LANG_DIRCACHE_ENABLE
,false,"dircache",NULL
),
1445 SYSTEM_SETTING(NVRAM(4),dircache_size
,0),
1448 #ifdef HAVE_TAGCACHE
1449 #ifdef HAVE_TC_RAMCACHE
1450 OFFON_SETTING(F_BANFROMQS
,tagcache_ram
,LANG_TAGCACHE_RAM
,false,"tagcache_ram",NULL
),
1452 OFFON_SETTING(F_BANFROMQS
, tagcache_autoupdate
, LANG_TAGCACHE_AUTOUPDATE
, false,
1453 "tagcache_autoupdate", NULL
),
1455 CHOICE_SETTING(0, default_codepage
, LANG_DEFAULT_CODEPAGE
, 0,
1457 #ifdef HAVE_LCD_BITMAP
1458 /* The order must match with that in unicode.c */
1459 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
1460 "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8",
1462 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1463 ID2P(LANG_CODEPAGE_HEBREW
), ID2P(LANG_CODEPAGE_CYRILLIC
),
1464 ID2P(LANG_CODEPAGE_THAI
), ID2P(LANG_CODEPAGE_ARABIC
),
1465 ID2P(LANG_CODEPAGE_TURKISH
),
1466 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1467 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1468 ID2P(LANG_CODEPAGE_JAPANESE
),
1469 ID2P(LANG_CODEPAGE_SIMPLIFIED
), ID2P(LANG_CODEPAGE_KOREAN
),
1470 ID2P(LANG_CODEPAGE_TRADITIONAL
), ID2P(LANG_CODEPAGE_UTF8
)),
1471 #else /* !HAVE_LCD_BITMAP */
1472 /* The order must match with that in unicode.c */
1473 "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,utf-8",
1475 ID2P(LANG_CODEPAGE_LATIN1
), ID2P(LANG_CODEPAGE_GREEK
),
1476 ID2P(LANG_CODEPAGE_CYRILLIC
), ID2P(LANG_CODEPAGE_TURKISH
),
1477 ID2P(LANG_CODEPAGE_LATIN_EXTENDED
),
1478 ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN
),
1479 ID2P(LANG_CODEPAGE_UTF8
)),
1481 OFFON_SETTING(0, warnon_erase_dynplaylist
, LANG_WARN_ERASEDYNPLAYLIST_MENU
,
1482 true, "warn when erasing dynamic playlist",NULL
),
1484 #ifdef HAVE_BACKLIGHT
1485 #ifdef HAS_BUTTON_HOLD
1486 CHOICE_SETTING(0, backlight_on_button_hold
, LANG_BACKLIGHT_ON_BUTTON_HOLD
,
1487 1, "backlight on button hold", "normal,off,on",
1488 backlight_set_on_button_hold
, 3,
1489 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1492 #ifdef HAVE_LCD_SLEEP_SETTING
1493 STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off
,
1494 LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF
, 3,
1495 "lcd sleep after backlight off",
1496 "always,never,5,10,15,20,30,45,60,90",
1497 lcd_set_sleep_after_backlight_off
, 10,
1498 LANG_ALWAYS
, LANG_NEVER
, TALK_ID(5, UNIT_SEC
),
1499 TALK_ID(10, UNIT_SEC
), TALK_ID(15, UNIT_SEC
),
1500 TALK_ID(20, UNIT_SEC
), TALK_ID(30, UNIT_SEC
),
1501 TALK_ID(45, UNIT_SEC
),TALK_ID(60, UNIT_SEC
),
1502 TALK_ID(90, UNIT_SEC
)),
1503 #endif /* HAVE_LCD_SLEEP_SETTING */
1504 #endif /* HAVE_BACKLIGHT */
1506 OFFON_SETTING(0, hold_lr_for_scroll_in_list
, -1, true,
1507 "hold_lr_for_scroll_in_list",NULL
),
1508 #ifdef HAVE_LCD_BITMAP
1509 CHOICE_SETTING(0, show_path_in_browser
, LANG_SHOW_PATH
, SHOW_PATH_CURRENT
,
1510 "show path in browser", "off,current directory,full path",
1511 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_SHOW_PATH_CURRENT
),
1512 ID2P(LANG_DISPLAY_FULL_PATH
)),
1516 {F_T_INT
,&global_settings
.rec_agc_preset_mic
,LANG_RECORDING_AGC_PRESET
,
1517 INT(1),"agc mic preset",NULL
,UNUSED
},
1518 {F_T_INT
,&global_settings
.rec_agc_preset_line
,LANG_RECORDING_AGC_PRESET
,
1519 INT(1),"agc line preset",NULL
,UNUSED
},
1520 {F_T_INT
,&global_settings
.rec_agc_maxgain_mic
,-1,INT(104),
1521 "agc maximum mic gain",NULL
,UNUSED
},
1522 {F_T_INT
,&global_settings
.rec_agc_maxgain_line
,-1,INT(96),
1523 "agc maximum line gain",NULL
,UNUSED
},
1524 {F_T_INT
,&global_settings
.rec_agc_cliptime
,LANG_RECORDING_AGC_CLIPTIME
,
1525 INT(1),"agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED
},
1528 #ifdef HAVE_REMOTE_LCD
1529 #ifdef HAS_REMOTE_BUTTON_HOLD
1530 CHOICE_SETTING(0, remote_backlight_on_button_hold
,
1531 LANG_BACKLIGHT_ON_BUTTON_HOLD
, 0,
1532 "remote backlight on button hold",
1533 "normal,off,on", remote_backlight_set_on_button_hold
, 3,
1534 ID2P(LANG_NORMAL
), ID2P(LANG_OFF
), ID2P(LANG_ON
)),
1537 #ifdef HAVE_HEADPHONE_DETECTION
1538 CHOICE_SETTING(0, unplug_mode
, LANG_HEADPHONE_UNPLUG
, 0,
1539 "pause on headphone unplug", "off,pause,pause and resume",
1540 NULL
, 3, ID2P(LANG_OFF
), ID2P(LANG_PAUSE
),
1541 ID2P(LANG_HEADPHONE_UNPLUG_RESUME
)),
1542 INT_SETTING(0, unplug_rw
, LANG_HEADPHONE_UNPLUG_RW
, 0,
1543 "rewind duration on pause", UNIT_SEC
, 0, 15, 1, NULL
, NULL
,
1545 OFFON_SETTING(0, unplug_autoresume
,
1546 LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME
, false,
1547 "disable autoresume if phones not present",NULL
),
1550 CHOICE_SETTING(0, fm_region
, LANG_FM_REGION
, 0,
1551 "fm_region", "eu,us,jp,kr,it,wo", set_radio_region
, 6,
1552 ID2P(LANG_FM_EUROPE
), ID2P(LANG_FM_US
),
1553 ID2P(LANG_FM_JAPAN
), ID2P(LANG_FM_KOREA
),
1554 ID2P(LANG_FM_ITALY
), ID2P(LANG_FM_OTHER
)),
1557 OFFON_SETTING(F_BANFROMQS
, audioscrobbler
, LANG_AUDIOSCROBBLER
, false,
1558 "Last.fm Logging", NULL
),
1560 TEXT_SETTING(0, fmr_file
, "fmr", "-",
1561 FMPRESET_PATH
"/", ".fmr"),
1562 TEXT_SETTING(F_THEMESETTING
,fms_file
, "fms",
1563 DEFAULT_FMS_NAME
, SBS_DIR
"/", ".fms"),
1564 #ifdef HAVE_REMOTE_LCD
1565 TEXT_SETTING(F_THEMESETTING
,rfms_file
, "rfms",
1566 DEFAULT_FMS_NAME
, SBS_DIR
"/", ".rfms"),
1568 #endif /* CONFIG_TUNER */
1569 #ifdef HAVE_LCD_BITMAP
1570 TEXT_SETTING(F_THEMESETTING
, font_file
, "font",
1571 DEFAULT_FONTNAME
, FONT_DIR
"/", ".fnt"),
1573 #ifdef HAVE_REMOTE_LCD
1574 TEXT_SETTING(F_THEMESETTING
, remote_font_file
, "remote font",
1575 DEFAULT_REMOTE_FONTNAME
, FONT_DIR
"/", ".fnt"),
1577 TEXT_SETTING(F_THEMESETTING
,wps_file
, "wps",
1578 DEFAULT_WPSNAME
, WPS_DIR
"/", ".wps"),
1579 #ifdef HAVE_LCD_BITMAP
1580 TEXT_SETTING(F_THEMESETTING
,sbs_file
, "sbs",
1581 DEFAULT_SBSNAME
, SBS_DIR
"/", ".sbs"),
1583 #ifdef HAVE_REMOTE_LCD
1584 TEXT_SETTING(F_THEMESETTING
,rwps_file
,"rwps",
1585 DEFAULT_WPSNAME
, WPS_DIR
"/", ".rwps"),
1586 TEXT_SETTING(F_THEMESETTING
,rsbs_file
, "rsbs",
1587 DEFAULT_SBSNAME
, SBS_DIR
"/", ".rsbs"),
1589 TEXT_SETTING(0,lang_file
,"lang","",LANG_DIR
"/",".lng"),
1591 TEXT_SETTING(F_THEMESETTING
,backdrop_file
,"backdrop",
1592 DEFAULT_BACKDROP
, BACKDROP_DIR
"/", ".bmp"),
1594 #ifdef HAVE_LCD_BITMAP
1595 TEXT_SETTING(0,kbd_file
,"kbd","-",ROCKBOX_DIR
"/",".kbd"),
1597 #ifdef HAVE_USB_CHARGING_ENABLE
1598 OFFON_SETTING(0,usb_charging
,LANG_USB_CHARGING
,false,"usb charging",NULL
),
1600 OFFON_SETTING(F_BANFROMQS
,cuesheet
,LANG_CUESHEET_ENABLE
,false,"cuesheet support",
1602 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, skip_length
,
1603 LANG_SKIP_LENGTH
, 0, "skip length",
1604 "outro,track,1s,2s,3s,5s,7s,10s,15s,20s,30s,45s,1min,90s,2min,3min,5min,10min,15min",
1605 UNIT_SEC
, formatter_unit_0_is_skip_track
,
1606 getlang_unit_0_is_skip_track
, NULL
,
1607 19, -1,0,1,2,3,5,7,10,15,20,30,45,60,90,120,180,300,600,900),
1608 CHOICE_SETTING(0, start_in_screen
, LANG_START_SCREEN
, 1,
1609 "start in screen", "previous,root,files,"
1610 #ifdef HAVE_TAGCACHE
1614 #ifdef HAVE_RECORDING
1621 #if defined(HAVE_TAGCACHE)
1622 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1624 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1630 #if defined(HAVE_RECORDING) && CONFIG_TUNER
1632 #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */
1638 ID2P(LANG_PREVIOUS_SCREEN
), ID2P(LANG_MAIN_MENU
),
1639 ID2P(LANG_DIR_BROWSER
),
1640 #ifdef HAVE_TAGCACHE
1641 ID2P(LANG_TAGCACHE
),
1643 ID2P(LANG_RESUME_PLAYBACK
), ID2P(LANG_SETTINGS
),
1644 #ifdef HAVE_RECORDING
1645 ID2P(LANG_RECORDING
),
1648 ID2P(LANG_FM_RADIO
),
1650 ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
)
1652 SYSTEM_SETTING(NVRAM(1),last_screen
,-1),
1653 #if defined(HAVE_RTC_ALARM) && \
1654 (defined(HAVE_RECORDING) || CONFIG_TUNER)
1655 {F_T_INT
, &global_settings
.alarm_wake_up_screen
, LANG_ALARM_WAKEUP_SCREEN
,
1656 INT(ALARM_START_WPS
), "alarm wakeup screen", ALARM_SETTING_TEXT
,UNUSED
},
1657 #endif /* HAVE_RTC_ALARM */
1659 /* Customizable icons */
1660 #ifdef HAVE_LCD_BITMAP
1661 TEXT_SETTING(F_THEMESETTING
, icon_file
, "iconset", DEFAULT_ICONSET
,
1662 ICON_DIR
"/", ".bmp"),
1663 TEXT_SETTING(F_THEMESETTING
, viewers_icon_file
, "viewers iconset",
1664 DEFAULT_VIEWERS_ICONSET
,
1665 ICON_DIR
"/", ".bmp"),
1667 #ifdef HAVE_REMOTE_LCD
1668 TEXT_SETTING(F_THEMESETTING
, remote_icon_file
, "remote iconset", "-",
1669 ICON_DIR
"/", ".bmp"),
1670 TEXT_SETTING(F_THEMESETTING
, remote_viewers_icon_file
,
1671 "remote viewers iconset", "-",
1672 ICON_DIR
"/", ".bmp"),
1673 #endif /* HAVE_REMOTE_LCD */
1674 #ifdef HAVE_LCD_COLOR
1675 TEXT_SETTING(F_THEMESETTING
, colors_file
, "filetype colours", "-",
1676 THEME_DIR
"/", ".colours"),
1678 #ifdef HAVE_BUTTON_LIGHT
1679 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, buttonlight_timeout
,
1680 LANG_BUTTONLIGHT_TIMEOUT
, 5, "button light timeout", off_on
,
1681 UNIT_SEC
, backlight_formatter
, backlight_getlang
,
1682 buttonlight_set_timeout
, 20,
1683 -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
1685 #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
1686 INT_SETTING(F_NO_WRAP
, buttonlight_brightness
, LANG_BUTTONLIGHT_BRIGHTNESS
,
1687 DEFAULT_BRIGHTNESS_SETTING
,
1688 "button light brightness",UNIT_INT
, MIN_BRIGHTNESS_SETTING
,
1689 MAX_BRIGHTNESS_SETTING
, 1, NULL
, NULL
,
1690 buttonlight_set_brightness
),
1692 #ifndef HAVE_WHEEL_ACCELERATION
1693 INT_SETTING(0, list_accel_start_delay
, LANG_LISTACCEL_START_DELAY
,
1694 2, "list_accel_start_delay", UNIT_MS
, 0, 10, 1,
1695 formatter_unit_0_is_off
, getlang_unit_0_is_off
, NULL
),
1696 INT_SETTING(0, list_accel_wait
, LANG_LISTACCEL_ACCEL_SPEED
,
1697 3, "list_accel_wait", UNIT_SEC
, 1, 10, 1,
1698 scanaccel_formatter
, getlang_unit_0_is_off
, NULL
),
1699 #endif /* HAVE_WHEEL_ACCELERATION */
1700 #if CONFIG_CODEC == SWCODEC
1702 CHOICE_SETTING(0, keyclick
, LANG_KEYCLICK
, 0,
1703 "keyclick", "off,weak,moderate,strong", NULL
, 4,
1704 ID2P(LANG_OFF
), ID2P(LANG_WEAK
), ID2P(LANG_MODERATE
),
1706 OFFON_SETTING(0, keyclick_repeats
, LANG_KEYCLICK_REPEATS
, false,
1707 "keyclick repeats", NULL
),
1708 #endif /* CONFIG_CODEC == SWCODEC */
1709 TEXT_SETTING(0, playlist_catalog_dir
, "playlist catalog directory",
1710 PLAYLIST_CATALOG_DEFAULT_DIR
, NULL
, NULL
),
1711 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
1712 CHOICE_SETTING(0, touchpad_sensitivity
, LANG_TOUCHPAD_SENSITIVITY
, 0,
1713 "touchpad sensitivity", "normal,high", touchpad_set_sensitivity
, 2,
1714 ID2P(LANG_NORMAL
), ID2P(LANG_HIGH
)),
1716 #ifdef HAVE_QUICKSCREEN
1717 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_TOP
], LANG_TOP_QS_ITEM
,
1718 &global_settings
.dirfilter
, "qs top",
1719 qs_load_from_cfg
, qs_write_to_cfg
,
1720 qs_is_changed
, qs_set_default
),
1721 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_LEFT
], LANG_LEFT_QS_ITEM
,
1722 &global_settings
.playlist_shuffle
, "qs left",
1723 qs_load_from_cfg
, qs_write_to_cfg
,
1724 qs_is_changed
, qs_set_default
),
1725 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_RIGHT
], LANG_RIGHT_QS_ITEM
,
1726 &global_settings
.repeat_mode
, "qs right",
1727 qs_load_from_cfg
, qs_write_to_cfg
,
1728 qs_is_changed
, qs_set_default
),
1729 CUSTOM_SETTING(0, qs_items
[QUICKSCREEN_BOTTOM
], LANG_BOTTOM_QS_ITEM
,
1730 &global_settings
.dirfilter
, "qs bottom",
1731 qs_load_from_cfg
, qs_write_to_cfg
,
1732 qs_is_changed
, qs_set_default
),
1735 OFFON_SETTING(0, speaker_enabled
, LANG_ENABLE_SPEAKER
, false, "speaker",
1736 audiohw_enable_speaker
),
1738 #ifdef HAVE_TOUCHSCREEN
1739 CHOICE_SETTING(0, touch_mode
, LANG_TOUCHSCREEN_MODE
, TOUCHSCREEN_BUTTON
,
1740 "touchscreen mode", "point,grid", NULL
, 2,
1741 ID2P(LANG_TOUCHSCREEN_POINT
), ID2P(LANG_TOUCHSCREEN_GRID
)),
1742 CUSTOM_SETTING(0, ts_calibration_data
, -1,
1743 &default_calibration_parameters
, "touchscreen calibration",
1744 tsc_load_from_cfg
, tsc_write_to_cfg
,
1745 tsc_is_changed
, tsc_set_default
),
1747 OFFON_SETTING(0, prevent_skip
, LANG_PREVENT_SKIPPING
, false, "prevent track skip", NULL
),
1749 #ifdef HAVE_PITCHSCREEN
1750 OFFON_SETTING(0, pitch_mode_semitone
, LANG_SEMITONE
, false,
1751 "Semitone pitch change", NULL
),
1752 #if CONFIG_CODEC == SWCODEC
1753 OFFON_SETTING(0, pitch_mode_timestretch
, LANG_TIMESTRETCH
, false,
1754 "Timestretch mode", NULL
),
1758 #ifdef USB_ENABLE_HID
1759 OFFON_SETTING(0, usb_hid
, LANG_USB_HID
, true, "usb hid", usb_set_hid
),
1760 CHOICE_SETTING(0, usb_keypad_mode
, LANG_USB_KEYPAD_MODE
, 0,
1761 "usb keypad mode", "multimedia,presentation,browser"
1762 #ifdef HAVE_USB_HID_MOUSE
1766 #ifdef HAVE_USB_HID_MOUSE
1771 ID2P(LANG_MULTIMEDIA_MODE
), ID2P(LANG_PRESENTATION_MODE
),
1772 ID2P(LANG_BROWSER_MODE
)
1773 #ifdef HAVE_USB_HID_MOUSE
1774 , ID2P(LANG_MOUSE_MODE
)
1776 ), /* CHOICE_SETTING( usb_keypad_mode ) */
1779 /* Customizable list */
1780 #ifdef HAVE_LCD_BITMAP
1781 VIEWPORT_SETTING(ui_vp_config
, "ui viewport"),
1782 #ifdef HAVE_REMOTE_LCD
1783 VIEWPORT_SETTING(remote_ui_vp_config
, "remote ui viewport"),
1787 #ifdef HAVE_MORSE_INPUT
1788 OFFON_SETTING(0, morse_input
, LANG_MORSE_INPUT
, false, "morse input", NULL
),
1792 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, hotkey_wps
,
1793 LANG_HOTKEY_WPS
, HOTKEY_VIEW_PLAYLIST
, "hotkey wps",
1794 "off,view playlist,show track info,pitchscreen,open with,delete",
1795 UNIT_INT
, hotkey_formatter
, hotkey_getlang
, NULL
, 6, HOTKEY_OFF
,
1796 HOTKEY_VIEW_PLAYLIST
, HOTKEY_SHOW_TRACK_INFO
, HOTKEY_PITCHSCREEN
,
1797 HOTKEY_OPEN_WITH
, HOTKEY_DELETE
),
1798 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS
, hotkey_tree
,
1799 LANG_HOTKEY_FILE_BROWSER
, HOTKEY_OFF
, "hotkey tree",
1800 "off,open with,delete,insert,insert shuffled",
1801 UNIT_INT
, hotkey_formatter
, hotkey_getlang
, NULL
, 5, HOTKEY_OFF
,
1802 HOTKEY_OPEN_WITH
, HOTKEY_DELETE
, HOTKEY_INSERT
, HOTKEY_INSERT_SHUFFLED
),
1805 #if CONFIG_CODEC == SWCODEC
1806 INT_SETTING(0, resume_rewind
, LANG_RESUME_REWIND
, 0,
1807 "resume rewind", UNIT_SEC
, 0, 60, 5,
1812 const int nb_settings
= sizeof(settings
)/sizeof(*settings
);
1814 const struct settings_list
* get_settings_list(int*count
)
1816 *count
= nb_settings
;