Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
Jonathan Gordon | 4e73b53 | 2007-02-13 00:32:17 +0000 | [diff] [blame] | 8 | * $Id$ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 9 | * |
| 10 | * Copyright (C) 2007 Jonathan Gordon |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame] | 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. |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | |
| 22 | #include "config.h" |
| 23 | #include <stdbool.h> |
Thomas Martitz | 50a6ca3 | 2010-05-06 21:04:40 +0000 | [diff] [blame] | 24 | #include "string-extra.h" |
Jens Arnold | d490f44 | 2007-11-25 17:36:21 +0000 | [diff] [blame] | 25 | #include "system.h" |
Frank Gevaerts | 2f8a008 | 2008-11-01 16:14:28 +0000 | [diff] [blame] | 26 | #include "storage.h" |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 27 | #include "lang.h" |
Jonathan Gordon | 4718a1e | 2007-02-08 04:33:41 +0000 | [diff] [blame] | 28 | #include "talk.h" |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 29 | #include "lcd.h" |
Thomas Martitz | 1c5d0b4 | 2013-04-03 16:33:23 +0200 | [diff] [blame] | 30 | #include "scroll_engine.h" |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 31 | #include "button.h" |
| 32 | #include "backlight.h" |
Michael Sevakis | 80d0d15 | 2010-05-15 13:09:45 +0000 | [diff] [blame] | 33 | #include "sound.h" |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 34 | #include "settings.h" |
| 35 | #include "settings_list.h" |
Tomer Shalev | 83d24f8 | 2009-10-23 13:29:19 +0000 | [diff] [blame] | 36 | #include "usb.h" |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 37 | #include "audio.h" |
Jonathan Gordon | c370e08 | 2007-02-12 14:34:09 +0000 | [diff] [blame] | 38 | #include "power.h" |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 39 | #include "powermgmt.h" |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 40 | #include "kernel.h" |
Rafaël Carré | 6ab12df | 2012-01-07 19:18:25 +0000 | [diff] [blame] | 41 | #ifdef HAVE_REMOTE_LCD |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 42 | #include "lcd-remote.h" |
Rafaël Carré | 6ab12df | 2012-01-07 19:18:25 +0000 | [diff] [blame] | 43 | #endif |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 44 | #include "list.h" |
| 45 | #include "rbunicode.h" |
| 46 | #ifdef HAVE_LCD_BITMAP |
| 47 | #include "peakmeter.h" |
| 48 | #endif |
Jonathan Gordon | 2801a87 | 2007-02-19 02:14:51 +0000 | [diff] [blame] | 49 | #include "menus/eq_menu.h" |
Jonathan Gordon | 2816dc9 | 2007-02-27 09:06:30 +0000 | [diff] [blame] | 50 | #if CONFIG_TUNER |
| 51 | #include "radio.h" |
| 52 | #endif |
Michael Giacomelli | 70e9c7a | 2008-12-25 01:46:16 +0000 | [diff] [blame] | 53 | #ifdef IPOD_ACCESSORY_PROTOCOL |
| 54 | #include "iap.h" |
| 55 | #endif |
Jonathan Gordon | e385ee1 | 2008-12-31 05:59:26 +0000 | [diff] [blame] | 56 | #include "statusbar.h" |
Maurus Cuelenaere | b8435f5 | 2009-06-16 17:04:47 +0000 | [diff] [blame] | 57 | #ifdef HAVE_TOUCHSCREEN |
| 58 | #include "touchscreen.h" |
| 59 | #include "ctype.h" /* For isspace() */ |
| 60 | #endif |
Jeffrey Goode | 1ad76ff | 2010-05-09 02:02:51 +0000 | [diff] [blame] | 61 | #ifdef HAVE_HOTKEY |
| 62 | #include "onplay.h" |
| 63 | #endif |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 64 | |
Udo Schläpfer | 040306a | 2015-01-30 22:47:30 +0100 | [diff] [blame] | 65 | #if defined(DX50) || defined(DX90) |
| 66 | #include "governor-ibasso.h" |
Udo Schläpfer | 95fdad5 | 2015-01-21 20:51:36 +0100 | [diff] [blame] | 67 | #include "usb-ibasso.h" |
Udo Schläpfer | 040306a | 2015-01-30 22:47:30 +0100 | [diff] [blame] | 68 | #endif |
| 69 | |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 70 | #define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT) |
| 71 | /** NOTE: NVRAM_CONFIG_VERSION is in settings_list.h |
| 72 | and you may need to update it if you edit this file */ |
| 73 | |
| 74 | #define UNUSED {.RESERVED=NULL} |
| 75 | #define INT(a) {.int_ = a} |
| 76 | #define UINT(a) {.uint_ = a} |
| 77 | #define BOOL(a) {.bool_ = a} |
| 78 | #define CHARPTR(a) {.charptr = a} |
| 79 | #define UCHARPTR(a) {.ucharptr = a} |
| 80 | #define FUNCTYPE(a) {.func = a} |
| 81 | #define NODEFAULT INT(0) |
| 82 | |
| 83 | /* in all the following macros the args are: |
| 84 | - flags: bitwise | or the F_ bits in settings_list.h |
| 85 | - var: pointer to the variable being changed (usually in global_settings) |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 86 | - lang_id: LANG_* id to display in menus and setting screens for the setting |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 87 | - default: the default value for the variable, set if settings are reset |
| 88 | - name: the name of the setting in config files |
Alexander Levin | 40f30e6 | 2009-08-19 09:53:57 +0000 | [diff] [blame] | 89 | - cfg_vals: comma separated list of legal values to write to cfg files. |
| 90 | The values correspond to the values 0,1,2,etc. of the setting. |
| 91 | NULL if just the number itself should be written to the file. |
| 92 | No spaces between the values and the commas! |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 93 | - cb: the callback used by the setting screen. |
| 94 | */ |
| 95 | |
| 96 | /* Use for int settings which use the set_sound() function to set them */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 97 | #define SOUND_SETTING(flags,var,lang_id,name,setting) \ |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 98 | {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 99 | lang_id, NODEFAULT,name,NULL, \ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 100 | {.sound_setting=(struct sound_setting[]){{setting}}} } |
| 101 | |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 102 | /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO |
Alexander Levin | bbae89c | 2009-08-18 22:39:17 +0000 | [diff] [blame] | 103 | or dont save as "off" or "on" in the cfg. |
| 104 | cfgvals are comma separated values (without spaces after the comma!) to write |
| 105 | for 'false' and 'true' (in this order) |
Alexander Levin | 40f30e6 | 2009-08-19 09:53:57 +0000 | [diff] [blame] | 106 | yes_id is the lang_id for the 'yes' (or 'on') option in the menu |
| 107 | no_id is the lang_id for the 'no' (or 'off') option in the menu |
Alexander Levin | bbae89c | 2009-08-18 22:39:17 +0000 | [diff] [blame] | 108 | */ |
Alexander Levin | 40f30e6 | 2009-08-19 09:53:57 +0000 | [diff] [blame] | 109 | #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes_id,no_id,cb)\ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 110 | {flags|F_BOOL_SETTING, &global_settings.var, \ |
| 111 | lang_id, BOOL(default),name,cfgvals, \ |
Alexander Levin | 40f30e6 | 2009-08-19 09:53:57 +0000 | [diff] [blame] | 112 | {.bool_setting=(struct bool_setting[]){{cb,yes_id,no_id}}} } |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 113 | |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 114 | /* bool setting which does use LANG_YES and _NO and save as "off,on" */ |
| 115 | #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \ |
Alexander Levin | 40f30e6 | 2009-08-19 09:53:57 +0000 | [diff] [blame] | 116 | BOOL_SETTING(flags,var,lang_id,default,name,off_on, \ |
Alexander Levin | bbae89c | 2009-08-18 22:39:17 +0000 | [diff] [blame] | 117 | LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb) |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 118 | |
| 119 | /* int variable which is NOT saved to .cfg files, |
| 120 | (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 121 | #define SYSTEM_SETTING(flags,var,default) \ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 122 | {flags|F_T_INT, &global_status.var,-1, INT(default), \ |
| 123 | NULL, NULL, UNUSED} |
| 124 | |
Jonathan Gordon | 106b68e | 2008-10-23 00:29:17 +0000 | [diff] [blame] | 125 | /* setting which stores as a filename (or another string) in the .cfgvals |
| 126 | The string must be a char array (which all of our string settings are), |
| 127 | not just a char pointer. |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 128 | prefix: The absolute path to not save in the variable, ex /.rockbox/wps_file |
Jonathan Gordon | 106b68e | 2008-10-23 00:29:17 +0000 | [diff] [blame] | 129 | suffix: The file extention (usually...) e.g .wps_file |
Mustapha Senhaji | 3ff2f14 | 2008-10-23 16:23:42 +0000 | [diff] [blame] | 130 | If the prefix is set (not NULL), then the suffix must be set as well. |
Jonathan Gordon | 106b68e | 2008-10-23 00:29:17 +0000 | [diff] [blame] | 131 | */ |
| 132 | #define TEXT_SETTING(flags,var,name,default,prefix,suffix) \ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 133 | {flags|F_T_UCHARPTR, &global_settings.var,-1, \ |
| 134 | CHARPTR(default),name,NULL, \ |
Jens Arnold | d490f44 | 2007-11-25 17:36:21 +0000 | [diff] [blame] | 135 | {.filename_setting= \ |
Jonathan Gordon | 106b68e | 2008-10-23 00:29:17 +0000 | [diff] [blame] | 136 | (struct filename_setting[]){ \ |
| 137 | {prefix,suffix,sizeof(global_settings.var)}}} } |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 138 | |
| 139 | /* Used for settings which use the set_option() setting screen. |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 140 | The ... arg is a list of pointers to strings to display in the setting |
| 141 | screen. These can either be literal strings, or ID2P(LANG_*) */ |
| 142 | #define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...) \ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 143 | {flags|F_CHOICE_SETTING|F_T_INT, &global_settings.var, lang_id, \ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 144 | INT(default), name, cfg_vals, \ |
| 145 | {.choice_setting = (struct choice_setting[]){ \ |
| 146 | {cb, count, {.desc = (const unsigned char*[]) \ |
| 147 | {__VA_ARGS__}}}}}} |
| 148 | |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 149 | /* Similar to above, except the strings to display are taken from cfg_vals, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 150 | the ... arg is a list of ID's to talk for the strings, can use TALK_ID()'s */ |
| 151 | #define STRINGCHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals, \ |
| 152 | cb,count,...) \ |
| 153 | {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS, \ |
| 154 | &global_settings.var, lang_id, \ |
| 155 | INT(default), name, cfg_vals, \ |
| 156 | {.choice_setting = (struct choice_setting[]){ \ |
Jens Arnold | d490f44 | 2007-11-25 17:36:21 +0000 | [diff] [blame] | 157 | {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}} |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 158 | |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 159 | /* for settings which use the set_int() setting screen. |
| 160 | unit is the UNIT_ define to display/talk. |
| 161 | the first one saves a string to the config file, |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 162 | the second one saves the variable value to the config file */ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 163 | #define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 164 | unit, min, max, step, formatter, get_talk_id, cb) \ |
| 165 | {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \ |
| 166 | lang_id, INT(default), name, cfg_vals, \ |
| 167 | {.int_setting = (struct int_setting[]){ \ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 168 | {cb, unit, min, max, step, formatter, get_talk_id}}}} |
Jens Arnold | d490f44 | 2007-11-25 17:36:21 +0000 | [diff] [blame] | 169 | #define INT_SETTING(flags, var, lang_id, default, name, \ |
| 170 | unit, min, max, step, formatter, get_talk_id, cb) \ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 171 | {flags|F_INT_SETTING|F_T_INT, &global_settings.var, \ |
Jens Arnold | d490f44 | 2007-11-25 17:36:21 +0000 | [diff] [blame] | 172 | lang_id, INT(default), name, NULL, \ |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 173 | {.int_setting = (struct int_setting[]){ \ |
| 174 | {cb, unit, min, max, step, formatter, get_talk_id}}}} |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 175 | #define INT_SETTING_NOWRAP(flags, var, lang_id, default, name, \ |
| 176 | unit, min, max, step, formatter, get_talk_id, cb) \ |
Dan Everton | 0c2ff76 | 2007-11-29 09:19:08 +0000 | [diff] [blame] | 177 | {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var, \ |
| 178 | lang_id, INT(default), name, NULL, \ |
| 179 | {.int_setting = (struct int_setting[]){ \ |
| 180 | {cb, unit, min, max, step, formatter, get_talk_id}}}} |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 181 | |
Jens Arnold | d490f44 | 2007-11-25 17:36:21 +0000 | [diff] [blame] | 182 | #define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \ |
| 183 | unit, formatter, get_talk_id, cb, count, ...) \ |
| 184 | {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \ |
| 185 | lang_id, INT(default), name, cfg_vals, \ |
| 186 | {.table_setting = (struct table_setting[]) { \ |
| 187 | {cb, formatter, get_talk_id, unit, count, \ |
| 188 | (const int[]){__VA_ARGS__}}}}} |
Jonathan Gordon | a5278fa | 2007-07-11 05:41:23 +0000 | [diff] [blame] | 189 | |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 190 | #define TABLE_SETTING_LIST(flags, var, lang_id, default, name, cfg_vals, \ |
| 191 | unit, formatter, get_talk_id, cb, count, list) \ |
| 192 | {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var, \ |
| 193 | lang_id, INT(default), name, cfg_vals, \ |
| 194 | {.table_setting = (struct table_setting[]) { \ |
| 195 | {cb, formatter, get_talk_id, unit, count, list}}}} |
| 196 | |
Jonathan Gordon | 5395957 | 2008-11-03 10:43:37 +0000 | [diff] [blame] | 197 | #define CUSTOM_SETTING(flags, var, lang_id, default, name, \ |
| 198 | load_from_cfg, write_to_cfg, \ |
| 199 | is_change, set_default) \ |
| 200 | {flags|F_CUSTOM_SETTING|F_T_CUSTOM|F_BANFROMQS, \ |
| 201 | &global_settings.var, lang_id, \ |
| 202 | {.custom = (void*)default}, name, NULL, \ |
| 203 | {.custom_setting = (struct custom_setting[]){ \ |
| 204 | {load_from_cfg, write_to_cfg, is_change, set_default}}}} |
Thomas Martitz | 4c48b59 | 2009-08-16 22:20:11 +0000 | [diff] [blame] | 205 | |
Thomas Martitz | 1e22dae | 2009-08-17 00:28:47 +0000 | [diff] [blame] | 206 | #define VIEWPORT_SETTING(var,name) \ |
| 207 | TEXT_SETTING(F_THEMESETTING,var,name,"-", NULL, NULL) |
Thomas Martitz | 4c48b59 | 2009-08-16 22:20:11 +0000 | [diff] [blame] | 208 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 209 | /* some sets of values which are used more than once, to save memory */ |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 210 | static const char off[] = "off"; |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 211 | static const char off_on[] = "off,on"; |
| 212 | static const char off_on_ask[] = "off,on,ask"; |
Steve Bavin | 6fd10ba | 2007-06-07 09:24:53 +0000 | [diff] [blame] | 213 | static const char off_number_spell[] = "off,number,spell"; |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 214 | static const int timeout_sec_common[] = {-1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30, |
| 215 | 45,60,90,120,180,240,300,600,900,1200, |
| 216 | 1500,1800,2700,3600,4500,5400,6300,7200}; |
| 217 | static const int time_recording_trigger[] = {0,1,2,5,10,15,20,25,30,60,120,300,600}; |
| 218 | #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING) |
| 219 | static const int backlight_fade[] = {0,100,200,300,500,1000,2000,3000,5000,10000}; |
| 220 | #endif |
| 221 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 222 | #ifdef HAVE_LCD_BITMAP |
| 223 | static const char graphic_numeric[] = "graphic,numeric"; |
| 224 | #endif |
| 225 | |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 226 | /* Default theme settings */ |
Michael Giacomelli | b2366c8 | 2008-02-23 04:15:08 +0000 | [diff] [blame] | 227 | #define DEFAULT_WPSNAME "cabbiev2" |
Teruaki Kawashima | f11fd78 | 2010-02-22 05:16:11 +0000 | [diff] [blame] | 228 | #define DEFAULT_SBSNAME "-" |
Marcin Bukat | 5785cfb | 2012-06-25 22:04:36 +0200 | [diff] [blame] | 229 | #define DEFAULT_FMS_NAME "cabbiev2" |
Michael Giacomelli | b2366c8 | 2008-02-23 04:15:08 +0000 | [diff] [blame] | 230 | |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 231 | #ifdef HAVE_LCD_BITMAP |
| 232 | |
| 233 | #if LCD_HEIGHT <= 64 |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 234 | #define DEFAULT_FONT_HEIGHT 8 |
Jens Arnold | ca0de82 | 2008-09-03 17:50:21 +0000 | [diff] [blame] | 235 | #define DEFAULT_FONTNAME "08-Rockfont" |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 236 | #elif LCD_HEIGHT <= 80 |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 237 | #define DEFAULT_FONT_HEIGHT 11 |
Jens Arnold | ca0de82 | 2008-09-03 17:50:21 +0000 | [diff] [blame] | 238 | #define DEFAULT_FONTNAME "11-Sazanami-Mincho" |
Szymon Dziok | f8d367b | 2014-02-25 20:09:57 +0000 | [diff] [blame] | 239 | /* sandisk sansa clip zip and samsung yh-820 */ |
| 240 | #elif (LCD_HEIGHT == 96) && ((LCD_WIDTH == 96) || (LCD_WIDTH == 128)) |
Bertrik Sikken | 872a3a7 | 2012-05-27 01:39:06 +0200 | [diff] [blame] | 241 | #define DEFAULT_FONT_HEIGHT 8 |
| 242 | #define DEFAULT_FONTNAME "08-Rockfont" |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 243 | #elif LCD_HEIGHT <= 220 |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 244 | #define DEFAULT_FONT_HEIGHT 12 |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 245 | #elif LCD_HEIGHT <= 320 |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 246 | #define DEFAULT_FONT_HEIGHT 15 |
Marianne Arnold | a902adf | 2010-07-04 12:43:47 +0000 | [diff] [blame] | 247 | #elif LCD_HEIGHT <= 400 |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 248 | #define DEFAULT_FONT_HEIGHT 16 |
| 249 | #elif LCD_HEIGHT <= 480 && LCD_WIDTH < 800 |
| 250 | #define DEFAULT_FONT_HEIGHT 27 |
Michael Giacomelli | b2366c8 | 2008-02-23 04:15:08 +0000 | [diff] [blame] | 251 | #else |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 252 | #define DEFAULT_FONT_HEIGHT 35 |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 253 | #endif |
Fred Bauer | ea7a896 | 2011-11-19 23:34:26 +0000 | [diff] [blame] | 254 | #define DEFAULT_GLYPHS 250 |
| 255 | #define MIN_GLYPHS 50 |
| 256 | #define MAX_GLYPHS 65540 |
Michael Giacomelli | b2366c8 | 2008-02-23 04:15:08 +0000 | [diff] [blame] | 257 | |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 258 | #else |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 259 | #define DEFAULT_FONT_HEIGHT 12 |
| 260 | #endif |
| 261 | |
| 262 | #ifndef DEFAULT_FONTNAME |
| 263 | /* ugly expansion needed */ |
| 264 | #define _EXPAND2(x) #x |
| 265 | #define _EXPAND(x) _EXPAND2(x) |
| 266 | #define DEFAULT_FONTNAME _EXPAND(DEFAULT_FONT_HEIGHT) "-Adobe-Helvetica" |
| 267 | #endif |
| 268 | |
| 269 | #ifdef HAVE_LCD_COLOR |
| 270 | #if DEFAULT_FONT_HEIGHT >= 31 |
| 271 | #define DEFAULT_ICONSET "tango_icons.32x32" |
| 272 | #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.32x32" |
| 273 | #elif DEFAULT_FONT_HEIGHT >= 23 |
| 274 | #define DEFAULT_ICONSET "tango_icons.24x24" |
| 275 | #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.24x24" |
| 276 | #elif DEFAULT_FONT_HEIGHT >= 15 |
| 277 | #define DEFAULT_ICONSET "tango_icons.16x16" |
| 278 | #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.16x16" |
Bertrik Sikken | 872a3a7 | 2012-05-27 01:39:06 +0200 | [diff] [blame] | 279 | #elif DEFAULT_FONT_HEIGHT >= 11 |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 280 | #define DEFAULT_ICONSET "tango_icons.12x12" |
| 281 | #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.12x12" |
Bertrik Sikken | 872a3a7 | 2012-05-27 01:39:06 +0200 | [diff] [blame] | 282 | #elif DEFAULT_FONT_HEIGHT >= 7 |
| 283 | #define DEFAULT_ICONSET "tango_icons.8x8" |
| 284 | #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.8x8" |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 285 | #endif |
Thomas Martitz | e46dd2d | 2011-11-26 16:03:42 +0000 | [diff] [blame] | 286 | #elif LCD_DEPTH > 1 /* greyscale */ |
| 287 | #define DEFAULT_ICONSET "tango_small_mono" |
Thomas Martitz | b907f2f | 2011-11-26 16:01:11 +0000 | [diff] [blame] | 288 | #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono" |
| 289 | #else /* monochrome */ |
| 290 | #define DEFAULT_ICONSET "" |
| 291 | #define DEFAULT_VIEWERS_ICONSET "" |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 292 | #endif |
| 293 | |
Rafaël Carré | 1dc7f49 | 2010-06-03 07:30:01 +0000 | [diff] [blame] | 294 | #ifdef HAVE_REMOTE_LCD |
| 295 | #if LCD_REMOTE_HEIGHT <= 64 |
| 296 | #define DEFAULT_REMOTE_FONTNAME "08-Rockfont" |
| 297 | #else |
| 298 | #define DEFAULT_REMOTE_FONTNAME "-" |
| 299 | #endif |
| 300 | #endif /* HAVE_REMOTE_LCD */ |
| 301 | |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 302 | #define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce) |
| 303 | #define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00) |
| 304 | #define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c) |
| 305 | #define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00) |
| 306 | #define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00) |
Thomas Martitz | 05a67d0 | 2013-05-06 07:20:40 +0200 | [diff] [blame] | 307 | #define DEFAULT_THEME_SEPARATOR LCD_RGBPACK(0x80, 0x80, 0x80) |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 308 | |
Frank Gevaerts | a96a72b | 2011-04-16 19:26:21 +0000 | [diff] [blame] | 309 | #define DEFAULT_BACKDROP BACKDROP_DIR "/cabbiev2.bmp" |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 310 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 311 | #ifdef HAVE_RECORDING |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 312 | /* these should be in the config.h files */ |
| 313 | #if CONFIG_CODEC == MAS3587F |
| 314 | # define DEFAULT_REC_MIC_GAIN 8 |
| 315 | # define DEFAULT_REC_LEFT_GAIN 2 |
| 316 | # define DEFAULT_REC_RIGHT_GAIN 2 |
| 317 | #elif CONFIG_CODEC == SWCODEC |
| 318 | # ifdef HAVE_UDA1380 |
| 319 | # define DEFAULT_REC_MIC_GAIN 16 |
| 320 | # define DEFAULT_REC_LEFT_GAIN 0 |
| 321 | # define DEFAULT_REC_RIGHT_GAIN 0 |
| 322 | # elif defined(HAVE_TLV320) |
| 323 | # define DEFAULT_REC_MIC_GAIN 0 |
| 324 | # define DEFAULT_REC_LEFT_GAIN 0 |
| 325 | # define DEFAULT_REC_RIGHT_GAIN 0 |
| 326 | # elif defined(HAVE_WM8975) |
| 327 | # define DEFAULT_REC_MIC_GAIN 16 |
| 328 | # define DEFAULT_REC_LEFT_GAIN 0 |
| 329 | # define DEFAULT_REC_RIGHT_GAIN 0 |
| 330 | # elif defined(HAVE_WM8758) |
| 331 | # define DEFAULT_REC_MIC_GAIN 16 |
| 332 | # define DEFAULT_REC_LEFT_GAIN 0 |
| 333 | # define DEFAULT_REC_RIGHT_GAIN 0 |
| 334 | # elif defined(HAVE_WM8731) |
| 335 | # define DEFAULT_REC_MIC_GAIN 16 |
| 336 | # define DEFAULT_REC_LEFT_GAIN 0 |
| 337 | # define DEFAULT_REC_RIGHT_GAIN 0 |
| 338 | # endif |
| 339 | #endif |
| 340 | |
Jens Arnold | 09a7861 | 2007-11-26 23:10:20 +0000 | [diff] [blame] | 341 | #endif /* HAVE_RECORDING */ |
| 342 | |
Thomas Martitz | 63d2762 | 2012-07-18 23:36:57 +0200 | [diff] [blame] | 343 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) |
| 344 | #define DEFAULT_TAGCACHE_SCAN_PATHS "/sdcard" |
| 345 | #else |
| 346 | #define DEFAULT_TAGCACHE_SCAN_PATHS "/" |
| 347 | #endif |
| 348 | |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 349 | #ifdef HAVE_BACKLIGHT |
| 350 | #ifdef SIMULATOR |
| 351 | #define DEFAULT_BACKLIGHT_TIMEOUT 0 |
| 352 | #else |
| 353 | #define DEFAULT_BACKLIGHT_TIMEOUT 15 |
| 354 | #endif |
| 355 | #endif /* HAVE_BACKLIGHT */ |
| 356 | |
Thomas Martitz | 00434be | 2014-03-03 16:17:27 +0100 | [diff] [blame] | 357 | #if LCD_DEPTH > 1 |
Thomas Martitz | 3b12634 | 2011-10-17 17:38:10 +0000 | [diff] [blame] | 358 | static const char* list_pad_formatter(char *buffer, size_t buffer_size, |
| 359 | int val, const char *unit) |
| 360 | { |
| 361 | switch (val) |
| 362 | { |
| 363 | case -1: return str(LANG_AUTOMATIC); |
| 364 | case 0: return str(LANG_OFF); |
| 365 | default: break; |
| 366 | } |
| 367 | snprintf(buffer, buffer_size, "%d %s", val, unit); |
| 368 | return buffer; |
| 369 | } |
| 370 | |
| 371 | static int32_t list_pad_getlang(int value, int unit) |
| 372 | { |
| 373 | switch (value) |
| 374 | { |
| 375 | case -1: return LANG_AUTOMATIC; |
| 376 | case 0: return LANG_OFF; |
| 377 | default: return TALK_ID(value, unit); |
| 378 | } |
| 379 | } |
Thomas Martitz | 00434be | 2014-03-03 16:17:27 +0100 | [diff] [blame] | 380 | #endif |
Thomas Martitz | 3b12634 | 2011-10-17 17:38:10 +0000 | [diff] [blame] | 381 | |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 382 | static const char* formatter_time_unit_0_is_off(char *buffer, size_t buffer_size, |
| 383 | int val, const char *unit) |
| 384 | { |
| 385 | (void) buffer_size; |
| 386 | (void) unit; |
| 387 | if (val == 0) |
| 388 | return str(LANG_OFF); |
| 389 | return buffer; |
| 390 | } |
| 391 | |
| 392 | static int32_t getlang_time_unit_0_is_off(int value, int unit) |
| 393 | { |
| 394 | if (value == 0) |
| 395 | return LANG_OFF; |
| 396 | else |
| 397 | return talk_time_intervals(value, unit, false); |
| 398 | } |
| 399 | |
| 400 | #if defined(HAVE_BACKLIGHT) || defined(HAVE_LCD_SLEEP_SETTING) |
| 401 | static const char* formatter_time_unit_0_is_always(char *buffer, size_t buffer_size, |
| 402 | int val, const char *unit) |
| 403 | { |
| 404 | (void) buffer_size; |
| 405 | (void) unit; |
| 406 | if (val == -1) |
| 407 | return str(LANG__NEVER); |
| 408 | else if (val == 0) |
| 409 | return str(LANG_ALWAYS); |
| 410 | return buffer; |
| 411 | } |
| 412 | |
| 413 | static int32_t getlang_time_unit_0_is_always(int value, int unit) |
| 414 | { |
| 415 | if (value == -1) |
| 416 | return LANG__NEVER; |
| 417 | else if (value == 0) |
| 418 | return LANG_ALWAYS; |
| 419 | else |
| 420 | return talk_time_intervals(value, unit, false); |
| 421 | } |
| 422 | #endif /* HAVE_BACKLIGHT || HAVE_LCD_SLEEP_SETTING */ |
| 423 | |
| 424 | static const char* formatter_time_unit_0_is_skip_track(char *buffer, |
| 425 | size_t buffer_size, int val, const char *unit) |
Thom Johansen | 4a7e0c7 | 2008-07-14 20:39:30 +0000 | [diff] [blame] | 426 | { |
Stéphane Doyon | 58808b6 | 2008-08-18 01:03:07 +0000 | [diff] [blame] | 427 | (void)unit; |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 428 | (void)buffer_size; |
Thomas Martitz | a7c888c | 2009-10-17 16:05:23 +0000 | [diff] [blame] | 429 | if (val == -1) |
| 430 | return str(LANG_SKIP_OUTRO); |
| 431 | else if (val == 0) |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 432 | return str(LANG_SKIP_TRACK); |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 433 | return buffer; |
Thom Johansen | 4a7e0c7 | 2008-07-14 20:39:30 +0000 | [diff] [blame] | 434 | } |
| 435 | |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 436 | static int32_t getlang_time_unit_0_is_skip_track(int value, int unit) |
Thom Johansen | 4a7e0c7 | 2008-07-14 20:39:30 +0000 | [diff] [blame] | 437 | { |
Stéphane Doyon | 58808b6 | 2008-08-18 01:03:07 +0000 | [diff] [blame] | 438 | (void)unit; |
Alessio Lenzi | 06e0bfd | 2009-11-04 23:10:09 +0000 | [diff] [blame] | 439 | if (value == -1) |
| 440 | return LANG_SKIP_OUTRO; |
| 441 | else if (value == 0) |
Thom Johansen | 4a7e0c7 | 2008-07-14 20:39:30 +0000 | [diff] [blame] | 442 | return LANG_SKIP_TRACK; |
| 443 | else |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 444 | return talk_time_intervals(value, unit, false); |
Thom Johansen | 4a7e0c7 | 2008-07-14 20:39:30 +0000 | [diff] [blame] | 445 | } |
| 446 | |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 447 | #ifdef HAVE_LCD_BITMAP |
| 448 | static const char* formatter_time_unit_0_is_eternal(char *buffer, |
| 449 | size_t buffer_size, int val, const char *unit) |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 450 | { |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 451 | (void) buffer_size; |
| 452 | (void) unit; |
| 453 | if (val == 0) |
| 454 | return str(LANG_PM_ETERNAL); |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 455 | return buffer; |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 456 | } |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 457 | static int32_t getlang_time_unit_0_is_eternal(int value, int unit) |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 458 | { |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 459 | if (value == 0) |
| 460 | return LANG_PM_ETERNAL; |
Jens Arnold | 09a7861 | 2007-11-26 23:10:20 +0000 | [diff] [blame] | 461 | else |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 462 | return talk_time_intervals(value, unit, false); |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 463 | } |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 464 | #endif /* HAVE_LCD_BITMAP */ |
Jens Arnold | 09a7861 | 2007-11-26 23:10:20 +0000 | [diff] [blame] | 465 | |
Thomas Martitz | fd14cac | 2009-03-02 19:25:50 +0000 | [diff] [blame] | 466 | #ifndef HAVE_WHEEL_ACCELERATION |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 467 | static const char* scanaccel_formatter(char *buffer, size_t buffer_size, |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 468 | int val, const char *unit) |
| 469 | { |
| 470 | (void)unit; |
| 471 | if (val == 0) |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 472 | return str(LANG_OFF); |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 473 | else |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 474 | snprintf(buffer, buffer_size, "Speed up every %d s", val); |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 475 | return buffer; |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 476 | } |
Marcoen Hirschberg | b628198 | 2008-06-28 18:35:26 +0000 | [diff] [blame] | 477 | #endif |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 478 | |
Jonathan Gordon | fe3cfcc | 2007-02-08 10:28:42 +0000 | [diff] [blame] | 479 | #if CONFIG_CODEC == SWCODEC |
William Wilgus | 4a8f263 | 2018-12-22 13:53:00 -0600 | [diff] [blame] | 480 | |
| 481 | static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size, |
| 482 | int val, const char *unit) |
| 483 | { |
| 484 | if (val == 0) |
| 485 | return str(LANG_OFF); |
| 486 | else |
| 487 | snprintf(buffer, buffer_size, "%d %s", val, unit); |
| 488 | return buffer; |
| 489 | } |
| 490 | |
| 491 | static int32_t getlang_unit_0_is_off(int value, int unit) |
| 492 | { |
| 493 | if (value == 0) |
| 494 | return LANG_OFF; |
| 495 | else |
| 496 | return TALK_ID(value,unit); |
| 497 | } |
| 498 | |
Thom Johansen | 8e6e290 | 2007-03-07 15:06:33 +0000 | [diff] [blame] | 499 | static void crossfeed_cross_set(int val) |
Jonathan Gordon | fe3cfcc | 2007-02-08 10:28:42 +0000 | [diff] [blame] | 500 | { |
Thom Johansen | 8e6e290 | 2007-03-07 15:06:33 +0000 | [diff] [blame] | 501 | (void)val; |
| 502 | dsp_set_crossfeed_cross_params(global_settings.crossfeed_cross_gain, |
| 503 | global_settings.crossfeed_hf_attenuation, |
| 504 | global_settings.crossfeed_hf_cutoff); |
Jonathan Gordon | fe3cfcc | 2007-02-08 10:28:42 +0000 | [diff] [blame] | 505 | } |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 506 | |
Chiwen Chang | 3ae0f32 | 2014-08-22 23:30:35 +1000 | [diff] [blame] | 507 | static void surround_set_factor(int val) |
| 508 | { |
| 509 | (void)val; |
| 510 | dsp_surround_set_cutoff(global_settings.surround_fx1, global_settings.surround_fx2); |
| 511 | } |
| 512 | |
Jeffrey Goode | cf19ba5 | 2009-09-25 15:46:38 +0000 | [diff] [blame] | 513 | static void compressor_set(int val) |
| 514 | { |
| 515 | (void)val; |
Michael Sevakis | 0842d7f | 2012-04-26 17:19:16 -0400 | [diff] [blame] | 516 | dsp_set_compressor(&global_settings.compressor_settings); |
Jeffrey Goode | cf19ba5 | 2009-09-25 15:46:38 +0000 | [diff] [blame] | 517 | } |
| 518 | |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 519 | static const char* db_format(char* buffer, size_t buffer_size, int value, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 520 | const char* unit) |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 521 | { |
| 522 | int v = abs(value); |
| 523 | |
| 524 | snprintf(buffer, buffer_size, "%s%d.%d %s", value < 0 ? "-" : "", |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 525 | v / 10, v % 10, unit); |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 526 | return buffer; |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 527 | } |
| 528 | |
Nils Wallménius | 05d2bfd | 2008-04-19 13:19:04 +0000 | [diff] [blame] | 529 | static int32_t get_dec_talkid(int value, int unit) |
| 530 | { |
| 531 | return TALK_ID_DECIMAL(value, 1, unit); |
| 532 | } |
| 533 | |
| 534 | static int32_t get_precut_talkid(int value, int unit) |
| 535 | { |
| 536 | return TALK_ID_DECIMAL(-value, 1, unit); |
| 537 | } |
| 538 | |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 539 | struct eq_band_setting eq_defaults[EQ_NUM_BANDS] = { |
| 540 | { 32, 7, 0 }, |
| 541 | { 64, 10, 0 }, |
| 542 | { 125, 10, 0 }, |
| 543 | { 250, 10, 0 }, |
| 544 | { 500, 10, 0 }, |
| 545 | { 1000, 10, 0 }, |
| 546 | { 2000, 10, 0 }, |
| 547 | { 4000, 10, 0 }, |
| 548 | { 8000, 10, 0 }, |
| 549 | { 16000, 7, 0 }, |
| 550 | }; |
| 551 | |
| 552 | static void eq_load_from_cfg(void *setting, char *value) |
| 553 | { |
| 554 | struct eq_band_setting *eq = setting; |
| 555 | char *val_end, *end; |
| 556 | |
| 557 | val_end = value + strlen(value); |
| 558 | |
| 559 | /* cutoff/center */ |
| 560 | end = strchr(value, ','); |
| 561 | if (!end) return; |
| 562 | *end = '\0'; |
| 563 | eq->cutoff = atoi(value); |
| 564 | |
| 565 | /* q */ |
| 566 | value = end + 1; |
| 567 | if (value > val_end) return; |
| 568 | end = strchr(value, ','); |
| 569 | if (!end) return; |
| 570 | *end = '\0'; |
| 571 | eq->q = atoi(value); |
| 572 | |
| 573 | /* gain */ |
| 574 | value = end + 1; |
| 575 | if (value > val_end) return; |
| 576 | eq->gain = atoi(value); |
| 577 | } |
| 578 | |
| 579 | static char* eq_write_to_cfg(void *setting, char *buf, int buf_len) |
| 580 | { |
| 581 | struct eq_band_setting *eq = setting; |
| 582 | |
| 583 | snprintf(buf, buf_len, "%d, %d, %d", eq->cutoff, eq->q, eq->gain); |
| 584 | return buf; |
| 585 | } |
| 586 | |
| 587 | static bool eq_is_changed(void *setting, void *defaultval) |
| 588 | { |
| 589 | struct eq_band_setting *eq = setting; |
| 590 | |
| 591 | return memcmp(eq, defaultval, sizeof(struct eq_band_setting)); |
| 592 | } |
| 593 | |
| 594 | static void eq_set_default(void* setting, void* defaultval) |
| 595 | { |
| 596 | memcpy(setting, defaultval, sizeof(struct eq_band_setting)); |
| 597 | } |
| 598 | |
Jonathan Gordon | fe3cfcc | 2007-02-08 10:28:42 +0000 | [diff] [blame] | 599 | #endif |
Thom Johansen | 44d8097 | 2007-12-08 01:56:35 +0000 | [diff] [blame] | 600 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
Jonathan Gordon | fe3cfcc | 2007-02-08 10:28:42 +0000 | [diff] [blame] | 601 | static void set_mdb_enable(bool value) |
| 602 | { |
| 603 | sound_set_mdb_enable((int)value); |
| 604 | } |
| 605 | static void set_superbass(bool value) |
| 606 | { |
| 607 | sound_set_superbass((int)value); |
| 608 | } |
| 609 | #endif |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 610 | |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 611 | #ifdef HAVE_QUICKSCREEN |
Bertrik Sikken | 03be50a | 2008-11-03 22:26:32 +0000 | [diff] [blame] | 612 | static int find_setting_by_name(char*name) |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 613 | { |
| 614 | int i = 0; |
| 615 | const struct settings_list *setting; |
Jonathan Gordon | 0cfd7a3 | 2011-09-15 09:58:28 +0000 | [diff] [blame] | 616 | if (!strcmp(name, "-")) |
| 617 | return -1; |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 618 | while (i<nb_settings) |
| 619 | { |
| 620 | setting = &settings[i]; |
| 621 | if (setting->cfg_name && !strcmp(setting->cfg_name, name)) |
| 622 | { |
| 623 | return i; |
| 624 | } |
| 625 | i++; |
| 626 | } |
| 627 | return -1; |
| 628 | } |
Bertrik Sikken | 03be50a | 2008-11-03 22:26:32 +0000 | [diff] [blame] | 629 | static void qs_load_from_cfg(void* var, char*value) |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 630 | { |
| 631 | *(int*)var = find_setting_by_name(value); |
| 632 | } |
Bertrik Sikken | 03be50a | 2008-11-03 22:26:32 +0000 | [diff] [blame] | 633 | static char* qs_write_to_cfg(void* setting, char*buf, int buf_len) |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 634 | { |
Jonathan Gordon | 0cfd7a3 | 2011-09-15 09:58:28 +0000 | [diff] [blame] | 635 | int index = *(int*)setting; |
Dmitry Gamza | a987871 | 2014-02-10 17:39:12 +0400 | [diff] [blame] | 636 | if (index < 0 || index >= nb_settings) |
Jonathan Gordon | 0cfd7a3 | 2011-09-15 09:58:28 +0000 | [diff] [blame] | 637 | { |
| 638 | strlcpy(buf, "-", buf_len); |
| 639 | return buf; |
| 640 | } |
| 641 | const struct settings_list *var = &settings[index]; |
Nils Wallménius | 3d4701a | 2009-07-14 13:57:45 +0000 | [diff] [blame] | 642 | strlcpy(buf, var->cfg_name, buf_len); |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 643 | return buf; |
| 644 | } |
Bertrik Sikken | 03be50a | 2008-11-03 22:26:32 +0000 | [diff] [blame] | 645 | static bool qs_is_changed(void* setting, void* defaultval) |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 646 | { |
| 647 | int i = *(int*)setting; |
| 648 | if (i < 0 || i >= nb_settings) |
| 649 | return false; |
| 650 | const struct settings_list *var = &settings[i]; |
| 651 | return var != find_setting(defaultval, NULL); |
| 652 | } |
Bertrik Sikken | 03be50a | 2008-11-03 22:26:32 +0000 | [diff] [blame] | 653 | static void qs_set_default(void* setting, void* defaultval) |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 654 | { |
Jonathan Gordon | 4983d05 | 2011-07-20 01:30:29 +0000 | [diff] [blame] | 655 | if (defaultval == NULL) |
| 656 | *(int*)setting = -1; |
Jonathan Gordon | edcacaa | 2008-11-03 11:11:07 +0000 | [diff] [blame] | 657 | find_setting(defaultval, (int*)setting); |
| 658 | } |
| 659 | #endif |
Maurus Cuelenaere | b8435f5 | 2009-06-16 17:04:47 +0000 | [diff] [blame] | 660 | #ifdef HAVE_TOUCHSCREEN |
Thomas Martitz | b30447c | 2010-10-31 16:22:32 +0000 | [diff] [blame] | 661 | |
Thomas Martitz | 40ed5f5 | 2010-10-31 16:45:14 +0000 | [diff] [blame] | 662 | #if defined(APPLICATION) \ |
| 663 | || defined(ONDA_VX747) \ |
| 664 | || defined(ONDA_VX767) \ |
| 665 | || defined(ONDA_VX747P) \ |
Thomas Martitz | b30447c | 2010-10-31 16:22:32 +0000 | [diff] [blame] | 666 | || defined(ONDA_VX777) |
| 667 | |
| 668 | #define DEFAULT_TOUCHSCREEN_MODE TOUCHSCREEN_POINT |
| 669 | #else |
| 670 | #define DEFAULT_TOUCHSCREEN_MODE TOUCHSCREEN_BUTTON |
| 671 | #endif |
| 672 | |
Maurus Cuelenaere | b8435f5 | 2009-06-16 17:04:47 +0000 | [diff] [blame] | 673 | static void tsc_load_from_cfg(void* setting, char*value) |
| 674 | { |
| 675 | struct touchscreen_parameter *var = (struct touchscreen_parameter*) setting; |
| 676 | |
| 677 | /* Replacement for sscanf(value, "%d ..., &var->A, ...); */ |
| 678 | int vals[7], count = 0; |
| 679 | while(*value != 0 && count < 7) |
| 680 | { |
| 681 | if(isspace(*value)) |
| 682 | value++; |
| 683 | else |
| 684 | { |
| 685 | vals[count++] = atoi(value); |
| 686 | while(!isspace(*value)) |
| 687 | value++; |
| 688 | } |
| 689 | } |
| 690 | var->A = vals[0]; |
| 691 | var->B = vals[1]; |
| 692 | var->C = vals[2]; |
| 693 | var->D = vals[3]; |
| 694 | var->E = vals[4]; |
| 695 | var->F = vals[5]; |
| 696 | var->divider = vals[6]; |
| 697 | } |
| 698 | |
| 699 | static char* tsc_write_to_cfg(void* setting, char*buf, int buf_len) |
| 700 | { |
| 701 | const struct touchscreen_parameter *var = (const struct touchscreen_parameter*) setting; |
| 702 | 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); |
| 703 | return buf; |
| 704 | } |
| 705 | static bool tsc_is_changed(void* setting, void* defaultval) |
| 706 | { |
| 707 | return memcmp(setting, defaultval, sizeof(struct touchscreen_parameter)) != 0; |
| 708 | } |
| 709 | static void tsc_set_default(void* setting, void* defaultval) |
| 710 | { |
| 711 | memcpy(setting, defaultval, sizeof(struct touchscreen_parameter)); |
| 712 | } |
| 713 | #endif |
Jeffrey Goode | 1ad76ff | 2010-05-09 02:02:51 +0000 | [diff] [blame] | 714 | #ifdef HAVE_HOTKEY |
| 715 | static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value, |
| 716 | const char* unit) |
| 717 | { |
| 718 | (void)buffer; |
| 719 | (void)buffer_size; |
| 720 | (void)unit; |
| 721 | return str(get_hotkey_lang_id(value)); |
| 722 | } |
| 723 | static int32_t hotkey_getlang(int value, int unit) |
| 724 | { |
| 725 | (void)unit; |
| 726 | return get_hotkey_lang_id(value); |
| 727 | } |
| 728 | #endif /* HAVE_HOTKEY */ |
PurlingNayuki | f0bec02 | 2013-12-21 21:33:54 +0800 | [diff] [blame] | 729 | |
| 730 | /* volume limiter */ |
| 731 | static void volume_limit_load_from_cfg(void* var, char*value) |
| 732 | { |
| 733 | *(int*)var = atoi(value); |
| 734 | } |
| 735 | static char* volume_limit_write_to_cfg(void* setting, char*buf, int buf_len) |
| 736 | { |
| 737 | int current = *(int*)setting; |
| 738 | snprintf(buf, buf_len, "%d", current); |
| 739 | return buf; |
| 740 | } |
| 741 | static bool volume_limit_is_changed(void* setting, void* defaultval) |
| 742 | { |
Frank Gevaerts | 72367f4 | 2014-01-13 15:26:13 +0100 | [diff] [blame] | 743 | (void)defaultval; |
PurlingNayuki | f0bec02 | 2013-12-21 21:33:54 +0800 | [diff] [blame] | 744 | int current = *(int*)setting; |
PurlingNayuki | f0bec02 | 2013-12-21 21:33:54 +0800 | [diff] [blame] | 745 | return (current != sound_max(SOUND_VOLUME)); |
| 746 | } |
| 747 | static void volume_limit_set_default(void* setting, void* defaultval) |
| 748 | { |
| 749 | (void)defaultval; |
| 750 | *(int*)setting = sound_max(SOUND_VOLUME); |
| 751 | } |
| 752 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 753 | const struct settings_list settings[] = { |
| 754 | /* sound settings */ |
PurlingNayuki | f0bec02 | 2013-12-21 21:33:54 +0800 | [diff] [blame] | 755 | SOUND_SETTING(F_NO_WRAP, volume, LANG_VOLUME, "volume", SOUND_VOLUME), |
| 756 | CUSTOM_SETTING(F_NO_WRAP, volume_limit, LANG_VOLUME_LIMIT, |
| 757 | NULL, "volume limit", |
| 758 | volume_limit_load_from_cfg, volume_limit_write_to_cfg, |
| 759 | volume_limit_is_changed, volume_limit_set_default), |
Jonathan Gordon | 0f7f346 | 2007-10-15 10:33:01 +0000 | [diff] [blame] | 760 | SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE), |
Michael Sevakis | 80d0d15 | 2010-05-15 13:09:45 +0000 | [diff] [blame] | 761 | /* Tone controls */ |
| 762 | #ifdef AUDIOHW_HAVE_BASS |
Jonathan Gordon | 0f7f346 | 2007-10-15 10:33:01 +0000 | [diff] [blame] | 763 | SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS), |
Michael Sevakis | 80d0d15 | 2010-05-15 13:09:45 +0000 | [diff] [blame] | 764 | #endif |
| 765 | #ifdef AUDIOHW_HAVE_TREBLE |
Jonathan Gordon | 0f7f346 | 2007-10-15 10:33:01 +0000 | [diff] [blame] | 766 | SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE), |
Michael Sevakis | 80d0d15 | 2010-05-15 13:09:45 +0000 | [diff] [blame] | 767 | #endif |
| 768 | /* Hardware EQ tone controls */ |
| 769 | #ifdef AUDIOHW_HAVE_EQ |
| 770 | /* Band gain is generic */ |
| 771 | SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND1].gain, |
| 772 | LANG_HW_EQ_GAIN, "tone band1 gain", SOUND_EQ_BAND1_GAIN), |
| 773 | #ifdef AUDIOHW_HAVE_EQ_BAND2 |
| 774 | SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND2].gain, |
| 775 | LANG_HW_EQ_GAIN, "tone band2 gain", SOUND_EQ_BAND2_GAIN), |
| 776 | #endif /* AUDIOHW_HAVE_EQ_BAND2 */ |
| 777 | #ifdef AUDIOHW_HAVE_EQ_BAND3 |
| 778 | SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND3].gain, |
| 779 | LANG_HW_EQ_GAIN, "tone band3 gain", SOUND_EQ_BAND3_GAIN), |
| 780 | #endif /* AUDIOHW_HAVE_EQ_BAND3 */ |
| 781 | #ifdef AUDIOHW_HAVE_EQ_BAND4 |
| 782 | SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND4].gain, |
| 783 | LANG_HW_EQ_GAIN, "tone band4 gain", SOUND_EQ_BAND4_GAIN), |
| 784 | #endif /* AUDIOHW_HAVE_EQ_BAND4 */ |
| 785 | #ifdef AUDIOHW_HAVE_EQ_BAND5 |
| 786 | SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND5].gain, |
| 787 | LANG_HW_EQ_GAIN, "tone band5 gain", SOUND_EQ_BAND5_GAIN), |
| 788 | #endif /* AUDIOHW_HAVE_EQ_BAND5 */ |
| 789 | #ifdef HAVE_WM8978 |
| 790 | /* Frequencies vary with samplerate but at least the user has an idea |
| 791 | * about the bands and it will be correct with normal playback rates. */ |
| 792 | /* Band 1 */ |
| 793 | STRINGCHOICE_SETTING(F_SOUNDSETTING, |
| 794 | hw_eq_bands[AUDIOHW_EQ_BAND1].frequency, |
| 795 | LANG_HW_EQ_FREQUENCY, 0,"tone band1 frequency", |
| 796 | "80 Hz,105 Hz,135 Hz,175 Hz", |
| 797 | sound_set_hw_eq_band1_frequency, 4, |
| 798 | TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ), |
| 799 | TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)), |
| 800 | /* Band 2 */ |
| 801 | STRINGCHOICE_SETTING(F_SOUNDSETTING, |
| 802 | hw_eq_bands[AUDIOHW_EQ_BAND2].frequency, |
| 803 | LANG_HW_EQ_FREQUENCY, 0,"tone band2 frequency", |
| 804 | "230 Hz,300 Hz,385 Hz,500 Hz", |
| 805 | sound_set_hw_eq_band2_frequency, 4, |
| 806 | TALK_ID(230, UNIT_HERTZ), TALK_ID(300, UNIT_HERTZ), |
| 807 | TALK_ID(385, UNIT_HERTZ), TALK_ID(500, UNIT_HERTZ)), |
| 808 | CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND2].width, |
| 809 | LANG_HW_EQ_WIDTH, 0, "tone band2 width", "narrow,wide", |
| 810 | sound_set_hw_eq_band2_width, 2, |
| 811 | ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)), |
| 812 | /* Band 3 */ |
| 813 | STRINGCHOICE_SETTING(F_SOUNDSETTING, |
| 814 | hw_eq_bands[AUDIOHW_EQ_BAND3].frequency, |
| 815 | LANG_HW_EQ_FREQUENCY, 0, "tone band3 frequency", |
| 816 | "650 Hz,850 Hz,1.1 kHz,1.4 kHz", |
| 817 | sound_set_hw_eq_band3_frequency, 4, |
| 818 | TALK_ID(650, UNIT_HERTZ), TALK_ID(850, UNIT_HERTZ), |
| 819 | TALK_ID_DECIMAL(11, 1, UNIT_KHZ), |
| 820 | TALK_ID_DECIMAL(14, 1, UNIT_KHZ)), |
| 821 | CHOICE_SETTING(F_SOUNDSETTING,hw_eq_bands[AUDIOHW_EQ_BAND3].width, |
| 822 | LANG_HW_EQ_WIDTH, 0, "tone band3 width", "narrow,wide", |
| 823 | sound_set_hw_eq_band3_width, 2, |
| 824 | ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)), |
| 825 | /* Band 4 */ |
| 826 | STRINGCHOICE_SETTING(F_SOUNDSETTING, |
| 827 | hw_eq_bands[AUDIOHW_EQ_BAND4].frequency, |
| 828 | LANG_HW_EQ_FREQUENCY, 0, "tone band4 frequency", |
| 829 | "1.8 kHz,2.4 kHz,3.2 kHz,4.1 kHz", |
| 830 | sound_set_hw_eq_band4_frequency, 4, |
| 831 | TALK_ID_DECIMAL(18, 1, UNIT_KHZ), |
| 832 | TALK_ID_DECIMAL(24, 1, UNIT_KHZ), |
| 833 | TALK_ID_DECIMAL(32, 1, UNIT_KHZ), |
| 834 | TALK_ID_DECIMAL(41, 1, UNIT_KHZ)), |
| 835 | CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND4].width, |
| 836 | LANG_HW_EQ_WIDTH, 0, "tone band4 width", "narrow,wide", |
| 837 | sound_set_hw_eq_band4_width, 2, |
| 838 | ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)), |
| 839 | /* Band 5 */ |
| 840 | STRINGCHOICE_SETTING(F_SOUNDSETTING, |
| 841 | hw_eq_bands[AUDIOHW_EQ_BAND5].frequency, |
| 842 | LANG_HW_EQ_FREQUENCY, 0, "tone band5 frequency", |
| 843 | "5.3 kHz,6.9 kHz,9.0 kHz,11.7 kHz", |
| 844 | sound_set_hw_eq_band5_frequency, 4, |
| 845 | TALK_ID_DECIMAL(53, 1, UNIT_KHZ), |
| 846 | TALK_ID_DECIMAL(69, 1, UNIT_KHZ), |
| 847 | TALK_ID_DECIMAL(90, 1, UNIT_KHZ), |
| 848 | TALK_ID_DECIMAL(117, 1, UNIT_KHZ)), |
| 849 | #endif /* HAVE_WM8978 */ |
| 850 | #endif /* AUDIOHW_HAVE_EQ */ |
| 851 | /* 3-d enhancement effect */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 852 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
Jonathan Gordon | fe3cfcc | 2007-02-08 10:28:42 +0000 | [diff] [blame] | 853 | SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 854 | /* requires index, uses table defined by driver */ |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 855 | STRINGCHOICE_SETTING(F_SOUNDSETTING,avc,LANG_AUTOVOL,0,"auto volume", |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 856 | "off,20 ms,2 s,4 s,8 s,", sound_set_avc, 5, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 857 | LANG_OFF,TALK_ID(20, UNIT_MS),TALK_ID(2, UNIT_SEC), |
| 858 | TALK_ID(4, UNIT_SEC),TALK_ID(8, UNIT_SEC)), |
| 859 | OFFON_SETTING(F_SOUNDSETTING, superbass, LANG_SUPERBASS, false, "superbass", |
| 860 | set_superbass), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 861 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 862 | |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 863 | CHOICE_SETTING(F_SOUNDSETTING, channel_config, LANG_CHANNEL_CONFIGURATION, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 864 | 0,"channels", |
Michael Giacomelli | b25cd7d | 2011-10-26 18:37:50 +0000 | [diff] [blame] | 865 | "stereo,mono,custom,mono left,mono right,karaoke", |
| 866 | sound_set_channels, 6, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 867 | ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO), |
| 868 | ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT), |
Michael Giacomelli | b25cd7d | 2011-10-26 18:37:50 +0000 | [diff] [blame] | 869 | ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)), |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 870 | SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 871 | "stereo_width", SOUND_STEREO_WIDTH), |
Michael Sevakis | 80d0d15 | 2010-05-15 13:09:45 +0000 | [diff] [blame] | 872 | #ifdef AUDIOHW_HAVE_DEPTH_3D |
| 873 | SOUND_SETTING(0,depth_3d, LANG_DEPTH_3D, "3-d enhancement", |
| 874 | SOUND_DEPTH_3D), |
| 875 | #endif |
Andrew Ryabinin | 0519f7e | 2013-05-12 23:23:45 +0400 | [diff] [blame] | 876 | |
| 877 | #ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF |
| 878 | CHOICE_SETTING(F_SOUNDSETTING, roll_off, LANG_FILTER_ROLL_OFF, 0, |
Solomon Peachy | d4942cc | 2018-06-29 16:09:28 -0400 | [diff] [blame] | 879 | #ifndef AUDIOHW_HAVE_SHORT_ROLL_OFF |
Andrew Ryabinin | 0519f7e | 2013-05-12 23:23:45 +0400 | [diff] [blame] | 880 | "roll_off", "sharp,slow", sound_set_filter_roll_off, |
| 881 | 2, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW)), |
Solomon Peachy | d4942cc | 2018-06-29 16:09:28 -0400 | [diff] [blame] | 882 | #else |
| 883 | "roll_off", "sharp,slow,short,bypass", sound_set_filter_roll_off, |
| 884 | 4, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW), ID2P(LANG_FILTER_SHORT), ID2P(LANG_FILTER_BYPASS)), |
| 885 | #endif |
Andrew Ryabinin | 0519f7e | 2013-05-12 23:23:45 +0400 | [diff] [blame] | 886 | #endif |
| 887 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 888 | /* playback */ |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 889 | OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 890 | SYSTEM_SETTING(NVRAM(4), resume_index, -1), |
Richard Quirk | 212e780 | 2012-12-09 21:04:17 +0100 | [diff] [blame] | 891 | SYSTEM_SETTING(NVRAM(4), resume_crc32, -1), |
Michael Sevakis | 31b7122 | 2013-07-14 07:59:39 -0400 | [diff] [blame] | 892 | SYSTEM_SETTING(NVRAM(4), resume_elapsed, -1), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 893 | SYSTEM_SETTING(NVRAM(4), resume_offset, -1), |
Björn Stenberg | 11fffaa | 2008-12-17 13:45:00 +0000 | [diff] [blame] | 894 | CHOICE_SETTING(0, repeat_mode, LANG_REPEAT, REPEAT_OFF, "repeat", |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 895 | "off,all,one,shuffle" |
Daniel Stenberg | 0c021de | 2007-02-17 23:07:39 +0000 | [diff] [blame] | 896 | #ifdef AB_REPEAT_ENABLE |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 897 | ",ab" |
Jonathan Gordon | b285859 | 2007-02-15 07:37:25 +0000 | [diff] [blame] | 898 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 899 | , NULL, |
Daniel Stenberg | 0c021de | 2007-02-17 23:07:39 +0000 | [diff] [blame] | 900 | #ifdef AB_REPEAT_ENABLE |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 901 | 5, |
Jonathan Gordon | b285859 | 2007-02-15 07:37:25 +0000 | [diff] [blame] | 902 | #else |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 903 | 4, |
Jonathan Gordon | b285859 | 2007-02-15 07:37:25 +0000 | [diff] [blame] | 904 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 905 | ID2P(LANG_OFF), ID2P(LANG_ALL), ID2P(LANG_REPEAT_ONE), |
| 906 | ID2P(LANG_SHUFFLE) |
Daniel Stenberg | 0c021de | 2007-02-17 23:07:39 +0000 | [diff] [blame] | 907 | #ifdef AB_REPEAT_ENABLE |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 908 | ,ID2P(LANG_REPEAT_AB) |
Jonathan Gordon | b285859 | 2007-02-15 07:37:25 +0000 | [diff] [blame] | 909 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 910 | ), /* CHOICE_SETTING( repeat_mode ) */ |
Michael Sevakis | d37bf24 | 2013-05-23 13:58:51 -0400 | [diff] [blame] | 911 | #ifdef HAVE_PLAY_FREQ |
Michael Sevakis | 19b289a | 2013-07-06 17:14:02 -0400 | [diff] [blame] | 912 | STRINGCHOICE_SETTING(0, play_frequency, LANG_FREQUENCY, 0, |
Michael Sevakis | d37bf24 | 2013-05-23 13:58:51 -0400 | [diff] [blame] | 913 | "playback frequency", "44.1 kHz,48 kHz", NULL, 2, |
| 914 | TALK_ID_DECIMAL(441, 1, UNIT_KHZ), TALK_ID(48, UNIT_KHZ)), |
| 915 | #endif /* HAVE_PLAY_FREQ */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 916 | /* LCD */ |
| 917 | #ifdef HAVE_LCD_CONTRAST |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 918 | /* its easier to leave this one un-macro()ed for the time being */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 919 | { F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.contrast, |
| 920 | LANG_CONTRAST, FUNCTYPE(lcd_default_contrast), "contrast", NULL , { |
| 921 | .int_setting = (struct int_setting[]) { |
| 922 | { lcd_set_contrast, UNIT_INT, MIN_CONTRAST_SETTING, |
| 923 | MAX_CONTRAST_SETTING, 1, NULL, NULL }}}}, |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 924 | #endif |
Jens Arnold | 47bf6c5 | 2007-04-12 22:12:13 +0000 | [diff] [blame] | 925 | #ifdef HAVE_BACKLIGHT |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 926 | TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, |
| 927 | backlight_timeout, LANG_BACKLIGHT, |
| 928 | DEFAULT_BACKLIGHT_TIMEOUT, "backlight timeout", |
| 929 | off_on, UNIT_SEC, formatter_time_unit_0_is_always, |
| 930 | getlang_time_unit_0_is_always, backlight_set_timeout, |
| 931 | 23, timeout_sec_common), |
Jonathan Gordon | 9a6f419 | 2007-02-18 05:32:06 +0000 | [diff] [blame] | 932 | #if CONFIG_CHARGING |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 933 | TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, |
| 934 | backlight_timeout_plugged, LANG_BACKLIGHT_ON_WHEN_CHARGING, |
| 935 | DEFAULT_BACKLIGHT_TIMEOUT, "backlight timeout plugged", |
| 936 | off_on, UNIT_SEC, formatter_time_unit_0_is_always, |
| 937 | getlang_time_unit_0_is_always, backlight_set_timeout_plugged, |
| 938 | 23, timeout_sec_common), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 939 | #endif |
Jens Arnold | 47bf6c5 | 2007-04-12 22:12:13 +0000 | [diff] [blame] | 940 | #endif /* HAVE_BACKLIGHT */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 941 | #ifdef HAVE_LCD_BITMAP |
Nils Wallménius | b311367 | 2007-08-05 19:19:39 +0000 | [diff] [blame] | 942 | #ifdef HAVE_LCD_INVERT |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 943 | BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 944 | LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_set_invert_display), |
Nils Wallménius | b311367 | 2007-08-05 19:19:39 +0000 | [diff] [blame] | 945 | #endif |
| 946 | #ifdef HAVE_LCD_FLIP |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 947 | OFFON_SETTING(0, flip_display, LANG_FLIP_DISPLAY, false, "flip display", |
| 948 | NULL), |
Nils Wallménius | b311367 | 2007-08-05 19:19:39 +0000 | [diff] [blame] | 949 | #endif |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 950 | /* display */ |
Jens Arnold | 69b7141 | 2008-02-23 08:28:19 +0000 | [diff] [blame] | 951 | CHOICE_SETTING(F_TEMPVAR|F_THEMESETTING, cursor_style, LANG_INVERT_CURSOR, |
Nicolas Pennequin | f3b015f | 2007-09-27 15:42:55 +0000 | [diff] [blame] | 952 | #ifdef HAVE_LCD_COLOR |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 953 | 3, "selector type", |
| 954 | "pointer,bar (inverse),bar (color),bar (gradient)", NULL, 4, |
| 955 | ID2P(LANG_INVERT_CURSOR_POINTER), |
| 956 | ID2P(LANG_INVERT_CURSOR_BAR), |
| 957 | ID2P(LANG_INVERT_CURSOR_COLOR), |
| 958 | ID2P(LANG_INVERT_CURSOR_GRADIENT)), |
Nicolas Pennequin | f3b015f | 2007-09-27 15:42:55 +0000 | [diff] [blame] | 959 | #else |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 960 | 1, "selector type", "pointer,bar (inverse)", NULL, 2, |
| 961 | ID2P(LANG_INVERT_CURSOR_POINTER), |
| 962 | ID2P(LANG_INVERT_CURSOR_BAR)), |
Nicolas Pennequin | f3b015f | 2007-09-27 15:42:55 +0000 | [diff] [blame] | 963 | #endif |
Jonathan Gordon | f1034e0 | 2009-07-05 18:07:58 +0000 | [diff] [blame] | 964 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, statusbar, |
Jonathan Gordon | a9b5f4d | 2010-03-06 00:29:46 +0000 | [diff] [blame] | 965 | LANG_STATUS_BAR, STATUSBAR_TOP, "statusbar","off,top,bottom", |
| 966 | NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP), |
| 967 | ID2P(LANG_STATUSBAR_BOTTOM)), |
Jonathan Gordon | f1034e0 | 2009-07-05 18:07:58 +0000 | [diff] [blame] | 968 | #ifdef HAVE_REMOTE_LCD |
| 969 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, remote_statusbar, |
Jonathan Gordon | a9b5f4d | 2010-03-06 00:29:46 +0000 | [diff] [blame] | 970 | LANG_REMOTE_STATUSBAR, STATUSBAR_TOP, "remote statusbar","off,top,bottom", |
| 971 | NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP), |
| 972 | ID2P(LANG_STATUSBAR_BOTTOM)), |
Jonathan Gordon | f1034e0 | 2009-07-05 18:07:58 +0000 | [diff] [blame] | 973 | #endif |
Thomas Martitz | 97548f3 | 2009-08-24 00:22:54 +0000 | [diff] [blame] | 974 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar, |
Tomer Shalev | 1acacc2 | 2009-10-05 18:11:41 +0000 | [diff] [blame] | 975 | LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right", |
| 976 | NULL, 3, ID2P(LANG_OFF), ID2P(LANG_LEFT), ID2P(LANG_RIGHT)), |
Thomas Martitz | 97548f3 | 2009-08-24 00:22:54 +0000 | [diff] [blame] | 977 | INT_SETTING(F_THEMESETTING, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6, |
| 978 | "scrollbar width",UNIT_INT, 3, MAX(LCD_WIDTH/10,25), 1, |
| 979 | NULL, NULL, NULL), |
Thomas Martitz | 3b12634 | 2011-10-17 17:38:10 +0000 | [diff] [blame] | 980 | #ifdef HAVE_TOUCHSCREEN |
| 981 | TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, list_line_padding, LANG_LIST_LINE_PADDING, |
Michael Chicoine | 928bcd4 | 2011-11-10 12:23:55 +0000 | [diff] [blame] | 982 | -1, "list padding", "auto,off", UNIT_PIXEL, list_pad_formatter, |
Thomas Martitz | 3b12634 | 2011-10-17 17:38:10 +0000 | [diff] [blame] | 983 | list_pad_getlang, NULL, 16, |
| 984 | -1,0,2,4,6,8,10,12,16,20,24,28,32,38,44,50), |
| 985 | #endif |
Thomas Martitz | 05a67d0 | 2013-05-06 07:20:40 +0200 | [diff] [blame] | 986 | #if LCD_DEPTH > 1 |
| 987 | TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, list_separator_height, LANG_LIST_SEPARATOR, |
| 988 | 0, "list separator height", "auto,off", UNIT_PIXEL, |
| 989 | list_pad_formatter, list_pad_getlang, NULL, 15, |
| 990 | -1,0,1,2,3,4,5,7,9,11,13,16,20,25,30), |
Thomas Martitz | 00434be | 2014-03-03 16:17:27 +0100 | [diff] [blame] | 991 | #ifdef HAVE_LCD_COLOR |
Thomas Martitz | 05a67d0 | 2013-05-06 07:20:40 +0200 | [diff] [blame] | 992 | {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.list_separator_color,-1, |
| 993 | INT(DEFAULT_THEME_SEPARATOR),"list separator color",NULL,UNUSED}, |
| 994 | #endif |
Thomas Martitz | 00434be | 2014-03-03 16:17:27 +0100 | [diff] [blame] | 995 | #endif |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 996 | #if CONFIG_KEYPAD == RECORDER_PAD |
Thomas Martitz | 97548f3 | 2009-08-24 00:22:54 +0000 | [diff] [blame] | 997 | OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 998 | #endif |
Thomas Martitz | 97548f3 | 2009-08-24 00:22:54 +0000 | [diff] [blame] | 999 | CHOICE_SETTING(F_THEMESETTING, volume_type, LANG_VOLUME_DISPLAY, 0, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1000 | "volume display", graphic_numeric, NULL, 2, |
| 1001 | ID2P(LANG_DISPLAY_GRAPHIC), |
| 1002 | ID2P(LANG_DISPLAY_NUMERIC)), |
Thomas Martitz | 97548f3 | 2009-08-24 00:22:54 +0000 | [diff] [blame] | 1003 | CHOICE_SETTING(F_THEMESETTING, battery_display, LANG_BATTERY_DISPLAY, 0, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1004 | "battery display", graphic_numeric, NULL, 2, |
| 1005 | ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)), |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1006 | CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0, |
| 1007 | "time format", "24hour,12hour", NULL, 2, |
| 1008 | ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1009 | #endif /* HAVE_LCD_BITMAP */ |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1010 | OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1011 | /* system */ |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1012 | INT_SETTING(F_TIME_SETTING, poweroff, LANG_POWEROFF_IDLE, 10, |
| 1013 | "idle poweroff", UNIT_MIN, 0,60,1, |
| 1014 | formatter_time_unit_0_is_off, getlang_time_unit_0_is_off, |
| 1015 | set_poweroff_timeout), |
Jonathan Gordon | 1688867 | 2008-06-07 09:17:20 +0000 | [diff] [blame] | 1016 | SYSTEM_SETTING(NVRAM(4), runtime, 0), |
| 1017 | SYSTEM_SETTING(NVRAM(4), topruntime, 0), |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1018 | INT_SETTING(F_BANFROMQS, max_files_in_playlist, |
Jonathan Gordon | 1688867 | 2008-06-07 09:17:20 +0000 | [diff] [blame] | 1019 | LANG_MAX_FILES_IN_PLAYLIST, |
Andree Buschmann | 5d849a9 | 2011-02-02 17:43:32 +0000 | [diff] [blame] | 1020 | #if MEMORYSIZE > 1 |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1021 | 10000, |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1022 | #else |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1023 | 400, |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1024 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1025 | "max files in playlist", UNIT_INT, 1000, 32000, 1000, |
| 1026 | NULL, NULL, NULL), |
Jonathan Gordon | de6cdda | 2008-11-03 23:49:18 +0000 | [diff] [blame] | 1027 | INT_SETTING(F_BANFROMQS, max_files_in_dir, LANG_MAX_FILES_IN_DIR, |
Andree Buschmann | 5d849a9 | 2011-02-02 17:43:32 +0000 | [diff] [blame] | 1028 | #if MEMORYSIZE > 1 |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1029 | 1000, |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1030 | #else |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1031 | 200, |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1032 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1033 | "max files in dir", UNIT_INT, 50, 10000, 50, |
| 1034 | NULL, NULL, NULL), |
Thomas Martitz | 24424ba | 2010-09-01 23:49:28 +0000 | [diff] [blame] | 1035 | /* use this setting for user code even if there's no exchangable battery |
| 1036 | * support enabled */ |
Thomas Martitz | c1bd9b0 | 2012-01-03 23:44:38 +0000 | [diff] [blame] | 1037 | #if BATTERY_CAPACITY_DEFAULT > 0 |
Thomas Martitz | 24424ba | 2010-09-01 23:49:28 +0000 | [diff] [blame] | 1038 | /* define min/max/inc for this file if there's only one battery */ |
| 1039 | #ifndef BATTERY_CAPACITY_MIN |
| 1040 | #define BATTERY_CAPACITY_MIN BATTERY_CAPACITY_DEFAULT |
| 1041 | #define BATTERY_CAPACITY_MAX BATTERY_CAPACITY_DEFAULT |
| 1042 | #define BATTERY_CAPACITY_INC 0 |
| 1043 | #endif |
Frank Gevaerts | 6c5c349 | 2011-07-19 20:55:59 +0000 | [diff] [blame] | 1044 | #if defined(IPOD_VIDEO) && !defined(SIMULATOR) |
Frank Gevaerts | aa27d47 | 2011-07-19 20:48:16 +0000 | [diff] [blame] | 1045 | /* its easier to leave this one un-macro()ed for the time being */ |
| 1046 | { F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.battery_capacity, |
| 1047 | LANG_BATTERY_CAPACITY, FUNCTYPE(battery_default_capacity), |
| 1048 | "battery capacity", NULL , { |
| 1049 | .int_setting = (struct int_setting[]) { |
| 1050 | { set_battery_capacity, UNIT_MAH, BATTERY_CAPACITY_MIN, |
| 1051 | BATTERY_CAPACITY_MAX, BATTERY_CAPACITY_INC, NULL, NULL }}}}, |
| 1052 | #else /* IPOD_VIDEO */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1053 | INT_SETTING(0, battery_capacity, LANG_BATTERY_CAPACITY, |
| 1054 | BATTERY_CAPACITY_DEFAULT, "battery capacity", UNIT_MAH, |
| 1055 | BATTERY_CAPACITY_MIN, BATTERY_CAPACITY_MAX, |
Frank Gevaerts | aa27d47 | 2011-07-19 20:48:16 +0000 | [diff] [blame] | 1056 | BATTERY_CAPACITY_INC, NULL, NULL, set_battery_capacity), |
| 1057 | #endif /* IPOD_VIDEO */ |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1058 | #endif |
Jonathan Gordon | 9a6f419 | 2007-02-18 05:32:06 +0000 | [diff] [blame] | 1059 | #if CONFIG_CHARGING |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1060 | OFFON_SETTING(NVRAM(1), car_adapter_mode, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1061 | LANG_CAR_ADAPTER_MODE, false, "car adapter mode", NULL), |
Solomon Peachy | 0a6cad7 | 2019-01-01 21:05:13 -0500 | [diff] [blame] | 1062 | INT_SETTING_NOWRAP(0, car_adapter_mode_delay, LANG_CAR_ADAPTER_MODE_DELAY, |
| 1063 | 5, "delay before resume", UNIT_SEC, 5, 30, 5, |
| 1064 | NULL, NULL, NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1065 | #endif |
Michael Giacomelli | 70e9c7a | 2008-12-25 01:46:16 +0000 | [diff] [blame] | 1066 | #ifdef IPOD_ACCESSORY_PROTOCOL |
| 1067 | CHOICE_SETTING(0, serial_bitrate, LANG_SERIAL_BITRATE, 0, "serial bitrate", |
| 1068 | "auto,9600,19200,38400,57600", iap_bitrate_set, 5, ID2P(LANG_SERIAL_BITRATE_AUTO), |
Rob Purchase | ed1a335 | 2009-03-24 21:55:05 +0000 | [diff] [blame] | 1069 | ID2P(LANG_SERIAL_BITRATE_9600),ID2P(LANG_SERIAL_BITRATE_19200), |
| 1070 | ID2P(LANG_SERIAL_BITRATE_38400),ID2P(LANG_SERIAL_BITRATE_57600)), |
Michael Giacomelli | 70e9c7a | 2008-12-25 01:46:16 +0000 | [diff] [blame] | 1071 | #endif |
Andree Buschmann | 850a112 | 2008-04-20 18:28:25 +0000 | [diff] [blame] | 1072 | #ifdef HAVE_ACCESSORY_SUPPLY |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1073 | OFFON_SETTING(0, accessory_supply, LANG_ACCESSORY_SUPPLY, |
| 1074 | true, "accessory power supply", accessory_supply_set), |
Andree Buschmann | 850a112 | 2008-04-20 18:28:25 +0000 | [diff] [blame] | 1075 | #endif |
Andree Buschmann | b6c12a1 | 2010-03-20 15:02:29 +0000 | [diff] [blame] | 1076 | #ifdef HAVE_LINEOUT_POWEROFF |
| 1077 | OFFON_SETTING(0, lineout_active, LANG_LINEOUT_ONOFF, |
| 1078 | true, "lineout", lineout_set), |
| 1079 | #endif |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1080 | /* tuner */ |
Jens Arnold | c652218 | 2007-02-18 08:46:12 +0000 | [diff] [blame] | 1081 | #if CONFIG_TUNER |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1082 | OFFON_SETTING(0,fm_force_mono, LANG_FM_MONO_MODE, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1083 | false, "force fm mono", toggle_mono_mode), |
| 1084 | SYSTEM_SETTING(NVRAM(4),last_frequency,0), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1085 | #endif |
| 1086 | |
| 1087 | #if BATTERY_TYPES_COUNT > 1 |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1088 | CHOICE_SETTING(0, battery_type, LANG_BATTERY_TYPE, 0, "battery type", |
| 1089 | "alkaline,nimh", NULL, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE), |
| 1090 | ID2P(LANG_BATTERY_TYPE_NIMH)), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1091 | #endif |
| 1092 | #ifdef HAVE_REMOTE_LCD |
| 1093 | /* remote lcd */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1094 | INT_SETTING(0, remote_contrast, LANG_CONTRAST, |
| 1095 | DEFAULT_REMOTE_CONTRAST_SETTING, "remote contrast", UNIT_INT, |
| 1096 | MIN_REMOTE_CONTRAST_SETTING, MAX_REMOTE_CONTRAST_SETTING, 1, |
| 1097 | NULL, NULL, lcd_remote_set_contrast), |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 1098 | BOOL_SETTING(0, remote_invert, LANG_INVERT, false ,"remote invert", off_on, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1099 | LANG_INVERT_LCD_INVERSE, LANG_NORMAL, |
| 1100 | lcd_remote_set_invert_display), |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1101 | OFFON_SETTING(0,remote_flip_display, LANG_FLIP_DISPLAY, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1102 | false,"remote flip display", NULL), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1103 | TABLE_SETTING_LIST(F_ALLOW_ARBITRARY_VALS, remote_backlight_timeout, |
| 1104 | LANG_BACKLIGHT, 5, |
| 1105 | "remote backlight timeout", off_on, UNIT_SEC, |
| 1106 | formatter_time_unit_0_is_always, getlang_time_unit_0_is_always, |
| 1107 | remote_backlight_set_timeout, 23, timeout_sec_common), |
Jonathan Gordon | 9a6f419 | 2007-02-18 05:32:06 +0000 | [diff] [blame] | 1108 | #if CONFIG_CHARGING |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1109 | TABLE_SETTING_LIST(F_ALLOW_ARBITRARY_VALS, remote_backlight_timeout_plugged, |
Jens Arnold | 124f8de | 2007-11-30 10:08:28 +0000 | [diff] [blame] | 1110 | LANG_BACKLIGHT_ON_WHEN_CHARGING, 10, |
| 1111 | "remote backlight timeout plugged", off_on, UNIT_SEC, |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1112 | formatter_time_unit_0_is_always, getlang_time_unit_0_is_always, |
| 1113 | remote_backlight_set_timeout_plugged, 23, timeout_sec_common), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1114 | #endif |
| 1115 | #ifdef HAVE_REMOTE_LCD_TICKING |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1116 | OFFON_SETTING(0, remote_reduce_ticking, LANG_REDUCE_TICKING, |
| 1117 | false,"remote reduce ticking", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1118 | #endif |
| 1119 | #endif |
| 1120 | |
Jens Arnold | 47bf6c5 | 2007-04-12 22:12:13 +0000 | [diff] [blame] | 1121 | #ifdef HAVE_BACKLIGHT |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1122 | OFFON_SETTING(0, bl_filter_first_keypress, |
| 1123 | LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false, |
| 1124 | "backlight filters first keypress", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1125 | #ifdef HAVE_REMOTE_LCD |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1126 | OFFON_SETTING(0, remote_bl_filter_first_keypress, |
| 1127 | LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false, |
| 1128 | "backlight filters first remote keypress", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1129 | #endif |
Jens Arnold | 47bf6c5 | 2007-04-12 22:12:13 +0000 | [diff] [blame] | 1130 | #endif /* HAVE_BACKLIGHT */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1131 | |
| 1132 | /** End of old RTC config block **/ |
| 1133 | |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1134 | #ifndef HAS_BUTTON_HOLD |
William Wilgus | 7d24ef1 | 2018-11-05 23:53:42 -0500 | [diff] [blame] | 1135 | OFFON_SETTING(F_BANFROMQS, bt_selective_softlock_actions, |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1136 | LANG_ACTION_ENABLED, false, |
| 1137 | "No Screen Lock For Selected Actions", NULL), |
William Wilgus | 7d24ef1 | 2018-11-05 23:53:42 -0500 | [diff] [blame] | 1138 | INT_SETTING(F_BANFROMQS, bt_selective_softlock_actions_mask, |
| 1139 | LANG_SOFTLOCK_SELECTIVE, |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1140 | 0, "Selective Screen Lock Actions", UNIT_INT, |
| 1141 | 0, 2048,2, NULL, NULL, NULL), |
| 1142 | #endif /* !HAS_BUTTON_HOLD */ |
| 1143 | |
Jens Arnold | 47bf6c5 | 2007-04-12 22:12:13 +0000 | [diff] [blame] | 1144 | #ifdef HAVE_BACKLIGHT |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1145 | OFFON_SETTING(0, caption_backlight, LANG_CAPTION_BACKLIGHT, |
| 1146 | false, "caption backlight", NULL), |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1147 | |
William Wilgus | 7d24ef1 | 2018-11-05 23:53:42 -0500 | [diff] [blame] | 1148 | OFFON_SETTING(F_BANFROMQS, bl_selective_actions, |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1149 | LANG_ACTION_ENABLED, false, |
| 1150 | "No Backlight On Selected Actions", NULL), |
| 1151 | |
William Wilgus | 7d24ef1 | 2018-11-05 23:53:42 -0500 | [diff] [blame] | 1152 | INT_SETTING(F_BANFROMQS, bl_selective_actions_mask, |
| 1153 | LANG_BACKLIGHT_SELECTIVE, |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1154 | 0, "Selective Backlight Actions", UNIT_INT, |
| 1155 | 0, 2048,2, NULL, NULL, NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1156 | #ifdef HAVE_REMOTE_LCD |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1157 | OFFON_SETTING(0, remote_caption_backlight, LANG_CAPTION_BACKLIGHT, |
| 1158 | false, "remote caption backlight", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1159 | #endif |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1160 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1161 | INT_SETTING(F_NO_WRAP, brightness, LANG_BRIGHTNESS, |
| 1162 | DEFAULT_BRIGHTNESS_SETTING, "brightness",UNIT_INT, |
| 1163 | MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1, |
| 1164 | NULL, NULL, backlight_set_brightness), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1165 | #endif |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1166 | /* backlight fading */ |
Thomas Martitz | 12a0ed3 | 2009-01-26 23:21:49 +0000 | [diff] [blame] | 1167 | #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING) |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1168 | TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, backlight_fade_in, |
Jens Arnold | 09a7861 | 2007-11-26 23:10:20 +0000 | [diff] [blame] | 1169 | LANG_BACKLIGHT_FADE_IN, 300, "backlight fade in", "off", |
William Wilgus | 4a8f263 | 2018-12-22 13:53:00 -0600 | [diff] [blame] | 1170 | UNIT_MS, formatter_time_unit_0_is_off, getlang_time_unit_0_is_off, |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1171 | backlight_set_fade_in, 7, backlight_fade), |
| 1172 | TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, backlight_fade_out, |
Jens Arnold | 09a7861 | 2007-11-26 23:10:20 +0000 | [diff] [blame] | 1173 | LANG_BACKLIGHT_FADE_OUT, 2000, "backlight fade out", "off", |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1174 | UNIT_MS, formatter_time_unit_0_is_off, |
| 1175 | getlang_time_unit_0_is_off, |
| 1176 | backlight_set_fade_out, 10, backlight_fade), |
Thomas Martitz | 12a0ed3 | 2009-01-26 23:21:49 +0000 | [diff] [blame] | 1177 | #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) |
Steve Bavin | f684726 | 2008-11-26 08:26:13 +0000 | [diff] [blame] | 1178 | OFFON_SETTING(0, backlight_fade_in, LANG_BACKLIGHT_FADE_IN, |
| 1179 | true, "backlight fade in", backlight_set_fade_in), |
| 1180 | OFFON_SETTING(0, backlight_fade_out, LANG_BACKLIGHT_FADE_OUT, |
| 1181 | true, "backlight fade out", backlight_set_fade_out), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1182 | #endif |
Thomas Martitz | 12a0ed3 | 2009-01-26 23:21:49 +0000 | [diff] [blame] | 1183 | #endif /* HAVE_BACKLIGHT */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1184 | INT_SETTING(F_PADTITLE, scroll_speed, LANG_SCROLL_SPEED, 9,"scroll speed", |
Michael Giacomelli | 36613d5 | 2012-01-09 03:26:03 +0000 | [diff] [blame] | 1185 | UNIT_INT, 0, 17, 1, NULL, NULL, lcd_scroll_speed), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1186 | INT_SETTING(F_TIME_SETTING | F_PADTITLE, scroll_delay, LANG_SCROLL_DELAY, |
| 1187 | 1000, "scroll delay", UNIT_MS, 0, 3000, 100, |
| 1188 | formatter_time_unit_0_is_off, |
| 1189 | getlang_time_unit_0_is_off, lcd_scroll_delay), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1190 | INT_SETTING(0, bidir_limit, LANG_BIDIR_SCROLL, 50, "bidir limit", |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 1191 | UNIT_PERCENT, 0, 200, 25, NULL, NULL, lcd_bidir_scroll), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1192 | #ifdef HAVE_REMOTE_LCD |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1193 | INT_SETTING(0, remote_scroll_speed, LANG_SCROLL_SPEED, 9, |
Michael Giacomelli | 36613d5 | 2012-01-09 03:26:03 +0000 | [diff] [blame] | 1194 | "remote scroll speed", UNIT_INT, 0,17, 1, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1195 | NULL, NULL, lcd_remote_scroll_speed), |
| 1196 | INT_SETTING(0, remote_scroll_step, LANG_SCROLL_STEP, 6, |
| 1197 | "remote scroll step", UNIT_PIXEL, 1, LCD_REMOTE_WIDTH, 1, NULL, |
| 1198 | NULL, lcd_remote_scroll_step), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1199 | INT_SETTING(F_TIME_SETTING, remote_scroll_delay, LANG_SCROLL_DELAY, 1000, |
| 1200 | "remote scroll delay", UNIT_MS, 0, 3000, 100, |
| 1201 | formatter_time_unit_0_is_off, getlang_time_unit_0_is_off, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1202 | lcd_remote_scroll_delay), |
| 1203 | INT_SETTING(0, remote_bidir_limit, LANG_BIDIR_SCROLL, 50, |
| 1204 | "remote bidir limit", UNIT_PERCENT, 0, 200, 25, NULL, NULL, |
| 1205 | lcd_remote_bidir_scroll), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1206 | #endif |
| 1207 | #ifdef HAVE_LCD_BITMAP |
Jonathan Gordon | 40a253d | 2007-02-17 14:02:48 +0000 | [diff] [blame] | 1208 | OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1209 | false, "Screen Scrolls Out Of View", |
| 1210 | gui_list_screen_scroll_out_of_view), |
| 1211 | INT_SETTING(F_PADTITLE, scroll_step, LANG_SCROLL_STEP, 6, "scroll step", |
| 1212 | UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, lcd_scroll_step), |
| 1213 | INT_SETTING(F_PADTITLE, screen_scroll_step, LANG_SCREEN_SCROLL_STEP, 16, |
| 1214 | "screen scroll step", UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, |
| 1215 | gui_list_screen_scroll_step), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1216 | #endif /* HAVE_LCD_BITMAP */ |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1217 | OFFON_SETTING(0,scroll_paginated,LANG_SCROLL_PAGINATED, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1218 | false,"scroll paginated",NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1219 | #ifdef HAVE_LCD_COLOR |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 1220 | |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1221 | {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.fg_color,-1, |
| 1222 | INT(DEFAULT_THEME_FOREGROUND),"foreground color",NULL,UNUSED}, |
| 1223 | {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.bg_color,-1, |
| 1224 | INT(DEFAULT_THEME_BACKGROUND),"background color",NULL,UNUSED}, |
| 1225 | {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lss_color,-1, |
| 1226 | INT(DEFAULT_THEME_SELECTOR_START),"line selector start color",NULL, |
| 1227 | UNUSED}, |
| 1228 | {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lse_color,-1, |
| 1229 | INT(DEFAULT_THEME_SELECTOR_END),"line selector end color",NULL,UNUSED}, |
| 1230 | {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lst_color,-1, |
| 1231 | INT(DEFAULT_THEME_SELECTOR_TEXT),"line selector text color",NULL, |
| 1232 | UNUSED}, |
Michael Giacomelli | aa26962 | 2008-02-23 03:56:39 +0000 | [diff] [blame] | 1233 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1234 | #endif |
| 1235 | /* more playback */ |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1236 | OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL), |
| 1237 | OFFON_SETTING(0,party_mode,LANG_PARTY_MODE,false,"party mode",NULL), |
| 1238 | OFFON_SETTING(0,fade_on_stop,LANG_FADE_ON_STOP,true,"volume fade",NULL), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1239 | INT_SETTING(F_TIME_SETTING, ff_rewind_min_step, LANG_FFRW_STEP, 1, |
| 1240 | "scan min step", UNIT_SEC, 1, 60, 1, NULL, NULL, NULL), |
Marcoen Hirschberg | 2fb70bc | 2008-06-28 17:55:53 +0000 | [diff] [blame] | 1241 | CHOICE_SETTING(0, ff_rewind_accel, LANG_FFRW_ACCEL, 2, |
Marcoen Hirschberg | 3260118 | 2008-06-29 14:53:21 +0000 | [diff] [blame] | 1242 | "seek acceleration", "very fast,fast,normal,slow,very slow", NULL, 5, |
Marcoen Hirschberg | 2fb70bc | 2008-06-28 17:55:53 +0000 | [diff] [blame] | 1243 | ID2P(LANG_VERY_FAST), ID2P(LANG_FAST), ID2P(LANG_NORMAL), |
| 1244 | ID2P(LANG_SLOW) , ID2P(LANG_VERY_SLOW)), |
Frank Gevaerts | 4657301 | 2008-10-07 19:37:33 +0000 | [diff] [blame] | 1245 | #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE) |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1246 | TABLE_SETTING(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, buffer_margin, |
| 1247 | LANG_MP3BUFFER_MARGIN, 5, "antiskip", NULL, UNIT_SEC, |
| 1248 | NULL, NULL, |
| 1249 | NULL,8, 5,15,30,60,120,180,300,600), |
Frank Gevaerts | 4657301 | 2008-10-07 19:37:33 +0000 | [diff] [blame] | 1250 | #elif defined(HAVE_DISK_STORAGE) |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1251 | INT_SETTING(F_TIME_SETTING, buffer_margin, LANG_MP3BUFFER_MARGIN, 0, |
| 1252 | "antiskip", UNIT_SEC, 0, 7, 1, formatter_time_unit_0_is_off, |
| 1253 | getlang_time_unit_0_is_off, audio_set_buffer_margin), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1254 | #endif |
| 1255 | /* disk */ |
Frank Gevaerts | 4657301 | 2008-10-07 19:37:33 +0000 | [diff] [blame] | 1256 | #ifdef HAVE_DISK_STORAGE |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1257 | INT_SETTING(F_TIME_SETTING, disk_spindown, LANG_SPINDOWN, 5, "disk spindown", |
Frank Gevaerts | 2f8a008 | 2008-11-01 16:14:28 +0000 | [diff] [blame] | 1258 | UNIT_SEC, 3, 254, 1, NULL, NULL, storage_spindown), |
Frank Gevaerts | 4657301 | 2008-10-07 19:37:33 +0000 | [diff] [blame] | 1259 | #endif /* HAVE_DISK_STORAGE */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1260 | /* browser */ |
Jonathan Gordon | efbcece | 2010-10-04 10:34:38 +0000 | [diff] [blame] | 1261 | TEXT_SETTING(0, start_directory, "start directory", "/", NULL, NULL), |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1262 | CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files", |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1263 | "all,supported,music,playlists", NULL, 4, ID2P(LANG_ALL), |
| 1264 | ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC), |
| 1265 | ID2P(LANG_PLAYLISTS)), |
Thomas Martitz | d13f1a4 | 2009-03-01 17:55:59 +0000 | [diff] [blame] | 1266 | /* file sorting */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1267 | OFFON_SETTING(0, sort_case, LANG_SORT_CASE, false, "sort case", NULL), |
Thomas Martitz | d13f1a4 | 2009-03-01 17:55:59 +0000 | [diff] [blame] | 1268 | CHOICE_SETTING(0, sort_dir, LANG_SORT_DIR, 0 , |
| 1269 | "sort dirs", "alpha,oldest,newest", NULL, 3, |
| 1270 | ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE), |
| 1271 | ID2P(LANG_SORT_DATE_REVERSE)), |
| 1272 | CHOICE_SETTING(0, sort_file, LANG_SORT_FILE, 0 , |
| 1273 | "sort files", "alpha,oldest,newest,type", NULL, 4, |
| 1274 | ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE), |
| 1275 | ID2P(LANG_SORT_DATE_REVERSE) , ID2P(LANG_SORT_TYPE)), |
| 1276 | CHOICE_SETTING(0, interpret_numbers, LANG_SORT_INTERPRET_NUMBERS, 1, |
| 1277 | "sort interpret number", "digits,numbers",NULL, 2, |
| 1278 | ID2P(LANG_SORT_INTERPRET_AS_DIGIT), |
| 1279 | ID2P(LANG_SORT_INTERPRET_AS_NUMBERS)), |
Peter D'Hoye | 043c966 | 2007-08-13 23:11:30 +0000 | [diff] [blame] | 1280 | CHOICE_SETTING(0, show_filename_ext, LANG_SHOW_FILENAME_EXT, 3, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1281 | "show filename exts", "off,on,unknown,view_all", NULL , 4 , |
| 1282 | ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_UNKNOWN_TYPES), |
| 1283 | ID2P(LANG_EXT_ONLY_VIEW_ALL)), |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1284 | OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL), |
| 1285 | OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1286 | "playlist viewer icons",NULL), |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1287 | OFFON_SETTING(0,playlist_viewer_indices,LANG_SHOW_INDICES,true, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1288 | "playlist viewer indices",NULL), |
Jonathan Gordon | a2740d9 | 2007-04-25 11:20:19 +0000 | [diff] [blame] | 1289 | CHOICE_SETTING(0, playlist_viewer_track_display, LANG_TRACK_DISPLAY, 0, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1290 | "playlist viewer track display","track name,full path", |
| 1291 | NULL, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY), |
| 1292 | ID2P(LANG_DISPLAY_FULL_PATH)), |
Nils Wallménius | 479a6a7 | 2007-10-01 13:39:30 +0000 | [diff] [blame] | 1293 | CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_ON, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1294 | "recursive directory insert", off_on_ask, NULL , 3 , |
| 1295 | ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_ASK)), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1296 | /* bookmarks */ |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1297 | CHOICE_SETTING(0, autocreatebookmark, LANG_BOOKMARK_SETTINGS_AUTOCREATE, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1298 | BOOKMARK_NO, "autocreate bookmarks", |
| 1299 | "off,on,ask,recent only - on,recent only - ask", NULL, 5, |
| 1300 | ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), |
| 1301 | ID2P(LANG_ASK), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES), |
| 1302 | ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK)), |
Torne Wuff | db1b823 | 2010-07-05 16:39:00 +0000 | [diff] [blame] | 1303 | OFFON_SETTING(0, autoupdatebookmark, LANG_BOOKMARK_SETTINGS_AUTOUPDATE, |
| 1304 | false, "autoupdate bookmarks", NULL), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1305 | CHOICE_SETTING(0, autoloadbookmark, LANG_BOOKMARK_SETTINGS_AUTOLOAD, |
| 1306 | BOOKMARK_NO, "autoload bookmarks", off_on_ask, NULL, 3, |
| 1307 | ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), |
| 1308 | ID2P(LANG_ASK)), |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1309 | CHOICE_SETTING(0, usemrb, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1310 | BOOKMARK_NO, "use most-recent-bookmarks", |
Solomon Peachy | bea9cf7 | 2018-10-30 09:43:32 -0400 | [diff] [blame] | 1311 | "off,on,unique only,one per track", NULL, 4, ID2P(LANG_SET_BOOL_NO), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1312 | ID2P(LANG_SET_BOOL_YES), |
Solomon Peachy | bea9cf7 | 2018-10-30 09:43:32 -0400 | [diff] [blame] | 1313 | ID2P(LANG_BOOKMARK_SETTINGS_ONE_PER_PLAYLIST), |
| 1314 | ID2P(LANG_BOOKMARK_SETTINGS_ONE_PER_TRACK)), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1315 | #ifdef HAVE_LCD_BITMAP |
| 1316 | /* peak meter */ |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1317 | TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, peak_meter_clip_hold, |
| 1318 | LANG_PM_CLIP_HOLD, 60, "peak meter clip hold", "eternal", |
| 1319 | UNIT_SEC, formatter_time_unit_0_is_eternal, |
| 1320 | getlang_time_unit_0_is_eternal, peak_meter_set_clip_hold, |
| 1321 | 31, &timeout_sec_common[1]), /* skip -1 entry */ |
| 1322 | TABLE_SETTING(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, peak_meter_hold, |
| 1323 | LANG_PM_PEAK_HOLD, 500, "peak meter hold", off, UNIT_MS, |
| 1324 | formatter_time_unit_0_is_off, getlang_time_unit_0_is_off,NULL, |
| 1325 | 18, 0,200,300,500,1000,2000,3000,4000,5000,6000,7000,8000, |
| 1326 | 9000,10000,15000,20000,30000,60000), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1327 | INT_SETTING(0, peak_meter_release, LANG_PM_RELEASE, 8, "peak meter release", |
| 1328 | UNIT_PM_TICK, 1, 0x7e, 1, NULL, NULL,NULL), |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1329 | OFFON_SETTING(0,peak_meter_dbfs,LANG_PM_DBFS,true,"peak meter dbfs",NULL), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1330 | {F_T_INT, &global_settings.peak_meter_min, LANG_PM_MIN,INT(60), |
| 1331 | "peak meter min", NULL, UNUSED}, |
| 1332 | {F_T_INT, &global_settings.peak_meter_max, LANG_PM_MAX,INT(0), |
| 1333 | "peak meter max", NULL, UNUSED}, |
Peter D'Hoye | 6109d39 | 2007-08-26 21:34:36 +0000 | [diff] [blame] | 1334 | #ifdef HAVE_RECORDING |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1335 | OFFON_SETTING(0, peak_meter_clipcounter, LANG_PM_CLIPCOUNTER, false, |
| 1336 | "peak meter clipcounter", NULL), |
Peter D'Hoye | 6109d39 | 2007-08-26 21:34:36 +0000 | [diff] [blame] | 1337 | #endif /* HAVE_RECORDING */ |
| 1338 | #endif /* HAVE_LCD_BITMAP */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1339 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 1340 | SOUND_SETTING(F_SOUNDSETTING, mdb_strength, LANG_MDB_STRENGTH, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1341 | "mdb strength", SOUND_MDB_STRENGTH), |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 1342 | SOUND_SETTING(F_SOUNDSETTING, mdb_harmonics, LANG_MDB_HARMONICS, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1343 | "mdb harmonics", SOUND_MDB_HARMONICS), |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 1344 | SOUND_SETTING(F_SOUNDSETTING, mdb_center, LANG_MDB_CENTER, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1345 | "mdb center", SOUND_MDB_CENTER), |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 1346 | SOUND_SETTING(F_SOUNDSETTING, mdb_shape, LANG_MDB_SHAPE, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1347 | "mdb shape", SOUND_MDB_SHAPE), |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 1348 | OFFON_SETTING(F_SOUNDSETTING, mdb_enable, LANG_MDB_ENABLE, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1349 | false, "mdb enable", set_mdb_enable), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1350 | #endif |
| 1351 | #if CONFIG_CODEC == MAS3507D |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 1352 | OFFON_SETTING(F_SOUNDSETTING, line_in,LANG_LINE_IN,false,"line in",NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1353 | #endif |
| 1354 | /* voice */ |
Jonathan Gordon | cd2d62c | 2007-02-13 07:50:47 +0000 | [diff] [blame] | 1355 | OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL), |
Steve Bavin | 6fd10ba | 2007-06-07 09:24:53 +0000 | [diff] [blame] | 1356 | CHOICE_SETTING(0, talk_dir, LANG_VOICE_DIR, 0, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1357 | "talk dir", off_number_spell, NULL, 3, |
| 1358 | ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER), |
| 1359 | ID2P(LANG_VOICE_SPELL)), |
| 1360 | OFFON_SETTING(F_TEMPVAR, talk_dir_clip, LANG_VOICE_DIR_TALK, false, |
| 1361 | "talk dir clip", NULL), |
Steve Bavin | 6fd10ba | 2007-06-07 09:24:53 +0000 | [diff] [blame] | 1362 | CHOICE_SETTING(0, talk_file, LANG_VOICE_FILE, 0, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1363 | "talk file", off_number_spell, NULL, 3, |
| 1364 | ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER), |
| 1365 | ID2P(LANG_VOICE_SPELL)), |
| 1366 | OFFON_SETTING(F_TEMPVAR, talk_file_clip, LANG_VOICE_FILE_TALK, false, |
| 1367 | "talk file clip", NULL), |
| 1368 | OFFON_SETTING(F_TEMPVAR, talk_filetype, LANG_VOICE_FILETYPE, false, |
| 1369 | "talk filetype", NULL), |
| 1370 | OFFON_SETTING(F_TEMPVAR, talk_battery_level, LANG_TALK_BATTERY_LEVEL, false, |
Stéphane Doyon | da93299 | 2007-11-03 05:00:49 +0000 | [diff] [blame] | 1371 | "Announce Battery Level", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1372 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1373 | #ifdef HAVE_RECORDING |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1374 | /* recording */ |
| 1375 | TABLE_SETTING(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS | F_RECSETTING, |
| 1376 | rec_timesplit, |
| 1377 | LANG_SPLIT_TIME, 0, "rec timesplit", off, UNIT_MIN, |
| 1378 | formatter_time_unit_0_is_off, getlang_time_unit_0_is_off,NULL, |
| 1379 | 16, 0,5,10,15,30,60,74,80,120,240,360,480,600,720,1080,1440), |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 1380 | STRINGCHOICE_SETTING(F_RECSETTING, rec_sizesplit, LANG_SPLIT_SIZE, 0, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1381 | "rec sizesplit", |
| 1382 | "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB," |
| 1383 | "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB", |
| 1384 | NULL, 16, LANG_OFF, |
| 1385 | TALK_ID(5, UNIT_MB), TALK_ID(10, UNIT_MB), |
| 1386 | TALK_ID(15, UNIT_MB), TALK_ID(32, UNIT_MB), |
| 1387 | TALK_ID(64, UNIT_MB), TALK_ID(75, UNIT_MB), |
| 1388 | TALK_ID(100, UNIT_MB), TALK_ID(128, UNIT_MB), |
| 1389 | TALK_ID(256, UNIT_MB), TALK_ID(512, UNIT_MB), |
| 1390 | TALK_ID(650, UNIT_MB), TALK_ID(700, UNIT_MB), |
| 1391 | TALK_ID(1024, UNIT_MB), TALK_ID(1536, UNIT_MB), |
| 1392 | TALK_ID(1792, UNIT_MB)), |
| 1393 | {F_T_INT|F_RECSETTING, &global_settings.rec_channels, LANG_CHANNELS, INT(0), |
| 1394 | "rec channels","stereo,mono",UNUSED}, |
Peter D'Hoye | 528fe44 | 2008-10-08 22:18:16 +0000 | [diff] [blame] | 1395 | #if CONFIG_CODEC == SWCODEC |
| 1396 | {F_T_INT|F_RECSETTING, &global_settings.rec_mono_mode, |
| 1397 | LANG_RECORDING_MONO_MODE, INT(0), "rec mono mode","L+R,L,R",UNUSED}, |
| 1398 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1399 | CHOICE_SETTING(F_RECSETTING, rec_split_type, LANG_SPLIT_TYPE, 0, |
Peter D'Hoye | a352402 | 2008-05-15 22:47:07 +0000 | [diff] [blame] | 1400 | "rec split type", "Split,Stop,Shutdown", NULL, 3, |
| 1401 | ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN)), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1402 | CHOICE_SETTING(F_RECSETTING, rec_split_method, LANG_SPLIT_MEASURE, 0, |
| 1403 | "rec split method", "Time,Filesize", NULL, 2, |
Mustapha Senhaji | 5e1e05f | 2010-12-24 03:31:40 +0000 | [diff] [blame] | 1404 | ID2P(LANG_TIME), ID2P(LANG_FILESIZE)), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1405 | {F_T_INT|F_RECSETTING, &global_settings.rec_source, LANG_RECORDING_SOURCE, |
| 1406 | INT(0), "rec source", |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1407 | &HAVE_MIC_REC_(",mic") |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1408 | HAVE_LINE_REC_(",line") |
| 1409 | HAVE_SPDIF_REC_(",spdif") |
| 1410 | HAVE_FMRADIO_REC_(",fmradio")[1], |
| 1411 | UNUSED}, |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1412 | INT_SETTING(F_TIME_SETTING | F_RECSETTING, rec_prerecord_time, |
| 1413 | LANG_RECORD_PRERECORD_TIME, 0, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1414 | "prerecording time", UNIT_SEC, 0, 30, 1, |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1415 | formatter_time_unit_0_is_off, getlang_time_unit_0_is_off, NULL), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1416 | |
Jonathan Gordon | 106b68e | 2008-10-23 00:29:17 +0000 | [diff] [blame] | 1417 | TEXT_SETTING(F_RECSETTING, rec_directory, "rec path", |
| 1418 | REC_BASE_DIR, NULL, NULL), |
Jens Arnold | 47bf6c5 | 2007-04-12 22:12:13 +0000 | [diff] [blame] | 1419 | #ifdef HAVE_BACKLIGHT |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1420 | CHOICE_SETTING(F_RECSETTING, cliplight, LANG_CLIP_LIGHT, 0, |
| 1421 | "cliplight", "off,main,both,remote", NULL, |
Jonathan Gordon | 120016f | 2007-03-13 11:48:47 +0000 | [diff] [blame] | 1422 | #ifdef HAVE_REMOTE_LCD |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1423 | 4, ID2P(LANG_OFF), ID2P(LANG_MAIN_UNIT), |
| 1424 | ID2P(LANG_REMOTE_MAIN), ID2P(LANG_REMOTE_UNIT) |
Jonathan Gordon | 120016f | 2007-03-13 11:48:47 +0000 | [diff] [blame] | 1425 | #else |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1426 | 2, ID2P(LANG_OFF), ID2P(LANG_ON) |
Jonathan Gordon | 120016f | 2007-03-13 11:48:47 +0000 | [diff] [blame] | 1427 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1428 | ), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1429 | #endif |
Michael Sevakis | bcb8a88 | 2007-06-05 07:03:30 +0000 | [diff] [blame] | 1430 | #ifdef DEFAULT_REC_MIC_GAIN |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 1431 | {F_T_INT|F_RECSETTING,&global_settings.rec_mic_gain, |
Nils Wallménius | b311367 | 2007-08-05 19:19:39 +0000 | [diff] [blame] | 1432 | LANG_GAIN,INT(DEFAULT_REC_MIC_GAIN), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1433 | "rec mic gain",NULL,UNUSED}, |
Michael Sevakis | bcb8a88 | 2007-06-05 07:03:30 +0000 | [diff] [blame] | 1434 | #endif /* DEFAULT_REC_MIC_GAIN */ |
| 1435 | #ifdef DEFAULT_REC_LEFT_GAIN |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 1436 | {F_T_INT|F_RECSETTING,&global_settings.rec_left_gain, |
Peter D'Hoye | 496e1f7 | 2008-08-06 20:12:44 +0000 | [diff] [blame] | 1437 | LANG_GAIN_LEFT,INT(DEFAULT_REC_LEFT_GAIN), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1438 | "rec left gain",NULL,UNUSED}, |
Michael Sevakis | bcb8a88 | 2007-06-05 07:03:30 +0000 | [diff] [blame] | 1439 | #endif /* DEFAULT_REC_LEFT_GAIN */ |
| 1440 | #ifdef DEFAULT_REC_RIGHT_GAIN |
Peter D'Hoye | 496e1f7 | 2008-08-06 20:12:44 +0000 | [diff] [blame] | 1441 | {F_T_INT|F_RECSETTING,&global_settings.rec_right_gain,LANG_GAIN_RIGHT, |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1442 | INT(DEFAULT_REC_RIGHT_GAIN), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1443 | "rec right gain",NULL,UNUSED}, |
Michael Sevakis | bcb8a88 | 2007-06-05 07:03:30 +0000 | [diff] [blame] | 1444 | #endif /* DEFAULT_REC_RIGHT_GAIN */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1445 | #if CONFIG_CODEC == MAS3587F |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 1446 | {F_T_INT|F_RECSETTING,&global_settings.rec_frequency, |
Michael Sevakis | 19b289a | 2013-07-06 17:14:02 -0400 | [diff] [blame] | 1447 | LANG_FREQUENCY, INT(0), "rec frequency", |
| 1448 | "44,48,32,22,24,16", UNUSED}, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1449 | INT_SETTING(F_RECSETTING, rec_quality, LANG_RECORDING_QUALITY, 5, |
| 1450 | "rec quality", UNIT_INT, 0, 7, 1, NULL, NULL, NULL), |
| 1451 | OFFON_SETTING(F_RECSETTING, rec_editable, LANG_RECORDING_EDITABLE, false, |
| 1452 | "editable recordings", NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1453 | #endif /* CONFIG_CODEC == MAS3587F */ |
| 1454 | #if CONFIG_CODEC == SWCODEC |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 1455 | {F_T_INT|F_RECSETTING,&global_settings.rec_frequency, |
Michael Sevakis | 19b289a | 2013-07-06 17:14:02 -0400 | [diff] [blame] | 1456 | LANG_FREQUENCY,INT(REC_FREQ_DEFAULT), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1457 | "rec frequency",REC_FREQ_CFG_VAL_LIST,UNUSED}, |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 1458 | {F_T_INT|F_RECSETTING,&global_settings.rec_format, |
| 1459 | LANG_RECORDING_FORMAT,INT(REC_FORMAT_DEFAULT), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1460 | "rec format",REC_FORMAT_CFG_VAL_LIST,UNUSED}, |
| 1461 | /** Encoder settings start - keep these together **/ |
| 1462 | /* aiff_enc */ |
| 1463 | /* (no settings yet) */ |
| 1464 | /* mp3_enc */ |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 1465 | {F_T_INT|F_RECSETTING, &global_settings.mp3_enc_config.bitrate,-1, |
| 1466 | INT(MP3_ENC_BITRATE_CFG_DEFAULT), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1467 | "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST,UNUSED}, |
| 1468 | /* wav_enc */ |
| 1469 | /* (no settings yet) */ |
| 1470 | /* wavpack_enc */ |
| 1471 | /* (no settings yet) */ |
| 1472 | /** Encoder settings end **/ |
| 1473 | #endif /* CONFIG_CODEC == SWCODEC */ |
| 1474 | /* values for the trigger */ |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 1475 | INT_SETTING(F_RECSETTING, rec_start_thres_db, LANG_RECORD_START_THRESHOLD, -35, |
Michael Sevakis | e61e9c6 | 2013-04-20 04:06:13 -0400 | [diff] [blame] | 1476 | "trigger start threshold dB", UNIT_DB, -89, 0, 1, NULL, NULL, NULL), |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 1477 | INT_SETTING(F_RECSETTING, rec_start_thres_linear, LANG_RECORD_START_THRESHOLD, 5, |
| 1478 | "trigger start threshold linear", UNIT_PERCENT, 0, 100, 1, NULL, NULL, NULL), |
| 1479 | INT_SETTING(F_RECSETTING, rec_stop_thres_db, LANG_RECORD_STOP_THRESHOLD, -45, |
Michael Sevakis | e61e9c6 | 2013-04-20 04:06:13 -0400 | [diff] [blame] | 1480 | "trigger stop threshold dB", UNIT_DB, -89, 0, 1, NULL, NULL, NULL), |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 1481 | INT_SETTING(F_RECSETTING, rec_stop_thres_linear, LANG_RECORD_STOP_THRESHOLD, 10, |
| 1482 | "trigger stop threshold linear", UNIT_PERCENT, 0, 100, 1, NULL, NULL, NULL), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1483 | TABLE_SETTING_LIST(F_TIME_SETTING | F_RECSETTING, rec_start_duration, |
| 1484 | LANG_MIN_DURATION, 0, "trigger start duration", |
| 1485 | off, UNIT_SEC, NULL, NULL, NULL, 13, time_recording_trigger), |
| 1486 | TABLE_SETTING_LIST(F_TIME_SETTING | F_RECSETTING, rec_stop_postrec, |
| 1487 | LANG_MIN_DURATION, 0, "trigger stop duration", |
| 1488 | off, UNIT_SEC, NULL, NULL, NULL, 13, time_recording_trigger), |
| 1489 | TABLE_SETTING_LIST(F_TIME_SETTING | F_RECSETTING, rec_stop_gap, |
| 1490 | LANG_RECORD_STOP_GAP, 1, "trigger min gap", |
| 1491 | off, UNIT_SEC, NULL, NULL, NULL, 13, time_recording_trigger), |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 1492 | CHOICE_SETTING(F_RECSETTING, rec_trigger_mode, LANG_RECORD_TRIGGER, TRIG_MODE_OFF, |
| 1493 | "trigger mode","off,once,repeat", NULL ,3, |
| 1494 | ID2P(LANG_OFF), ID2P(LANG_RECORD_TRIG_NOREARM), ID2P(LANG_REPEAT)), |
| 1495 | CHOICE_SETTING(F_RECSETTING, rec_trigger_type, LANG_RECORD_TRIGGER_TYPE, TRIG_TYPE_STOP, |
Jonathan Gordon | 83696d9 | 2008-08-10 08:09:43 +0000 | [diff] [blame] | 1496 | "trigger type","stop,pause,nf stp", NULL ,3, |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 1497 | ID2P(LANG_RECORD_TRIGGER_STOP), ID2P(LANG_PAUSE), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP)), |
Peter D'Hoye | 82f4c60 | 2011-06-05 12:36:27 +0000 | [diff] [blame] | 1498 | #endif /* HAVE_RECORDING */ |
| 1499 | |
| 1500 | #ifdef HAVE_HISTOGRAM |
Peter D'Hoye | be90f74 | 2010-03-03 22:16:08 +0000 | [diff] [blame] | 1501 | /* TO DO: additional restictions of following REP items? */ |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1502 | INT_SETTING(F_TIME_SETTING | F_RECSETTING, histogram_interval, |
| 1503 | LANG_HISTOGRAM_INTERVAL, 0, |
| 1504 | "histogram interval", UNIT_SEC, 0,4,1, |
| 1505 | NULL, NULL, NULL), |
Peter D'Hoye | 82f4c60 | 2011-06-05 12:36:27 +0000 | [diff] [blame] | 1506 | #endif /* HAVE_HISTOGRAM */ |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1507 | |
| 1508 | #ifdef HAVE_SPDIF_POWER |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 1509 | OFFON_SETTING(F_SOUNDSETTING, spdif_enable, LANG_SPDIF_ENABLE, false, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1510 | "spdif enable", spdif_power_enable), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1511 | #endif |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 1512 | CHOICE_SETTING(0, next_folder, LANG_NEXT_FOLDER, FOLDER_ADVANCE_OFF, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1513 | "folder navigation", "off,on,random",NULL ,3, |
| 1514 | ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), |
| 1515 | ID2P(LANG_RANDOM)), |
Nick Peskett | be10817 | 2012-03-19 09:56:38 +0000 | [diff] [blame] | 1516 | BOOL_SETTING(0, constrain_next_folder, LANG_CONSTRAIN_NEXT_FOLDER, false, |
| 1517 | "constrain next folder", off_on, |
| 1518 | LANG_SET_BOOL_YES, LANG_SET_BOOL_NO, NULL), |
Nils Wallménius | 071e3ef | 2009-01-03 13:41:54 +0000 | [diff] [blame] | 1519 | |
| 1520 | #ifdef HAVE_TAGCACHE |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1521 | #if CONFIG_CODEC == SWCODEC |
Michael Hohmuth | f0ce188 | 2011-02-08 20:31:22 +0000 | [diff] [blame] | 1522 | BOOL_SETTING(0, autoresume_enable, LANG_AUTORESUME, false, |
Michael Giacomelli | 66e8fc0 | 2011-01-02 02:49:13 +0000 | [diff] [blame] | 1523 | "autoresume enable", off_on, |
Michael Hohmuth | f0ce188 | 2011-02-08 20:31:22 +0000 | [diff] [blame] | 1524 | LANG_SET_BOOL_YES, LANG_SET_BOOL_NO, NULL), |
Michael Hohmuth | 7141ff4 | 2011-02-08 20:31:35 +0000 | [diff] [blame] | 1525 | CHOICE_SETTING(0, autoresume_automatic, LANG_AUTORESUME_AUTOMATIC, |
| 1526 | AUTORESUME_NEXTTRACK_NEVER, |
| 1527 | "autoresume next track", "never,all,custom", |
| 1528 | NULL, 3, |
| 1529 | ID2P(LANG_SET_BOOL_NO), |
| 1530 | ID2P(LANG_ALWAYS), |
| 1531 | ID2P(LANG_AUTORESUME_CUSTOM)), |
Michael Hohmuth | a530376 | 2011-02-11 00:20:03 +0000 | [diff] [blame] | 1532 | TEXT_SETTING(0, autoresume_paths, "autoresume next track paths", |
| 1533 | "/podcast:/podcasts", NULL, NULL), |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 1534 | #endif |
Marianne Arnold | 820bfb2 | 2011-01-12 16:20:48 +0000 | [diff] [blame] | 1535 | |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1536 | OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false, |
| 1537 | "gather runtime data", NULL), |
Thomas Martitz | 63d2762 | 2012-07-18 23:36:57 +0200 | [diff] [blame] | 1538 | TEXT_SETTING(0, tagcache_scan_paths, "database scan paths", |
| 1539 | DEFAULT_TAGCACHE_SCAN_PATHS, NULL, NULL), |
Nils Wallménius | 071e3ef | 2009-01-03 13:41:54 +0000 | [diff] [blame] | 1540 | #endif |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1541 | |
| 1542 | #if CONFIG_CODEC == SWCODEC |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1543 | /* replay gain */ |
Michael Sevakis | 57a20d2 | 2012-04-30 16:27:01 -0400 | [diff] [blame] | 1544 | CHOICE_SETTING(F_SOUNDSETTING, replaygain_settings.type, |
| 1545 | LANG_REPLAYGAIN_MODE, REPLAYGAIN_SHUFFLE, "replaygain type", |
Alexander Levin | 8589fcb | 2009-06-20 21:13:24 +0000 | [diff] [blame] | 1546 | "track,album,track shuffle,off", NULL, 4, ID2P(LANG_TRACK_GAIN), |
| 1547 | ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN), ID2P(LANG_OFF)), |
Michael Sevakis | 57a20d2 | 2012-04-30 16:27:01 -0400 | [diff] [blame] | 1548 | OFFON_SETTING(F_SOUNDSETTING, replaygain_settings.noclip, |
| 1549 | LANG_REPLAYGAIN_NOCLIP, false, "replaygain noclip", NULL), |
| 1550 | INT_SETTING_NOWRAP(F_SOUNDSETTING, replaygain_settings.preamp, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1551 | LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp", |
| 1552 | UNIT_DB, -120, 120, 5, db_format, get_dec_talkid, NULL), |
| 1553 | |
| 1554 | CHOICE_SETTING(0, beep, LANG_BEEP, 0, "beep", "off,weak,moderate,strong", |
| 1555 | NULL, 4, ID2P(LANG_OFF), ID2P(LANG_WEAK), |
| 1556 | ID2P(LANG_MODERATE), ID2P(LANG_STRONG)), |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1557 | |
Michael Giacomelli | 6469926 | 2009-08-11 02:05:38 +0000 | [diff] [blame] | 1558 | #ifdef HAVE_CROSSFADE |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1559 | /* crossfade */ |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1560 | CHOICE_SETTING(F_SOUNDSETTING, crossfade, LANG_CROSSFADE_ENABLE, 0, |
| 1561 | "crossfade", |
Jeffrey Goode | 29d2711 | 2009-11-12 15:42:37 +0000 | [diff] [blame] | 1562 | "off,auto track change,man track skip,shuffle,shuffle or man track skip,always", |
Jeffrey Goode | 664dc90 | 2009-11-11 00:48:17 +0000 | [diff] [blame] | 1563 | NULL, 6, ID2P(LANG_OFF), ID2P(LANG_AUTOTRACKSKIP), |
| 1564 | ID2P(LANG_MANTRACKSKIP), ID2P(LANG_SHUFFLE), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1565 | ID2P(LANG_SHUFFLE_TRACKSKIP), ID2P(LANG_ALWAYS)), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1566 | INT_SETTING(F_TIME_SETTING | F_SOUNDSETTING, crossfade_fade_in_delay, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1567 | LANG_CROSSFADE_FADE_IN_DELAY, 0, |
| 1568 | "crossfade fade in delay", UNIT_SEC, 0, 7, 1, NULL, NULL, NULL), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1569 | INT_SETTING(F_TIME_SETTING | F_SOUNDSETTING, crossfade_fade_out_delay, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1570 | LANG_CROSSFADE_FADE_OUT_DELAY, 0, |
| 1571 | "crossfade fade out delay", UNIT_SEC, 0, 7, 1, NULL, NULL,NULL), |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1572 | INT_SETTING(F_TIME_SETTING | F_SOUNDSETTING, crossfade_fade_in_duration, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1573 | LANG_CROSSFADE_FADE_IN_DURATION, 2, |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1574 | "crossfade fade in duration", UNIT_SEC, 0, 15, 1, NULL, NULL, NULL), |
| 1575 | INT_SETTING(F_TIME_SETTING | F_SOUNDSETTING, crossfade_fade_out_duration, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1576 | LANG_CROSSFADE_FADE_OUT_DURATION, 2, |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 1577 | "crossfade fade out duration", UNIT_SEC, 0, 15, 1, NULL, NULL, NULL), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1578 | CHOICE_SETTING(F_SOUNDSETTING, crossfade_fade_out_mixmode, |
| 1579 | LANG_CROSSFADE_FADE_OUT_MODE, 0, |
| 1580 | "crossfade fade out mode", "crossfade,mix", NULL, 2, |
| 1581 | ID2P(LANG_CROSSFADE), ID2P(LANG_MIX)), |
Michael Giacomelli | 47a0901 | 2009-08-11 01:09:05 +0000 | [diff] [blame] | 1582 | #endif |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1583 | |
Jonathan Gordon | 4ca8a43 | 2007-01-26 05:45:06 +0000 | [diff] [blame] | 1584 | /* crossfeed */ |
Bertrik Sikken | afc9608 | 2012-05-01 03:58:27 -0400 | [diff] [blame] | 1585 | CHOICE_SETTING(F_SOUNDSETTING, crossfeed, LANG_CROSSFEED, 0,"crossfeed", |
| 1586 | "off,meier,custom", dsp_set_crossfeed_type, 3, |
| 1587 | ID2P(LANG_OFF), ID2P(LANG_CROSSFEED_MEIER), |
| 1588 | ID2P(LANG_CROSSFEED_CUSTOM)), |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1589 | INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_direct_gain, |
| 1590 | LANG_CROSSFEED_DIRECT_GAIN, -15, |
| 1591 | "crossfeed direct gain", UNIT_DB, -60, 0, 5, |
| 1592 | db_format, get_dec_talkid,dsp_set_crossfeed_direct_gain), |
| 1593 | INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_cross_gain, |
| 1594 | LANG_CROSSFEED_CROSS_GAIN, -60, |
| 1595 | "crossfeed cross gain", UNIT_DB, -120, -30, 5, |
| 1596 | db_format, get_dec_talkid, crossfeed_cross_set), |
| 1597 | INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_hf_attenuation, |
| 1598 | LANG_CROSSFEED_HF_ATTENUATION, -160, |
| 1599 | "crossfeed hf attenuation", UNIT_DB, -240, -60, 5, |
| 1600 | db_format, get_dec_talkid, crossfeed_cross_set), |
| 1601 | INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_hf_cutoff, |
| 1602 | LANG_CROSSFEED_HF_CUTOFF, 700, |
| 1603 | "crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100, |
| 1604 | NULL, NULL, crossfeed_cross_set), |
Dan Everton | 5886efa | 2007-12-07 10:59:07 +0000 | [diff] [blame] | 1605 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1606 | /* equalizer */ |
Dan Everton | 5886efa | 2007-12-07 10:59:07 +0000 | [diff] [blame] | 1607 | OFFON_SETTING(F_EQSETTING, eq_enabled, LANG_EQUALIZER_ENABLED, false, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1608 | "eq enabled", NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1609 | |
Dan Everton | 5886efa | 2007-12-07 10:59:07 +0000 | [diff] [blame] | 1610 | INT_SETTING_NOWRAP(F_EQSETTING, eq_precut, LANG_EQUALIZER_PRECUT, 0, |
Hayden Pearce | e4040d9 | 2013-03-05 12:15:27 +1300 | [diff] [blame] | 1611 | "eq precut", UNIT_DB, 0, 240, 1, eq_precut_format, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1612 | get_precut_talkid, dsp_set_eq_precut), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1613 | |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1614 | /* 0..32768 Hz */ |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1615 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[0].cutoff, LANG_EQUALIZER_BAND_CUTOFF, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1616 | 32, "eq band 0 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1617 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1618 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[1].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1619 | 64, "eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1620 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1621 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[2].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1622 | 125, "eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1623 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1624 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[3].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1625 | 250, "eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1626 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1627 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[4].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1628 | 500, "eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
| 1629 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1630 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[5].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1631 | 1000, "eq band 5 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
| 1632 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1633 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[6].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1634 | 2000, "eq band 6 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
| 1635 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1636 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[7].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1637 | 4000, "eq band 7 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
| 1638 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1639 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[8].cutoff, LANG_EQUALIZER_BAND_CENTER, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1640 | 8000, "eq band 8 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
| 1641 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1642 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[9].cutoff, LANG_EQUALIZER_BAND_CUTOFF, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1643 | 16000, "eq band 9 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1644 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
Jonathan Gordon | b2e5090 | 2007-01-23 13:40:44 +0000 | [diff] [blame] | 1645 | /* 0..64 (or 0.0 to 6.4) */ |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1646 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[0].q, LANG_EQUALIZER_BAND_Q, 7, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1647 | "eq band 0 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
| 1648 | eq_q_format, get_dec_talkid, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1649 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[1].q, LANG_EQUALIZER_BAND_Q, 10, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1650 | "eq band 1 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
| 1651 | eq_q_format, get_dec_talkid, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1652 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[2].q, LANG_EQUALIZER_BAND_Q, 10, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1653 | "eq band 2 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
| 1654 | eq_q_format, get_dec_talkid, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1655 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[3].q, LANG_EQUALIZER_BAND_Q, 10, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1656 | "eq band 3 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
| 1657 | eq_q_format, get_dec_talkid, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1658 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[4].q, LANG_EQUALIZER_BAND_Q, 10, |
Peter D'Hoye | 5c3d591 | 2008-05-11 23:13:59 +0000 | [diff] [blame] | 1659 | "eq band 4 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
| 1660 | eq_q_format, get_dec_talkid, NULL), |
Jonathan Gordon | 1eb17dc | 2013-02-05 23:20:17 +1100 | [diff] [blame] | 1661 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[5].q, LANG_EQUALIZER_BAND_Q, 10, |
Hayden Pearce | d73c209 | 2013-01-23 07:08:16 +1300 | [diff] [blame] | 1662 | "eq band 5 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
| 1663 | |