Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#5474 - Brightness & Contrast for the X5

Attached to Project: Rockbox
Opened by Rani Hod (RaeNye) - Thursday, 01 June 2006, 01:03 GMT+2
Task Type Patches
Category LCD
Status Closed
Assigned To No-one
Player Type iAudio X5
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

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).
(application/octet-stream)    contrast-brightness-x5.patch (6.3 KiB)
 firmware/export/config-iaudiox5.h           |    3 ++-
 firmware/target/coldfire/iaudio/x5/lcd-x5.c |   26 +++++++++++++++++---------
 firmware/backlight.c                        |    2 +-
 apps/settings_menu.c                        |    8 ++++----
 apps/settings.c                             |    4 ++--
 apps/settings.h                             |    7 ++++++-
 6 files changed, 32 insertions(+), 18 deletions(-)

This task depends upon

Closed by  Rani Hod (RaeNye)
Monday, 24 July 2006, 00:18 GMT+2
Reason for closing:  Accepted
Comment by Rani Hod (RaeNye) - Monday, 12 June 2006, 21:18 GMT+2
BillKerr says:

---8<------8<------8<------8<------8<---

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

#define CONFIG_BLOCK_VERSION 44

to

#define CONFIG_BLOCK_VERSION 45

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

---8<------8<------8<------8<------8<---
Comment by Christian Gmeiner (ChristianGmeiner) - Tuesday, 18 July 2006, 20:48 GMT+2
I am looking at this patch to get it into CVS.
Comment by Rani Hod (RaeNye) - Wednesday, 19 July 2006, 01:38 GMT+2
Ready for commit:
- bumped CONFIG_BLOCK_VERSION
- resynced with current CVS
- tested compilation on h1xx, h3xx, ipod photo, archos player and x5
- apply with patch -p1
(application/octet-stream)    contrast-brightness-x5.patch (6.8 KiB)
 rockbox-test/PATCHES                                     |only
 rockbox-test/apps/settings.c                             |    6 +++---
 rockbox-test/apps/settings.c.orig                        |only
 rockbox-test/apps/settings.h                             |    7 ++++++-
 rockbox-test/apps/settings.h.orig                        |only
 rockbox-test/apps/settings_menu.c                        |    8 ++++----
 rockbox-test/apps/settings_menu.c.orig                   |only
 rockbox-test/build-archos                                |only
 rockbox-test/build-h1xx                                  |only
 rockbox-test/build-h3xx                                  |only
 rockbox-test/build-ipod                                  |only
 rockbox-test/build-x5                                    |only
 rockbox-test/firmware/backlight.c                        |    2 +-
 rockbox-test/firmware/export/config-iaudiox5.h           |    3 ++-
 rockbox-test/firmware/target/coldfire/iaudio/x5/lcd-x5.c |   11 ++++++++---
 rockbox-test/tools/bmp2rb                                |only
 rockbox-test/tools/codepages                             |only
 rockbox-test/tools/convbdf                               |only
 rockbox-test/tools/descramble                            |only
 rockbox-test/tools/descramble.o                          |only
 rockbox-test/tools/generate_rocklatin                    |only
 rockbox-test/tools/ipod_fw                               |only
 rockbox-test/tools/iriver.o                              |only
 rockbox-test/tools/mkboot                                |only
 rockbox-test/tools/rdf2binary                            |only
 rockbox-test/tools/scramble                              |only
 rockbox-test/tools/scramble.o                            |only
 rockbox-test/tools/sh2d                                  |only
 rockbox-test/tools/ucl/src/alloc.o                       |only
 rockbox-test/tools/ucl/src/io.o                          |only
 rockbox-test/tools/ucl/src/libucl.a                      |only
 rockbox-test/tools/ucl/src/n2b_99.o                      |only
 rockbox-test/tools/ucl/src/n2b_d.o                       |only
 rockbox-test/tools/ucl/src/n2b_ds.o                      |only
 rockbox-test/tools/ucl/src/n2b_to.o                      |only
 rockbox-test/tools/ucl/src/n2d_99.o                      |only
 rockbox-test/tools/ucl/src/n2d_d.o                       |only
 rockbox-test/tools/ucl/src/n2d_ds.o                      |only
 rockbox-test/tools/ucl/src/n2d_to.o                      |only
 rockbox-test/tools/ucl/src/n2e_99.o                      |only
 rockbox-test/tools/ucl/src/n2e_d.o                       |only
 rockbox-test/tools/ucl/src/n2e_ds.o                      |only
 rockbox-test/tools/ucl/src/n2e_to.o                      |only
 rockbox-test/tools/ucl/src/ucl_crc.o                     |only
 rockbox-test/tools/ucl/src/ucl_dll.o                     |only
 rockbox-test/tools/ucl/src/ucl_init.o                    |only
 rockbox-test/tools/ucl/src/ucl_ptr.o                     |only
 rockbox-test/tools/ucl/src/ucl_str.o                     |only
 rockbox-test/tools/ucl/src/ucl_util.o                    |only
 rockbox-test/tools/ucl/uclpack.o                         |only
 rockbox-test/tools/uclpack                               |only
 51 files changed, 24 insertions(+), 13 deletions(-)

Comment by Christian Gmeiner (ChristianGmeiner) - Wednesday, 19 July 2006, 09:34 GMT+2
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, 16:35 GMT+2
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
http://www.rockbox.org/twiki/bin/view/Main/IaudioX5HardwareComponents#LCD_Varitronix_COG_T180MLH
page 31 describes POWER_REG_5 (0x0e) and page 34 describes the relevant field (VDV).

The OF sets contrast in the same manner.

Loading...