Rockbox

Tasklist

FS#10034 - iPod Photo, Color: LCD sleep and proper LCD shutdown

Attached to Project: Rockbox
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
Task Type Patches
Category LCD
Status Requires testing
Assigned To No-one
Operating System iPod 4G Color
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This 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.
This task depends upon

Comment by Boris Gjenero (dreamlayers) - Friday, 20 March 2009, 18:36 GMT
Here is a patch implementing HAVE_LCD_SLEEP functionality for all Color and Photo iPods. The LCD timeout may be set via HAVE_LCD_SLEEP_SETTING functionality. In "Settings -> General Settings -> Display -> LCD Settings" there is a new option, "Sleep (After Backlight Off)". The default is 10 seconds.

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.
Comment by Cuan van Aswegen (cuan) - Wednesday, 17 June 2009, 12:24 GMT
I have an Ipod photo 60gig with a type 1 screen. When the LCD sleeps and then awake, the screen is scrambled and looks like it is landscape mode.
The LCD shutdown works properly though.
Comment by Cuan van Aswegen (cuan) - Wednesday, 17 June 2009, 14:14 GMT
I have an Ipod photo 60gig with a type 1 screen. When the LCD sleeps and then awake, the screen is scrambled and looks like it is landscape mode.
The LCD shutdown works properly though.
Comment by Jakub MatouĊĦek (kubiix) - Tuesday, 14 July 2009, 07:58 GMT
Is anything blocking this patch to be merged with svn ?
Comment by Mark Z. (markz) - Tuesday, 10 November 2009, 04:32 GMT
Hi. This patch puts my display to sleep properly and prevents the black lines from appearing on the screen at shutdown. The only issue is that when the screen sleeps and then comes back up, the display is upside down (!) and I have to reset the device to get it right side up again. I have a 20gb colour iPod (4G) with a type 1 LCD. Thanks for your work on this patch!
Comment by Bertrik Sikken (bertrik) - Wednesday, 27 January 2010, 20:48 GMT
Resynced patch ipod_color_photo-lcd_sleep.patch to current SVN, with the following changes:
* 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.
Comment by Michael Carr (Strife89) - Wednesday, 27 January 2010, 23:19 GMT
Compiled and working in r24352 with what is apparently a Type 2 LCD (just 20 revisions ago, it was IDed as a Type 0. How strange. :/)

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. :)
Comment by Michael Carr (Strife89) - Wednesday, 27 January 2010, 23:20 GMT
Argh, I should have mentioned that the DAP in question is an iPod Color (20 GB).
Comment by Bertrik Sikken (bertrik) - Wednesday, 23 June 2010, 17:57 GMT
Synced against SVN r27090. Haven't tested it myself, because I don't have this player.
Comment by Cuan van Aswegen (cuan) - Wednesday, 23 June 2010, 20:49 GMT
Tried patch 3 and it behaves the same as before. When the LCD goes to sleep, it wakes up scrambled and appears to be rotated clockwise 90 deg. I have a 60gig Ipod color with a type 3 display.

Loading...