summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-06-22 12:37:42 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-06-22 12:37:42 +0000
commit94da3b5f1d6bd8ea7bba41dee573895f23c04544 (patch)
tree14d2c743c6c3c4ec007a185c34781cef7a505630
parent9830b164ef09277df433be37c2adafe3b078c3d4 (diff)
downloadrockbox-94da3b5f1d6bd8ea7bba41dee573895f23c04544.zip
rockbox-94da3b5f1d6bd8ea7bba41dee573895f23c04544.tar.gz
rockbox-94da3b5f1d6bd8ea7bba41dee573895f23c04544.tar.bz2
rockbox-94da3b5f1d6bd8ea7bba41dee573895f23c04544.tar.xz
Added the (practically useless) 20ms option to the Auto Volume setting, for completeness
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4793 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/settings.c4
-rw-r--r--apps/settings.h2
-rw-r--r--apps/sound_menu.c3
-rw-r--r--firmware/mp3_playback.c11
4 files changed, 12 insertions, 8 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 36fcff3..7d1d92f 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -71,7 +71,7 @@ char rockboxdir[] = ROCKBOX_DIR; /* config/font/data file directory */
char rec_base_directory[] = REC_BASE_DIR;
-#define CONFIG_BLOCK_VERSION 12
+#define CONFIG_BLOCK_VERSION 13
#define CONFIG_BLOCK_SIZE 512
#define RTC_BLOCK_SIZE 44
@@ -166,7 +166,7 @@ static struct bit_entry rtc_bits[] =
#ifdef HAVE_MAS3587F
{5, S_O(loudness), 0, "loudness", NULL }, /* 0...17 */
{7, S_O(bass_boost), 0, "bass boost", NULL }, /* 0...100 */
- {2, S_O(avc), 0, "auto volume", "off,2,4,8" },
+ {3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" },
#endif
{3, S_O(channel_config), 6, "channels",
"stereo,stereo narrow,mono,mono left,mono right,karaoke,stereo wide" },
diff --git a/apps/settings.h b/apps/settings.h
index ddc3aca..baea723 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -72,7 +72,7 @@ struct user_settings
int treble; /* treble eq: 0-100 0=low 100=high */
int loudness; /* loudness eq: 0-100 0=off 100=max */
int bass_boost; /* bass boost eq: 0-100 0=off 100=max */
- int avc; /* auto volume correct: 0=disable, 1=2s 2=4s 3=8s */
+ int avc; /* auto volume correct: 0=off, 1=20ms, 2=2s 3=4s 4=8s */
int channel_config; /* Stereo, Mono, Mono left, Mono right */
int rec_quality; /* 0-7 */
diff --git a/apps/sound_menu.c b/apps/sound_menu.c
index e41153c..4a6857d 100644
--- a/apps/sound_menu.c
+++ b/apps/sound_menu.c
@@ -191,12 +191,13 @@ static bool avc(void)
{
struct opt_items names[] = {
{ STR(LANG_OFF) },
+ { "20ms", TALK_ID(20, UNIT_MS) },
{ "2s", TALK_ID(2, UNIT_SEC) },
{ "4s", TALK_ID(4, UNIT_SEC) },
{ "8s", TALK_ID(8, UNIT_SEC) }
};
return set_option(str(LANG_DECAY), &global_settings.avc, INT,
- names, 4, set_avc);
+ names, 5, set_avc);
}
static bool recsource(void)
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c
index 28d14ea..5d43458 100644
--- a/firmware/mp3_playback.c
+++ b/firmware/mp3_playback.c
@@ -124,7 +124,7 @@ static int maxval[] =
100, /* Balance */
17, /* Loudness */
100, /* Bass boost */
- 3, /* AVC */
+ 4, /* AVC */
6, /* Channels */
15, /* Left gain */
15, /* Right gain */
@@ -673,13 +673,16 @@ void mpeg_sound_set(int setting, int value)
case SOUND_AVC:
switch (value) {
- case 1: /* 2s */
+ case 1: /* 20ms */
+ tmp = (0x1 << 8) | (0x8 << 12);
+ break;
+ case 2: /* 2s */
tmp = (0x2 << 8) | (0x8 << 12);
break;
- case 2: /* 4s */
+ case 3: /* 4s */
tmp = (0x4 << 8) | (0x8 << 12);
break;
- case 3: /* 8s */
+ case 4: /* 8s */
tmp = (0x8 << 8) | (0x8 << 12);
break;
case -1: /* turn off and then turn on again to decay quickly */