Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Deprecated: Function create_function() is deprecated in /sites/ on line 104 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /sites/ on line 845 Deprecated: Function create_function() is deprecated in /sites/ on line 111 FS#6417 : LCD Brightness for Nano



FS#6417 - LCD Brightness for Nano

Attached to Project: Rockbox
Opened by Billy (ipodfoo) - Wednesday, 06 December 2006, 18:58 GMT
Last edited by Dave Chapman (linuxstb) - Saturday, 17 November 2007, 22:53 GMT
Task Type Feature Requests
Category LCD
Status Closed
Assigned To No-one
Operating System iPod Nano
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Anyone know where the lcd brightness patch is for the nano. I tried the one from but it doesnt show up in the menu on the nano. Senab used to have a patch for lcd brightness but I cant seem to find it anymore. Cheers for any pointers.
This task depends upon

Closed by  Bj√∂rn Stenberg (zagor)
Saturday, 17 November 2007, 22:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  Closing all feature requests.
Comment by Ralf Herz (herz42) - Friday, 08 December 2006, 08:30 GMT
You can try to add the same lines that the patch inserts to config-ipodvideo.h to config-ipodnano.h:


/* LCD backlight brightness range and defaults */
#define MIN_BRIGHTNESS_SETTING 2 /* 2/16 (12.50%) */
#define MAX_BRIGHTNESS_SETTING 15 /* 15/16 (93.75%) */
#define DEFAULT_BRIGHTNESS_SETTING 9 /* 9/16 (56.25%) */
Comment by Billy (ipodfoo) - Friday, 15 December 2006, 14:28 GMT
Tried the above, make comes up with this error:
CC backlight.c
backlight.c: In function `backlight_set_brightness':
backlight.c:798: error: `bl_brightness' undeclared (first use in this function)
backlight.c:798: error: (Each undeclared identifier is reported only once
backlight.c:798: error: for each function it appears in.)
backlight.c:798: error: `bl_brightness_map' undeclared (first use in this funct
make[1]: *** [/home/user/rockbox-devel-181106/nano-sim/firmware/backlight.o] Er
ror 1
make: *** [all] Error 2
Comment by Ralf Herz (herz42) - Saturday, 16 December 2006, 08:00 GMT
hmm, that looks exactly like the error that was reported some time ago for #5234.
After that I have adapted the patch to the latest CVS.

I have update the patch in #5234 again to include the defines for the nano.
Please try to patch a clean CVS checkout with that and let us know if that works there.
Comment by Billy (ipodfoo) - Saturday, 16 December 2006, 11:06 GMT
Im actually using source build date 18th 11 2006 due to bmp resize patch for album art. I tried the older versions of the brightness, but the last hunk doesnt apply as the code dont match up. The code in the source's backlight.c "in the way" is:

#endif /* HAVE_REMOTE_LCD */

void backlight_set_brightness(int val)

And the patch needs to go:

+void backlight_set_brightness(int val)
+ /* set ipod brightness by changing the PWM.
+ conveniently using the same range (2..15) as iriver,
+ so we have to map the range to 0..100% */
+ val &= 0x0F;
+ bl_brightness = bl_brightness_map[val];

Any ideas?
Comment by Ralf Herz (herz42) - Monday, 18 December 2006, 03:37 GMT
This looks like a messed up version of backlight.c
The #endif inside the function makes no sense (alone) and is probably a leftover from a previous try to patch which went wrong.

So get a clean CVS version again (the one from 18. Nov should also work with the latest brightness patch).
If backlight.c and the ipod config files are not modified by your other patches, you could try to only replace those with clean versions.

To see which (faulty) modifications your actual version of backlight.c contains, use cvs diff.
Comment by Billy (ipodfoo) - Monday, 18 December 2006, 13:18 GMT
Did a file check with backlight.c and config-ipodnano.h. Theyre identical to the cvs files. The other patches I apply dont touch the backlight.c or config-ipodnano.h files. Its a bit of a puzzle. :/
Comment by Billy (ipodfoo) - Monday, 18 December 2006, 14:47 GMT
Ok. It builds and works fine on the nano player. Error only shows up when trying to build the sim. Could this line from the patch be the problem?

Comment by Billy (ipodfoo) - Wednesday, 17 January 2007, 18:52 GMT
Can build the simulator if I comment out the line:


in the config-ipodnano.h

Must uncomment it when compiling for a build. Bit annoying.