Rockbox

Tasklist

FS#9874 - sansa - Make lcd_sleep work

Attached to Project: Rockbox
Opened by Philippe Latulippe (PhilippeLatulippe) - Friday, 06 February 2009, 23:22 GMT
Last edited by Dominik Riebeling (bluebrother) - Sunday, 05 June 2011, 09:35 GMT
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Operating System Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch allows "Sleep (After Backlight Off)" to work on sansa e200 targets. A change made in revision 13250, during the early days of Sansa development, prevented it from working by automatically turning off the LCD controller in conjunction with the backlight (to save power.)

This patch simply removes the line that turns the LCD controller off, and lets the newer LCD sleep timer to do its job. I've kept the call to turn it back on just in case. Wouldn't want to accidentally keep the LCD controller turned off. It shouldn't have any negative effect, as lcd_enable(true) immediately returns if the LCD is already powered.

I tested it on my sansa e250, but a simple change like this should work on all Sansa e200 & c200

This task depends upon

Closed by  Dominik Riebeling (bluebrother)
Sunday, 05 June 2011, 09:35 GMT
Reason for closing:  Out of Date
Additional comments about closing:  "Sleep (After Backlight Off)" works on the e200 these days.
Comment by MichaelGiacomelli (saratoga) - Saturday, 07 February 2009, 02:14 GMT
Just to be clear, you mean that presently we turn off the back light but not the LCD controller? Do you know how much this patch improves battery life?
Comment by Philippe Latulippe (PhilippeLatulippe) - Saturday, 07 February 2009, 16:49 GMT
The opposite actually. Currently when the backlight is turned off, so is the LCD controller. However, this is done in _backlight_off(), which shouldn't be turning off the LCD controller, as it is already implemented in a non-target-specific part of the code.
Because backlight-c200_e200.c always turns off the LCD controller, it breaks the ability for the user to chose how long to wait before turning off the LCD controller.
So:
1. User sets backlight to turn off after 5 seconds of inactivity.
2. User sets LCD controller to sleep 5 seconds after backlight turns off.
5 seconds later:
4. The (non-target-specific) countdown timer calls the (target-specific) method to turn off the backlight.
5. On Sansa, the method to turn off the backlight also turns off the LCD controller.
Both the backlight and LCD are turned off.
5 seconds later:
6. The LCD sleep timer attempts to turn off the LCD controller. Nothing actually happens, as it has already been turned off previously!

The reason I actually care about this is because keeping the LCD on after the backlight shuts off allows me to read the screen when I'm outside and the sun illuminates the screen.

Comment by Boris Gjenero (dreamlayers) - Monday, 02 March 2009, 01:51 GMT
See some of the discussion in  FS#9890 . There it was decided that HAVE_LCD_ENABLE shouldn't be defined if the LCD isn't turned off with the backlight.
Is the Sansa LCD usable without the backlight?
Comment by Philippe Latulippe (PhilippeLatulippe) - Monday, 02 March 2009, 16:06 GMT
Yes, it's usable in direct sunlight, which is quite useful for me. I'm not completely certain what  FS#9890  would entail for my patch, as I only read part of it (the parts relevant to me are padded by a sea of battery benchmarks and unrelated problems), but I do beleive my patch is still valid. I don't think the LCD controller should be shutdown in the target-specific _backlight_off(), as it is already done in non-target-specific code (even if taking  FS#9890  into consideration), and also renders the "Sleep (After Backlight Off)" option useless.

Loading...