Only in rockbox-modified/firmware: drivers 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-17 21:16:38.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-17 20:53:06.000000000 +0300 +++ rockbox-modified/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c 2007-04-17 20:55:18.000000000 +0300 @@ -24,6 +24,7 @@ #include "lcd.h" #include "system.h" #include +#include "pcm_playback.h" #include "backlight-target.h" #define LCD_DATA_IN_GPIO GPIOB_INPUT_VAL @@ -278,20 +279,14 @@ 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(); - /* Restart DMA */ - LCD_REG_6 |= 1; + if((pcm_is_playing() == false) || (pcm_is_paused() == true)) + flush_icache(); } } @@ -299,19 +294,12 @@ { 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(); - /* Restart DMA */ - LCD_REG_6 |= 1; + if((pcm_is_playing() == false) || (pcm_is_paused() == true)) + flush_icache(); } }