FS#10129 - LCD sleep timer should start after PWM fadeout

Attached to Project: Rockbox
Opened by Boris Gjenero (dreamlayers) - Tuesday, 14 April 2009, 03:23 GMT
Last edited by Boris Gjenero (dreamlayers) - Tuesday, 21 April 2009, 22:01 GMT
Task Type Bugs
Category LCD
Status Closed
Assigned To No-one
Operating System iPod 5G
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Currently, the LCD sleep timer starts at the beginning of backlight PWM fade-out. This means that if LCD "Sleep (After Backlight Off)" is set to "Always" and "Backlight Fade Out" isn't off, the LCD will go white at the beginning of the fade. This is ugly and unpleasant. A simple workaround is to set "Sleep (After Backlight Off)" to "5" (seconds) instead of "Always". This attached patch fixes the problem.

This is a known issue with  FS#9890  iPod 5G LCD sleep. The patch is "lcd_sleep_after_pwm_fadeout.patch" from that task. However, it is actually a separate issue in platform independent code, so I guess it needs its own FS entry.

Note that a PWM fade can end in 3 different ways:
1) The LCD fades and the timer ISR handles the end.
2) Other code calls timer_register(), so the fade is interrupted, and backlight_release_timer() is called.
3) timer_register() fails.
Of these 1) is the only case which normally happens, but the patch handles all three.

(Behaviour confirmed and patch tested with r20696)
This task depends upon

Closed by  Boris Gjenero (dreamlayers)
Tuesday, 21 April 2009, 22:01 GMT
Reason for closing:  Accepted
Additional comments about closing:  r20774
Comment by SadurnĂ­ (sadur) - Saturday, 18 April 2009, 13:49 GMT
Applied to r20728 and works well. Now the LCD fades out as expected.