1
0
Fork 0
forked from len0rd/rockbox

Removed the sound debugging screen

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4920 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-07-23 08:58:06 +00:00
parent 25a60a54e7
commit e2e06a7c41

View file

@ -1497,136 +1497,6 @@ bool dbg_fm_radio(void)
} }
#endif #endif
static bool dbg_sound(void)
{
char buf[128];
bool done = false;
bool set = true;
long ll, lr, rr, rl;
int d, i;
#ifdef HAVE_MAS3587F
long superbass;
long val;
#endif
#ifdef HAVE_LCD_BITMAP
lcd_setmargins(0, 0);
#endif
/* Normal stereo */
ll = 0x80000;
lr = 0x00000;
rr = 0x80000;
rl = 0x00000;
#ifdef HAVE_MAS3587F
/* 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);
#endif
while(!done)
{
int button;
#ifdef HAVE_MAS3587F
superbass = mas_codec_readreg(MAS_REG_KLOUDNESS) & 0x0004;
#endif
lcd_clear_display();
d = 200 - ll * 100 / 0x80000;
i = d / 100;
snprintf(buf, sizeof buf, "LL: -%d.%02d (%05x)", i, d % 100, ll);
lcd_puts(0, 0, buf);
d = - lr * 100 / 0x80000;
i = d / 100;
snprintf(buf, sizeof buf, "LR: -%d.%02d (%05x)", i, d % 100,
lr & 0x000fffff);
lcd_puts(0, 1, buf);
#ifdef HAVE_MAS3587F
if(superbass)
lcd_puts(0, 2, "Super Bass");
#endif
lcd_update();
/* Wait for a key to be pushed */
button = button_get(true);
switch(button) {
#if defined(HAVE_PLAYER_KEYPAD) || defined(HAVE_NEO_KEYPAD)
case BUTTON_STOP | BUTTON_REL:
#else
case BUTTON_OFF | BUTTON_REL:
#endif
done = true;
break;
case BUTTON_LEFT:
case BUTTON_LEFT | BUTTON_REPEAT:
if(ll < 0x100000)
{
ll += 0x80000/128;
rr += 0x80000/128;
lr -= 0x80000/128;
rl -= 0x80000/128;
}
set = true;
break;
case BUTTON_RIGHT:
case BUTTON_RIGHT | BUTTON_REPEAT:
if(ll > 0x80000)
{
ll -= 0x80000/128;
rr -= 0x80000/128;
lr += 0x80000/128;
rl += 0x80000/128;
}
set = true;
break;
case BUTTON_PLAY:
if(set) /* This means that the current config is the
custom one */
mpeg_sound_set(SOUND_CHANNELS, MPEG_SOUND_STEREO);
set = !set;
break;
#ifdef HAVE_MAS3587F
case BUTTON_ON:
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
}
if(set)
{
#ifdef HAVE_MAS3587F
mas_writemem(MAS_BANK_D0, 0x7fc, &ll, 1); /* LL */
mas_writemem(MAS_BANK_D0, 0x7fd, &lr, 1); /* LR */
mas_writemem(MAS_BANK_D0, 0x7fe, &rl, 1); /* RL */
mas_writemem(MAS_BANK_D0, 0x7ff, &rr, 1); /* RR */
#else
mas_writemem(MAS_BANK_D1, 0x7f8, &ll, 1); /* LL */
mas_writemem(MAS_BANK_D1, 0x7f9, &lr, 1); /* LR */
mas_writemem(MAS_BANK_D1, 0x7fa, &rl, 1); /* RL */
mas_writemem(MAS_BANK_D1, 0x7fb, &rr, 1); /* RR */
#endif
}
}
return false;
}
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
extern bool do_screendump_instead_of_usb; extern bool do_screendump_instead_of_usb;
@ -1677,7 +1547,6 @@ bool debug_menu(void)
#ifdef HAVE_FMRADIO #ifdef HAVE_FMRADIO
{ "FM Radio", -1, dbg_fm_radio }, { "FM Radio", -1, dbg_fm_radio },
#endif #endif
{ "Sound test", -1, dbg_sound },
}; };
m=menu_init( items, sizeof items / sizeof(struct menu_item), NULL, m=menu_init( items, sizeof items / sizeof(struct menu_item), NULL,