Rockbox

  • Status Requires testing
  • Percent Complete
    0%
  • Task Type Patches
  • Category LCD
  • Assigned To No-one
  • Operating System iPod 4G Color
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by dreamlayers - 2009-03-19
Last edited by dreamlayers - 2009-04-10

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

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.

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.

cuan commented on 2009-06-17 12:24

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.

cuan commented on 2009-06-17 14:14

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.

Is anything blocking this patch to be merged with svn ?

markz commented on 2009-11-10 04:32

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!

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.

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. :)

Argh, I should have mentioned that the DAP in question is an iPod Color (20 GB).

Synced against SVN r27090. Haven't tested it myself, because I don't have this player.

cuan commented on 2010-06-23 20:49

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.

hi. i'm new at forum, help to install a patch to rockbox on ipod, please

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing