summaryrefslogtreecommitdiff
path: root/firmware/backlight.c (follow)
Commit message (Collapse)AuthorAge
* iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
* Get rid of stupid _backlight_* function namesMarcin Bukat2015-01-12
| | | | | | _remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
* All kernel objects in code shared amongs targets (core, plugins, codecs) ↵Michael Sevakis2011-02-14
| | | | | | should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
* Try to get some control over #ifdef hell in usb.c by refactoring and inline ↵Michael Sevakis2011-01-18
| | | | | | function use. SYS_USB_DISCONNECTED_ACK hasn't been doing anything useful for the USB thread; remove it. USB thread simply ignores that value. Observe only valid usb_state transitions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29084 a1c6a512-1295-4272-9138-f99709370657
* Fix #ifdef in backlight.c from previous commitBertrik Sikken2010-08-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27648 a1c6a512-1295-4272-9138-f99709370657
* Various minor cleanupsBertrik Sikken2010-08-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27647 a1c6a512-1295-4272-9138-f99709370657
* I shouldn't have touched backlight.c at all :\ Also fix the yellow in ↵Thomas Martitz2010-06-21
| | | | | | peakmeter.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27022 a1c6a512-1295-4272-9138-f99709370657
* Fix yellows and reds (one was a type, the other was rather incorrect before ↵Thomas Martitz2010-06-21
| | | | | | already) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27021 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#10362 (flickering backlight when removing hold) by preventing ↵Rob Purchase2009-11-23
| | | | | | multiple SYS_TIMEOUT events being posted the backlight thread. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23730 a1c6a512-1295-4272-9138-f99709370657
* Remove int_prio argument from timer_register, and move the only use for it ↵Rafaël Carré2009-06-29
| | | | | | | | into alpine_cdc plugin, since this plugin is only built on SH7034 Also remove it from TIMER_START() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21558 a1c6a512-1295-4272-9138-f99709370657
* Remove an #ifdef SIMULATOR in favor of using a stubThomas Martitz2009-05-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20853 a1c6a512-1295-4272-9138-f99709370657
* Fix another FS#10130 issue - Set backlight and button light brightness via ↵Boris Gjenero2009-05-01
| | | | | | the backlight thread to avoid potential concurrency issues. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20834 a1c6a512-1295-4272-9138-f99709370657
* Hopefully fix lcd_sleep() from not be being called for targets without ↵Thomas Martitz2009-04-28
| | | | | | fading at all and being and being called too early for backlight always of on PWM fading targets. Also, clean up the code a bit by renaming the function that initiates fading on PWM. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20820 a1c6a512-1295-4272-9138-f99709370657
* Move the sim stubs into a seperate file to clean backlight.c up a bit.Thomas Martitz2009-04-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20796 a1c6a512-1295-4272-9138-f99709370657
* Remove two calls backlight_lcd_sleep_countdown() more, this time in backlight.cThomas Martitz2009-04-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20795 a1c6a512-1295-4272-9138-f99709370657
* Replace the condition with a more obvious function call, which is the same.Thomas Martitz2009-04-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20794 a1c6a512-1295-4272-9138-f99709370657
* Remove the calls to backlight_lcd_sleep_countdown from target specific code ↵Thomas Martitz2009-04-26
| | | | | | and move it into backlight.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20793 a1c6a512-1295-4272-9138-f99709370657
* Remove the backlight tick task in favor of handling timeouts through a 1s ↵Thomas Martitz2009-04-26
| | | | | | timeout in the backlight thread. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20792 a1c6a512-1295-4272-9138-f99709370657
* Restructure backlight timeout management a bit by factoring out the ↵Thomas Martitz2009-04-25
| | | | | | get_current_timeout code. No functional change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20789 a1c6a512-1295-4272-9138-f99709370657
* Fix red.Thomas Martitz2009-04-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20785 a1c6a512-1295-4272-9138-f99709370657
* Rename _buttonlight_timeout and use a function call instead of extern'ing ↵Thomas Martitz2009-04-25
| | | | | | buttonlight_timeout to be more inline with backlight, and use a #define instead of a const variable for !HAVE_LCD_SLEEP_SETTING (no functional changes) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20784 a1c6a512-1295-4272-9138-f99709370657
* Add forgotton colon and fix red.Thomas Martitz2009-04-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20779 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#10130 (Concurrent backlight function calls from backlight timeout ↵Thomas Martitz2009-04-24
| | | | | | settings menu) by ensuring that all calls of target-specific backlight code happen from backlight thread git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20778 a1c6a512-1295-4272-9138-f99709370657
* FS#10129 - Start LCD sleep timer after PWM fadeout is completeBoris Gjenero2009-04-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20774 a1c6a512-1295-4272-9138-f99709370657
* Add a rockbox kernel thread for simulator specific tasks, and use that for ↵Jens Arnold2009-02-20
| | | | | | calling the screendump function(s). Fixes screendump in simulators for backlight-less targets (Ondio), and reduces mixing of unrelated functionality a bit (screendump was called from backlight thread, triggered by a sim-only system wide event). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20065 a1c6a512-1295-4272-9138-f99709370657
* Move screendump from apps to firmware, solving two nasty firmware-to-apps ↵Jens Arnold2009-02-10
| | | | | | calls. This required to move the filename creation functions as well. * Fix bug in the BMP header of Clip screendumps. * Add remote screendump for targets with an LCD remote. * Simplify some ifdefs and rename a macro in the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19967 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9724, which reworks the preprocessor defines related to backlight ↵Thomas Martitz2009-01-26
| | | | | | fading to a CONFIG_BACKLIGHT_FADING style. The apps/ code will only see which setting is supposed to be used, specific backlight fading handling is kept in firmware, slightly reword the manual text about software fading too with regards to the Gigabeat S git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19860 a1c6a512-1295-4272-9138-f99709370657
* Rename software backlight fading files, as we don't call it thread fading. ↵Thomas Martitz2009-01-22
| | | | | | Correct a copyright info too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19818 a1c6a512-1295-4272-9138-f99709370657
* Commit part 1 of FS#9663 by Thomas Martitz. Enables backlight fading on the ↵Michael Giacomelli2009-01-18
| | | | | | Fuze and e200v2. Also removed a bit of dead code that was copied by accident into the fuze and e200v2 config files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19791 a1c6a512-1295-4272-9138-f99709370657
* Use cookies for thread identification instead of pointers directly which ↵Michael Sevakis2008-12-10
| | | | | | gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
* Straighten out some powermanagement stuff. Give target complete control over ↵Michael Sevakis2008-12-03
| | | | | | how power inputs are sensed. Clean SIMULATOR stuff out of target files. Get rid of USB charging option on targets that don't support it or don't implement it yet. Menu string remains to avoid language incompatibility but should be removed on next cleanup for targets not using it (notice in english.lang). global_settings becomes incompatible for some builds and so plugin API version is incremented. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19315 a1c6a512-1295-4272-9138-f99709370657
* Fix reds. Also note my r19221 commit message had a typo - shoudld have been ↵Steve Bavin2008-11-26
| | | | | | e200/c200, not e100. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19224 a1c6a512-1295-4272-9138-f99709370657
* Add software backlight fading for E100/H300/X5/D2, by Thomas Martitz and ↵Steve Bavin2008-11-26
| | | | | | others - see FS#6800 for credits. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19221 a1c6a512-1295-4272-9138-f99709370657
* Revert v18522 for firmware/backlight.c, it breaks a couple of bootloadersBertrik Sikken2008-09-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18523 a1c6a512-1295-4272-9138-f99709370657
* Fix some more #includesBertrik Sikken2008-09-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18522 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Oops. Left a couple things in a bad state when using fading.Michael Sevakis2008-05-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17515 a1c6a512-1295-4272-9138-f99709370657
* Straigten-out lcd sleeping on Gigabeat F/X. Add a service function to ↵Michael Sevakis2008-05-14
| | | | | | backlight.c to handle lcd sleep timer. Make HAVE_LCD_SLEEP useable without a setting and use HAVE_LCD_SLEEP_SETTING when a setting is available in addition to HCD_HAVE_SLEEP. If a setting isn't used, the target must define the timeout to be used in the config. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17505 a1c6a512-1295-4272-9138-f99709370657
* Bring Gigabeat S bootloader one step close to a release version.Michael Sevakis2008-05-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657
* 1st/2nd Gen: Make backlight inversion adaption in the greyscale library work ↵Jens Arnold2008-04-06
| | | | | | again. is_backlight_on() can now be called from COP. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16988 a1c6a512-1295-4272-9138-f99709370657
* Allow to select the core for running the user timer on portalplayer targets. ↵Jens Arnold2008-04-04
| | | | | | * Incompatible plugin API change -> sorted API. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16965 a1c6a512-1295-4272-9138-f99709370657
* Ooops, overlooked the no-backlight stubs...Jens Arnold2008-04-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16937 a1c6a512-1295-4272-9138-f99709370657
* Greyscale library: * Implement linearisation curve flipping for 1st/2nd Gen ↵Jens Arnold2008-04-02
| | | | | | iPods (LCD is inverted when backlight is on, so the curve is also inverted). This needs a slight extension of is_backlight_on() functionality in the core. * Thorough recalibration of all reachable greyscale targets, and #ifdef cleanup. * Reduce on-target gamma a bit, because the displayable contrast range of a monochrome/greyscale isn't that high. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16936 a1c6a512-1295-4272-9138-f99709370657
* Revert accidental tree commit. /me needs a smaller enter key...Jens Arnold2008-03-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16805 a1c6a512-1295-4272-9138-f99709370657
* Cabbiev2 gigabeat background: reduce WPS backdrop filesize by storing it as ↵Jens Arnold2008-03-25
| | | | | | 24 bit BMP instead of unnecessary 32 bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16802 a1c6a512-1295-4272-9138-f99709370657
* M3: Make remote LCD hotplug work, and make 'backlight on button hold' use ↵Jens Arnold2008-03-19
| | | | | | the correct hold switch. * Kill a warning. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16711 a1c6a512-1295-4272-9138-f99709370657
* Increase backlight priority to the same level as UI so that there is no ↵Michael Giacomelli2008-03-07
| | | | | | longer a long delay when activating it during heavy CPU load. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16543 a1c6a512-1295-4272-9138-f99709370657
* Allow (almost) arbitrary backlight fade in and fade out times (on targets ↵Jens Arnold2007-11-26
| | | | | | with software PWM fading), and comvert the associated settings to table settings. * Settings system: Unify a bunch of formatters and getlang helpers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15817 a1c6a512-1295-4272-9138-f99709370657
* New way of handling integer settings with variable steps: table settings (FS ↵Jens Arnold2007-11-25
| | | | | | #8186, with fixes by me). This allows to get rid of those synchronised tables in firmware/ and apps/, making things more flexible and less error prone. First application: backlight timeouts. * Make some more things 'const'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15803 a1c6a512-1295-4272-9138-f99709370657