Rockbox

Tasklist

FS#5735 - Use Hold button to switch off the backlight in X5

Attached to Project: Rockbox
Opened by Bernych (bernych) - Saturday, 29 July 2006, 15:39 GMT
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Operating System iAudio X5
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

With this patch the backlight is switched off when the hold button is active.

This allow me to set the backlight preference to ON and use the hold button as backlight trigger.
It's also possible to set the hold button immediatly after powering the device on and the backlight will be switched off just after the initialization (but before the logo screen).

Have fun!
This task depends upon

Closed by  Rani Hod (RaeNye)
Tuesday, 08 August 2006, 22:07 GMT
Reason for closing:  Duplicate
Additional comments about closing:  fs #5772 implements this and was commited.
Comment by Rani Hod (RaeNye) - Saturday, 29 July 2006, 17:38 GMT
I see the same code repeating twice (maybe more) in backlight.c .
Maybe have this common code as a function?
Comment by Bernych (bernych) - Saturday, 29 July 2006, 18:01 GMT
Yes, there are three very similar codes (but not identical) in backlight.c
Some code cleaning would be good, but I choose the quick and dirty approach ;)
If you have time to improve it you are welcome...

Otherwise have you (RaeNye) found a fix for the power_off backlight fliker?
I understood that you and MichaelSevakis were working on it.
Comment by Michael Sevakis (MikeS) - Sunday, 30 July 2006, 19:49 GMT
It's not possible because there is no pullup on the ON/OFF pin on the D305A so it goes low at poweroff with the BL flashing ON (when LCD is OFF) because of perhaps draining some caps that would be drained by the LCD. The OF doesn't bother with graceful shutdown and it's probably not needed according to LinusN. I will test the benefits of shutting off the LCD for power saving with a multimeter though.
Comment by Bernych (bernych) - Sunday, 30 July 2006, 20:19 GMT
That' strange, because I don't observe such phenomen on the OF.
I tried to remove the backlight_off call on the shutdown routine, but the display still goes completly white for a moment!
Why this don't happen on the OF?
Comment by Michael Sevakis (MikeS) - Sunday, 30 July 2006, 21:15 GMT
It isn't a backlight issue (not directly). It should be off before the LCD's Vcc is cut or else you'll see a white screen. Leave the backlight_off() call as it is. It's the lcd_poweroff() call in power_off() in power-x5.c (I assume you're using  FS#5651 )? I have no problem if I let the LCD just be turned off when the power supply is cut. If do the LCD power off sequence in the datasheet just before setting KEEPACT low-- and even if I explicity turn off the backlight instead letting the backlight thread do it-- then then "blink" happens...like a camera flash.

Hope this help.
Comment by Bernych (bernych) - Monday, 31 July 2006, 07:26 GMT
Exact MikeS removing the lcd_poweroff() from power_off() solves the problem.
Thanks

Bernych
Comment by Michael Sevakis (MikeS) - Tuesday, 01 August 2006, 08:27 GMT
I'm thinking I don't want the LCD off just because I use the hold switch. In fact, I'd like a way to get the display visible again without releasing the hold switch (unholding the player takes a good grip on it).

BTW: I have been put to the task of getting some lcd power stuff implemented well and integrating your patch with it along with a setting. I think maybe there should be a special backlight setting value as well for this because, like I said, it's not a behavior I like. :) This needs to be thought out carefully.

Loading...