--- debug_menu.c 2010-03-24 22:59:14.000000000 +0200 +++ rockbox/apps/debug_menu.c 2010-03-24 23:06:17.000000000 +0200 @@ -287,7 +289,7 @@ static bool dbg_buffering_thread(void) { int button; - int line; + int line, remote_line; bool done = false; size_t bufused; size_t bufsize = pcmbuf_get_bufsize(); @@ -300,6 +302,7 @@ tick_add_task(dbg_audio_task); + lcd_remote_setfont(FONT_SYSFIXED); lcd_setfont(FONT_SYSFIXED); while(!done) { @@ -320,24 +323,32 @@ buffering_get_debugdata(&d); line = 0; + remote_line = 0; lcd_clear_display(); + lcd_remote_clear_display(); bufused = bufsize - pcmbuf_free(); + lcd_remote_putsf(0, line, "pcm: %6ld/%ld", (long) bufused, + (long) bufsize); lcd_putsf(0, line++, "pcm: %6ld/%ld", (long) bufused, (long) bufsize); gui_scrollbar_draw(&screens[SCREEN_MAIN],0, line*8, LCD_WIDTH, 6, bufsize, 0, bufused, HORIZONTAL); line++; - + + lcd_remote_putsf(0, remote_line++, "alloc: %6ld/%ld", + audio_filebufused(), (long) filebuflen); lcd_putsf(0, line++, "alloc: %6ld/%ld", audio_filebufused(), - (long) filebuflen); + (long) filebuflen); #if LCD_HEIGHT > 80 gui_scrollbar_draw(&screens[SCREEN_MAIN],0, line*8, LCD_WIDTH, 6, filebuflen, 0, audio_filebufused(), HORIZONTAL); line++; - + + lcd_remote_putsf(0, remote_line++, "real: %6ld/%ld", + (long)d.buffered_data, (long)filebuflen); lcd_putsf(0, line++, "real: %6ld/%ld", (long)d.buffered_data, (long)filebuflen); @@ -346,8 +357,10 @@ line++; #endif + lcd_remote_putsf(0, remote_line++, "usefl: %6ld/%ld", + (long)(d.useful_data),(long)filebuflen); lcd_putsf(0, line++, "usefl: %6ld/%ld", (long)(d.useful_data), - (long)filebuflen); + (long)filebuflen); #if LCD_HEIGHT > 80 gui_scrollbar_draw(&screens[SCREEN_MAIN],0, line*8, LCD_WIDTH, 6, @@ -355,13 +368,20 @@ line++; #endif + lcd_remote_putsf(0, remote_line++, "data_rem: %ld", (long)d.data_rem); lcd_putsf(0, line++, "data_rem: %ld", (long)d.data_rem); + lcd_remote_putsf(0, remote_line++, "track count: %2d", + audio_track_count()); lcd_putsf(0, line++, "track count: %2d", audio_track_count()); - + + lcd_remote_putsf(0, remote_line++, "handle count: %d", + (int)d.num_handles); lcd_putsf(0, line++, "handle count: %d", (int)d.num_handles); #ifndef SIMULATOR + lcd_remote_putsf(0, remote_line++, "cpu freq: %3dMHz", + (int)((FREQ + 500000) / 1000000)); lcd_putsf(0, line++, "cpu freq: %3dMHz", (int)((FREQ + 500000) / 1000000)); #endif @@ -370,19 +390,28 @@ { int boostquota = boost_ticks * 1000 / ticks; /* in 0.1 % */ int avgclock = freq_sum * 10 / ticks; /* in 100 kHz */ + lcd_remote_putsf(0, remote_line++, "boost:%3d.%d%% (%d.%dMHz)", + boostquota/10, boostquota%10, avgclock/10, avgclock%10); lcd_putsf(0, line++, "boost:%3d.%d%% (%d.%dMHz)", boostquota/10, boostquota%10, avgclock/10, avgclock%10); } + lcd_remote_putsf(0, remote_line++, "pcmbufdesc: %2d/%2d", + pcmbuf_used_descs(), pcmbufdescs); lcd_putsf(0, line++, "pcmbufdesc: %2d/%2d", pcmbuf_used_descs(), pcmbufdescs); + + lcd_remote_putsf(0, remote_line++, "watermark: %6d", + (int)(d.watermark)); lcd_putsf(0, line++, "watermark: %6d", (int)(d.watermark)); + lcd_remote_update(); lcd_update(); } tick_remove_task(dbg_audio_task); + lcd_remote_setfont(FONT_UI); lcd_setfont(FONT_UI); return false;