blob: b72eec6f8bbcd8b1ce1df2895b2c93bc5dab5a82 [file] [log] [blame]
Björn Stenbergf80d8a702002-06-27 00:20:00 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
Steve Bavincd88e2a2008-03-25 15:24:03 +000010 * Copyright (C) 2002 by Stuart Martin
Björn Stenbergf80d8a702002-06-27 00:20:00 +000011 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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 Stenbergf80d8a702002-06-27 00:20:00 +000016 *
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 Sikkenb24fafb2009-03-08 20:28:15 +000026#include <stddef.h>
Jens Arnoldfb7368e2006-03-03 01:12:50 +000027#include "inttypes.h"
Hardeep Sidhue9d40582003-07-15 02:34:10 +000028#include "config.h"
Michael Sevakis33bb4cd2010-05-16 04:25:26 +000029#include "audiohw.h" /* for the AUDIOHW_* defines */
Thomas Martitz19f44a62009-08-23 23:44:31 +000030#include "statusbar.h" /* for the statusbar values */
Nils Wallméniusff197a42009-10-28 20:41:34 +000031#include "quickscreen.h"
Thomas Martitzd33bff22009-03-09 23:13:50 +000032#include "button.h"
Michael Sevakis0f5cb942006-11-06 18:07:30 +000033#if CONFIG_CODEC == SWCODEC
34#include "audio.h"
Michael Sevakis56f17c42012-04-29 17:31:30 -040035#include "dsp_proc_settings.h"
Michael Sevakis0f5cb942006-11-06 18:07:30 +000036#endif
Thomas Martitz9c0b2472010-08-01 16:15:27 +000037#include "rbpaths.h"
Michael Sevakis0f5cb942006-11-06 18:07:30 +000038
Stéphane Doyon0279c712007-10-10 01:41:48 +000039struct opt_items {
40 unsigned const char* string;
Nils Wallméniusacbd7802007-11-20 19:50:52 +000041 int32_t voice_id;
Stéphane Doyon0279c712007-10-10 01:41:48 +000042};
43
Jonathan Gordon41bd24e2007-01-29 13:18:57 +000044/** Setting values defines **/
Marianne Arnold28aa1312007-02-03 10:52:57 +000045#define MAX_FILENAME 32
Teruaki Kawashima21426282010-11-15 12:33:47 +000046#define MAX_PATHNAME 80
Björn Stenbergdea31222002-10-08 15:42:40 +000047
Solomon Peachybea9cf72018-10-30 09:43:32 -040048/* The values are assigned to the enums so that they correspond to */
49/* setting values in settings_list.c */
Björn Stenbergf80d8a702002-06-27 00:20:00 +000050
Solomon Peachybea9cf72018-10-30 09:43:32 -040051/* Shared by all bookmark parameters */
Thomas Martitz40b09202009-08-07 00:56:39 +000052enum {
Jeffrey Goode24bd4922009-08-12 18:42:13 +000053 BOOKMARK_NO = 0,
Solomon Peachybea9cf72018-10-30 09:43:32 -040054 BOOKMARK_YES = 1,
55};
56
57/* Auto create bookmark */
58enum {
59 BOOKMARK_ASK = 2,
60 BOOKMARK_RECENT_ONLY_YES = 3,
61 BOOKMARK_RECENT_ONLY_ASK = 4,
62};
63
64/* Most recent bookmark */
65enum {
66 BOOKMARK_ONE_PER_PLAYLIST = 2,
67 BOOKMARK_ONE_PER_TRACK = 3,
Thomas Martitz40b09202009-08-07 00:56:39 +000068};
Eric Linenberg7eb27112002-09-04 03:38:37 +000069
Jonathan Gordonff469ab2008-05-28 10:55:39 +000070enum
71{
72 TRIG_MODE_OFF = 0,
73 TRIG_MODE_NOREARM,
74 TRIG_MODE_REARM
75};
Linus Nielsen Feltzing68482bb2005-04-04 09:12:12 +000076
Jonathan Gordonff469ab2008-05-28 10:55:39 +000077enum
78{
79 TRIG_TYPE_STOP = 0,
80 TRIG_TYPE_PAUSE,
81 TRIG_TYPE_NEW_FILE
82};
Björn Stenbergde5477c2003-09-29 21:26:53 +000083
Jeffrey Goode664dc902009-11-11 00:48:17 +000084#ifdef HAVE_CROSSFADE
Thomas Martitz40b09202009-08-07 00:56:39 +000085enum {
Teruaki Kawashima90ea3e92009-08-16 12:27:21 +000086 CROSSFADE_ENABLE_OFF = 0,
Jeffrey Goode664dc902009-11-11 00:48:17 +000087 CROSSFADE_ENABLE_AUTOSKIP,
88 CROSSFADE_ENABLE_MANSKIP,
Thomas Martitz40b09202009-08-07 00:56:39 +000089 CROSSFADE_ENABLE_SHUFFLE,
Jeffrey Goode29d27112009-11-12 15:42:37 +000090 CROSSFADE_ENABLE_SHUFFLE_OR_MANSKIP,
Thomas Martitz40b09202009-08-07 00:56:39 +000091 CROSSFADE_ENABLE_ALWAYS,
92};
Jeffrey Goode664dc902009-11-11 00:48:17 +000093#endif
Miika Pekkarinen90161c92005-07-22 16:46:27 +000094
Thomas Martitz40b09202009-08-07 00:56:39 +000095enum {
Teruaki Kawashima90ea3e92009-08-16 12:27:21 +000096 FOLDER_ADVANCE_OFF = 0,
Thomas Martitz40b09202009-08-07 00:56:39 +000097 FOLDER_ADVANCE_NEXT,
98 FOLDER_ADVANCE_RANDOM,
Thomas Martitz6e5448d2009-08-07 00:59:22 +000099};
Jonathan Gordon27ad51f2006-10-09 10:54:17 +0000100
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000101/* repeat mode options */
102enum
103{
Teruaki Kawashima90ea3e92009-08-16 12:27:21 +0000104 REPEAT_OFF = 0,
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000105 REPEAT_ALL,
106 REPEAT_ONE,
107 REPEAT_SHUFFLE,
Daniel Stenberg7bcfc1d2007-02-17 22:26:14 +0000108#ifdef AB_REPEAT_ENABLE
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000109 REPEAT_AB,
110#endif
111 NUM_REPEAT_MODES
112};
113
Alexander Levin8589fcb2009-06-20 21:13:24 +0000114
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000115/* 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. */
119enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, SHOW_ID3DB,
120 NUM_FILTER_MODES,
Jonathan Gordon1bd072c2010-05-12 10:38:00 +0000121 SHOW_WPS, SHOW_RWPS, SHOW_FMS, SHOW_RFMS, SHOW_SBS, SHOW_RSBS, SHOW_FMR, SHOW_CFG,
Teruaki Kawashimae6b4d8f2010-12-15 12:47:30 +0000122 SHOW_LNG, SHOW_MOD, SHOW_FONT, SHOW_PLUGINS, SHOW_M3U};
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000123
Nils Wallménius48b52ae2008-10-08 16:32:01 +0000124/* file and dir sort options */
125enum { SORT_ALPHA, SORT_DATE, SORT_DATE_REVERSED, SORT_TYPE, /* available as settings */
126 SORT_ALPHA_REVERSED, SORT_TYPE_REVERSED }; /* internal use only */
Thomas Martitzd13f1a42009-03-01 17:55:59 +0000127enum { SORT_INTERPRET_AS_DIGIT, SORT_INTERPRET_AS_NUMBER };
Nils Wallménius48b52ae2008-10-08 16:32:01 +0000128
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000129/* recursive dir insert options */
130enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK };
131
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000132/* show path types */
133enum { SHOW_PATH_OFF = 0, SHOW_PATH_CURRENT, SHOW_PATH_FULL };
134
Alexander Levin07d0bfd2009-08-19 12:36:40 +0000135/* scrollbar visibility/position */
Tomer Shalev1acacc22009-10-05 18:11:41 +0000136enum { SCROLLBAR_OFF = 0, SCROLLBAR_LEFT, SCROLLBAR_RIGHT };
Alexander Levin07d0bfd2009-08-19 12:36:40 +0000137
Michael Hohmuth7141ff42011-02-08 20:31:35 +0000138/* autoresume settings */
139enum { AUTORESUME_NEXTTRACK_NEVER = 0, AUTORESUME_NEXTTRACK_ALWAYS,
140 AUTORESUME_NEXTTRACK_CUSTOM};
141
Jonathan Gordon9e554a82007-03-07 01:16:25 +0000142/* Alarm settings */
143#ifdef HAVE_RTC_ALARM
144enum { 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 Gordon41bd24e2007-01-29 13:18:57 +0000160
Jonathan Gordon9e554a82007-03-07 01:16:25 +0000161#endif /* HAVE_RTC_ALARM */
Michael Sevakis93572e22008-12-13 06:01:08 +0000162
163/* Keyclick stuff */
164
165 /* Not really a setting but several files should stay synced */
166#define KEYCLICK_DURATION 2
167
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000168/** virtual pointer stuff.. move to another .h maybe? **/
Jörg Hohensohnb1403ee2004-07-23 23:01:20 +0000169/* 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 Sparmann112bc152009-10-05 14:42:18 +0000174#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 Patulea01ddb562007-11-02 02:50:02 +0000178/* the DM320 has IRAM at 0, so we use 0xffff bytes right after that */
179#define VIRT_PTR ((unsigned char*)0x4000)
Jörg Hohensohnb1403ee2004-07-23 23:01:20 +0000180#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énius01729e72008-08-15 08:27:39 +0000189#define P2STR(p) (char *)((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? str(p-VIRT_PTR) : p)
Jörg Hohensohnb1403ee2004-07-23 23:01:20 +0000190
191/* get the string ID from a virtual pointer, -1 if not virtual */
Nils Wallménius01729e72008-08-15 08:27:39 +0000192#define P2ID(p) ((p>=VIRT_PTR && p<VIRT_PTR+VIRT_SIZE) ? p-VIRT_PTR : -1)
Jörg Hohensohnb1403ee2004-07-23 23:01:20 +0000193
Rani Hodcc839a22006-07-31 19:13:21 +0000194/* !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 Gordon41bd24e2007-01-29 13:18:57 +0000197
198
199
200/** function prototypes **/
201
202/* argument bits for settings_load() */
Thomas Martitz40b09202009-08-07 00:56:39 +0000203#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 Gjenerofdc29d02011-12-19 20:12:52 +0000206void settings_load(int which) INIT_ATTR;
Steve Bavin135cc752008-03-28 12:51:33 +0000207bool settings_load_config(const char* file, bool apply);
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000208
Steve Bavincd88e2a2008-03-25 15:24:03 +0000209void status_save(void);
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000210int settings_save(void);
Mihail Zenkov6228c8d2016-03-30 22:25:24 +0000211void reset_runtime(void);
Jonathan Gordonf0d28612007-02-01 13:57:14 +0000212/* defines for the options paramater */
Jonathan Gordon9adf0562007-05-29 04:39:11 +0000213enum {
214 SETTINGS_SAVE_CHANGED = 0,
215 SETTINGS_SAVE_ALL,
216 SETTINGS_SAVE_THEME,
Jonathan Gordonb8bc45d2007-12-24 22:35:31 +0000217 SETTINGS_SAVE_SOUND,
Jonathan Gordon9adf0562007-05-29 04:39:11 +0000218#ifdef HAVE_RECORDING
219 SETTINGS_SAVE_RECPRESETS,
220#endif
Dan Everton5886efa2007-12-07 10:59:07 +0000221#if CONFIG_CODEC == SWCODEC
222 SETTINGS_SAVE_EQPRESET,
223#endif
Jonathan Gordon9adf0562007-05-29 04:39:11 +0000224};
Steve Bavin135cc752008-03-28 12:51:33 +0000225bool settings_save_config(int options);
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000226
Stéphane Doyonb2aa86a2008-04-20 14:12:28 +0000227struct settings_list;
228void reset_setting(const struct settings_list *setting, void *var);
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000229void settings_reset(void);
230void sound_settings_apply(void);
Thomas Martitzc4266282009-08-16 20:12:17 +0000231
Wieland Hoffmannc5f772c2011-09-20 19:43:55 +0200232/* call this after loading a .wps/.rwps or other skin files, so that the
Thomas Martitzc4266282009-08-16 20:12:17 +0000233 * skin buffer is reset properly
234 */
235void settings_apply_skins(void);
236
Magnus Holmgrena14f4ac2010-03-06 12:14:12 +0000237void settings_apply(bool read_disk);
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000238void settings_apply_pm_range(void);
239void settings_display(void);
240
241enum optiontype { INT, BOOL };
242
Steve Bavincd88e2a2008-03-25 15:24:03 +0000243const struct settings_list* find_setting(const void* variable, int *id);
Jonathan Gordon89973212011-09-04 13:17:09 +0000244const struct settings_list* find_setting_by_cfgname(const char* name, int *id);
Steve Bavin135cc752008-03-28 12:51:33 +0000245bool cfg_int_to_string(int setting_id, int val, char* buf, int buf_len);
Bertrik Sikken204a2e92011-04-17 11:23:48 +0000246bool cfg_string_to_int(int setting_id, int* out, const char* str);
Antoine Cellerier3ad53502008-12-07 16:19:25 +0000247bool cfg_to_string(int setting_id, char* buf, int buf_len);
Steve Bavincd88e2a2008-03-25 15:24:03 +0000248bool set_bool_options(const char* string, const bool* variable,
Steve Bavin135cc752008-03-28 12:51:33 +0000249 const char* yes_str, int yes_voice,
250 const char* no_str, int no_voice,
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000251 void (*function)(bool));
252
Steve Bavincd88e2a2008-03-25 15:24:03 +0000253bool set_bool(const char* string, const bool* variable);
Steve Bavin135cc752008-03-28 12:51:33 +0000254bool set_int(const unsigned char* string, const char* unit, int voice_unit,
Steve Bavincd88e2a2008-03-25 15:24:03 +0000255 const int* variable,
Steve Bavin135cc752008-03-28 12:51:33 +0000256 void (*function)(int), int step, int min, int max,
Nils Wallménius3200d042009-08-20 16:47:44 +0000257 const char* (*formatter)(char*, size_t, int, const char*) );
Steve Bavincd88e2a2008-03-25 15:24:03 +0000258
Jonathan Gordonfb628312007-02-12 14:22:35 +0000259/* use this one if you need to create a lang from the value (i.e with TALK_ID()) */
Steve Bavin135cc752008-03-28 12:51:33 +0000260bool set_int_ex(const unsigned char* string, const char* unit, int voice_unit,
Steve Bavincd88e2a2008-03-25 15:24:03 +0000261 const int* variable,
Steve Bavin135cc752008-03-28 12:51:33 +0000262 void (*function)(int), int step, int min, int max,
Nils Wallménius3200d042009-08-20 16:47:44 +0000263 const char* (*formatter)(char*, size_t, int, const char*),
Jens Arnold09a78612007-11-26 23:10:20 +0000264 int32_t (*get_talk_id)(int, int));
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000265
Thomas Martitza3e6a862010-07-25 22:45:57 +0000266void set_file(const char* filename, char* setting, const int maxlen);
Steve Bavincd88e2a2008-03-25 15:24:03 +0000267
Steve Bavin135cc752008-03-28 12:51:33 +0000268bool set_option(const char* string, const void* variable, enum optiontype type,
269 const struct opt_items* options, int numoptions, void (*function)(int));
Steve Bavincd88e2a2008-03-25 15:24:03 +0000270
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000271
272
273/** global_settings and global_status struct definitions **/
274
Jonathan Gordon228d62d2007-01-24 02:19:22 +0000275struct system_status
276{
277 int resume_index; /* index in playlist (-1 for no active resume) */
Richard Quirk212e7802012-12-09 21:04:17 +0100278 uint32_t resume_crc32; /* crc32 of the name of the file */
Michael Sevakis31b71222013-07-14 07:59:39 -0400279 uint32_t resume_elapsed; /* elapsed time in last file */
Jonathan Gordon228d62d2007-01-24 02:19:22 +0000280 uint32_t resume_offset; /* byte offset in mp3 file */
Jonathan Gordon228d62d2007-01-24 02:19:22 +0000281 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 Arnoldc6522182007-02-18 08:46:12 +0000286#if CONFIG_TUNER
Jonathan Gordon228d62d2007-01-24 02:19:22 +0000287 int last_frequency; /* Last frequency for resuming, in FREQ_STEP units,
288 relative to MIN_FREQ */
289#endif
Jonathan Gordonee0111a2008-11-03 09:40:45 +0000290 signed char last_screen;
Jonathan Gordon9d3694c2007-04-22 08:50:24 +0000291 int viewer_icon_count;
Jonathan Gordon235d1ae2009-11-01 02:36:51 +0000292 int last_volume_change; /* tick the last volume change happened. skins use this */
Jonathan Gordonaa0f4a42011-09-24 13:19:34 +0000293#ifdef HAVE_LCD_BITMAP
294 int font_id[NB_SCREENS]; /* font id of the settings font for each screen */
295#endif
Michael Sevakis31b71222013-07-14 07:59:39 -0400296
Jonathan Gordon228d62d2007-01-24 02:19:22 +0000297};
Michael Sevakiseed62f12007-02-07 04:24:21 +0000298
Björn Stenbergf80d8a702002-06-27 00:20:00 +0000299struct user_settings
300{
301 /* audio settings */
302
Nils Wallméniusfedc7dc2007-11-18 16:45:58 +0000303 int volume; /* audio output volume in decibels range depends on the dac */
Udo Schläpferdbabd0d2015-02-02 21:44:29 +0100304 int balance; /* stereo balance: -100 - +100 -100=left 0=bal +100=right */
Nils Wallméniusfedc7dc2007-11-18 16:45:58 +0000305 int bass; /* bass boost/cut in decibels */
306 int treble; /* treble boost/cut in decibels */
Jens Arnold76b257f2005-01-12 00:24:15 +0000307 int channel_config; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */
308 int stereo_width; /* 0-255% */
Nils Wallméniusfedc7dc2007-11-18 16:45:58 +0000309
310#if CONFIG_CODEC != SWCODEC
Nils Wallménius3681ff12009-01-03 12:48:06 +0000311 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éniusfedc7dc2007-11-18 16:45:58 +0000319#endif
Linus Nielsen Feltzingafe0da92002-11-10 23:18:33 +0000320
Michael Sevakise73a1752010-05-15 14:16:35 +0000321#ifdef AUDIOHW_HAVE_BASS_CUTOFF
Dan Evertond7e1f772007-11-24 07:51:00 +0000322 int bass_cutoff;
Michael Sevakise73a1752010-05-15 14:16:35 +0000323#endif
324#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
Dan Evertond7e1f772007-11-24 07:51:00 +0000325 int treble_cutoff;
326#endif
327
Jens Arnoldd6c05452005-08-29 21:15:27 +0000328#if CONFIG_CODEC == SWCODEC
Jeffrey Goode9e095342009-11-10 03:46:08 +0000329#ifdef HAVE_CROSSFADE
Nils Wallménius3681ff12009-01-03 12:48:06 +0000330 /* Crossfade */
331 int crossfade; /* Enable crossfade (0=off, 1=shuffle, 2=trackskip,
332 3=shuff&trackskip, 4=always) */
Miika Pekkarinene7461b32005-11-06 16:40:20 +0000333 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 Goode9e095342009-11-10 03:46:08 +0000338#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000339
340 /* Replaygain */
Michael Sevakis57a20d22012-04-30 16:27:01 -0400341 struct replaygain_settings replaygain_settings;
Nils Wallménius3681ff12009-01-03 12:48:06 +0000342
343 /* Crossfeed */
Bertrik Sikkenafc96082012-05-01 03:58:27 -0400344 int crossfeed; /* crossfeed type */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000345 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 Sevakisc9bcbe22012-03-27 19:52:15 -0400353 struct eq_band_setting eq_band_settings[EQ_NUM_BANDS]; /* for each band */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000354
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éniusd29a11b2012-05-08 16:34:26 +0200360#ifdef HAVE_PITCHCONTROL
Steve Bavinfb238072009-06-12 07:20:50 +0000361 bool timestretch_enabled;
Frank Gevaertsf3660902010-09-17 20:28:47 +0000362#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000363#endif /* CONFIG_CODEC == SWCODEC */
364
Jonathan Gordon415e9d72007-07-10 07:41:37 +0000365#ifdef HAVE_RECORDING
Michael Sevakis0f5cb942006-11-06 18:07:30 +0000366#if CONFIG_CODEC == SWCODEC
367 int rec_format; /* record format index */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000368 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 Sevakis0f5cb942006-11-06 18:07:30 +0000380#else
Linus Nielsen Feltzingafe0da92002-11-10 23:18:33 +0000381 int rec_quality; /* 0-7 */
Michael Sevakis0f5cb942006-11-06 18:07:30 +0000382#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 Feltzingafe0da92002-11-10 23:18:33 +0000385 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énius3681ff12009-01-03 12:48:06 +0000391
Michael Sevakis0f5cb942006-11-06 18:07:30 +0000392 int rec_mic_gain; /* depends on target */
393 int rec_left_gain; /* depends on target */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000394 int rec_right_gain; /* depends on target */
395 bool peak_meter_clipcounter; /* clipping count indicator */
Linus Nielsen Feltzing478da622003-04-20 22:00:30 +0000396 bool rec_editable; /* true means that the bit reservoir is off */
Björn Stenberg56f771e2003-06-04 13:48:50 +0000397
398 /* note: timesplit setting is not saved */
William Wilgusa06d9c82018-12-17 22:27:55 -0600399 int rec_timesplit; /* IN MINUTES 0 = off */
Martin Scarratt9130a2a2006-07-22 17:23:05 +0000400 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 Arnoldfa9dee02006-09-18 12:41:12 +0000407
Linus Nielsen Feltzing74976c12003-12-31 03:13:29 +0000408 int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */
Teruaki Kawashima21426282010-11-15 12:33:47 +0000409 char rec_directory[MAX_PATHNAME+1];
Peter D'Hoye3467ba62006-02-17 22:47:56 +0000410 int cliplight; /* 0 = off
411 1 = main lcd
412 2 = main and remote lcd
413 3 = remote lcd */
Steve Bavinea358a12008-01-21 09:48:44 +0000414
Jonathan Gordonff469ab2008-05-28 10:55:39 +0000415 int rec_start_thres_db;
416 int rec_start_thres_linear;
Linus Nielsen Feltzing68482bb2005-04-04 09:12:12 +0000417 int rec_start_duration; /* index of trig_durations */
Jonathan Gordonff469ab2008-05-28 10:55:39 +0000418 int rec_stop_thres_db;
419 int rec_stop_thres_linear;
420 int rec_stop_postrec;
Linus Nielsen Feltzing68482bb2005-04-04 09:12:12 +0000421 int rec_stop_gap; /* index of trig_durations */
422 int rec_trigger_mode; /* see TRIG_MODE_XXX constants */
Martin Scarrattd8103f32006-11-09 12:27:56 +0000423 int rec_trigger_type; /* what to do when trigger released */
Peter D'Hoye82f4c602011-06-05 12:36:27 +0000424#ifdef HAVE_HISTOGRAM
425 int histogram_interval; /* recording peakmeter histogram */
Peter D'Hoyebe90f742010-03-03 22:16:08 +0000426#endif
Linus Nielsen Feltzing68482bb2005-04-04 09:12:12 +0000427
Peter D'Hoye5fc66e52006-08-16 23:26:55 +0000428#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 Gordon415e9d72007-07-10 07:41:37 +0000447#endif /* HAVE_RECORDING */
Jens Arnoldec9b2022005-09-10 12:28:16 +0000448
Jens Arnoldc6522182007-02-18 08:46:12 +0000449#if CONFIG_TUNER
Nils Wallménius3681ff12009-01-03 12:48:06 +0000450 int fm_region;
451 bool fm_force_mono; /* Forces Mono mode if true */
Hristo Kovachev009853f2006-04-02 12:23:08 +0000452 unsigned char fmr_file[MAX_FILENAME+1]; /* last fmr preset */
Jonathan Gordon1bd072c2010-05-12 10:38:00 +0000453 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 Kovachev009853f2006-04-02 12:23:08 +0000456#endif
Jonathan Gordon1bd072c2010-05-12 10:38:00 +0000457#endif /* CONFIG_TUNER */
Martin Scarratt22e7e942006-09-27 21:36:50 +0000458
Björn Stenbergf80d8a702002-06-27 00:20:00 +0000459 /* misc options */
Thomas Martitzfd14cac2009-03-02 19:25:50 +0000460#ifndef HAVE_WHEEL_ACCELERATION
Nils Wallménius3681ff12009-01-03 12:48:06 +0000461 int list_accel_start_delay; /* ms before we start increaseing step size */
462 int list_accel_wait; /* ms between increases */
463#endif
Björn Stenbergf80d8a702002-06-27 00:20:00 +0000464
Nils Wallménius3681ff12009-01-03 12:48:06 +0000465#ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
466 int touchpad_sensitivity;
467#endif
468
Amaury Pouly8146b402013-12-01 18:25:42 +0000469#ifdef HAVE_TOUCHPAD_DEADZONE
470 int touchpad_deadzone;
471#endif
472
Michael Hohmuth5aec3c22011-05-13 22:28:47 +0000473 int pause_rewind; /* time in s to rewind when pausing */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000474#ifdef HAVE_HEADPHONE_DETECTION
475 int unplug_mode; /* pause on headphone unplug */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000476 bool unplug_autoresume; /* disable auto-resume if no phones */
477#endif
478
479#ifdef HAVE_QUICKSCREEN
Nils Wallméniusff197a42009-10-28 20:41:34 +0000480 int qs_items[QUICKSCREEN_ITEM_COUNT];
Nils Wallménius3681ff12009-01-03 12:48:06 +0000481#endif
482
Markus Braun22a7a2d2002-10-14 12:50:20 +0000483 int timeformat; /* time format: 0=24 hour clock, 1=12 hour clock */
Nils Wallménius0bfa3e72007-08-01 08:50:44 +0000484
Frank Gevaerts46573012008-10-07 19:37:33 +0000485#ifdef HAVE_DISK_STORAGE
Björn Stenberg457b8a02002-08-26 13:21:14 +0000486 int disk_spindown; /* time until disk spindown, in seconds (0=off) */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000487 int buffer_margin; /* audio buffer watermark margin, in seconds */
Nils Wallménius0bfa3e72007-08-01 08:50:44 +0000488#endif
Björn Stenbergf80d8a702002-06-27 00:20:00 +0000489
Nils Wallménius3681ff12009-01-03 12:48:06 +0000490 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 Peachy0a6cad72019-01-01 21:05:13 -0500501 int car_adapter_mode_delay; /* delay before resume, in seconds*/
Nils Wallménius3681ff12009-01-03 12:48:06 +0000502 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 Feltzingbb572c42002-09-27 09:31:31 +0000510 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 Feltzingfd0cc3b2002-10-29 12:09:15 +0000513 bool peak_meter_dbfs; /* show linear or dbfs values */
Björn Stenberg9c16e122003-02-14 14:14:55 +0000514 int peak_meter_min; /* range minimum */
515 int peak_meter_max; /* range maximum */
Linus Nielsen Feltzingbb572c42002-09-27 09:31:31 +0000516
Nils Wallménius3681ff12009-01-03 12:48:06 +0000517 unsigned char wps_file[MAX_FILENAME+1]; /* last wps */
Thomas Martitz1016ee42009-10-19 15:28:15 +0000518#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énius3681ff12009-01-03 12:48:06 +0000525 unsigned char lang_file[MAX_FILENAME+1]; /* last language */
Teruaki Kawashima21426282010-11-15 12:33:47 +0000526 unsigned char playlist_catalog_dir[MAX_PATHNAME+1];
Nils Wallménius3681ff12009-01-03 12:48:06 +0000527 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 Mahone9b6d3d72009-11-07 01:26:22 +0000533 int statusbar; /* STATUSBAR_* enum values */
Jonathan Gordonf1034e02009-07-05 18:07:58 +0000534#ifdef HAVE_REMOTE_LCD
Andrew Mahone9b6d3d72009-11-07 01:26:22 +0000535 int remote_statusbar;
William Wilgusdc87e9e2016-11-22 06:21:31 +0100536#endif
Daniel Stenberg053d9042002-08-22 15:47:30 +0000537
Nils Wallméniusfedc7dc2007-11-18 16:45:58 +0000538#if CONFIG_KEYPAD == RECORDER_PAD
Linus Nielsen Feltzing77936e62004-03-16 13:44:56 +0000539 bool buttonbar; /* 0=hide, 1=show */
Nils Wallméniusfedc7dc2007-11-18 16:45:58 +0000540#endif
Linus Nielsen Feltzing77936e62004-03-16 13:44:56 +0000541
Alexander Levin07d0bfd2009-08-19 12:36:40 +0000542#ifdef HAVE_LCD_BITMAP
543 int scrollbar; /* SCROLLBAR_* enum values */
544 int scrollbar_width;
Alexander Levin07d0bfd2009-08-19 12:36:40 +0000545
Thomas Martitz3b126342011-10-17 17:38:10 +0000546#ifdef HAVE_TOUCHSCREEN
547 int list_line_padding;
548#endif
Thomas Martitz05a67d02013-05-06 07:20:40 +0200549#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 Linenbergecca1232002-09-09 14:25:39 +0000554 /* goto current song when exiting WPS */
555 bool browse_current; /* 1=goto current song,
556 0=goto previous location */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000557 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 Stenberga108ec22004-01-14 00:13:04 +0000562
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 Wuffdb1b8232010-07-05 16:39:00 +0000566 bool autoupdatebookmark;/* auto update option */
Solomon Peachybea9cf72018-10-30 09:43:32 -0400567 int usemrb; /* use MRB list: 0=No, 1=Yes, 2=One per playlist,
568 3=One per playlist and track */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000569
570#ifdef HAVE_DIRCACHE
571 bool dircache; /* enable directory cache */
Kjell Ericson53f156a2003-05-22 06:42:14 +0000572#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000573#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 Levinf8f91d02011-01-02 22:39:05 +0000578 bool autoresume_enable; /* enable auto-resume feature? */
Michael Hohmuth7141ff42011-02-08 20:31:35 +0000579 int autoresume_automatic; /* resume next track? 0=never, 1=always,
580 2=custom */
Michael Hohmutha5303762011-02-11 00:20:03 +0000581 unsigned char autoresume_paths[MAX_PATHNAME+1]; /* colon-separated list */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000582 bool runtimedb; /* runtime database active? */
Thomas Martitz63d27622012-07-18 23:36:57 +0200583 unsigned char tagcache_scan_paths[MAX_PATHNAME+1];
Nils Wallménius3681ff12009-01-03 12:48:06 +0000584#endif /* HAVE_TAGCACHE */
585
586#if LCD_DEPTH > 1
Frank Gevaertsd09f9782011-04-10 13:25:47 +0000587 unsigned char backdrop_file[MAX_PATHNAME+1]; /* backdrop bitmap file */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000588#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 Peskettbe108172012-03-19 09:56:38 +0000602 bool constrain_next_folder; /* whether next_folder is constrained to
603 directories within start_directory */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000604 int recursive_dir_insert; /* should directories be inserted recursively */
Björn Stenberge2628d92003-02-14 15:54:52 +0000605 bool fade_on_stop; /* fade on pause/unpause/stop */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000606 bool playlist_shuffle;
607 bool warnon_erase_dynplaylist; /* warn when erasing dynamic playlist */
Hardeep Sidhu107ebc52004-01-26 17:05:21 +0000608
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 Hohensohn3aa99e12004-03-27 00:11:01 +0000613
614 /* voice UI settings */
615 bool talk_menu; /* enable voice UI */
Steve Bavin6fd10ba2007-06-07 09:24:53 +0000616 int talk_dir; /* voiced directories mode: 0=off 1=number 2=spell */
617 bool talk_dir_clip; /* use directory .talk clips */
Steve Bavinea358a12008-01-21 09:48:44 +0000618 int talk_file; /* voice file mode: 0=off, 1=number, 2=spell */
Steve Bavin6fd10ba2007-06-07 09:24:53 +0000619 bool talk_file_clip; /* use file .talk clips */
Stéphane Doyona4f491c2007-11-07 03:25:33 +0000620 bool talk_filetype; /* say file type */
Stéphane Doyonda932992007-11-03 05:00:49 +0000621 bool talk_battery_level;
Jörg Hohensohn5c8a2f52004-06-22 09:16:44 +0000622
623 /* file browser sorting */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000624 bool sort_case; /* dir sort order: 0=case insensitive, 1=sensitive */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000625 int sort_dir; /* 0=alpha, 1=date (old first), 2=date (new first) */
Thomas Martitzd13f1a42009-03-01 17:55:59 +0000626 int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */
627 int interpret_numbers; /* true=strnatcmp, false=strcmp */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000628
629 /* power settings */
630 int poweroff; /* idle power off timer */
Thomas Martitzc1bd9b02012-01-03 23:44:38 +0000631#if BATTERY_CAPACITY_DEFAULT > 0
Nils Wallménius3681ff12009-01-03 12:48:06 +0000632 int battery_capacity; /* in mAh */
Thomas Martitzf05cdc42010-09-01 23:36:15 +0000633#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000634
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 Gevaerts18f0ba02012-12-26 18:01:19 +0100641#ifdef HAVE_USB_CHARGING_ENABLE
Torne Wuff991e92f2010-06-05 10:05:27 +0000642 int usb_charging;
Nils Wallménius3681ff12009-01-03 12:48:06 +0000643#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000644 /* 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 Bauerfdfc88f2011-11-20 15:41:17 +0000663 int glyphs_to_cache; /* default font allocation size in glyphs */
Jonathan Gordon1c2aa352010-02-14 06:26:16 +0000664#ifdef HAVE_REMOTE_LCD
665 unsigned char remote_font_file[MAX_FILENAME+1]; /* last font */
666#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000667 unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */
668#endif /* HAVE_LCD_BITMAP */
Sebastian Leonhardt3e504c32019-06-25 22:32:39 +0200669 int backlight_timeout; /* backlight off timeout: -1=never,
670 0=always, or time in seconds */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000671 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 Wilgusdc87e9e2016-11-22 06:21:31 +0100676#ifndef HAS_BUTTON_HOLD
677 bool bt_selective_softlock_actions;
678 int bt_selective_softlock_actions_mask;
679#endif
Thomas Martitzd33bff22009-03-09 23:13:50 +0000680#ifdef HAVE_BACKLIGHT
William Wilgusdc87e9e2016-11-22 06:21:31 +0100681 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énius3681ff12009-01-03 12:48:06 +0000683#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 Leonhardt3e504c32019-06-25 22:32:39 +0200689 has turned off: -1=never, 0=always,
690 or time in seconds */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000691#endif
William Wilgusdc87e9e2016-11-22 06:21:31 +0100692#endif /* HAVE_BACKLIGHT */
693
Thomas Martitz12a0ed32009-01-26 23:21:49 +0000694#if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
Nils Wallménius3681ff12009-01-03 12:48:06 +0000695 int backlight_fade_in; /* backlight fade in timing: 0..3 */
696 int backlight_fade_out; /* backlight fade in timing: 0..7 */
Thomas Martitz12a0ed32009-01-26 23:21:49 +0000697#elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
Nils Wallménius3681ff12009-01-03 12:48:06 +0000698 bool backlight_fade_in;
699 bool backlight_fade_out;
700#endif
William Wilgusdc87e9e2016-11-22 06:21:31 +0100701#ifdef HAVE_BACKLIGHT_BRIGHTNESS
Nils Wallménius3681ff12009-01-03 12:48:06 +0000702 int brightness;
703#endif
Steve Bavinea358a12008-01-21 09:48:44 +0000704
Christian Gmeiner7c1879b2005-04-15 12:08:49 +0000705#ifdef HAVE_REMOTE_LCD
Christi Scarboroughbe789452005-07-05 22:27:54 +0000706 /* remote lcd */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000707 int remote_contrast; /* lcd contrast: 0-63 0=low 63=high */
Sebastian Leonhardt3e504c32019-06-25 22:32:39 +0200708 int remote_backlight_timeout; /* backlight off timeout: -1=never,
709 0=always, or time in seconds */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000710 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 Arnoldb51f7df2005-11-21 23:55:39 +0000717 bool remote_caption_backlight; /* turn on backlight at end and start of track */
Nils Wallménius3681ff12009-01-03 12:48:06 +0000718 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 Sevakis3d2e10b2006-09-10 02:00:40 +0000721#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 Arnoldb51f7df2005-11-21 23:55:39 +0000725#ifdef HAVE_REMOTE_LCD_TICKING
Miika Pekkarinen05fdb1a2005-11-19 07:58:20 +0000726 bool remote_reduce_ticking; /* 0=normal operation,
727 1=EMI reduce on with cost more CPU. */
Christian Gmeiner7c1879b2005-04-15 12:08:49 +0000728#endif
Michael Sevakis3d2e10b2006-09-10 02:00:40 +0000729#endif /* HAVE_REMOTE_LCD */
Steve Bavinea358a12008-01-21 09:48:44 +0000730
Nils Wallménius3681ff12009-01-03 12:48:06 +0000731#if CONFIG_CODEC == MAS3507D
732 bool line_in; /* false=off, true=active */
Christi Scarborough4c0b83f2005-11-17 20:14:59 +0000733#endif
Dan Everton88abdd92006-02-07 14:07:46 +0000734
Jonathan Gordon4b1d1b42007-04-22 13:02:24 +0000735#ifdef HAVE_BUTTON_LIGHT
Jens Arnold5f1ec302007-10-07 15:02:02 +0000736 int buttonlight_timeout;
Jonathan Gordon4b1d1b42007-04-22 13:02:24 +0000737#endif
Karl Kurbjun6f95ab72007-05-08 06:45:38 +0000738#ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
739 int buttonlight_brightness;
740#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000741
742#ifdef IPOD_ACCESSORY_PROTOCOL
743 int serial_bitrate; /* 0=auto 1=9600 2=19200 3=38400 4=57600 */
Michael Sevakis873e0fd2007-07-22 21:02:24 +0000744#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000745#ifdef HAVE_ACCESSORY_SUPPLY
746 bool accessory_supply; /* 0=off 1=on, accessory power supply for iPod */
Christian Gmeiner8181a0c2007-08-27 16:04:32 +0000747#endif
Andree Buschmannb6c12a12010-03-20 15:02:29 +0000748#ifdef HAVE_LINEOUT_POWEROFF
749 bool lineout_active;
750#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000751
Maurus Cuelenaere6c252a62009-03-02 18:18:24 +0000752#ifdef HAVE_SPEAKER
Amaury Pouly1245c5f2017-01-14 01:40:12 +0100753 int speaker_mode; /* 0: off, 1: on, 2: auto (only if headphone detection) */
754#endif /* HAVE_SPEAKER */
Thomas Martitz62f3e952009-03-27 13:53:29 +0000755 bool prevent_skip;
Maurus Cuelenaere6c252a62009-03-02 18:18:24 +0000756
Rob Purchaseed1a3352009-03-24 21:55:05 +0000757#ifdef HAVE_TOUCHSCREEN
758 int touch_mode;
Maurus Cuelenaereb8435f52009-06-16 17:04:47 +0000759 struct touchscreen_parameter ts_calibration_data;
Rob Purchaseed1a3352009-03-24 21:55:05 +0000760#endif
761
Nils Wallméniusd29a11b2012-05-08 16:34:26 +0200762#ifdef HAVE_PITCHCONTROL
Alexander Levincc7c6652009-07-11 16:46:19 +0000763 /* pitch screen settings */
764 bool pitch_mode_semitone;
765#if CONFIG_CODEC == SWCODEC
766 bool pitch_mode_timestretch;
767#endif
Jens Arnold4c75ece2009-07-11 21:21:33 +0000768#endif
Nils Wallménius3681ff12009-01-03 12:48:06 +0000769 /* 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 Shalev8c5141b2009-09-30 10:06:04 +0000772
773#ifdef USB_ENABLE_HID
Tomer Shalev83d24f82009-10-23 13:29:19 +0000774 bool usb_hid;
Tomer Shalev8c5141b2009-09-30 10:06:04 +0000775 int usb_keypad_mode;
776#endif
777
Frank Gevaerts544a52d2011-09-09 16:15:35 +0000778#if defined(USB_ENABLE_STORAGE) && defined(HAVE_MULTIDRIVE)
779 bool usb_skip_first_drive;
780#endif
781
Thomas Martitz4c48b592009-08-16 22:20:11 +0000782#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 Cuelenaeree1832592009-08-18 00:43:36 +0000787#endif
Jeffrey Goode2b7ef6b2009-08-18 03:24:45 +0000788
789#if CONFIG_CODEC == SWCODEC
Michael Sevakisc9bcbe22012-03-27 19:52:15 -0400790 struct compressor_settings compressor_settings;
Jeffrey Goode2b7ef6b2009-08-18 03:24:45 +0000791#endif
792
Alexander Levin0726b172011-12-26 11:29:18 +0000793 int sleeptimer_duration; /* In minutes; 0=off */
Thomas Martitze3471462011-10-17 18:57:38 +0000794 bool sleeptimer_on_startup;
Nick Peskett5dba7712011-12-26 09:30:25 +0000795 bool keypress_restarts_sleeptimer;
Thomas Martitze3471462011-10-17 18:57:38 +0000796
Teruaki Kawashima92fb1df2009-11-08 13:14:50 +0000797#ifdef HAVE_MORSE_INPUT
798 bool morse_input; /* text input method setting */
799#endif
800
Jeffrey Gooded5e6bc72010-04-01 03:14:44 +0000801#ifdef HAVE_HOTKEY
Jeffrey Goodeaccc0462010-04-08 01:43:50 +0000802 /* hotkey assignments - acceptable values are in
Jeffrey Goode1ad76ff2010-05-09 02:02:51 +0000803 hotkey_action enum in onplay.h */
Jeffrey Gooded5e6bc72010-04-01 03:14:44 +0000804 int hotkey_wps;
Jeffrey Gooded5e6bc72010-04-01 03:14:44 +0000805 int hotkey_tree;
Jeffrey Gooded5e6bc72010-04-01 03:14:44 +0000806#endif
807
Magnus Holmgrend38093d2010-04-24 14:10:28 +0000808#if CONFIG_CODEC == SWCODEC
809 /* When resuming playback (after a stop), rewind this number of seconds */
810 int resume_rewind;
811#endif
Michael Sevakis80d0d152010-05-15 13:09:45 +0000812
813#ifdef AUDIOHW_HAVE_DEPTH_3D
814 int depth_3d;
815#endif
816
Andrew Ryabinin0519f7e2013-05-12 23:23:45 +0400817#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
818 int roll_off;
819#endif
820
Solomon Peachy06627932018-06-28 06:24:26 -0400821#ifdef AUDIOHW_HAVE_FUNCTIONAL_MODE
822 int func_mode;
823#endif
824
Michael Sevakis80d0d152010-05-15 13:09:45 +0000825#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 Gordonbe716c02011-11-16 10:25:43 +0000839
840#ifdef HAVE_HARDWARE_CLICK
841#if CONFIG_CODEC == SWCODEC
842 bool keyclick_hardware; /* hardware piezo keyclick */
843#endif
844#endif
845
Teruaki Kawashima21426282010-11-15 12:33:47 +0000846 char start_directory[MAX_PATHNAME+1];
Alexander Levin7676dae2012-03-02 20:33:13 +0100847 /* Has the root been customized from the .cfg file? false = no, true = loaded from cfg */
848 bool root_menu_customized;
Jonathan Gordon6f622262012-03-28 00:38:30 +1100849#ifdef HAVE_QUICKSCREEN
850 bool shortcuts_replaces_qs;
851#endif
Michael Sevakisd37bf242013-05-23 13:58:51 -0400852
853#ifdef HAVE_PLAY_FREQ
854 int play_frequency; /* core audio output frequency selection */
855#endif
PurlingNayukif0bec022013-12-21 21:33:54 +0800856 int volume_limit; /* maximum volume limit */
Chiwen Chang3ae0f322014-08-22 23:30:35 +1000857
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äpfer040306a2015-01-30 22:47:30 +0100869
870#if defined(DX50) || defined(DX90)
871 int governor;
Udo Schläpfer95fdad52015-01-21 20:51:36 +0100872 int usb_mode;
Udo Schläpfer040306a2015-01-30 22:47:30 +0100873#endif
Björn Stenbergf80d8a702002-06-27 00:20:00 +0000874};
875
Jonathan Gordon41bd24e2007-01-29 13:18:57 +0000876/** global variables **/
877extern long lasttime;
Björn Stenbergf80d8a702002-06-27 00:20:00 +0000878/* global settings */
879extern struct user_settings global_settings;
Jonathan Gordon228d62d2007-01-24 02:19:22 +0000880/* global status */
881extern struct system_status global_status;
Dan Evertoneb1dd382006-08-15 09:38:13 +0000882
Björn Stenbergf80d8a702002-06-27 00:20:00 +0000883#endif /* __SETTINGS_H__ */