FS#5474 - Brightness & Contrast for the X5

Attached to Project: Rockbox
Opened by Rani Hod (RaeNye) - Wednesday, 31 May 2006, 23:03 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


1. Adapted the HAVE_BACKLIGHT_BRIGHTNESS control of the H300 for the X5.
2. Added contrast control via VDV voltage of the LCD (same way that the OF does that).

Also edited settings{.h,.c,_menu.c} as appropriate.

comments for commiter:
a. please get rid of lcd_default_contrast() and replace it by DEFAULT_CONTRAST_SETTING on other platforms as well.
b. maybe it'd be wiser to #define HAVE_LCD_CONTRAST instead of checking !defined(LCD_COLOR) || defined(IAUDIO_X5).
This task depends upon

Closed by  Rani Hod (RaeNye)
Sunday, 23 July 2006, 22:18 GMT
Reason for closing:  Accepted
Comment by Rani Hod (RaeNye) - Monday, 12 June 2006, 19:18 GMT
BillKerr says:


I have managed to get the contrast & brightness patch to work!! The problem is exactly as RaeNye said: the settings need to be reset & rebuilt.
I edited apps/settings.c and changed line 97 from




This forced the stored settings to be rebuilt & reloaded. The brightness & contrast changes perfectly now.

Comment by Christian Gmeiner (ChristianGmeiner) - Tuesday, 18 July 2006, 18:48 GMT
I am looking at this patch to get it into CVS.
Comment by Rani Hod (RaeNye) - Tuesday, 18 July 2006, 23:38 GMT
Ready for commit:
- resynced with current CVS
- tested compilation on h1xx, h3xx, ipod photo, archos player and x5
- apply with patch -p1
Comment by Christian Gmeiner (ChristianGmeiner) - Wednesday, 19 July 2006, 07:34 GMT
Can you tell me in which datapaper and on with site number i can find the register call?
Comment by Rani Hod (RaeNye) - Wednesday, 19 July 2006, 14:35 GMT
Assuming you refer to the contrast part (the brightness is just modifying PWM rate as done in the H3xx),
the relevant datasheet is the first link in
page 31 describes POWER_REG_5 (0x0e) and page 34 describes the relevant field (VDV).

The OF sets contrast in the same manner.