Commit graph

195 commits

Author SHA1 Message Date
Christian Soffke
7e0e4fe888 Add setting to hide shutdown message
Also keeps display from lighting up before shutdown,
which reduces distractions, especially at night and
when the sleep timer is used by allowing the
screen to remain dark.

Change-Id: I1c2d1966f6fb9766532adf01e8828876a871857f
2021-12-08 22:26:38 -05:00
Sebastian Leonhardt
3e504c3dcd Fix reversal of "always/never" in "LCD setting > Sleep (After Backlight Off)"
The bug was introduced in a06d9c8.
The patch also fixes some (more or less) related obsolete comments.

Change-Id: I5e491d64574c37cdbc46b146d7cfc555d86b9a11
2019-06-27 14:19:05 +02:00
Sebastian Leonhardt
287685932e Fix lcd not waking up when backlight is always off
This patch is relevant for targets with a transflective display.
If the backlight was set to "always off" (e.g. to use the lcd
in a pure passive way), and the sleep timer ran off, the LCD
would stay disabled and didn't wake up when a button is pressed.

Change-Id: I0a157c7f421d9fc4c7d8ba903f2cf93f6cef51d0
2019-02-07 22:10:52 +01:00
William Wilgus
a06d9c85f7 Auto-Ranging Time Formatting For Menus (hh:mm:ss:mss)
Unifies time formatting in settings_list.c allows time format to
display as HH:MM:SS.MSS or any consecutive combination thereof
(hh:mm:ss, mm:ss, mm:ss.mss, ss.mss, hh, mm, ss ,mss)
works in INT and TABLE settings with the addition of flag 'F_TIME_SETTING'

Time is auto-ranged dependent on value

Adds talk_time_intervals to allow time values to be spoken similar to
display format:  x Hours, x Minutes, x Seconds, x Milliseconds

Table lookups merged or removed from recording, clip meter and lcd timeout
-String_Choice replaced with TABLE_SETTING or INT_SETTING for these
functions as well, cleaned-up cfg_vals that get saved to cfgfile

RTL Languages ARE supported

Negative values ARE supported

Backlight on/off are now Always and Never to share formatter with LCD
Timeout

Added flag to allow ranged units to be locked to a minimum index

Added flag to allow leading zero to be supressed from the largest unit

merged talk_time_unit() and talk_time_intervals()

optimized time_split()

optimized format_time_auto()

Backlight time-out list same as original

Change-Id: I59027c62d3f2956bd16fdcc1a48b2ac32c084abd
2018-12-22 12:27:21 -06:00
William Wilgus
dc87e9e9f3 Selective Backlight/Advanced Softlock - Selective actions based on context
Selective backlight allows the user to choose actions that will not
enable the backlight when pressed.

Advanced softlock allows user to choose actions that  will not be
blocked by screenlock on devices without a hold button.

Both only occur in FM and WPS Contexts.

Update:
Back from the dead
-Cleaned up code, removed unnecessary calls, re-arranged last filter action
  timeout conditional to work in case last_filtered_action_tick was never set
-Added entries to the manual
-Fixed back button on some menus not activating backlight
-Made menus more intuitive, no actions selected now changes menu item to off.
-Added talk fuctionality.
-Added option to disable selective backlight while on external power.
-Rewrote backlight and softlock handling code to fix issue with scrollwheels
-Menu changed to have toggle(yes/no) and settings
-Optimized selective actions lookup
-Added option to disable notification of 'buttons locked' while softlocked
-Removed uneeded code, consolidated action lookup to single function
-Fixed incorrect name on selective softlock menu
-Added option to disable touch on touchscreen devices
-Fixed backlight on original screenlock without selective screenlock active
-Added text selection in mask_select for when show_icons is off
-Fixed voice in mask_select to speak if voice is defined instead of spelling
-Added more lang defines (play skip seek)
-Added option to disable unknown keys turning on backlight
-Fixed Conditional argument In wrong place causing players without
	backlight to fail to build
-Fixed Disable Unknown blocking detection of context change
-Fixed canceling menu didn't update new settings
-Added Autolock on backlight off
-Removed backlight_on_force from backlight.c, Now sets ignore next to false
	and uses backlight_on
-Cleaned up autolock code added strings to lang file
-Fixed issue where rapid presses would bypass softlock
-Removed old softlock code, Cleaned selective actions code
-Changed menu to match existing RB menus
-Fixed Backlight_on_Hold blocked by backlight_ignore_next
-Fixed ignore_next for ipod
-Fixed bug allowing context with softlock to bypass selective backlight
-Changed mask_select to no longer prompt for changes to be saved
-Changed menu names
-Added ignore timeout to allow ipod scroll wheel to work properly and other
 players to still work properly, removed some previous code including
 ignore_event
-Increased ignore timeout to prevent sd card accesses from interrupting action
 code and turning on backlight
-Changed Unknown action to unmapped action in menu, changed handling code
-Removed unneeded logic and variables for handling unfiltered actions
-Reverted unmapped action code to previous functionality
-Added manual entries (thanks JohnB)
-Removed elusive unhandled unicode character from manual, changed formatting slightly

Actions:
Volume,Play,Seek,Skip

Extras:
Disable unmapped actions
Disable selective backlight on external power
Disable touch during softlock on touchscreen devices
Disable softlock notifications (power button still notifies)
Autolock on backlight off

Method:
Adds a function to ignore backlight on next call
 If selected action occurs backlight is forced on,
 Filter_first_keypress stays intact.

Selective softlock allows selected actions through, bypasses the normal
 softlock routine.

ToDo:
DONE

previous commit (#1) has attribution for folder_select.c which mask_select
is based from.

Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
2017-01-17 23:06:17 +01:00
Udo Schläpfer
dbabd0d9c3 iBasso DX50/DX90: Major code cleanup and reorganization.
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
2015-02-02 21:57:55 +01:00
Marcin Bukat
89ba7e818c Get rid of stupid _backlight_* function names
_remote_backlight_* and _buttonlight_* are cleaned as well

Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2015-01-12 11:09:27 +01:00
Michael Sevakis
b15aa47c56 All kernel objects in code shared amongs targets (core, plugins, codecs) 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
2011-02-14 11:27:45 +00:00
Michael Sevakis
453550a687 Try to get some control over #ifdef hell in usb.c by refactoring and inline 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
2011-01-18 14:10:06 +00:00
Bertrik Sikken
38caf2c807 Fix #ifdef in backlight.c from previous commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27648 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 10:17:17 +00:00
Bertrik Sikken
3a8e7e644b Various minor cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27647 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 10:07:05 +00:00
Thomas Martitz
4e26db3f35 I shouldn't have touched backlight.c at all :\ Also fix the yellow in peakmeter.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27022 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 17:26:50 +00:00
Thomas Martitz
637010541a Fix yellows and reds (one was a type, the other was rather incorrect before already)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27021 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 17:10:22 +00:00
Thomas Martitz
35e8b1429a Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #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
2010-06-21 16:53:00 +00:00
Rob Purchase
0b30eb79b1 Fix FS#10362 (flickering backlight when removing hold) by preventing multiple SYS_TIMEOUT events being posted the backlight thread.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23730 a1c6a512-1295-4272-9138-f99709370657
2009-11-23 23:30:55 +00:00
Rafaël Carré
89ccd5c145 Remove int_prio argument from timer_register, and move the only use for it 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
2009-06-29 14:29:46 +00:00
Thomas Martitz
b2b3f39403 Remove an #ifdef SIMULATOR in favor of using a stub
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20853 a1c6a512-1295-4272-9138-f99709370657
2009-05-05 08:43:32 +00:00
Boris Gjenero
f4943b90e6 Fix another FS#10130 issue - Set backlight and button light brightness via the backlight thread to avoid potential concurrency issues.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20834 a1c6a512-1295-4272-9138-f99709370657
2009-05-01 03:18:20 +00:00
Thomas Martitz
14731bc3e2 Hopefully fix lcd_sleep() from not be being called for targets without 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
2009-04-28 08:57:38 +00:00
Thomas Martitz
0a5beba823 Move the sim stubs into a seperate file to clean backlight.c up a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20796 a1c6a512-1295-4272-9138-f99709370657
2009-04-26 02:27:11 +00:00
Thomas Martitz
179ac1039b Remove two calls backlight_lcd_sleep_countdown() more, this time in backlight.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20795 a1c6a512-1295-4272-9138-f99709370657
2009-04-26 02:02:46 +00:00
Thomas Martitz
cbe67dcc9d Replace the condition with a more obvious function call, which is the same.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20794 a1c6a512-1295-4272-9138-f99709370657
2009-04-26 01:35:19 +00:00
Thomas Martitz
6abae1f124 Remove the calls to backlight_lcd_sleep_countdown from target specific code and move it into backlight.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20793 a1c6a512-1295-4272-9138-f99709370657
2009-04-26 01:23:39 +00:00
Thomas Martitz
c40af94d12 Remove the backlight tick task in favor of handling timeouts through a 1s timeout in the backlight thread.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20792 a1c6a512-1295-4272-9138-f99709370657
2009-04-26 00:47:35 +00:00
Thomas Martitz
5b316afcfd Restructure backlight timeout management a bit by factoring out the get_current_timeout code. No functional change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20789 a1c6a512-1295-4272-9138-f99709370657
2009-04-25 21:11:16 +00:00
Thomas Martitz
7a4145c47a Fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20785 a1c6a512-1295-4272-9138-f99709370657
2009-04-25 18:39:05 +00:00
Thomas Martitz
0017dfbe82 Rename _buttonlight_timeout and use a function call instead of extern'ing 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
2009-04-25 18:15:50 +00:00
Thomas Martitz
b056f0637c Add forgotton colon and fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20779 a1c6a512-1295-4272-9138-f99709370657
2009-04-24 09:08:43 +00:00
Thomas Martitz
b0ac944364 Fix FS#10130 (Concurrent backlight function calls from backlight timeout 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
2009-04-24 08:54:10 +00:00
Boris Gjenero
d50d1df817 FS#10129 - Start LCD sleep timer after PWM fadeout is complete
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20774 a1c6a512-1295-4272-9138-f99709370657
2009-04-21 21:49:29 +00:00
Jens Arnold
3e67e3b1f0 Add a rockbox kernel thread for simulator specific tasks, and use that for 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
2009-02-20 17:13:08 +00:00
Jens Arnold
11ad7b4bc8 Move screendump from apps to firmware, solving two nasty firmware-to-apps 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
2009-02-10 23:43:37 +00:00
Thomas Martitz
12a0ed3b8d Commit FS#9724, which reworks the preprocessor defines related to backlight 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
2009-01-26 23:21:49 +00:00
Thomas Martitz
81df953da5 Rename software backlight fading files, as we don't call it thread fading. Correct a copyright info too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19818 a1c6a512-1295-4272-9138-f99709370657
2009-01-22 10:50:11 +00:00
Michael Giacomelli
7278163087 Commit part 1 of FS#9663 by Thomas Martitz. Enables backlight fading on the 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
2009-01-18 18:43:58 +00:00
Michael Sevakis
8cfbd3604f Use cookies for thread identification instead of pointers directly which 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
2008-12-10 08:57:10 +00:00
Michael Sevakis
58eb784a5d Straighten out some powermanagement stuff. Give target complete control over 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
2008-12-03 19:54:25 +00:00
Steve Bavin
b70f575023 Fix reds. Also note my r19221 commit message had a typo - shoudld have been e200/c200, not e100.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19224 a1c6a512-1295-4272-9138-f99709370657
2008-11-26 10:21:03 +00:00
Steve Bavin
f684726580 Add software backlight fading for E100/H300/X5/D2, by Thomas Martitz and others - see FS#6800 for credits.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19221 a1c6a512-1295-4272-9138-f99709370657
2008-11-26 08:26:13 +00:00
Bertrik Sikken
1a904eb1eb Revert v18522 for firmware/backlight.c, it breaks a couple of bootloaders
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18523 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 20:01:07 +00:00
Bertrik Sikken
f13184e472 Fix some more #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18522 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 19:50:55 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
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
2008-06-28 18:10:04 +00:00
Michael Sevakis
955d889a15 Oops. Left a couple things in a bad state when using fading.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17515 a1c6a512-1295-4272-9138-f99709370657
2008-05-14 21:29:43 +00:00
Michael Sevakis
009cebeab2 Straigten-out lcd sleeping on Gigabeat F/X. Add a service function to 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
2008-05-14 19:29:25 +00:00
Michael Sevakis
80278e45aa Bring Gigabeat S bootloader one step close to a release version.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657
2008-05-10 18:00:11 +00:00
Jens Arnold
94c6e6f337 1st/2nd Gen: Make backlight inversion adaption in the greyscale library work 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
2008-04-06 15:15:44 +00:00
Jens Arnold
ac9b92716a Allow to select the core for running the user timer on portalplayer targets. * Incompatible plugin API change -> sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16965 a1c6a512-1295-4272-9138-f99709370657
2008-04-04 19:38:46 +00:00
Jens Arnold
d5f37b2235 Ooops, overlooked the no-backlight stubs...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16937 a1c6a512-1295-4272-9138-f99709370657
2008-04-02 22:28:08 +00:00
Jens Arnold
5c87a98b97 Greyscale library: * Implement linearisation curve flipping for 1st/2nd Gen 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
2008-04-02 22:16:14 +00:00
Jens Arnold
1f4bcc86da Revert accidental tree commit. /me needs a smaller enter key...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16805 a1c6a512-1295-4272-9138-f99709370657
2008-03-25 19:57:23 +00:00