From 94da3b5f1d6bd8ea7bba41dee573895f23c04544 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 22 Jun 2004 12:37:42 +0000 Subject: 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 --- apps/settings.c | 4 ++-- apps/settings.h | 2 +- apps/sound_menu.c | 3 ++- firmware/mp3_playback.c | 11 +++++++---- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/settings.c b/apps/settings.c index 36fcff3814..7d1d92fa97 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 ddc3aca599..baea723e4b 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 e41153c29b..4a6857d0cb 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 28d14eae64..5d43458445 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 */ -- cgit v1.2.3