FS#10034 - iPod Photo, Color: LCD sleep and proper LCD shutdown
Opened by Boris Gjenero (dreamlayers) - Thursday, 19 March 2009, 01:32 GMT
Last edited by Boris Gjenero (dreamlayers) - Friday, 10 April 2009, 00:01 GMT
|
DetailsThis patch implements HAVE_LCD_SHUTDOWN functionality for Photo and Color iPods. It is in response to issue 2 in http://forums.rockbox.org/index.php?topic=20994 : "2. The LCD screen on the iPod is not cleared properly when I shut down rockbox. I see 1-2 horizontal lines remain on the screen (which do fade after a minute or so). Nothing is wrong with my IPod's LCD screen as I did not experience this with Apple's Firmware"
It seems the Color iPod can have 4 different LCDs. They're detected via two GPIO bits in lcd-color_nano.c. Types 0 and 2 are the old LCD with an unknown controller and they use the same init, shutdown and update procedures, and they are reported as 0. Types 1 and 3 are similar to HD66789R. They have different init and shutdown procedures but they share the same update procedure. Both 1 and 3 were reported as 1 earlier. To see what LCD type you have, from the main menu go to System -> Debug (Keep Out) -> View HW Info and then see the number after "LCD type:". This patch has only been tested with LCD type 3 so far. I am submitting this as a patch because I feel it is not a significant bug. Theoretically, the DC voltage that's left can degrade the LCD, but the line fades quickly and no negative after-effects were reported. I would like to also add LCD initialization code and develop HAVE_LCD_SLEEP functionality. |
The patch also takes care of HAVE_LCD_SHUTDOWN, so that the LCD is shut down properly when turning off the iPod. The LCD should be perfectly blank at shutdown. It should also be perfectly blank when asleep.
These iPods can have four different LCD panels. If you've tested this patch, report your "LCD type" from "System -> Debug (Keep Out) -> View HW Info".
To avoid build errors, "make clean" or apply
FS#9936"When only config-*.h is changed, apps/features is not updated."I did not add LCD initialization at startup. I think it would just slow down startup and make the LCD flash as it is reset. It would be useful when loading Rockbox from Rockbox via ROLO, but it's simpler to just make ROLO ensure that the LCD is on. If people want the full LCD init, I'll add it.
To reduce memory usage, LCD sleep and awake sequences are in arrays. A function reads the arrays and performs operations.
If this goes well, I'll also add support for the Nano. If it doesn't, then I guess I'm being stupid for releasing something I cannot test.
I moved the lcd_awake() prototype from backlight-target.h to lcd.h. After r20331, I think it can be a standard way of turning on the LCD after lcd_sleep() when there is no lcd_enable.
The LCD shutdown works properly though.
The LCD shutdown works properly though.
* applied modifications on firmware/export/config-ipodcolor.h to firmware/export/config/ipodcolor.h
* replaced lcd_activation_call_hook invocation by send_event(LCD_EVENT_ACTIVATION, NULL)
I don't have this target, so I haven't tested, but it does compile and link.
To test, I simply started a playlist and let the LCD turn off completely. No apparent problems occurred when I turned the LCD back on. :)