FS#5489 - LCD shutdown for H300 and Ipod

Attached to Project: Rockbox
Opened by Karl Kurbjun (kkurbjun) - Saturday, 03 June 2006, 17:30 GMT
Last edited by Peter D'Hoye (petur) - Sunday, 04 June 2006, 00:07 GMT
Task Type Patches
Category Drivers
Status Closed
Assigned To Karl Kurbjun (kkurbjun)
Operating System All players
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch properly turns off the LCD's on the H300 and greyscale Ipods (lcd_ipod.c). I've left placeholders for the screens that I didn't add yet. I'm planning on trying to add those in as well later. This fixes the black bars that show up on the ipod mini's at shutdown.
This task depends upon

Closed by  Karl Kurbjun (kkurbjun)
Wednesday, 13 December 2006, 04:51 GMT
Reason for closing:  Rejected
Additional comments about closing:  The patch does not fix the problem that it was created for.
Comment by Karl Kurbjun (kkurbjun) - Saturday, 03 June 2006, 17:44 GMT
Opps, small fix:
Comment by Norbert Preining (norbusan) - Monday, 05 June 2006, 10:52 GMT
Hi Karl!
Does this mean that the lcd wasn't shut off before? At what times? During full shutdown and/or during blank screen while playing? This could be one source of power drain.
I will include the patch in my builds and test.
Best wishes
Comment by Matthias Larisch (Matze88m) - Monday, 05 June 2006, 21:03 GMT
Oehm... in my opinion, you shut down the LCD in Systemshutdown, so this has NO effect during normal runtime. refering to backlight.c in firmware folder, lcd_enable(false) is called, when the backlight is switched off during normal operation.

According to lcd-h300.c driver, this runs nearly the same Shutdown procedure your patch adds. Differences:
lcd_write_reg(R_POWER_CONTROL1, 0x0000); /* SAP2-0=000, AP2-0=000 */
you write 0x0500

lcd_write_reg(R_POWER_CONTROL1, 0x0001); /* STB=1: standby mode */
which is not called by your function.

I'll look into the datasheet to see what this does... but your patch does not have ANY effect in normal operation.
Comment by Matthias Larisch (Matze88m) - Monday, 05 June 2006, 21:15 GMT
oh well... i didnt really read or understood your intention, you only wanted to do a clean shutdown on shutdown :) Well, so everything is okay ^^ But maybe you should call the standby mode, too? And the BT2-0 should be 0 for optimum powersaving...
Comment by Karl Kurbjun (kkurbjun) - Thursday, 08 June 2006, 02:31 GMT
I believe the LCD has it's power cutoff by the PCF when it goes into its deep sleep mode. I still need to look into this more because the mini is still giving me the black bars at shutdown sometimes (although it seems less frequent now). Thanks for testing this patch though. Out of curiosity, what player are you using?

Are you interested in having a standby mode like the H300's when the player isn't being used? I don't know what the power draw is on the greyscale lcd's, but I don't think the savings are nearly as significant as on the color targets. If you are interested in the standby mode I can look into adding a feature like that.