summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-03-29 11:20:42 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-03-29 11:20:42 +0000
commitad3241492850f8766ae499a498a8648d4799c27c (patch)
tree4a1629acf19b91be3c599760a2b047517fa86c47 /apps
parentb109c1e910bb51f06fba96a9eebcc6963cd51de7 (diff)
downloadrockbox-ad3241492850f8766ae499a498a8648d4799c27c.tar.gz
rockbox-ad3241492850f8766ae499a498a8648d4799c27c.tar.bz2
rockbox-ad3241492850f8766ae499a498a8648d4799c27c.zip
New sound test code. Now it sets up the MDB as the original firmware does.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4450 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 7739915162..79e7c8f4e3 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1492,11 +1492,17 @@ static bool dbg_sound(void)
lcd_setmargins(0, 0);
#endif
- /* Narrow stereo */
- ll = 0xa0000;
- lr = 0xe0000;
- rr = 0xa0000;
- rl = 0xe0000;
+ /* Normal stereo */
+ ll = 0x80000;
+ lr = 0x00000;
+ rr = 0x80000;
+ rl = 0x00000;
+
+ /* Set the MDB to the Archos "flat" setting, but not activated */
+ mas_codec_writereg(MAS_REG_KMDB_STR, 0);
+ mas_codec_writereg(MAS_REG_KMDB_HAR, 0x3000);
+ mas_codec_writereg(MAS_REG_KMDB_FC, 0x0600);
+ mas_codec_writereg(MAS_REG_KMDB_SWITCH, 0);
while(!done)
{
@@ -1512,9 +1518,10 @@ static bool dbg_sound(void)
snprintf(buf, sizeof buf, "LL: -%d.%02d (%05x)", i, d % 100, ll);
lcd_puts(0, 0, buf);
- d = 200 - lr * 100 / 0x80000;
+ d = - lr * 100 / 0x80000;
i = d / 100;
- snprintf(buf, sizeof buf, "LR: -%d.%02d (%05x)", i, d % 100, lr);
+ snprintf(buf, sizeof buf, "LR: -%d.%02d (%05x)", i, d % 100,
+ lr & 0x000fffff);
lcd_puts(0, 1, buf);
#ifdef HAVE_MAS3587F
@@ -1571,6 +1578,10 @@ static bool dbg_sound(void)
val = mas_codec_readreg(MAS_REG_KLOUDNESS);
val ^= 0x0004;
mas_codec_writereg(MAS_REG_KLOUDNESS, val);
+ if(val)
+ mas_codec_writereg(MAS_REG_KMDB_SWITCH, 0x0902);
+ else
+ mas_codec_writereg(MAS_REG_KMDB_SWITCH, 0);
break;
#endif
}