• Status Closed
  • Percent Complete
  • Task Type Feature Requests
  • Category LCD
  • Assigned To No-one
  • Operating System iPod Nano
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by ipodfoo - 2006-12-06
Last edited by linuxstb - 2007-11-17

FS#6417 - LCD Brightness for Nano

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.

Closed by  zagor
2007-11-17 22:53
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Closing all feature requests.

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%) */

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
* [all] Error 2

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.

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)

  else if (val > MAX_BRIGHTNESS_SETTING)


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?

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.

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. :/

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?


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.


Available keyboard shortcuts


Task Details

Task Editing