Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 10 | * Copyright (C) 2002 by Stuart Martin |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 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. |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +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 | #ifndef __SETTINGS_H__ |
| 23 | #define __SETTINGS_H__ |
| 24 | |
| 25 | #include <stdbool.h> |
Bertrik Sikken | b24fafb | 2009-03-08 20:28:15 +0000 | [diff] [blame] | 26 | #include <stddef.h> |
Jens Arnold | fb7368e | 2006-03-03 01:12:50 +0000 | [diff] [blame] | 27 | #include "inttypes.h" |
Hardeep Sidhu | e9d4058 | 2003-07-15 02:34:10 +0000 | [diff] [blame] | 28 | #include "config.h" |
Michael Sevakis | 33bb4cd | 2010-05-16 04:25:26 +0000 | [diff] [blame] | 29 | #include "audiohw.h" /* for the AUDIOHW_* defines */ |
Thomas Martitz | 19f44a6 | 2009-08-23 23:44:31 +0000 | [diff] [blame] | 30 | #include "statusbar.h" /* for the statusbar values */ |
Nils Wallménius | ff197a4 | 2009-10-28 20:41:34 +0000 | [diff] [blame] | 31 | #include "quickscreen.h" |
Thomas Martitz | d33bff2 | 2009-03-09 23:13:50 +0000 | [diff] [blame] | 32 | #include "button.h" |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 33 | #if CONFIG_CODEC == SWCODEC |
| 34 | #include "audio.h" |
Michael Sevakis | 56f17c4 | 2012-04-29 17:31:30 -0400 | [diff] [blame] | 35 | #include "dsp_proc_settings.h" |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 36 | #endif |
Thomas Martitz | 9c0b247 | 2010-08-01 16:15:27 +0000 | [diff] [blame] | 37 | #include "rbpaths.h" |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 38 | |
Stéphane Doyon | 0279c71 | 2007-10-10 01:41:48 +0000 | [diff] [blame] | 39 | struct opt_items { |
| 40 | unsigned const char* string; |
Nils Wallménius | acbd780 | 2007-11-20 19:50:52 +0000 | [diff] [blame] | 41 | int32_t voice_id; |
Stéphane Doyon | 0279c71 | 2007-10-10 01:41:48 +0000 | [diff] [blame] | 42 | }; |
| 43 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 44 | /** Setting values defines **/ |
Marianne Arnold | 28aa131 | 2007-02-03 10:52:57 +0000 | [diff] [blame] | 45 | #define MAX_FILENAME 32 |
Teruaki Kawashima | 2142628 | 2010-11-15 12:33:47 +0000 | [diff] [blame] | 46 | #define MAX_PATHNAME 80 |
Björn Stenberg | dea3122 | 2002-10-08 15:42:40 +0000 | [diff] [blame] | 47 | |
Solomon Peachy | bea9cf7 | 2018-10-30 09:43:32 -0400 | [diff] [blame] | 48 | /* The values are assigned to the enums so that they correspond to */ |
| 49 | /* setting values in settings_list.c */ |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 50 | |
Solomon Peachy | bea9cf7 | 2018-10-30 09:43:32 -0400 | [diff] [blame] | 51 | /* Shared by all bookmark parameters */ |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 52 | enum { |
Jeffrey Goode | 24bd492 | 2009-08-12 18:42:13 +0000 | [diff] [blame] | 53 | BOOKMARK_NO = 0, |
Solomon Peachy | bea9cf7 | 2018-10-30 09:43:32 -0400 | [diff] [blame] | 54 | BOOKMARK_YES = 1, |
| 55 | }; |
| 56 | |
| 57 | /* Auto create bookmark */ |
| 58 | enum { |
| 59 | BOOKMARK_ASK = 2, |
| 60 | BOOKMARK_RECENT_ONLY_YES = 3, |
| 61 | BOOKMARK_RECENT_ONLY_ASK = 4, |
| 62 | }; |
| 63 | |
| 64 | /* Most recent bookmark */ |
| 65 | enum { |
| 66 | BOOKMARK_ONE_PER_PLAYLIST = 2, |
| 67 | BOOKMARK_ONE_PER_TRACK = 3, |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 68 | }; |
Eric Linenberg | 7eb2711 | 2002-09-04 03:38:37 +0000 | [diff] [blame] | 69 | |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 70 | enum |
| 71 | { |
| 72 | TRIG_MODE_OFF = 0, |
| 73 | TRIG_MODE_NOREARM, |
| 74 | TRIG_MODE_REARM |
| 75 | }; |
Linus Nielsen Feltzing | 68482bb | 2005-04-04 09:12:12 +0000 | [diff] [blame] | 76 | |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 77 | enum |
| 78 | { |
| 79 | TRIG_TYPE_STOP = 0, |
| 80 | TRIG_TYPE_PAUSE, |
| 81 | TRIG_TYPE_NEW_FILE |
| 82 | }; |
Björn Stenberg | de5477c | 2003-09-29 21:26:53 +0000 | [diff] [blame] | 83 | |
Jeffrey Goode | 664dc90 | 2009-11-11 00:48:17 +0000 | [diff] [blame] | 84 | #ifdef HAVE_CROSSFADE |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 85 | enum { |
Teruaki Kawashima | 90ea3e9 | 2009-08-16 12:27:21 +0000 | [diff] [blame] | 86 | CROSSFADE_ENABLE_OFF = 0, |
Jeffrey Goode | 664dc90 | 2009-11-11 00:48:17 +0000 | [diff] [blame] | 87 | CROSSFADE_ENABLE_AUTOSKIP, |
| 88 | CROSSFADE_ENABLE_MANSKIP, |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 89 | CROSSFADE_ENABLE_SHUFFLE, |
Jeffrey Goode | 29d2711 | 2009-11-12 15:42:37 +0000 | [diff] [blame] | 90 | CROSSFADE_ENABLE_SHUFFLE_OR_MANSKIP, |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 91 | CROSSFADE_ENABLE_ALWAYS, |
| 92 | }; |
Jeffrey Goode | 664dc90 | 2009-11-11 00:48:17 +0000 | [diff] [blame] | 93 | #endif |
Miika Pekkarinen | 90161c9 | 2005-07-22 16:46:27 +0000 | [diff] [blame] | 94 | |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 95 | enum { |
Teruaki Kawashima | 90ea3e9 | 2009-08-16 12:27:21 +0000 | [diff] [blame] | 96 | FOLDER_ADVANCE_OFF = 0, |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 97 | FOLDER_ADVANCE_NEXT, |
| 98 | FOLDER_ADVANCE_RANDOM, |
Thomas Martitz | 6e5448d | 2009-08-07 00:59:22 +0000 | [diff] [blame] | 99 | }; |
Jonathan Gordon | 27ad51f | 2006-10-09 10:54:17 +0000 | [diff] [blame] | 100 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 101 | /* repeat mode options */ |
| 102 | enum |
| 103 | { |
Teruaki Kawashima | 90ea3e9 | 2009-08-16 12:27:21 +0000 | [diff] [blame] | 104 | REPEAT_OFF = 0, |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 105 | REPEAT_ALL, |
| 106 | REPEAT_ONE, |
| 107 | REPEAT_SHUFFLE, |
Daniel Stenberg | 7bcfc1d | 2007-02-17 22:26:14 +0000 | [diff] [blame] | 108 | #ifdef AB_REPEAT_ENABLE |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 109 | REPEAT_AB, |
| 110 | #endif |
| 111 | NUM_REPEAT_MODES |
| 112 | }; |
| 113 | |
Alexander Levin | 8589fcb | 2009-06-20 21:13:24 +0000 | [diff] [blame] | 114 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 115 | /* dir filter options */ |
| 116 | /* Note: Any new filter modes need to be added before NUM_FILTER_MODES. |
| 117 | * Any new rockbox browse filter modes (accessible through the menu) |
| 118 | * must be added after NUM_FILTER_MODES. */ |
| 119 | enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, SHOW_ID3DB, |
| 120 | NUM_FILTER_MODES, |
Jonathan Gordon | 1bd072c | 2010-05-12 10:38:00 +0000 | [diff] [blame] | 121 | SHOW_WPS, SHOW_RWPS, SHOW_FMS, SHOW_RFMS, SHOW_SBS, SHOW_RSBS, SHOW_FMR, SHOW_CFG, |
Teruaki Kawashima | e6b4d8f | 2010-12-15 12:47:30 +0000 | [diff] [blame] | 122 | SHOW_LNG, SHOW_MOD, SHOW_FONT, SHOW_PLUGINS, SHOW_M3U}; |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 123 | |
Nils Wallménius | 48b52ae | 2008-10-08 16:32:01 +0000 | [diff] [blame] | 124 | /* file and dir sort options */ |
| 125 | enum { SORT_ALPHA, SORT_DATE, SORT_DATE_REVERSED, SORT_TYPE, /* available as settings */ |
| 126 | SORT_ALPHA_REVERSED, SORT_TYPE_REVERSED }; /* internal use only */ |
Thomas Martitz | d13f1a4 | 2009-03-01 17:55:59 +0000 | [diff] [blame] | 127 | enum { SORT_INTERPRET_AS_DIGIT, SORT_INTERPRET_AS_NUMBER }; |
Nils Wallménius | 48b52ae | 2008-10-08 16:32:01 +0000 | [diff] [blame] | 128 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 129 | /* recursive dir insert options */ |
| 130 | enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK }; |
| 131 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 132 | /* show path types */ |
| 133 | enum { SHOW_PATH_OFF = 0, SHOW_PATH_CURRENT, SHOW_PATH_FULL }; |
| 134 | |
Alexander Levin | 07d0bfd | 2009-08-19 12:36:40 +0000 | [diff] [blame] | 135 | /* scrollbar visibility/position */ |
Tomer Shalev | 1acacc2 | 2009-10-05 18:11:41 +0000 | [diff] [blame] | 136 | enum { SCROLLBAR_OFF = 0, SCROLLBAR_LEFT, SCROLLBAR_RIGHT }; |
Alexander Levin | 07d0bfd | 2009-08-19 12:36:40 +0000 | [diff] [blame] | 137 | |
Michael Hohmuth | 7141ff4 | 2011-02-08 20:31:35 +0000 | [diff] [blame] | 138 | /* autoresume settings */ |
| 139 | enum { AUTORESUME_NEXTTRACK_NEVER = 0, AUTORESUME_NEXTTRACK_ALWAYS, |
| 140 | AUTORESUME_NEXTTRACK_CUSTOM}; |
| 141 | |
Jonathan Gordon | 9e554a8 | 2007-03-07 01:16:25 +0000 | [diff] [blame] | 142 | /* Alarm settings */ |
| 143 | #ifdef HAVE_RTC_ALARM |
| 144 | enum { ALARM_START_WPS = 0, |
| 145 | #if CONFIG_TUNER |
| 146 | ALARM_START_FM, |
| 147 | #endif |
| 148 | #ifdef HAVE_RECORDING |
| 149 | ALARM_START_REC, |
| 150 | #endif |
| 151 | ALARM_START_COUNT |
| 152 | }; |
| 153 | #if CONFIG_TUNER && defined(HAVE_RECORDING) |
| 154 | #define ALARM_SETTING_TEXT "wps,fm,rec" |
| 155 | #elif CONFIG_TUNER |
| 156 | #define ALARM_SETTING_TEXT "wps,fm" |
| 157 | #elif defined(HAVE_RECORDING) |
| 158 | #define ALARM_SETTING_TEXT "wps,rec" |
| 159 | #endif |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 160 | |
Jonathan Gordon | 9e554a8 | 2007-03-07 01:16:25 +0000 | [diff] [blame] | 161 | #endif /* HAVE_RTC_ALARM */ |
Michael Sevakis | 93572e2 | 2008-12-13 06:01:08 +0000 | [diff] [blame] | 162 | |
| 163 | /* Keyclick stuff */ |
| 164 | |
| 165 | /* Not really a setting but several files should stay synced */ |
| 166 | #define KEYCLICK_DURATION 2 |
| 167 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 168 | /** virtual pointer stuff.. move to another .h maybe? **/ |
Jörg Hohensohn | b1403ee | 2004-07-23 23:01:20 +0000 | [diff] [blame] | 169 | /* These define "virtual pointers", which could either be a literal string, |
| 170 | or a mean a string ID if the pointer is in a certain range. |
| 171 | This helps to save space for menus and options. */ |
| 172 | |
| 173 | #define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */ |
Michael Sparmann | 112bc15 | 2009-10-05 14:42:18 +0000 | [diff] [blame] | 174 | #if defined(CPU_S5L870X) |
| 175 | /* the S5L870X has IRAM at 0, so we use 0xffff bytes right after that */ |
| 176 | #define VIRT_PTR ((unsigned char*)0x40000) |
| 177 | #elif CONFIG_CPU==DM320 |
Catalin Patulea | 01ddb56 | 2007-11-02 02:50:02 +0000 | [diff] [blame] | 178 | /* the DM320 has IRAM at 0, so we use 0xffff bytes right after that */ |
| 179 | #define VIRT_PTR ((unsigned char*)0x4000) |
Jörg Hohensohn | b1403ee | 2004-07-23 23:01:20 +0000 | [diff] [blame] | 180 | #else |
| 181 | /* a location where we won't store strings, 0 is the fastest */ |
| 182 | #define VIRT_PTR ((unsigned char*)0) |
| 183 | #endif |
| 184 | |
| 185 | /* form a "virtual pointer" out of a language ID */ |
| 186 | #define ID2P(id) (VIRT_PTR + id) |
| 187 | |
| 188 | /* resolve a pointer which could be a virtualized ID or a literal */ |
Nils Wallménius | 01729e7 | 2008-08-15 08:27:39 +0000 | [diff] [blame] | 189 | #define P2STR(p) (char *)((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p) |
Jörg Hohensohn | b1403ee | 2004-07-23 23:01:20 +0000 | [diff] [blame] | 190 | |
| 191 | /* get the string ID from a virtual pointer, -1 if not virtual */ |
Nils Wallménius | 01729e7 | 2008-08-15 08:27:39 +0000 | [diff] [blame] | 192 | #define P2ID(p) ((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1) |
Jörg Hohensohn | b1403ee | 2004-07-23 23:01:20 +0000 | [diff] [blame] | 193 | |
Rani Hod | cc839a2 | 2006-07-31 19:13:21 +0000 | [diff] [blame] | 194 | /* !defined(HAVE_LCD_COLOR) implies HAVE_LCD_CONTRAST with default 40. |
| 195 | Explicitly define HAVE_LCD_CONTRAST in config file for newer ports for |
| 196 | simplicity. */ |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 197 | |
| 198 | |
| 199 | |
| 200 | /** function prototypes **/ |
| 201 | |
| 202 | /* argument bits for settings_load() */ |
Thomas Martitz | 40b0920 | 2009-08-07 00:56:39 +0000 | [diff] [blame] | 203 | #define SETTINGS_RTC (BIT_N(0)) /* only the settings from the RTC nonvolatile RAM */ |
| 204 | #define SETTINGS_HD (BIT_N(1)) /* only the settings from the disk sector */ |
| 205 | #define SETTINGS_ALL (SETTINGS_RTC|SETTINGS_HD) /* both */ |
Boris Gjenero | fdc29d0 | 2011-12-19 20:12:52 +0000 | [diff] [blame] | 206 | void settings_load(int which) INIT_ATTR; |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 207 | bool settings_load_config(const char* file, bool apply); |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 208 | |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 209 | void status_save(void); |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 210 | int settings_save(void); |
Mihail Zenkov | 6228c8d | 2016-03-30 22:25:24 +0000 | [diff] [blame] | 211 | void reset_runtime(void); |
Jonathan Gordon | f0d2861 | 2007-02-01 13:57:14 +0000 | [diff] [blame] | 212 | /* defines for the options paramater */ |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 213 | enum { |
| 214 | SETTINGS_SAVE_CHANGED = 0, |
| 215 | SETTINGS_SAVE_ALL, |
| 216 | SETTINGS_SAVE_THEME, |
Jonathan Gordon | b8bc45d | 2007-12-24 22:35:31 +0000 | [diff] [blame] | 217 | SETTINGS_SAVE_SOUND, |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 218 | #ifdef HAVE_RECORDING |
| 219 | SETTINGS_SAVE_RECPRESETS, |
| 220 | #endif |
Dan Everton | 5886efa | 2007-12-07 10:59:07 +0000 | [diff] [blame] | 221 | #if CONFIG_CODEC == SWCODEC |
| 222 | SETTINGS_SAVE_EQPRESET, |
| 223 | #endif |
Jonathan Gordon | 9adf056 | 2007-05-29 04:39:11 +0000 | [diff] [blame] | 224 | }; |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 225 | bool settings_save_config(int options); |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 226 | |
Stéphane Doyon | b2aa86a | 2008-04-20 14:12:28 +0000 | [diff] [blame] | 227 | struct settings_list; |
| 228 | void reset_setting(const struct settings_list *setting, void *var); |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 229 | void settings_reset(void); |
| 230 | void sound_settings_apply(void); |
Thomas Martitz | c426628 | 2009-08-16 20:12:17 +0000 | [diff] [blame] | 231 | |
Wieland Hoffmann | c5f772c | 2011-09-20 19:43:55 +0200 | [diff] [blame] | 232 | /* call this after loading a .wps/.rwps or other skin files, so that the |
Thomas Martitz | c426628 | 2009-08-16 20:12:17 +0000 | [diff] [blame] | 233 | * skin buffer is reset properly |
| 234 | */ |
| 235 | void settings_apply_skins(void); |
| 236 | |
Magnus Holmgren | a14f4ac | 2010-03-06 12:14:12 +0000 | [diff] [blame] | 237 | void settings_apply(bool read_disk); |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 238 | void settings_apply_pm_range(void); |
| 239 | void settings_display(void); |
| 240 | |
| 241 | enum optiontype { INT, BOOL }; |
| 242 | |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 243 | const struct settings_list* find_setting(const void* variable, int *id); |
Jonathan Gordon | 8997321 | 2011-09-04 13:17:09 +0000 | [diff] [blame] | 244 | const struct settings_list* find_setting_by_cfgname(const char* name, int *id); |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 245 | bool cfg_int_to_string(int setting_id, int val, char* buf, int buf_len); |
Bertrik Sikken | 204a2e9 | 2011-04-17 11:23:48 +0000 | [diff] [blame] | 246 | bool cfg_string_to_int(int setting_id, int* out, const char* str); |
Antoine Cellerier | 3ad5350 | 2008-12-07 16:19:25 +0000 | [diff] [blame] | 247 | bool cfg_to_string(int setting_id, char* buf, int buf_len); |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 248 | bool set_bool_options(const char* string, const bool* variable, |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 249 | const char* yes_str, int yes_voice, |
| 250 | const char* no_str, int no_voice, |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 251 | void (*function)(bool)); |
| 252 | |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 253 | bool set_bool(const char* string, const bool* variable); |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 254 | bool set_int(const unsigned char* string, const char* unit, int voice_unit, |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 255 | const int* variable, |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 256 | void (*function)(int), int step, int min, int max, |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 257 | const char* (*formatter)(char*, size_t, int, const char*) ); |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 258 | |
Jonathan Gordon | fb62831 | 2007-02-12 14:22:35 +0000 | [diff] [blame] | 259 | /* use this one if you need to create a lang from the value (i.e with TALK_ID()) */ |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 260 | bool set_int_ex(const unsigned char* string, const char* unit, int voice_unit, |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 261 | const int* variable, |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 262 | void (*function)(int), int step, int min, int max, |
Nils Wallménius | 3200d04 | 2009-08-20 16:47:44 +0000 | [diff] [blame] | 263 | const char* (*formatter)(char*, size_t, int, const char*), |
Jens Arnold | 09a7861 | 2007-11-26 23:10:20 +0000 | [diff] [blame] | 264 | int32_t (*get_talk_id)(int, int)); |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 265 | |
Thomas Martitz | a3e6a86 | 2010-07-25 22:45:57 +0000 | [diff] [blame] | 266 | void set_file(const char* filename, char* setting, const int maxlen); |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 267 | |
Steve Bavin | 135cc75 | 2008-03-28 12:51:33 +0000 | [diff] [blame] | 268 | bool set_option(const char* string, const void* variable, enum optiontype type, |
| 269 | const struct opt_items* options, int numoptions, void (*function)(int)); |
Steve Bavin | cd88e2a | 2008-03-25 15:24:03 +0000 | [diff] [blame] | 270 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 271 | |
| 272 | |
| 273 | /** global_settings and global_status struct definitions **/ |
| 274 | |
Jonathan Gordon | 228d62d | 2007-01-24 02:19:22 +0000 | [diff] [blame] | 275 | struct system_status |
| 276 | { |
| 277 | int resume_index; /* index in playlist (-1 for no active resume) */ |
Richard Quirk | 212e780 | 2012-12-09 21:04:17 +0100 | [diff] [blame] | 278 | uint32_t resume_crc32; /* crc32 of the name of the file */ |
Michael Sevakis | 31b7122 | 2013-07-14 07:59:39 -0400 | [diff] [blame] | 279 | uint32_t resume_elapsed; /* elapsed time in last file */ |
Jonathan Gordon | 228d62d | 2007-01-24 02:19:22 +0000 | [diff] [blame] | 280 | uint32_t resume_offset; /* byte offset in mp3 file */ |
Jonathan Gordon | 228d62d | 2007-01-24 02:19:22 +0000 | [diff] [blame] | 281 | int runtime; /* current runtime since last charge */ |
| 282 | int topruntime; /* top known runtime */ |
| 283 | #ifdef HAVE_DIRCACHE |
| 284 | int dircache_size; /* directory cache structure last size, 22 bits */ |
| 285 | #endif |
Jens Arnold | c652218 | 2007-02-18 08:46:12 +0000 | [diff] [blame] | 286 | #if CONFIG_TUNER |
Jonathan Gordon | 228d62d | 2007-01-24 02:19:22 +0000 | [diff] [blame] | 287 | int last_frequency; /* Last frequency for resuming, in FREQ_STEP units, |
| 288 | relative to MIN_FREQ */ |
| 289 | #endif |
Jonathan Gordon | ee0111a | 2008-11-03 09:40:45 +0000 | [diff] [blame] | 290 | signed char last_screen; |
Jonathan Gordon | 9d3694c | 2007-04-22 08:50:24 +0000 | [diff] [blame] | 291 | int viewer_icon_count; |
Jonathan Gordon | 235d1ae | 2009-11-01 02:36:51 +0000 | [diff] [blame] | 292 | int last_volume_change; /* tick the last volume change happened. skins use this */ |
Jonathan Gordon | aa0f4a4 | 2011-09-24 13:19:34 +0000 | [diff] [blame] | 293 | #ifdef HAVE_LCD_BITMAP |
| 294 | int font_id[NB_SCREENS]; /* font id of the settings font for each screen */ |
| 295 | #endif |
Michael Sevakis | 31b7122 | 2013-07-14 07:59:39 -0400 | [diff] [blame] | 296 | |
Jonathan Gordon | 228d62d | 2007-01-24 02:19:22 +0000 | [diff] [blame] | 297 | }; |
Michael Sevakis | eed62f1 | 2007-02-07 04:24:21 +0000 | [diff] [blame] | 298 | |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 299 | struct user_settings |
| 300 | { |
| 301 | /* audio settings */ |
| 302 | |
Nils Wallménius | fedc7dc | 2007-11-18 16:45:58 +0000 | [diff] [blame] | 303 | int volume; /* audio output volume in decibels range depends on the dac */ |
Udo Schläpfer | dbabd0d | 2015-02-02 21:44:29 +0100 | [diff] [blame] | 304 | int balance; /* stereo balance: -100 - +100 -100=left 0=bal +100=right */ |
Nils Wallménius | fedc7dc | 2007-11-18 16:45:58 +0000 | [diff] [blame] | 305 | int bass; /* bass boost/cut in decibels */ |
| 306 | int treble; /* treble boost/cut in decibels */ |
Jens Arnold | 76b257f | 2005-01-12 00:24:15 +0000 | [diff] [blame] | 307 | int channel_config; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */ |
| 308 | int stereo_width; /* 0-255% */ |
Nils Wallménius | fedc7dc | 2007-11-18 16:45:58 +0000 | [diff] [blame] | 309 | |
| 310 | #if CONFIG_CODEC != SWCODEC |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 311 | int loudness; /* loudness eq: 0-100 0=off 100=max */ |
| 312 | int avc; /* auto volume correct: 0=off, 1=20ms, 2=2s 3=4s 4=8s */ |
| 313 | int mdb_strength; /* 0-127dB */ |
| 314 | int mdb_harmonics; /* 0-100% */ |
| 315 | int mdb_center; /* 20-300Hz */ |
| 316 | int mdb_shape; /* 50-300Hz */ |
| 317 | bool mdb_enable; /* true/false */ |
| 318 | bool superbass; /* true/false */ |
Nils Wallménius | fedc7dc | 2007-11-18 16:45:58 +0000 | [diff] [blame] | 319 | #endif |
Linus Nielsen Feltzing | afe0da9 | 2002-11-10 23:18:33 +0000 | [diff] [blame] | 320 | |
Michael Sevakis | e73a175 | 2010-05-15 14:16:35 +0000 | [diff] [blame] | 321 | #ifdef AUDIOHW_HAVE_BASS_CUTOFF |
Dan Everton | d7e1f77 | 2007-11-24 07:51:00 +0000 | [diff] [blame] | 322 | int bass_cutoff; |
Michael Sevakis | e73a175 | 2010-05-15 14:16:35 +0000 | [diff] [blame] | 323 | #endif |
| 324 | #ifdef AUDIOHW_HAVE_TREBLE_CUTOFF |
Dan Everton | d7e1f77 | 2007-11-24 07:51:00 +0000 | [diff] [blame] | 325 | int treble_cutoff; |
| 326 | #endif |
| 327 | |
Jens Arnold | d6c0545 | 2005-08-29 21:15:27 +0000 | [diff] [blame] | 328 | #if CONFIG_CODEC == SWCODEC |
Jeffrey Goode | 9e09534 | 2009-11-10 03:46:08 +0000 | [diff] [blame] | 329 | #ifdef HAVE_CROSSFADE |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 330 | /* Crossfade */ |
| 331 | int crossfade; /* Enable crossfade (0=off, 1=shuffle, 2=trackskip, |
| 332 | 3=shuff&trackskip, 4=always) */ |
Miika Pekkarinen | e7461b3 | 2005-11-06 16:40:20 +0000 | [diff] [blame] | 333 | int crossfade_fade_in_delay; /* Fade in delay (0-15s) */ |
| 334 | int crossfade_fade_out_delay; /* Fade out delay (0-15s) */ |
| 335 | int crossfade_fade_in_duration; /* Fade in duration (0-15s) */ |
| 336 | int crossfade_fade_out_duration; /* Fade out duration (0-15s) */ |
| 337 | int crossfade_fade_out_mixmode; /* Fade out mode (0=crossfade,1=mix) */ |
Jeffrey Goode | 9e09534 | 2009-11-10 03:46:08 +0000 | [diff] [blame] | 338 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 339 | |
| 340 | /* Replaygain */ |
Michael Sevakis | 57a20d2 | 2012-04-30 16:27:01 -0400 | [diff] [blame] | 341 | struct replaygain_settings replaygain_settings; |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 342 | |
| 343 | /* Crossfeed */ |
Bertrik Sikken | afc9608 | 2012-05-01 03:58:27 -0400 | [diff] [blame] | 344 | int crossfeed; /* crossfeed type */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 345 | unsigned int crossfeed_direct_gain; /* dB x 10 */ |
| 346 | unsigned int crossfeed_cross_gain; /* dB x 10 */ |
| 347 | unsigned int crossfeed_hf_attenuation; /* dB x 10 */ |
| 348 | unsigned int crossfeed_hf_cutoff; /* Frequency in Hz */ |
| 349 | |
| 350 | /* EQ */ |
| 351 | bool eq_enabled; /* Enable equalizer */ |
| 352 | unsigned int eq_precut; /* dB */ |
Michael Sevakis | c9bcbe2 | 2012-03-27 19:52:15 -0400 | [diff] [blame] | 353 | struct eq_band_setting eq_band_settings[EQ_NUM_BANDS]; /* for each band */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 354 | |
| 355 | /* Misc. swcodec */ |
| 356 | int beep; /* system beep volume when changing tracks etc. */ |
| 357 | int keyclick; /* keyclick volume */ |
| 358 | int keyclick_repeats; /* keyclick on repeats */ |
| 359 | bool dithering_enabled; |
Nils Wallménius | d29a11b | 2012-05-08 16:34:26 +0200 | [diff] [blame] | 360 | #ifdef HAVE_PITCHCONTROL |
Steve Bavin | fb23807 | 2009-06-12 07:20:50 +0000 | [diff] [blame] | 361 | bool timestretch_enabled; |
Frank Gevaerts | f366090 | 2010-09-17 20:28:47 +0000 | [diff] [blame] | 362 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 363 | #endif /* CONFIG_CODEC == SWCODEC */ |
| 364 | |
Jonathan Gordon | 415e9d7 | 2007-07-10 07:41:37 +0000 | [diff] [blame] | 365 | #ifdef HAVE_RECORDING |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 366 | #if CONFIG_CODEC == SWCODEC |
| 367 | int rec_format; /* record format index */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 368 | int rec_mono_mode; /* how to create mono: L, R, L+R */ |
| 369 | |
| 370 | /* Encoder Settings Start - keep these together */ |
| 371 | struct mp3_enc_config mp3_enc_config; |
| 372 | #if 0 /* These currently contain no members but their places in line |
| 373 | should be held */ |
| 374 | struct aiff_enc_config aiff_enc_config; |
| 375 | struct wav_enc_config wav_enc_config; |
| 376 | struct wavpack_enc_config wavpack_enc_config; |
| 377 | #endif |
| 378 | /* Encoder Settings End */ |
| 379 | |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 380 | #else |
Linus Nielsen Feltzing | afe0da9 | 2002-11-10 23:18:33 +0000 | [diff] [blame] | 381 | int rec_quality; /* 0-7 */ |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 382 | #endif /* CONFIG_CODEC == SWCODEC */ |
| 383 | int rec_source; /* 0=mic, 1=line, 2=S/PDIF, 2 or 3=FM Radio */ |
| 384 | int rec_frequency; /* 0 = 44.1kHz (depends on target) |
Linus Nielsen Feltzing | afe0da9 | 2002-11-10 23:18:33 +0000 | [diff] [blame] | 385 | 1 = 48kHz |
| 386 | 2 = 32kHz |
| 387 | 3 = 22.05kHz |
| 388 | 4 = 24kHz |
| 389 | 5 = 16kHz */ |
| 390 | int rec_channels; /* 0=Stereo, 1=Mono */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 391 | |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 392 | int rec_mic_gain; /* depends on target */ |
| 393 | int rec_left_gain; /* depends on target */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 394 | int rec_right_gain; /* depends on target */ |
| 395 | bool peak_meter_clipcounter; /* clipping count indicator */ |
Linus Nielsen Feltzing | 478da62 | 2003-04-20 22:00:30 +0000 | [diff] [blame] | 396 | bool rec_editable; /* true means that the bit reservoir is off */ |
Björn Stenberg | 56f771e | 2003-06-04 13:48:50 +0000 | [diff] [blame] | 397 | |
| 398 | /* note: timesplit setting is not saved */ |
William Wilgus | a06d9c8 | 2018-12-17 22:27:55 -0600 | [diff] [blame] | 399 | int rec_timesplit; /* IN MINUTES 0 = off */ |
Martin Scarratt | 9130a2a | 2006-07-22 17:23:05 +0000 | [diff] [blame] | 400 | int rec_sizesplit; /* 0 = off, |
| 401 | 1 = 5MB, 2 = 10MB, 3 = 15MB, 4 = 32MB |
| 402 | 5 = 64MB, 6 = 75MB, 7 = 100MB, 8 = 128MB |
| 403 | 9 = 256MB, 10= 512MB, 11= 650MB, 12= 700MB, |
| 404 | 13= 1GB, 14 = 1.5GB 15 = 1.75MB*/ |
| 405 | int rec_split_type; /* split/stop */ |
| 406 | int rec_split_method; /* time/filesize */ |
Jens Arnold | fa9dee0 | 2006-09-18 12:41:12 +0000 | [diff] [blame] | 407 | |
Linus Nielsen Feltzing | 74976c1 | 2003-12-31 03:13:29 +0000 | [diff] [blame] | 408 | int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */ |
Teruaki Kawashima | 2142628 | 2010-11-15 12:33:47 +0000 | [diff] [blame] | 409 | char rec_directory[MAX_PATHNAME+1]; |
Peter D'Hoye | 3467ba6 | 2006-02-17 22:47:56 +0000 | [diff] [blame] | 410 | int cliplight; /* 0 = off |
| 411 | 1 = main lcd |
| 412 | 2 = main and remote lcd |
| 413 | 3 = remote lcd */ |
Steve Bavin | ea358a1 | 2008-01-21 09:48:44 +0000 | [diff] [blame] | 414 | |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 415 | int rec_start_thres_db; |
| 416 | int rec_start_thres_linear; |
Linus Nielsen Feltzing | 68482bb | 2005-04-04 09:12:12 +0000 | [diff] [blame] | 417 | int rec_start_duration; /* index of trig_durations */ |
Jonathan Gordon | ff469ab | 2008-05-28 10:55:39 +0000 | [diff] [blame] | 418 | int rec_stop_thres_db; |
| 419 | int rec_stop_thres_linear; |
| 420 | int rec_stop_postrec; |
Linus Nielsen Feltzing | 68482bb | 2005-04-04 09:12:12 +0000 | [diff] [blame] | 421 | int rec_stop_gap; /* index of trig_durations */ |
| 422 | int rec_trigger_mode; /* see TRIG_MODE_XXX constants */ |
Martin Scarratt | d8103f3 | 2006-11-09 12:27:56 +0000 | [diff] [blame] | 423 | int rec_trigger_type; /* what to do when trigger released */ |
Peter D'Hoye | 82f4c60 | 2011-06-05 12:36:27 +0000 | [diff] [blame] | 424 | #ifdef HAVE_HISTOGRAM |
| 425 | int histogram_interval; /* recording peakmeter histogram */ |
Peter D'Hoye | be90f74 | 2010-03-03 22:16:08 +0000 | [diff] [blame] | 426 | #endif |
Linus Nielsen Feltzing | 68482bb | 2005-04-04 09:12:12 +0000 | [diff] [blame] | 427 | |
Peter D'Hoye | 5fc66e5 | 2006-08-16 23:26:55 +0000 | [diff] [blame] | 428 | #ifdef HAVE_AGC |
| 429 | int rec_agc_preset_mic; /* AGC mic preset modes: |
| 430 | 0 = Off |
| 431 | 1 = Safety (clip) |
| 432 | 2 = Live (slow) |
| 433 | 3 = DJ-Set (slow) |
| 434 | 4 = Medium |
| 435 | 5 = Voice (fast) */ |
| 436 | int rec_agc_preset_line; /* AGC line-in preset modes: |
| 437 | 0 = Off |
| 438 | 1 = Safety (clip) |
| 439 | 2 = Live (slow) |
| 440 | 3 = DJ-Set (slow) |
| 441 | 4 = Medium |
| 442 | 5 = Voice (fast) */ |
| 443 | int rec_agc_maxgain_mic; /* AGC maximum mic gain */ |
| 444 | int rec_agc_maxgain_line; /* AGC maximum line-in gain */ |
| 445 | int rec_agc_cliptime; /* 0.2, 0.4, 0.6, 0.8, 1s */ |
| 446 | #endif |
Jonathan Gordon | 415e9d7 | 2007-07-10 07:41:37 +0000 | [diff] [blame] | 447 | #endif /* HAVE_RECORDING */ |
Jens Arnold | ec9b202 | 2005-09-10 12:28:16 +0000 | [diff] [blame] | 448 | |
Jens Arnold | c652218 | 2007-02-18 08:46:12 +0000 | [diff] [blame] | 449 | #if CONFIG_TUNER |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 450 | int fm_region; |
| 451 | bool fm_force_mono; /* Forces Mono mode if true */ |
Hristo Kovachev | 009853f | 2006-04-02 12:23:08 +0000 | [diff] [blame] | 452 | unsigned char fmr_file[MAX_FILENAME+1]; /* last fmr preset */ |
Jonathan Gordon | 1bd072c | 2010-05-12 10:38:00 +0000 | [diff] [blame] | 453 | unsigned char fms_file[MAX_FILENAME+1]; /* last fms */ |
| 454 | #ifdef HAVE_REMOTE_LCD |
| 455 | unsigned char rfms_file[MAX_FILENAME+1]; /* last remote-fms */ |
Hristo Kovachev | 009853f | 2006-04-02 12:23:08 +0000 | [diff] [blame] | 456 | #endif |
Jonathan Gordon | 1bd072c | 2010-05-12 10:38:00 +0000 | [diff] [blame] | 457 | #endif /* CONFIG_TUNER */ |
Martin Scarratt | 22e7e94 | 2006-09-27 21:36:50 +0000 | [diff] [blame] | 458 | |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 459 | /* misc options */ |
Thomas Martitz | fd14cac | 2009-03-02 19:25:50 +0000 | [diff] [blame] | 460 | #ifndef HAVE_WHEEL_ACCELERATION |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 461 | int list_accel_start_delay; /* ms before we start increaseing step size */ |
| 462 | int list_accel_wait; /* ms between increases */ |
| 463 | #endif |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 464 | |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 465 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING |
| 466 | int touchpad_sensitivity; |
| 467 | #endif |
| 468 | |
Amaury Pouly | 8146b40 | 2013-12-01 18:25:42 +0000 | [diff] [blame] | 469 | #ifdef HAVE_TOUCHPAD_DEADZONE |
| 470 | int touchpad_deadzone; |
| 471 | #endif |
| 472 | |
Michael Hohmuth | 5aec3c2 | 2011-05-13 22:28:47 +0000 | [diff] [blame] | 473 | int pause_rewind; /* time in s to rewind when pausing */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 474 | #ifdef HAVE_HEADPHONE_DETECTION |
| 475 | int unplug_mode; /* pause on headphone unplug */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 476 | bool unplug_autoresume; /* disable auto-resume if no phones */ |
| 477 | #endif |
| 478 | |
| 479 | #ifdef HAVE_QUICKSCREEN |
Nils Wallménius | ff197a4 | 2009-10-28 20:41:34 +0000 | [diff] [blame] | 480 | int qs_items[QUICKSCREEN_ITEM_COUNT]; |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 481 | #endif |
| 482 | |
Markus Braun | 22a7a2d | 2002-10-14 12:50:20 +0000 | [diff] [blame] | 483 | int timeformat; /* time format: 0=24 hour clock, 1=12 hour clock */ |
Nils Wallménius | 0bfa3e7 | 2007-08-01 08:50:44 +0000 | [diff] [blame] | 484 | |
Frank Gevaerts | 4657301 | 2008-10-07 19:37:33 +0000 | [diff] [blame] | 485 | #ifdef HAVE_DISK_STORAGE |
Björn Stenberg | 457b8a0 | 2002-08-26 13:21:14 +0000 | [diff] [blame] | 486 | int disk_spindown; /* time until disk spindown, in seconds (0=off) */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 487 | int buffer_margin; /* audio buffer watermark margin, in seconds */ |
Nils Wallménius | 0bfa3e7 | 2007-08-01 08:50:44 +0000 | [diff] [blame] | 488 | #endif |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 489 | |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 490 | int dirfilter; /* 0=display all, 1=only supported, 2=only music, |
| 491 | 3=dirs+playlists, 4=ID3 database */ |
| 492 | int show_filename_ext; /* show filename extensions in file browser? |
| 493 | 0 = no, 1 = yes, 2 = only unknown 0 */ |
| 494 | int default_codepage; /* set default codepage for tag conversion */ |
| 495 | bool hold_lr_for_scroll_in_list; /* hold L/R scrolls the list left/right */ |
| 496 | bool play_selected; /* Plays selected file even in shuffle mode */ |
| 497 | bool party_mode; /* party mode - unstoppable music */ |
| 498 | bool audioscrobbler; /* Audioscrobbler logging */ |
| 499 | bool cuesheet; |
| 500 | bool car_adapter_mode; /* 0=off 1=on */ |
Solomon Peachy | 0a6cad7 | 2019-01-01 21:05:13 -0500 | [diff] [blame] | 501 | int car_adapter_mode_delay; /* delay before resume, in seconds*/ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 502 | int start_in_screen; |
| 503 | #if defined(HAVE_RTC_ALARM) && \ |
| 504 | (defined(HAVE_RECORDING) || CONFIG_TUNER) |
| 505 | int alarm_wake_up_screen; |
| 506 | #endif |
| 507 | int ff_rewind_min_step; /* FF/Rewind minimum step size */ |
| 508 | int ff_rewind_accel; /* FF/Rewind acceleration (in seconds per doubling) */ |
| 509 | |
Linus Nielsen Feltzing | bb572c4 | 2002-09-27 09:31:31 +0000 | [diff] [blame] | 510 | int peak_meter_release; /* units per read out */ |
| 511 | int peak_meter_hold; /* hold time for peak meter in 1/100 s */ |
| 512 | int peak_meter_clip_hold; /* hold time for clips */ |
Linus Nielsen Feltzing | fd0cc3b | 2002-10-29 12:09:15 +0000 | [diff] [blame] | 513 | bool peak_meter_dbfs; /* show linear or dbfs values */ |
Björn Stenberg | 9c16e12 | 2003-02-14 14:14:55 +0000 | [diff] [blame] | 514 | int peak_meter_min; /* range minimum */ |
| 515 | int peak_meter_max; /* range maximum */ |
Linus Nielsen Feltzing | bb572c4 | 2002-09-27 09:31:31 +0000 | [diff] [blame] | 516 | |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 517 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ |
Thomas Martitz | 1016ee4 | 2009-10-19 15:28:15 +0000 | [diff] [blame] | 518 | #ifdef HAVE_LCD_BITMAP |
| 519 | unsigned char sbs_file[MAX_FILENAME+1]; /* last statusbar skin */ |
| 520 | #endif |
| 521 | #ifdef HAVE_REMOTE_LCD |
| 522 | unsigned char rwps_file[MAX_FILENAME+1]; /* last remote-wps */ |
| 523 | unsigned char rsbs_file[MAX_FILENAME+1]; /* last remote statusbar skin */ |
| 524 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 525 | unsigned char lang_file[MAX_FILENAME+1]; /* last language */ |
Teruaki Kawashima | 2142628 | 2010-11-15 12:33:47 +0000 | [diff] [blame] | 526 | unsigned char playlist_catalog_dir[MAX_PATHNAME+1]; |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 527 | int skip_length; /* skip length */ |
| 528 | int max_files_in_dir; /* Max entries in directory (file browser) */ |
| 529 | int max_files_in_playlist; /* Max entries in playlist */ |
| 530 | int volume_type; /* how volume is displayed: 0=graphic, 1=percent */ |
| 531 | int battery_display; /* how battery is displayed: 0=graphic, 1=percent */ |
| 532 | bool show_icons; /* 0=hide 1=show */ |
Andrew Mahone | 9b6d3d7 | 2009-11-07 01:26:22 +0000 | [diff] [blame] | 533 | int statusbar; /* STATUSBAR_* enum values */ |
Jonathan Gordon | f1034e0 | 2009-07-05 18:07:58 +0000 | [diff] [blame] | 534 | #ifdef HAVE_REMOTE_LCD |
Andrew Mahone | 9b6d3d7 | 2009-11-07 01:26:22 +0000 | [diff] [blame] | 535 | int remote_statusbar; |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 536 | #endif |
Daniel Stenberg | 053d904 | 2002-08-22 15:47:30 +0000 | [diff] [blame] | 537 | |
Nils Wallménius | fedc7dc | 2007-11-18 16:45:58 +0000 | [diff] [blame] | 538 | #if CONFIG_KEYPAD == RECORDER_PAD |
Linus Nielsen Feltzing | 77936e6 | 2004-03-16 13:44:56 +0000 | [diff] [blame] | 539 | bool buttonbar; /* 0=hide, 1=show */ |
Nils Wallménius | fedc7dc | 2007-11-18 16:45:58 +0000 | [diff] [blame] | 540 | #endif |
Linus Nielsen Feltzing | 77936e6 | 2004-03-16 13:44:56 +0000 | [diff] [blame] | 541 | |
Alexander Levin | 07d0bfd | 2009-08-19 12:36:40 +0000 | [diff] [blame] | 542 | #ifdef HAVE_LCD_BITMAP |
| 543 | int scrollbar; /* SCROLLBAR_* enum values */ |
| 544 | int scrollbar_width; |
Alexander Levin | 07d0bfd | 2009-08-19 12:36:40 +0000 | [diff] [blame] | 545 | |
Thomas Martitz | 3b12634 | 2011-10-17 17:38:10 +0000 | [diff] [blame] | 546 | #ifdef HAVE_TOUCHSCREEN |
| 547 | int list_line_padding; |
| 548 | #endif |
Thomas Martitz | 05a67d0 | 2013-05-06 07:20:40 +0200 | [diff] [blame] | 549 | #if LCD_DEPTH > 1 |
| 550 | int list_separator_height; /* -1=auto (== 1 currently), 0=disabled, X=height in pixels */ |
| 551 | int list_separator_color; |
| 552 | #endif |
| 553 | #endif |
Eric Linenberg | ecca123 | 2002-09-09 14:25:39 +0000 | [diff] [blame] | 554 | /* goto current song when exiting WPS */ |
| 555 | bool browse_current; /* 1=goto current song, |
| 556 | 0=goto previous location */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 557 | bool scroll_paginated; /* 0=dont 1=do */ |
| 558 | int scroll_speed; /* long texts scrolling speed: 1-30 */ |
| 559 | int bidir_limit; /* bidir scroll length limit */ |
| 560 | int scroll_delay; /* delay (in 1/10s) before starting scroll */ |
| 561 | int scroll_step; /* pixels to advance per update */ |
Björn Stenberg | a108ec2 | 2004-01-14 00:13:04 +0000 | [diff] [blame] | 562 | |
| 563 | /* auto bookmark settings */ |
| 564 | int autoloadbookmark; /* auto load option: 0=off, 1=ask, 2=on */ |
| 565 | int autocreatebookmark; /* auto create option: 0=off, 1=ask, 2=on */ |
Torne Wuff | db1b823 | 2010-07-05 16:39:00 +0000 | [diff] [blame] | 566 | bool autoupdatebookmark;/* auto update option */ |
Solomon Peachy | bea9cf7 | 2018-10-30 09:43:32 -0400 | [diff] [blame] | 567 | int usemrb; /* use MRB list: 0=No, 1=Yes, 2=One per playlist, |
| 568 | 3=One per playlist and track */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 569 | |
| 570 | #ifdef HAVE_DIRCACHE |
| 571 | bool dircache; /* enable directory cache */ |
Kjell Ericson | 53f156a | 2003-05-22 06:42:14 +0000 | [diff] [blame] | 572 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 573 | #ifdef HAVE_TAGCACHE |
| 574 | #ifdef HAVE_TC_RAMCACHE |
| 575 | bool tagcache_ram; /* load tagcache to ram? */ |
| 576 | #endif |
| 577 | bool tagcache_autoupdate; /* automatically keep tagcache in sync? */ |
Alexander Levin | f8f91d0 | 2011-01-02 22:39:05 +0000 | [diff] [blame] | 578 | bool autoresume_enable; /* enable auto-resume feature? */ |
Michael Hohmuth | 7141ff4 | 2011-02-08 20:31:35 +0000 | [diff] [blame] | 579 | int autoresume_automatic; /* resume next track? 0=never, 1=always, |
| 580 | 2=custom */ |
Michael Hohmuth | a530376 | 2011-02-11 00:20:03 +0000 | [diff] [blame] | 581 | unsigned char autoresume_paths[MAX_PATHNAME+1]; /* colon-separated list */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 582 | bool runtimedb; /* runtime database active? */ |
Thomas Martitz | 63d2762 | 2012-07-18 23:36:57 +0200 | [diff] [blame] | 583 | unsigned char tagcache_scan_paths[MAX_PATHNAME+1]; |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 584 | #endif /* HAVE_TAGCACHE */ |
| 585 | |
| 586 | #if LCD_DEPTH > 1 |
Frank Gevaerts | d09f978 | 2011-04-10 13:25:47 +0000 | [diff] [blame] | 587 | unsigned char backdrop_file[MAX_PATHNAME+1]; /* backdrop bitmap file */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 588 | #endif |
| 589 | |
| 590 | #ifdef HAVE_LCD_COLOR |
| 591 | int bg_color; /* background color native format */ |
| 592 | int fg_color; /* foreground color native format */ |
| 593 | int lss_color; /* background color for the selector or start color for the gradient */ |
| 594 | int lse_color; /* end color for the selector gradient */ |
| 595 | int lst_color; /* color of the text for the selector */ |
| 596 | unsigned char colors_file[MAX_FILENAME+1]; |
| 597 | #endif |
| 598 | |
| 599 | /* playlist/playback settings */ |
| 600 | int repeat_mode; /* 0=off 1=repeat all 2=repeat one 3=shuffle 4=ab */ |
| 601 | int next_folder; /* move to next folder */ |
Nick Peskett | be10817 | 2012-03-19 09:56:38 +0000 | [diff] [blame] | 602 | bool constrain_next_folder; /* whether next_folder is constrained to |
| 603 | directories within start_directory */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 604 | int recursive_dir_insert; /* should directories be inserted recursively */ |
Björn Stenberg | e2628d9 | 2003-02-14 15:54:52 +0000 | [diff] [blame] | 605 | bool fade_on_stop; /* fade on pause/unpause/stop */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 606 | bool playlist_shuffle; |
| 607 | bool warnon_erase_dynplaylist; /* warn when erasing dynamic playlist */ |
Hardeep Sidhu | 107ebc5 | 2004-01-26 17:05:21 +0000 | [diff] [blame] | 608 | |
| 609 | /* playlist viewer settings */ |
| 610 | bool playlist_viewer_icons; /* display icons on viewer */ |
| 611 | bool playlist_viewer_indices; /* display playlist indices on viewer */ |
| 612 | int playlist_viewer_track_display; /* how to display tracks in viewer */ |
Jörg Hohensohn | 3aa99e1 | 2004-03-27 00:11:01 +0000 | [diff] [blame] | 613 | |
| 614 | /* voice UI settings */ |
| 615 | bool talk_menu; /* enable voice UI */ |
Steve Bavin | 6fd10ba | 2007-06-07 09:24:53 +0000 | [diff] [blame] | 616 | int talk_dir; /* voiced directories mode: 0=off 1=number 2=spell */ |
| 617 | bool talk_dir_clip; /* use directory .talk clips */ |
Steve Bavin | ea358a1 | 2008-01-21 09:48:44 +0000 | [diff] [blame] | 618 | int talk_file; /* voice file mode: 0=off, 1=number, 2=spell */ |
Steve Bavin | 6fd10ba | 2007-06-07 09:24:53 +0000 | [diff] [blame] | 619 | bool talk_file_clip; /* use file .talk clips */ |
Stéphane Doyon | a4f491c | 2007-11-07 03:25:33 +0000 | [diff] [blame] | 620 | bool talk_filetype; /* say file type */ |
Stéphane Doyon | da93299 | 2007-11-03 05:00:49 +0000 | [diff] [blame] | 621 | bool talk_battery_level; |
Jörg Hohensohn | 5c8a2f5 | 2004-06-22 09:16:44 +0000 | [diff] [blame] | 622 | |
| 623 | /* file browser sorting */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 624 | bool sort_case; /* dir sort order: 0=case insensitive, 1=sensitive */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 625 | int sort_dir; /* 0=alpha, 1=date (old first), 2=date (new first) */ |
Thomas Martitz | d13f1a4 | 2009-03-01 17:55:59 +0000 | [diff] [blame] | 626 | int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */ |
| 627 | int interpret_numbers; /* true=strnatcmp, false=strcmp */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 628 | |
| 629 | /* power settings */ |
| 630 | int poweroff; /* idle power off timer */ |
Thomas Martitz | c1bd9b0 | 2012-01-03 23:44:38 +0000 | [diff] [blame] | 631 | #if BATTERY_CAPACITY_DEFAULT > 0 |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 632 | int battery_capacity; /* in mAh */ |
Thomas Martitz | f05cdc4 | 2010-09-01 23:36:15 +0000 | [diff] [blame] | 633 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 634 | |
| 635 | #if BATTERY_TYPES_COUNT > 1 |
| 636 | int battery_type; /* for units which can take multiple types (Ondio). */ |
| 637 | #endif |
| 638 | #ifdef HAVE_SPDIF_POWER |
| 639 | bool spdif_enable; /* S/PDIF power on/off */ |
| 640 | #endif |
Frank Gevaerts | 18f0ba0 | 2012-12-26 18:01:19 +0100 | [diff] [blame] | 641 | #ifdef HAVE_USB_CHARGING_ENABLE |
Torne Wuff | 991e92f | 2010-06-05 10:05:27 +0000 | [diff] [blame] | 642 | int usb_charging; |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 643 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 644 | /* device settings */ |
| 645 | #ifdef HAVE_LCD_CONTRAST |
| 646 | int contrast; /* lcd contrast */ |
| 647 | #endif |
| 648 | |
| 649 | #ifdef HAVE_LCD_BITMAP |
| 650 | #ifdef HAVE_LCD_INVERT |
| 651 | bool invert; /* invert display */ |
| 652 | #endif |
| 653 | #ifdef HAVE_LCD_FLIP |
| 654 | bool flip_display; /* turn display (and button layout) by 180 degrees */ |
| 655 | #endif |
| 656 | int cursor_style; /* style of the selection cursor */ |
| 657 | int screen_scroll_step; |
| 658 | int show_path_in_browser; /* 0=off, 1=current directory, 2=full path */ |
| 659 | bool offset_out_of_view; |
| 660 | unsigned char icon_file[MAX_FILENAME+1]; |
| 661 | unsigned char viewers_icon_file[MAX_FILENAME+1]; |
| 662 | unsigned char font_file[MAX_FILENAME+1]; /* last font */ |
Fred Bauer | fdfc88f | 2011-11-20 15:41:17 +0000 | [diff] [blame] | 663 | int glyphs_to_cache; /* default font allocation size in glyphs */ |
Jonathan Gordon | 1c2aa35 | 2010-02-14 06:26:16 +0000 | [diff] [blame] | 664 | #ifdef HAVE_REMOTE_LCD |
| 665 | unsigned char remote_font_file[MAX_FILENAME+1]; /* last font */ |
| 666 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 667 | unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */ |
| 668 | #endif /* HAVE_LCD_BITMAP */ |
Sebastian Leonhardt | 3e504c3 | 2019-06-25 22:32:39 +0200 | [diff] [blame] | 669 | int backlight_timeout; /* backlight off timeout: -1=never, |
| 670 | 0=always, or time in seconds */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 671 | bool caption_backlight; /* turn on backlight at end and start of track */ |
| 672 | bool bl_filter_first_keypress; /* filter first keypress when dark? */ |
| 673 | #if CONFIG_CHARGING |
| 674 | int backlight_timeout_plugged; |
| 675 | #endif |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 676 | #ifndef HAS_BUTTON_HOLD |
| 677 | bool bt_selective_softlock_actions; |
| 678 | int bt_selective_softlock_actions_mask; |
| 679 | #endif |
Thomas Martitz | d33bff2 | 2009-03-09 23:13:50 +0000 | [diff] [blame] | 680 | #ifdef HAVE_BACKLIGHT |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 681 | bool bl_selective_actions; /* backlight disable on some actions */ |
| 682 | int bl_selective_actions_mask;/* mask of actions that will not enable backlight */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 683 | #ifdef HAS_BUTTON_HOLD |
| 684 | int backlight_on_button_hold; /* what to do with backlight when hold |
| 685 | switch is on */ |
| 686 | #endif |
| 687 | #ifdef HAVE_LCD_SLEEP_SETTING |
| 688 | int lcd_sleep_after_backlight_off; /* when to put lcd to sleep after backlight |
Sebastian Leonhardt | 3e504c3 | 2019-06-25 22:32:39 +0200 | [diff] [blame] | 689 | has turned off: -1=never, 0=always, |
| 690 | or time in seconds */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 691 | #endif |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 692 | #endif /* HAVE_BACKLIGHT */ |
| 693 | |
Thomas Martitz | 12a0ed3 | 2009-01-26 23:21:49 +0000 | [diff] [blame] | 694 | #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING) |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 695 | int backlight_fade_in; /* backlight fade in timing: 0..3 */ |
| 696 | int backlight_fade_out; /* backlight fade in timing: 0..7 */ |
Thomas Martitz | 12a0ed3 | 2009-01-26 23:21:49 +0000 | [diff] [blame] | 697 | #elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 698 | bool backlight_fade_in; |
| 699 | bool backlight_fade_out; |
| 700 | #endif |
William Wilgus | dc87e9e | 2016-11-22 06:21:31 +0100 | [diff] [blame] | 701 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 702 | int brightness; |
| 703 | #endif |
Steve Bavin | ea358a1 | 2008-01-21 09:48:44 +0000 | [diff] [blame] | 704 | |
Christian Gmeiner | 7c1879b | 2005-04-15 12:08:49 +0000 | [diff] [blame] | 705 | #ifdef HAVE_REMOTE_LCD |
Christi Scarborough | be78945 | 2005-07-05 22:27:54 +0000 | [diff] [blame] | 706 | /* remote lcd */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 707 | int remote_contrast; /* lcd contrast: 0-63 0=low 63=high */ |
Sebastian Leonhardt | 3e504c3 | 2019-06-25 22:32:39 +0200 | [diff] [blame] | 708 | int remote_backlight_timeout; /* backlight off timeout: -1=never, |
| 709 | 0=always, or time in seconds */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 710 | int remote_backlight_timeout_plugged; |
| 711 | int remote_scroll_speed; /* long texts scrolling speed: 1-30 */ |
| 712 | int remote_scroll_delay; /* delay (in 1/10s) before starting scroll */ |
| 713 | int remote_scroll_step; /* pixels to advance per update */ |
| 714 | int remote_bidir_limit; /* bidir scroll length limit */ |
| 715 | bool remote_invert; /* invert display */ |
| 716 | bool remote_flip_display; /* turn display (and button layout) by 180 degrees */ |
Jens Arnold | b51f7df | 2005-11-21 23:55:39 +0000 | [diff] [blame] | 717 | bool remote_caption_backlight; /* turn on backlight at end and start of track */ |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 718 | bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ |
| 719 | unsigned char remote_icon_file[MAX_FILENAME+1]; |
| 720 | unsigned char remote_viewers_icon_file[MAX_FILENAME+1]; |
Michael Sevakis | 3d2e10b | 2006-09-10 02:00:40 +0000 | [diff] [blame] | 721 | #ifdef HAS_REMOTE_BUTTON_HOLD |
| 722 | int remote_backlight_on_button_hold; /* what to do with remote backlight when hold |
| 723 | switch is on */ |
| 724 | #endif |
Jens Arnold | b51f7df | 2005-11-21 23:55:39 +0000 | [diff] [blame] | 725 | #ifdef HAVE_REMOTE_LCD_TICKING |
Miika Pekkarinen | 05fdb1a | 2005-11-19 07:58:20 +0000 | [diff] [blame] | 726 | bool remote_reduce_ticking; /* 0=normal operation, |
| 727 | 1=EMI reduce on with cost more CPU. */ |
Christian Gmeiner | 7c1879b | 2005-04-15 12:08:49 +0000 | [diff] [blame] | 728 | #endif |
Michael Sevakis | 3d2e10b | 2006-09-10 02:00:40 +0000 | [diff] [blame] | 729 | #endif /* HAVE_REMOTE_LCD */ |
Steve Bavin | ea358a1 | 2008-01-21 09:48:44 +0000 | [diff] [blame] | 730 | |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 731 | #if CONFIG_CODEC == MAS3507D |
| 732 | bool line_in; /* false=off, true=active */ |
Christi Scarborough | 4c0b83f | 2005-11-17 20:14:59 +0000 | [diff] [blame] | 733 | #endif |
Dan Everton | 88abdd9 | 2006-02-07 14:07:46 +0000 | [diff] [blame] | 734 | |
Jonathan Gordon | 4b1d1b4 | 2007-04-22 13:02:24 +0000 | [diff] [blame] | 735 | #ifdef HAVE_BUTTON_LIGHT |
Jens Arnold | 5f1ec30 | 2007-10-07 15:02:02 +0000 | [diff] [blame] | 736 | int buttonlight_timeout; |
Jonathan Gordon | 4b1d1b4 | 2007-04-22 13:02:24 +0000 | [diff] [blame] | 737 | #endif |
Karl Kurbjun | 6f95ab7 | 2007-05-08 06:45:38 +0000 | [diff] [blame] | 738 | #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS |
| 739 | int buttonlight_brightness; |
| 740 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 741 | |
| 742 | #ifdef IPOD_ACCESSORY_PROTOCOL |
| 743 | int serial_bitrate; /* 0=auto 1=9600 2=19200 3=38400 4=57600 */ |
Michael Sevakis | 873e0fd | 2007-07-22 21:02:24 +0000 | [diff] [blame] | 744 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 745 | #ifdef HAVE_ACCESSORY_SUPPLY |
| 746 | bool accessory_supply; /* 0=off 1=on, accessory power supply for iPod */ |
Christian Gmeiner | 8181a0c | 2007-08-27 16:04:32 +0000 | [diff] [blame] | 747 | #endif |
Andree Buschmann | b6c12a1 | 2010-03-20 15:02:29 +0000 | [diff] [blame] | 748 | #ifdef HAVE_LINEOUT_POWEROFF |
| 749 | bool lineout_active; |
| 750 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 751 | |
Maurus Cuelenaere | 6c252a6 | 2009-03-02 18:18:24 +0000 | [diff] [blame] | 752 | #ifdef HAVE_SPEAKER |
Amaury Pouly | 1245c5f | 2017-01-14 01:40:12 +0100 | [diff] [blame] | 753 | int speaker_mode; /* 0: off, 1: on, 2: auto (only if headphone detection) */ |
| 754 | #endif /* HAVE_SPEAKER */ |
Thomas Martitz | 62f3e95 | 2009-03-27 13:53:29 +0000 | [diff] [blame] | 755 | bool prevent_skip; |
Maurus Cuelenaere | 6c252a6 | 2009-03-02 18:18:24 +0000 | [diff] [blame] | 756 | |
Rob Purchase | ed1a335 | 2009-03-24 21:55:05 +0000 | [diff] [blame] | 757 | #ifdef HAVE_TOUCHSCREEN |
| 758 | int touch_mode; |
Maurus Cuelenaere | b8435f5 | 2009-06-16 17:04:47 +0000 | [diff] [blame] | 759 | struct touchscreen_parameter ts_calibration_data; |
Rob Purchase | ed1a335 | 2009-03-24 21:55:05 +0000 | [diff] [blame] | 760 | #endif |
| 761 | |
Nils Wallménius | d29a11b | 2012-05-08 16:34:26 +0200 | [diff] [blame] | 762 | #ifdef HAVE_PITCHCONTROL |
Alexander Levin | cc7c665 | 2009-07-11 16:46:19 +0000 | [diff] [blame] | 763 | /* pitch screen settings */ |
| 764 | bool pitch_mode_semitone; |
| 765 | #if CONFIG_CODEC == SWCODEC |
| 766 | bool pitch_mode_timestretch; |
| 767 | #endif |
Jens Arnold | 4c75ece | 2009-07-11 21:21:33 +0000 | [diff] [blame] | 768 | #endif |
Nils Wallménius | 3681ff1 | 2009-01-03 12:48:06 +0000 | [diff] [blame] | 769 | /* If values are just added to the end, no need to bump plugin API |
| 770 | version. */ |
| 771 | /* new stuff to be added at the end */ |
Tomer Shalev | 8c5141b | 2009-09-30 10:06:04 +0000 | [diff] [blame] | 772 | |
| 773 | #ifdef USB_ENABLE_HID |
Tomer Shalev | 83d24f8 | 2009-10-23 13:29:19 +0000 | [diff] [blame] | 774 | bool usb_hid; |
Tomer Shalev | 8c5141b | 2009-09-30 10:06:04 +0000 | [diff] [blame] | 775 | int usb_keypad_mode; |
| 776 | #endif |
| 777 | |
Frank Gevaerts | 544a52d | 2011-09-09 16:15:35 +0000 | [diff] [blame] | 778 | #if defined(USB_ENABLE_STORAGE) && defined(HAVE_MULTIDRIVE) |
| 779 | bool usb_skip_first_drive; |
| 780 | #endif |
| 781 | |
Thomas Martitz | 4c48b59 | 2009-08-16 22:20:11 +0000 | [diff] [blame] | 782 | #ifdef HAVE_LCD_BITMAP |
| 783 | unsigned char ui_vp_config[64]; /* viewport string for the lists */ |
| 784 | #ifdef HAVE_REMOTE_LCD |
| 785 | unsigned char remote_ui_vp_config[64]; /* viewport string for the remote lists */ |
| 786 | #endif |
Maurus Cuelenaere | e183259 | 2009-08-18 00:43:36 +0000 | [diff] [blame] | 787 | #endif |
Jeffrey Goode | 2b7ef6b | 2009-08-18 03:24:45 +0000 | [diff] [blame] | 788 | |
| 789 | #if CONFIG_CODEC == SWCODEC |
Michael Sevakis | c9bcbe2 | 2012-03-27 19:52:15 -0400 | [diff] [blame] | 790 | struct compressor_settings compressor_settings; |
Jeffrey Goode | 2b7ef6b | 2009-08-18 03:24:45 +0000 | [diff] [blame] | 791 | #endif |
| 792 | |
Alexander Levin | 0726b17 | 2011-12-26 11:29:18 +0000 | [diff] [blame] | 793 | int sleeptimer_duration; /* In minutes; 0=off */ |
Thomas Martitz | e347146 | 2011-10-17 18:57:38 +0000 | [diff] [blame] | 794 | bool sleeptimer_on_startup; |
Nick Peskett | 5dba771 | 2011-12-26 09:30:25 +0000 | [diff] [blame] | 795 | bool keypress_restarts_sleeptimer; |
Thomas Martitz | e347146 | 2011-10-17 18:57:38 +0000 | [diff] [blame] | 796 | |
Teruaki Kawashima | 92fb1df | 2009-11-08 13:14:50 +0000 | [diff] [blame] | 797 | #ifdef HAVE_MORSE_INPUT |
| 798 | bool morse_input; /* text input method setting */ |
| 799 | #endif |
| 800 | |
Jeffrey Goode | d5e6bc7 | 2010-04-01 03:14:44 +0000 | [diff] [blame] | 801 | #ifdef HAVE_HOTKEY |
Jeffrey Goode | accc046 | 2010-04-08 01:43:50 +0000 | [diff] [blame] | 802 | /* hotkey assignments - acceptable values are in |
Jeffrey Goode | 1ad76ff | 2010-05-09 02:02:51 +0000 | [diff] [blame] | 803 | hotkey_action enum in onplay.h */ |
Jeffrey Goode | d5e6bc7 | 2010-04-01 03:14:44 +0000 | [diff] [blame] | 804 | int hotkey_wps; |
Jeffrey Goode | d5e6bc7 | 2010-04-01 03:14:44 +0000 | [diff] [blame] | 805 | int hotkey_tree; |
Jeffrey Goode | d5e6bc7 | 2010-04-01 03:14:44 +0000 | [diff] [blame] | 806 | #endif |
| 807 | |
Magnus Holmgren | d38093d | 2010-04-24 14:10:28 +0000 | [diff] [blame] | 808 | #if CONFIG_CODEC == SWCODEC |
| 809 | /* When resuming playback (after a stop), rewind this number of seconds */ |
| 810 | int resume_rewind; |
| 811 | #endif |
Michael Sevakis | 80d0d15 | 2010-05-15 13:09:45 +0000 | [diff] [blame] | 812 | |
| 813 | #ifdef AUDIOHW_HAVE_DEPTH_3D |
| 814 | int depth_3d; |
| 815 | #endif |
| 816 | |
Andrew Ryabinin | 0519f7e | 2013-05-12 23:23:45 +0400 | [diff] [blame] | 817 | #ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF |
| 818 | int roll_off; |
| 819 | #endif |
| 820 | |
Solomon Peachy | 0662793 | 2018-06-28 06:24:26 -0400 | [diff] [blame] | 821 | #ifdef AUDIOHW_HAVE_FUNCTIONAL_MODE |
| 822 | int func_mode; |
| 823 | #endif |
| 824 | |
Michael Sevakis | 80d0d15 | 2010-05-15 13:09:45 +0000 | [diff] [blame] | 825 | #ifdef AUDIOHW_HAVE_EQ |
| 826 | /** Hardware EQ tone controls **/ |
| 827 | struct hw_eq_band |
| 828 | { |
| 829 | /* Maintain the order of members or sound_menu has to be changed */ |
| 830 | int gain; |
| 831 | #ifdef AUDIOHW_HAVE_EQ_FREQUENCY |
| 832 | int frequency; |
| 833 | #endif |
| 834 | #ifdef AUDIOHW_HAVE_EQ_WIDTH |
| 835 | int width; |
| 836 | #endif |
| 837 | } hw_eq_bands[AUDIOHW_EQ_BAND_NUM]; |
| 838 | #endif /* AUDIOHW_HAVE_EQ */ |
Jonathan Gordon | be716c0 | 2011-11-16 10:25:43 +0000 | [diff] [blame] | 839 | |
| 840 | #ifdef HAVE_HARDWARE_CLICK |
| 841 | #if CONFIG_CODEC == SWCODEC |
| 842 | bool keyclick_hardware; /* hardware piezo keyclick */ |
| 843 | #endif |
| 844 | #endif |
| 845 | |
Teruaki Kawashima | 2142628 | 2010-11-15 12:33:47 +0000 | [diff] [blame] | 846 | char start_directory[MAX_PATHNAME+1]; |
Alexander Levin | 7676dae | 2012-03-02 20:33:13 +0100 | [diff] [blame] | 847 | /* Has the root been customized from the .cfg file? false = no, true = loaded from cfg */ |
| 848 | bool root_menu_customized; |
Jonathan Gordon | 6f62226 | 2012-03-28 00:38:30 +1100 | [diff] [blame] | 849 | #ifdef HAVE_QUICKSCREEN |
| 850 | bool shortcuts_replaces_qs; |
| 851 | #endif |
Michael Sevakis | d37bf24 | 2013-05-23 13:58:51 -0400 | [diff] [blame] | 852 | |
| 853 | #ifdef HAVE_PLAY_FREQ |
| 854 | int play_frequency; /* core audio output frequency selection */ |
| 855 | #endif |
PurlingNayuki | f0bec02 | 2013-12-21 21:33:54 +0800 | [diff] [blame] | 856 | int volume_limit; /* maximum volume limit */ |
Chiwen Chang | 3ae0f32 | 2014-08-22 23:30:35 +1000 | [diff] [blame] | 857 | |
| 858 | int surround_enabled; |
| 859 | int surround_balance; |
| 860 | int surround_fx1; |
| 861 | int surround_fx2; |
| 862 | bool surround_method2; |
| 863 | int surround_mix; |
| 864 | |
| 865 | int pbe; |
| 866 | int pbe_precut; |
| 867 | |
| 868 | int afr_enabled; |
Udo Schläpfer | 040306a | 2015-01-30 22:47:30 +0100 | [diff] [blame] | 869 | |
| 870 | #if defined(DX50) || defined(DX90) |
| 871 | int governor; |
Udo Schläpfer | 95fdad5 | 2015-01-21 20:51:36 +0100 | [diff] [blame] | 872 | int usb_mode; |
Udo Schläpfer | 040306a | 2015-01-30 22:47:30 +0100 | [diff] [blame] | 873 | #endif |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 874 | }; |
| 875 | |
Jonathan Gordon | 41bd24e | 2007-01-29 13:18:57 +0000 | [diff] [blame] | 876 | /** global variables **/ |
| 877 | extern long lasttime; |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 878 | /* global settings */ |
| 879 | extern struct user_settings global_settings; |
Jonathan Gordon | 228d62d | 2007-01-24 02:19:22 +0000 | [diff] [blame] | 880 | /* global status */ |
| 881 | extern struct system_status global_status; |
Dan Everton | eb1dd38 | 2006-08-15 09:38:13 +0000 | [diff] [blame] | 882 | |
Björn Stenberg | f80d8a70 | 2002-06-27 00:20:00 +0000 | [diff] [blame] | 883 | #endif /* __SETTINGS_H__ */ |