summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-23 08:58:06 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-23 08:58:06 +0000
commite2e06a7c4142a0e30fcfb32a5b2a3297bfdd699f (patch)
tree9f9cd497d1d69dfc8ea5b8656cb317bb5b810f1a
parent25a60a54e72cbf2694110b998a603ae5c63fae5f (diff)
downloadrockbox-e2e06a7c4142a0e30fcfb32a5b2a3297bfdd699f.tar.gz
rockbox-e2e06a7c4142a0e30fcfb32a5b2a3297bfdd699f.zip
Removed the sound debugging screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4920 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c131
1 files changed, 0 insertions, 131 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index f1645bf5d4..cd6ad08154 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1497,136 +1497,6 @@ bool dbg_fm_radio(void)
1497} 1497}
1498#endif 1498#endif
1499 1499
1500static bool dbg_sound(void)
1501{
1502 char buf[128];
1503 bool done = false;
1504 bool set = true;
1505 long ll, lr, rr, rl;
1506 int d, i;
1507#ifdef HAVE_MAS3587F
1508 long superbass;
1509 long val;
1510#endif
1511
1512#ifdef HAVE_LCD_BITMAP
1513 lcd_setmargins(0, 0);
1514#endif
1515
1516 /* Normal stereo */
1517 ll = 0x80000;
1518 lr = 0x00000;
1519 rr = 0x80000;
1520 rl = 0x00000;
1521
1522#ifdef HAVE_MAS3587F
1523 /* Set the MDB to the Archos "flat" setting, but not activated */
1524 mas_codec_writereg(MAS_REG_KMDB_STR, 0);
1525 mas_codec_writereg(MAS_REG_KMDB_HAR, 0x3000);
1526 mas_codec_writereg(MAS_REG_KMDB_FC, 0x0600);
1527 mas_codec_writereg(MAS_REG_KMDB_SWITCH, 0);
1528#endif
1529
1530 while(!done)
1531 {
1532 int button;
1533
1534#ifdef HAVE_MAS3587F
1535 superbass = mas_codec_readreg(MAS_REG_KLOUDNESS) & 0x0004;
1536#endif
1537
1538 lcd_clear_display();
1539 d = 200 - ll * 100 / 0x80000;
1540 i = d / 100;
1541 snprintf(buf, sizeof buf, "LL: -%d.%02d (%05x)", i, d % 100, ll);
1542 lcd_puts(0, 0, buf);
1543
1544 d = - lr * 100 / 0x80000;
1545 i = d / 100;
1546 snprintf(buf, sizeof buf, "LR: -%d.%02d (%05x)", i, d % 100,
1547 lr & 0x000fffff);
1548 lcd_puts(0, 1, buf);
1549
1550#ifdef HAVE_MAS3587F
1551 if(superbass)
1552 lcd_puts(0, 2, "Super Bass");
1553#endif
1554 lcd_update();
1555
1556 /* Wait for a key to be pushed */
1557 button = button_get(true);
1558 switch(button) {
1559#if defined(HAVE_PLAYER_KEYPAD) || defined(HAVE_NEO_KEYPAD)
1560 case BUTTON_STOP | BUTTON_REL:
1561#else
1562 case BUTTON_OFF | BUTTON_REL:
1563#endif
1564 done = true;
1565 break;
1566
1567 case BUTTON_LEFT:
1568 case BUTTON_LEFT | BUTTON_REPEAT:
1569 if(ll < 0x100000)
1570 {
1571 ll += 0x80000/128;
1572 rr += 0x80000/128;
1573 lr -= 0x80000/128;
1574 rl -= 0x80000/128;
1575 }
1576 set = true;
1577 break;
1578
1579 case BUTTON_RIGHT:
1580 case BUTTON_RIGHT | BUTTON_REPEAT:
1581 if(ll > 0x80000)
1582 {
1583 ll -= 0x80000/128;
1584 rr -= 0x80000/128;
1585 lr += 0x80000/128;
1586 rl += 0x80000/128;
1587 }
1588 set = true;
1589 break;
1590
1591 case BUTTON_PLAY:
1592 if(set) /* This means that the current config is the
1593 custom one */
1594 mpeg_sound_set(SOUND_CHANNELS, MPEG_SOUND_STEREO);
1595
1596 set = !set;
1597 break;
1598
1599#ifdef HAVE_MAS3587F
1600 case BUTTON_ON:
1601 val = mas_codec_readreg(MAS_REG_KLOUDNESS);
1602 val ^= 0x0004;
1603 mas_codec_writereg(MAS_REG_KLOUDNESS, val);
1604 if(val)
1605 mas_codec_writereg(MAS_REG_KMDB_SWITCH, 0x0902);
1606 else
1607 mas_codec_writereg(MAS_REG_KMDB_SWITCH, 0);
1608 break;
1609#endif
1610 }
1611 if(set)
1612 {
1613#ifdef HAVE_MAS3587F
1614 mas_writemem(MAS_BANK_D0, 0x7fc, &ll, 1); /* LL */
1615 mas_writemem(MAS_BANK_D0, 0x7fd, &lr, 1); /* LR */
1616 mas_writemem(MAS_BANK_D0, 0x7fe, &rl, 1); /* RL */
1617 mas_writemem(MAS_BANK_D0, 0x7ff, &rr, 1); /* RR */
1618#else
1619 mas_writemem(MAS_BANK_D1, 0x7f8, &ll, 1); /* LL */
1620 mas_writemem(MAS_BANK_D1, 0x7f9, &lr, 1); /* LR */
1621 mas_writemem(MAS_BANK_D1, 0x7fa, &rl, 1); /* RL */
1622 mas_writemem(MAS_BANK_D1, 0x7fb, &rr, 1); /* RR */
1623#endif
1624 }
1625 }
1626
1627 return false;
1628}
1629
1630#ifdef HAVE_LCD_BITMAP 1500#ifdef HAVE_LCD_BITMAP
1631extern bool do_screendump_instead_of_usb; 1501extern bool do_screendump_instead_of_usb;
1632 1502
@@ -1677,7 +1547,6 @@ bool debug_menu(void)
1677#ifdef HAVE_FMRADIO 1547#ifdef HAVE_FMRADIO
1678 { "FM Radio", -1, dbg_fm_radio }, 1548 { "FM Radio", -1, dbg_fm_radio },
1679#endif 1549#endif
1680 { "Sound test", -1, dbg_sound },
1681 }; 1550 };
1682 1551
1683 m=menu_init( items, sizeof items / sizeof(struct menu_item), NULL, 1552 m=menu_init( items, sizeof items / sizeof(struct menu_item), NULL,