From 3a7d397f20a6f5a3b7c5c47ae91312339acbf8c5 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 23 Mar 2004 07:10:03 +0000 Subject: [PATCH] Added Super Bass switch to the sound test debug screen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4434 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index d7dd1a20b7..73c653af75 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1478,6 +1478,10 @@ static bool dbg_sound(void) 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); @@ -1492,6 +1496,11 @@ static bool dbg_sound(void) 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; @@ -1503,6 +1512,10 @@ static bool dbg_sound(void) snprintf(buf, sizeof buf, "LR: -%d.%02d (%05x)", i, d % 100, lr); 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 */ @@ -1547,6 +1560,14 @@ static bool dbg_sound(void) 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); + break; +#endif } if(set) {