summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-07-31 12:55:27 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-07-31 12:55:27 +0000
commit1ae0cdbc468d929ce1b8d9b8e1e95609feff5427 (patch)
tree9e7f702b829de6ef30d498b4bc027a5208413553 /apps
parent7a47313a21c23b7e3e3ce69c6e799beb6bbf3548 (diff)
downloadrockbox-1ae0cdbc468d929ce1b8d9b8e1e95609feff5427.tar.gz
rockbox-1ae0cdbc468d929ce1b8d9b8e1e95609feff5427.zip
I-River targets: A workaround for the recording interference hardware issue when recording with a remote. Disable remote LCD while recording by pressing vol- on the remote. All remote buttons and cliplight are still operational while lcd is disabled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10376 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang28
-rw-r--r--apps/recorder/peakmeter.c4
-rw-r--r--apps/recorder/peakmeter.h2
-rw-r--r--apps/recorder/recording.c42
-rw-r--r--apps/sound_menu.c2
5 files changed, 69 insertions, 9 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 2ae4731e42..0ea56e88e3 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -8779,3 +8779,31 @@
*: "Stop recording"
</voice>
</phrase>
+<phrase>
+ id: LANG_REMOTE_LCD_OFF
+ desc: Remote lcd off splash
+ user:
+ <source>
+ *: "Remote Display OFF"
+ </source>
+ <dest>
+ *: "Remote Display OFF"
+ </dest>
+ <voice>
+ *: "Remote Display OFF"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_REMOTE_LCD_ON
+ desc: Remote lcd off splash
+ user:
+ <source>
+ *: "(Vol- : Re-enable)"
+ </source>
+ <dest>
+ *: "(Vol- : Re-enable)"
+ </dest>
+ <voice>
+ *: "(Vol- : Re-enable)"
+ </voice>
+</phrase> \ No newline at end of file
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index 4b8843cff3..0f8da98308 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -1169,7 +1169,7 @@ void peak_meter_draw_trig(int xpos, int ypos)
}
#endif
-int peak_meter_draw_get_btn(int x, int y[], int height)
+int peak_meter_draw_get_btn(int x, int y[], int height, int nb_screens)
{
int button = BUTTON_NONE;
long next_refresh = current_tick;
@@ -1195,7 +1195,7 @@ int peak_meter_draw_get_btn(int x, int y[], int height)
sleep(0); /* Sleep until end of current tick. */
}
if (TIME_AFTER(current_tick, next_refresh)) {
- FOR_NB_SCREENS(i)
+ for(i = 0; i < nb_screens; i++)
{
peak_meter_screen(&screens[i], x, y[i], height);
screens[i].update_rect(x, y[i], screens[i].width, height);
diff --git a/apps/recorder/peakmeter.h b/apps/recorder/peakmeter.h
index 4f92b14907..5456419181 100644
--- a/apps/recorder/peakmeter.h
+++ b/apps/recorder/peakmeter.h
@@ -29,7 +29,7 @@ extern bool peak_meter_histogram(void);
extern bool peak_meter_enabled;
extern void peak_meter_playback(bool playback);
-extern int peak_meter_draw_get_btn(int x, int y[], int height);
+extern int peak_meter_draw_get_btn(int x, int y[], int height, int nb_screens);
extern void peak_meter_set_clip_hold(int time);
extern void peak_meter_peek(void);
extern void peak_meter_init_range( bool dbfs, int range_min, int range_max);
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 06a6fd9b94..b45fc13345 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -111,6 +111,7 @@
#define REC_RC_NEXT BUTTON_RC_FF
#define REC_RC_PREV BUTTON_RC_REW
#define REC_RC_SETTINGS BUTTON_RC_MODE
+#define BUTTON_RC_DISPLAY BUTTON_RC_VOL_DOWN
#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
#define REC_SHUTDOWN (BUTTON_POWER | BUTTON_REPEAT)
@@ -155,6 +156,8 @@ bool f3_rec_screen(void);
#define MAX_FILE_SIZE 0x7F800000 /* 2 GB - 4 MB */
+int screen_update = NB_SCREENS;
+bool remote_display_on = true;
const char* const freq_str[6] =
{
"44.1kHz",
@@ -422,6 +425,16 @@ bool recording_screen(void)
if(rec_create_directory() > 0)
have_recorded = true;
+
+ if (!remote_display_on)
+ {
+ screens[1].clear_display();
+ snprintf(buf, 32, str(LANG_REMOTE_LCD_ON));
+ screens[1].puts((screens[1].width/w - strlen(buf))/2,
+ screens[1].height/(h*2) + 1, buf);
+ screens[1].update();
+ gui_syncsplash(0, true, str(LANG_REMOTE_LCD_OFF));
+ }
while(!done)
{
@@ -479,7 +492,7 @@ bool recording_screen(void)
#endif /* CONFIG_LED */
/* Wait for a button a while (HZ/10) drawing the peak meter */
- button = peak_meter_draw_get_btn(0, pm_y, h * PM_HEIGHT);
+ button = peak_meter_draw_get_btn(0, pm_y, h * PM_HEIGHT, screen_update);
if (last_audio_stat != audio_stat)
{
@@ -492,6 +505,26 @@ bool recording_screen(void)
switch(button)
{
+#ifdef BUTTON_RC_DISPLAY
+ case BUTTON_RC_DISPLAY:
+ if (remote_display_on)
+ {
+ remote_display_on = false;
+ screen_update = 1;
+ screens[1].clear_display();
+ snprintf(buf, 32, str(LANG_REMOTE_LCD_ON));
+ screens[1].puts((screens[1].width/w - strlen(buf))/2,
+ screens[1].height/(h*2) + 1, buf);
+ screens[1].update();
+ gui_syncsplash(0, true, str(LANG_REMOTE_LCD_OFF));
+ }
+ else
+ {
+ remote_display_on = true;
+ screen_update = NB_SCREENS;
+ }
+ break;
+#endif
case REC_STOPEXIT:
case REC_SHUTDOWN:
#ifdef REC_RC_STOPEXIT
@@ -1065,10 +1098,9 @@ bool recording_screen(void)
FOR_NB_SCREENS(i)
screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 5, buf);
- gui_syncstatusbar_draw(&statusbars, true);
-
- FOR_NB_SCREENS(i)
+ for(i = 0; i < screen_update; i++)
{
+ gui_statusbar_draw(&(statusbars.statusbars[i]), true);
peak_meter_screen(&screens[i], 0, pm_y[i], h*PM_HEIGHT);
screens[i].update();
}
@@ -1077,7 +1109,7 @@ bool recording_screen(void)
if (peak_meter_trigger_status() != TRIG_OFF)
{
peak_meter_draw_trig(LCD_WIDTH - TRIG_WIDTH, 4 * h);
- FOR_NB_SCREENS(i){
+ for(i = 0; i < screen_update; i++){
screens[i].update_rect(LCD_WIDTH - (TRIG_WIDTH + 2), 4 * h,
TRIG_WIDTH + 2, TRIG_HEIGHT);
}
diff --git a/apps/sound_menu.c b/apps/sound_menu.c
index 0d65bd8b9e..087ef4bd09 100644
--- a/apps/sound_menu.c
+++ b/apps/sound_menu.c
@@ -818,7 +818,7 @@ bool rectrigger(void)
FOR_NB_SCREENS(i)
pm_y[i] = screens[i].height - 8;
- button = peak_meter_draw_get_btn(0, pm_y, 8);
+ button = peak_meter_draw_get_btn(0, pm_y, 8, NB_SCREENS);
lcd_update();