diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-12-07 23:07:07 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-12-07 23:07:07 +0000 |
| commit | 2993ae69b5cfd95ddab595fcce9cc7637477d6a5 (patch) | |
| tree | 1a9ba25c51db3d7313621da6dcf5bb4192cfea9d /apps/settings.c | |
| parent | ec32c08a357bde454c11a41375230461509f2fe2 (diff) | |
| download | rockbox-2993ae69b5cfd95ddab595fcce9cc7637477d6a5.zip rockbox-2993ae69b5cfd95ddab595fcce9cc7637477d6a5.tar.gz rockbox-2993ae69b5cfd95ddab595fcce9cc7637477d6a5.tar.bz2 rockbox-2993ae69b5cfd95ddab595fcce9cc7637477d6a5.tar.xz | |
Simplified and uniform volume handling: * Volume setting in dB on all targets, within the 'natural' range defined by the respective DAC (limited to -100..+12 dB for archos Recorders and Ondios in order to avoid 4 chars being displayed in the status bar). 0 dB means line level on all targets. * No more artificial volume limiting for Iriver and Player, settings always represent true values. Removed the various sound scaling options. * Bumped config version so save your settings. Also make sure to adjust the volume after loading a .cfg, then save the .cfg again, otherwise the volume will be out of range (a flaw in the .cfg loader).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8197 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
| -rw-r--r-- | apps/settings.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/apps/settings.c b/apps/settings.c index d344163..bd6076d 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -85,7 +85,7 @@ const char rec_base_directory[] = REC_BASE_DIR; #include "dsp.h" #endif -#define CONFIG_BLOCK_VERSION 35 +#define CONFIG_BLOCK_VERSION 36 #define CONFIG_BLOCK_SIZE 512 #define RTC_BLOCK_SIZE 44 @@ -193,7 +193,11 @@ static const struct bit_entry rtc_bits[] = /* # of bits, offset+size, default, .cfg name, .cfg values */ /* sound */ - {7, S_O(volume), 70, "volume", NULL }, /* 0...100 */ +#if CONFIG_CODEC == MAS3507D + {8 | SIGNED, S_O(volume), -18, "volume", NULL }, /* -78...+18 */ +#else + {8 | SIGNED, S_O(volume), -25, "volume", NULL }, /* -100...+12 / -84...0 */ +#endif {8 | SIGNED, S_O(balance), 0, "balance", NULL }, /* -100...100 */ #if CONFIG_CODEC != SWCODEC /* any MAS */ {5 | SIGNED, S_O(bass), 0, "bass", NULL }, /* -15..+15 / -12..+12 */ @@ -210,9 +214,6 @@ static const struct bit_entry rtc_bits[] = {3, S_O(channel_config), 0, "channels", "stereo,mono,custom,mono left,mono right,karaoke" }, {8, S_O(stereo_width), 100, "stereo width", NULL}, -#ifdef HAVE_UDA1380 - {2, S_O(sound_scaling), SOUND_SCALE_VOLUME, "prevent clipping", "adjust volume,adjust bass,adjust current,off"}, -#endif /* playback */ {1, S_O(resume), false, "resume", off_on }, {1, S_O(playlist_shuffle), false, "shuffle", off_on }, @@ -842,9 +843,6 @@ void sound_settings_apply(void) sound_set(SOUND_VOLUME, global_settings.volume); sound_set(SOUND_CHANNELS, global_settings.channel_config); sound_set(SOUND_STEREO_WIDTH, global_settings.stereo_width); -#ifdef HAVE_UDA1380 - sound_set(SOUND_SCALING, global_settings.sound_scaling); -#endif #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) sound_set(SOUND_LOUDNESS, global_settings.loudness); sound_set(SOUND_AVC, global_settings.avc); @@ -1429,9 +1427,6 @@ void settings_reset(void) { global_settings.treble = sound_default(SOUND_TREBLE); global_settings.channel_config = sound_default(SOUND_CHANNELS); global_settings.stereo_width = sound_default(SOUND_STEREO_WIDTH); -#ifdef HAVE_UDA1380 - global_settings.sound_scaling = sound_default(SOUND_SCALING); -#endif #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) global_settings.loudness = sound_default(SOUND_LOUDNESS); global_settings.avc = sound_default(SOUND_AVC); |