Commit graph

15366 commits

Author SHA1 Message Date
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
Udo Schläpfer
6d3dc8fce0 iBasso DX50/DX90: CPU info enhancements.
System -> Debug (Keep Out) -> View CPU stats

Will now show the current cpufreq scaling governor, minimum, current and
maximum cpufreq scaling frequency for each CPU.

This may be genric for Android kernel based devices but is only enabled
for iBasso Devices. Other maintainers may choose do adopt this.

Change-Id: I53e212f8707bf2abaa557e297293fb559ac37058
2015-01-30 20:15:21 +01:00
Chiwen Chang
3ae0f32ac3 three new DSPs
perceptual bass enhancement
- a bbe-ish group delay corrction with Biophonic EQ boost.
- precut

auditory fatigue reduction
-reduce signal in frequency that may trigger temporary threshold shift

haas surround
-frequency between f(x1) and f(x2) is always bypassed.
-can apply to side only.

Change-Id: Icb6355ce9b1c99bf2c58c9385c3c411c0ae209d3
2015-01-19 19:34:01 +01:00
Marcin Bukat
9ffd9327e3 Fix red/yellow
Change-Id: Ie01251af2cd843979b5fdefcfa541ba377d13bd7
2015-01-12 12:02:24 +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
Thomas Jarosch
2a3e1628a5 Limit more variables to file scope
Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
2015-01-11 21:40:51 +01:00
Thomas Jarosch
cfbd9cb22f Make a few local variables static
Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
2015-01-11 18:02:43 +01:00
Franklin Wei
2d41866d5a Remove playback control from XWorld, fix comments a bit
XWorld grabs the audio buffer when it starts, so there can be no playback, making the playback control menu useless :P

Change-Id: Ia4e2c207f41619ef9b028917130d6dbf7dfba054
2015-01-08 23:45:37 +01:00
Amaury Pouly
dc127f213c Clarify usb_powered() and fix some code.
Either by mistake or because its meaning changed, usb_powered() doesn't mean
what the name suggest, so clarify its meaning by renaming it to usb_powered_only.
So use of usb_powered() are replaced by usb_inserted() when it makes more sense.

Change-Id: I112887e2d8560e84587bee5f55c826dde8c806d8
Reviewed-on: http://gerrit.rockbox.org/1097
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:45:32 +01:00
Amaury Pouly
66690ca987 Get rid of USE_ROCKBOX_USB
Except for unfinished or experimental ports, it isthe case that
USE_ROCKBOX_USB and HAVE_USBSTACK are both defined or both undefined.
Furthermore, it is a leftover of some early developments on the USB stack and
doesn't make sense anymore.

Change-Id: Ic87a865b6bb4c7c9a8d45d1f0bb0f2fb536b8cad
Reviewed-on: http://gerrit.rockbox.org/1091
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2015-01-08 16:07:12 +01:00
Thomas Jarosch
fdd4aef340 Make thirty functions static to reduce binary size
If any of those functions should be (unused) API functions,
they can easily be turned back once really needed.

Detected using a new cppcheck check that
uses the internal symbol database to catch
functions that are only used in the current file.

Change-Id: Ic2b1e5b8020b76397f11cefc4e205f3b7ac1f184
2015-01-05 18:44:36 +01:00
Thomas Jarosch
7265375087 Shortcuts: Add move callback for buflib allocations
If we don't provide a callback to buflib_alloc(),
the buffer is always movable (to reduce fragmentation).

We were passing around buffers to multiple functions
that call yield() and might trigger buflib compaction.

-> add locking while we are working on the buffers.

Also added source code comments that explain
why we added the locking in that particular section.

Change-Id: Ie32867b0b735ddb2905fd4bd51342f61035f836f
2015-01-02 01:11:54 +01:00
Thomas Jarosch
9076b433d1 PictureFlow: Add move callback for buflib allocations
If we don't provide a callback to buflib_alloc(),
the buffer is always movable (to reduce fragmentation).

Since we pass our buffer to functions that call yield(),
this could lead to memory corruption on buflib compaction.

Change-Id: Id1fad1822479d692551c55cb8bc87cea7b78f759
2015-01-01 23:49:41 +01:00
Franklin Wei
b0277e4b6d XWorld: fix some typos in keymaps.h
Happy New Year!

Change-Id: I228e4b9af9561eb70f75ebb57e333c78065873df
Reviewed-on: http://gerrit.rockbox.org/1093
Reviewed-by: Thomas Jarosch <tomj@simonv.com>
Tested: Thomas Jarosch <tomj@simonv.com>
2015-01-01 17:28:22 +01:00
Franklin Wei
193c5df75d XWorld: cleanup
- Comment keymaps.h
 - Tie XWORLD_DEBUG into ROCKBOX_HAS_LOGF to ease debugging
 - Fix up the manual a little bit

Change-Id: I12cfb58001199036cd67dbaa27f164e6790a199d
Reviewed-on: http://gerrit.rockbox.org/1084
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-28 02:48:42 +01:00
Benjamin Brown
ce94c3ed86 Fix for DX50 xworld keymaps.h
Change-Id: I6bf564cf009d935ebb1d7fb77ccb2eab8c87d2c7
Reviewed-on: http://gerrit.rockbox.org/1083
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-24 12:00:00 +01:00
Benjamin Brown
339bea4b6e Fixes more red for xworlds keymaps
A temporary fix for keymaps.h, the logic needs rewritten

Change-Id: Ic8c81a5f01620ffc409cf6220b2916c0ec428dbe
Reviewed-on: http://gerrit.rockbox.org/1082
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-24 11:45:20 +01:00
Benjamin Brown
7de7c22a68 Xworld - Fixes warnings for cowond2, hifimanhm60x, ibassodx50, and
ondavx747.  Also fixes errors for ondavx777.

Change-Id: I1a5daa844759316df4dec7b869425ea9a174814b
Reviewed-on: http://gerrit.rockbox.org/1081
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-12-24 09:27:11 +01:00
Benjamin Brown
78cd5c1e24 Fixes xworld keymaps for ondavx747, hifimanhm60x, and cowond2
Change-Id: I62d7702d2e6541777f5553e27e166470004cd06d
Reviewed-on: http://gerrit.rockbox.org/1080
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-24 03:15:27 +01:00
Franklin Wei
37817268ab fix xworld building with 24-bit lcd
also fix a couple unused vars

Change-Id: Ib05d2e22dd7477bc9bd193232bd3de8a0816beb2
Reviewed-on: http://gerrit.rockbox.org/1079
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-24 03:12:03 +01:00
Michael Giacomelli
1bc3964f96 Fix compilation error.
Change-Id: Ic565444bf1df955703dfe91adaf3094e8ab9b990
2014-12-24 00:05:31 +01:00
Franklin Wei
33cb13dee5 Xworld - Another World interpreter for Rockbox
Co-conspirators: Franklin Wei, Benjamin Brown

--------------------------------------------------------------------
This work is based on:
- Fabien Sanglard's "Fabother World" based on
- Piotr Padkowski's newRaw interpreter which was based on
- Gregory Montoir's reverse engineering of
- Eric Chahi's assembly code

--------------------------------------------------------------------
Progress:

* The plugin runs pretty nicely (with sound!) on most color targets
* Keymaps for color LCD targets are complete
* The manual entry is finished
* Grayscale/monochrome support is NOT PLANNED
  - the game looks horrible in grayscale! :p

--------------------------------------------------------------------
Notes:

* The original game strings were built-in to the executable, and
  were copyrighted and could not be used.
* This port ships with an alternate set of strings by default, but
  can load the "official" strings from a file at runtime.

--------------------------------------------------------------------
To be done (in descending order of importance):

* vertical stride compatibility                          <30% done>
* optimization                                           <10% done>

Change-Id: I3155b0d97c2ac470cb8a2040f40d4139ddcebfa5
Reviewed-on: http://gerrit.rockbox.org/1077
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-23 23:48:12 +01:00
Thomas Jarosch
b681e932a9 mikmod plugin: Remove bogus doubled return statement
Stick to the safer version of those two.

Tested mikmod still works with some nice Necros .s3m files.

Change-Id: I6774cdf3345a4c89b2f9cf3bb8d832963ca30c38
2014-12-22 22:33:28 +01:00
Thomas Jarosch
71c0516d52 zxbox: Add missing break; statement
No harm done, same values are assigned
in the "default" case.

cppcheck reported:
[rockbox/apps/plugins/zxbox/tapefile.c:674] -> [rockbox/apps/plugins/zxbox/tapefile.c:681]: (warning) Buffer 'seg_desc' is being written before its old content has been used. 'break;' missing?

Change-Id: I2bf044db9022c848c304f1ad88c012bd85ee61df
2014-12-22 21:50:47 +01:00
Thomas Jarosch
5d3aa1bce1 Fix red (pass pointer of 'item')
Change-Id: I2d04251519623b2531948615c35e61203f9a9940
2014-12-22 21:30:30 +01:00
Thomas Jarosch
06eeab0242 Always initialize "item"
Otherwise item.cfg_name and item.default_val
will contain garbage. It doesn't seem to have
an effect right now, but who knows what
a future refactoring might do.

cppcheck reported:
[rockbox/apps/settings.c:1268]: (error) Uninitialized variable: item

Change-Id: Ic4d0c302929613de8f291cd2d69cd39db8711107
2014-12-22 21:12:11 +01:00
Thomas Jarosch
9a5f7ce0f2 wavrecord plugin: Add harmless sanity check
cppcheck reported:
[rockbox/apps/plugins/wavrecord.c:3672]: (error) Array 'sampr[9][2]' index sampr[9][1] out of bounds.

Change-Id: Ib1e9c25842aa275b15d8d817018cc523269b1f42
2014-12-21 17:22:09 +01:00
Thomas Jarosch
c54537a663 Prevent theoretical out-of-bounds access in STM_Load()
We should be safe since STM_Load() should
never be called if STM_Test() fails.
Still it's better safe than sorry.

cppcheck reported:
[rockbox/apps/plugins/mikmod/load_stm.c:302]: (error) Array 'STM_Version[3]' accessed at index 3, which is out of bounds.

Change-Id: I914935fd108c492d013de24d17dcb9c227af6cd8
2014-12-20 13:37:40 +01:00
Thomas Jarosch
f8d9e9cb6c m3u playlist parser: Check size limit before using buffer
This should only be a problem if the last line
is not terminated by \r or \n though.

cppcheck reported:
[rockbox/apps/playlist.c:234]: (style) Array index 'i' is used before limits check.

Change-Id: I8182b66272ba9c024984c81588bd2a6dbb8255b8
2014-12-20 13:14:19 +01:00
Thomas Jarosch
2caf8870af text_viewer plugin: Fix two out-of-bounds buffer accesses
Test code:
--------------
int main(void)
{
    static unsigned short extra_spaces[] = { 0, 0x3000 };
    return sizeof(extra_spaces);
}
--------------

-> returns four instead of two.

cppcheck reported:
[rockbox/apps/plugins/text_viewer/tv_text_processor.c:180]: (error) Array 'break_chars[27]' acces
sed at index 53, which is out of bounds.
[rockbox/apps/plugins/text_viewer/tv_text_processor.c:195]: (error) Array 'extra_spaces[2]' acces
sed at index 3, which is out of bounds.

Change-Id: I66c305cc5c99e59e7c8e0aa9c86cecbe293ff037
2014-12-20 12:55:20 +01:00
Thomas Jarosch
1ff5fd4d6b Fix broken buflib_handle check in backdrop settings loader
The logic was messed up and always evaluated to true
if buflib_handle is non-zero.

Thanks to JdGordon for verifying the change.

cppcheck reported:
[rockbox/apps/gui/skin_engine/skin_backdrops.c:262]: (warning) Comparison of a boolean expression with an integer other than 0 or 1.

Change-Id: Ib52a73e0a6a2017a631e2dec19b638a2974dab83
2014-12-20 12:33:26 +01:00
Szymon Dziok
b29d311623 Fix remaining errors in Polish translation.
Change-Id: I6517e0bcbf57b18f34138019fb54cd3da7728848
2014-11-10 14:09:11 +01:00
Szymon Dziok
ce88fa2f81 Polish translation update.
Change-Id: Ie1f223a23e2c0b4c4838d0cb146f65ee6b8e5f09
2014-11-10 12:34:47 +01:00
Szymon Dziok
fa11990a2c Pegbox: use the same keymap for Samsung YH820 and YH920.
Keymap for the YH820 fits much better for the YH920 anyway.

Change-Id: I54d7f3be9dfaf689e76c73d39da4649395e912a1
2014-10-22 09:59:26 +02:00
Szymon Dziok
f443570897 YH820/YH92X: Add missing StdMenu action.
Change-Id: Ife5be1b6427724b5c231e0035aca44373adb0e40
2014-10-22 09:59:26 +02:00
Szymon Dziok
b7708059a8 Rockboy plugin: remove second keymap definition for the Iriver H10, added in
594b6e2 (FS#10251).

Change-Id: I652545c812a8bd4d5d1be5f200fce9c97733b636
2014-10-22 09:59:26 +02:00
Szymon Dziok
ce33d4f48b YH820/YH92X: Improve some keymaps for plugins.
Change-Id: Ib598737327043809f60127f7c538f2d45ddabb87
2014-10-22 09:59:26 +02:00
Ivan Pesic
ac928ed7a2 Update of the Serbian translation
Change-Id: If244aabe80414cc0202f3d18c0d0defc6b0c47bf
Reviewed-on: http://gerrit.rockbox.org/1016
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-10-18 05:29:47 +02:00
Richard Burke
1e7b93a9b2 Fixed disktidy bug and added a couple of new features to disktidy.
The following updates were made to disktidy:
- Fixed bug FS#12825. disktidy now checks subdirectories again for files to delete.
- Use iterative rather than recursive method to traverse file system.
- Once disktidy finishes a run it now returns to it's main menu rather than exiting.
- Added "Last Run Stats" view to disktidy. This shows how many files and directories
  were deleted in the last run as well as the total size of those files, the length of
  time the run took and when the run took place (for players with RTC).
- Added "Playback Control" option to disktidy main menu.

Change-Id: I9b7d6d5d08aef2b5f85fb63fcd2ec60f1c1ec2e0
Reviewed-on: http://gerrit.rockbox.org/808
Reviewed-by: Franklin Wei <frankhwei536@gmail.com>
Tested: Franklin Wei <frankhwei536@gmail.com>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-10-09 09:43:40 +02:00
Szymon Dziok
877bd982a7 YH820: Add a forgotten define in aa8ba60.
Change-Id: I89a0c21f2ca09f65a4d0b3e06b4b8fed3c07bef6
2014-10-08 16:47:16 +02:00
Szymon Dziok
aa8ba60fea YH820/YH92X: Properly enable morse input.
Change-Id: I6a35d64d0859b7ef429919c260a69974d6fdfafb
2014-10-08 16:31:39 +02:00
Szymon Dziok
91bd7f1eba YH820/YH92X: Fix keymap for custom settings.
Change-Id: I8e31b416d2e45d024c304e11318f1de8220c30b2
2014-10-08 16:31:39 +02:00
Szymon Dziok
193ea0909d Samsung yh820/yh92x: add HID keymaps.
Change-Id: I575e0e858aef0090d6864837d40a7b51e996ab43
2014-10-03 00:20:09 +02:00
Franklin Wei
4991544037 New Rockblox features
- Add "Ghost piece" feature
   - on 1-bit displays, it's too hard to distinguish from "real" pieces, should it be disabled?
 - Show what your score is when you get a high score
 - Indent

Change-Id: Ibefe748bca3a84736cf1884cc0872d9c36daa613
Reviewed-on: http://gerrit.rockbox.org/990
Tested: Franklin Wei <frankhwei536@gmail.com>
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-09-29 00:56:34 +02:00
Franklin Wei
515a3c50fc Add ptable to SOURCES
Change-Id: Ie31306210e3cfe78288269574e78976b682eab31
Reviewed-on: http://gerrit.rockbox.org/981
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-09-25 00:44:40 +02:00
Franklin Wei
428641998e Ptable: hopefully fix all the warnings, modify actinide/lanthanide behavior once again
... it's ready! :)

Change-Id: Ie6e9de6097bad2d2dcca2b6d927fe748fa69f60d
Reviewed-on: http://gerrit.rockbox.org/968
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-09-25 00:15:58 +02:00
Sebastian Leonhardt
3e131abe27 YH8xx,YH9xx: Keymap Improvement
Keymaps are still work-in-progress, so wait for more.

Changes:
* standard: fix REC, so that it can be used in other mappings
  as 'exit' button
* pitchscreen: support button repeat for slow/fast playback
* keyboard:
  - change REW/FFWD mapping to backspace/page flip (more important than cursor imo)
  - use REC as cancel button
  - use FFWD as button-combo-meta-key; change cursor left/right
    to button combos, introduce OK/cancel as combos.
* recording:
  - REC exits recording screen (more consistend and more obvious imo)
  - REW enters recording menu; long REW exits

Change-Id: Ie80c2d122e4a8c6268d0f8c2fc0426cc49276110
Reviewed-on: http://gerrit.rockbox.org/953
Reviewed-by: Szymon Dziok <b0hoon@o2.pl>
Tested: Szymon Dziok <b0hoon@o2.pl>
2014-09-21 13:29:26 +02:00
Simon Rothen
0b5ad60c26 Introducing Targets iBasso DX50 & iBasso DX90
The port to for this two targets has been entirely developped by Ilia Sergachev (alias Il or xzcc). His source
can be found at https://bitbucket.org/isergachev/rockbox . The few necesary modifications for the DX90 port
was done by headwhacker form head-fi.org. Unfortunately i could not try out the final state of the DX90 port.
The port is hosted on android (without java) as standalone app. The official Firmware is required to run this port.
Ilia did modify the source files for the "android" target in the rockbox source to make the DX port work. The work I did
was to separate the code for DX50 (&DX90) from the android target.
On this Target Ilia used source from tinyalsa from AOSP. I did not touch that part of the code because I do not understand it.
What else I changed from Ilias sources besides the separation from the target "android":
* removed a dirty hack to keep backlight off
* changed value battery meter to voltage battery meter
* made all plugins compile (named target as "standalone") and added keymaps
* i added the graphics for the manual but did not do anything else for the manual yet
* minor optimizations

known bugs:
* timers are slowed donw when playback is active (tinyalsa related?)
* some minor bugs

Things to do:
* The main prolem will be how to install the app correctly. A guy called DOC2008 added a CWM (by androtab.info) to the
  official firmware and Ilia made a CWM installation script and a dualboot selector (rbutils/ibassoboot, build with
  ndk-build). We will have to find a way to install rockbox in a proper way without breaking any copyrights.
  Maybe ADB is an option but it is not enable with OF by default. Patching the OF is probably the way to go.
* All the wiki and manual

to build:
needed: android ndk installed, android sdk installed with additional build-tools 19.1.0 installed

./tools/configure
select iBasso DX50 or iBasso DX90
make -j apk

the content of rockbox.zip/.rockbox needs to be copied to /system/rockbox/app_rockbox/rockbox/ (rockbox app not needed)
the content of libs/armeabi to /system/rockbox/lib/ (rockbox app needed)

The boot selector is needed as /system/bin/MangoPlayer and the iBasso app as /system/bin/MangoPlayer_original. There
is also the "vold" file. The one from OF does not work with DX50 rockbox (DX90 works!?), the one from Ilia is necessary.

Until we have found a proper way to install it, it can only be installed following the instructions of Ilia on his
bitbucket page, using the CWM-OF and his installation script package.

Change-Id: Ic4faaf84824c162aabcc08e492cee6e0068719d0
Reviewed-on: http://gerrit.rockbox.org/941
Tested: Chiwen Chang <rock1104.tw@yahoo.com.tw>
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-09-18 18:19:01 +02:00
Michael Giacomelli
448a289da5 Disable periodic table plugin until all the compilation issues are sorted out.
Change-Id: Idb93aa9b5ad57ae1d5671ba5f17d0af0f2d201c7
2014-09-15 02:24:09 +02:00
Franklin Wei
3c33c6c2b6 hopefully fix the warnings
Change-Id: Id822234afc8906bb7c023810e902e604451ddfda
Reviewed-on: http://gerrit.rockbox.org/963
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-09-15 01:49:00 +02:00