mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Remove NVRAM infavor of a separate cfg file
remove nvram and use the existing settings framework for it add a crc check to the user_settings data to see if we need to save the user setting file or if we can just save the status file (resume.cfg) move volume to the system_status struct so we don't write the whole settings file over volume changes allow user to still export volume with save sound settings allow the user to also export pitch and speed name the file .resume.cfg Rename all the SYSTEM_STATUS save file variables to TLAs to save space and discourage tinkering Cleanup DEBUG_AVAIL_SETTINGS output when saving user_settings it calls status_save as well this cause the resume file to be written twice. instead remove the callback for status_save when setting_save is called remove header text when saving .resume.cfg convert status_save() to status_save(bool force) add SYSTEM_STATUS_UPDATE_TICKS for ATA device set this to 5 minutes since we arlready wait for the disk to be up before saving we don't want to miss our window for all other every 15 minutes that way if the battery is too low by the time shutdown comes around you don't lose much progress Change-Id: I27214ffd6e5d5494ee5ca83b14f04a41ba426ad7
This commit is contained in:
parent
8e293b4948
commit
7100090f99
41 changed files with 299 additions and 340 deletions
|
|
@ -245,15 +245,11 @@ enum { ALARM_START_WPS = 0,
|
|||
|
||||
|
||||
/** function prototypes **/
|
||||
|
||||
/* argument bits for settings_load() */
|
||||
#define SETTINGS_RTC (BIT_N(0)) /* only the settings from the RTC nonvolatile RAM */
|
||||
#define SETTINGS_HD (BIT_N(1)) /* only the settings from the disk sector */
|
||||
#define SETTINGS_ALL (SETTINGS_RTC|SETTINGS_HD) /* both */
|
||||
void settings_load(int which) INIT_ATTR;
|
||||
void update_runtime(void);
|
||||
void settings_load(void) INIT_ATTR;
|
||||
bool settings_load_config(const char* file, bool apply);
|
||||
|
||||
void status_save(void);
|
||||
void status_save(bool force);
|
||||
int settings_save(void);
|
||||
void reset_runtime(void);
|
||||
/* defines for the options paramater */
|
||||
|
|
@ -266,6 +262,7 @@ enum {
|
|||
SETTINGS_SAVE_RECPRESETS,
|
||||
#endif
|
||||
SETTINGS_SAVE_EQPRESET,
|
||||
SETTINGS_SAVE_RESUMEINFO,
|
||||
};
|
||||
bool settings_save_config(int options);
|
||||
|
||||
|
|
@ -322,6 +319,7 @@ const char* setting_get_cfgvals(const struct settings_list *setting);
|
|||
|
||||
struct system_status
|
||||
{
|
||||
int volume; /* audio output volume in decibels range depends on the dac */
|
||||
int resume_index; /* index in playlist (-1 for no active resume) */
|
||||
uint32_t resume_crc32; /* crc32 of the name of the file */
|
||||
uint32_t resume_elapsed; /* elapsed time in last file */
|
||||
|
|
@ -350,8 +348,6 @@ struct system_status
|
|||
struct user_settings
|
||||
{
|
||||
/* audio settings */
|
||||
|
||||
int volume; /* audio output volume in decibels range depends on the dac */
|
||||
int balance; /* stereo balance: -100 - +100 -100=left 0=bal +100=right */
|
||||
int bass; /* bass boost/cut in decibels */
|
||||
int treble; /* treble boost/cut in decibels */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue