diff --strip-trailing-cr -u -r rockbox-original/firmware/target/arm/pcm-pp.c rockbox-modified/firmware/target/arm/pcm-pp.c --- rockbox-original/firmware/target/arm/pcm-pp.c 2007-04-17 20:52:58.000000000 +0300 +++ rockbox-modified/firmware/target/arm/pcm-pp.c 2007-04-21 22:15:55.000000000 +0300 @@ -242,6 +242,8 @@ IISFIFO_WR = (*(p++))<<16; p_size-=4; } + + pcm_paused = false; } /* Stops the DMA transfer and interrupt */ @@ -271,6 +273,8 @@ void pcm_play_pause_pause(void) { + pcm_paused = true; + #if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5024 /* Disable the interrupt */ IISCONFIG &= ~0x2; @@ -316,6 +320,8 @@ IISFIFO_WR = (*(p++))<<16; p_size-=4; } + + pcm_paused = false; } void pcm_set_frequency(unsigned int frequency) diff --strip-trailing-cr -u -r rockbox-original/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c rockbox-modified/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c --- rockbox-original/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c 2007-04-22 11:40:20.000000000 +0300 +++ rockbox-modified/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c 2007-04-22 11:53:30.000000000 +0300 @@ -24,6 +24,7 @@ #include "lcd.h" #include "system.h" #include +#include "pcm_playback.h" #include "backlight-target.h" #include "pp5024.h" @@ -275,17 +276,16 @@ if(__backlight_is_on()) { - /* Turn off DMA and wait for the transfer to complete */ - /* TODO: Work out the proper delay */ - LCD_REG_6 &= ~1; - udelay(1000); - /* Copy the Rockbox framebuffer to the second framebuffer */ /* TODO: Move the second framebuffer into uncached SDRAM */ memcpy(((char*)&lcd_driver_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH), ((char *)&lcd_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH), ((height * sizeof(fb_data) * LCD_WIDTH))); - flush_icache(); + +#ifndef BOOTLOADER + if((pcm_is_playing() == false) || (pcm_is_paused() == true)) +#endif + flush_icache(); /* Restart DMA */ LCD_REG_6 |= 1; @@ -296,16 +296,14 @@ { if(__backlight_is_on()) { - /* TODO: It may be faster to swap the addresses of lcd_driver_framebuffer - * and lcd_framebuffer */ - /* Turn off DMA and wait for the transfer to complete */ - LCD_REG_6 &= ~1; - udelay(1000); - /* Copy the Rockbox framebuffer to the second framebuffer */ memcpy(lcd_driver_framebuffer, lcd_framebuffer, sizeof(fb_data) * LCD_WIDTH * LCD_HEIGHT); - flush_icache(); + +#ifndef BOOTLOADER + if((pcm_is_playing() == false) || (pcm_is_paused() == true)) +#endif + flush_icache(); /* Restart DMA */ LCD_REG_6 |= 1;