Commit graph

32408 commits

Author SHA1 Message Date
Amaury Pouly
ccfa51835e Add hwstub support for portal player (manufacturer mode)
It is very similar to how e200tool from MrH works but uses the framework
of hwstub which is makes it completely trivial since we already have the
USB driver written.

Change-Id: I61cdc245d3f828c2682bcd6ecfed5a1cc0094139
2014-04-07 22:26:50 +02:00
Amaury Pouly
399acc0387 Add new tool to upload code on e200/c200/view in manufacturer mode
This is actually the trivial part of e200tool from MrH: it simply writes the
code on the bulk endpoint. Code was mostly copied from imxtools/sbloader.

Change-Id: I6c208840d23553aaf3bd8b9374e6b0337e54f3b0
2014-04-07 22:25:06 +02:00
Amaury Pouly
68370b6eea Fix red
Change-Id: Ibfc5e559f619820d6c3f7de76353e54d27e9b160
2014-04-07 11:34:19 +02:00
David Jilke
d489444119 Complete Plugin Keymaps for Creative Zen X-Fi3
This patch completes the plugin keymaps for the Zen X-Fi3 and enables those plugins for compilation.
One key was changed in "button-target.h" for compatibility with Rockboy.
This also caused the changes to "keymap-zenxfi3.c", to keep the stock functionality (no further changes in here).

Change-Id: Ic222faf89e9a9a2332a49d6e532cedb6eb16d3d7
Reviewed-on: http://gerrit.rockbox.org/762
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-04-06 20:51:12 +02:00
Michael Sevakis
8375b691e6 buffering.c: Patch up some straggling strlcpy warnings
Originating from 3661581

Some build clients finding their "standard" string.h's that don't declare
strlcpy?

Change-Id: I50d19c7cecf5ae96ee1855f77d3c2e1f42620108
2014-04-03 18:49:16 -04:00
Sebastian Leonhardt
580104db4d Vibe500: change scrollstrip and button sensitivity to defines
Apart from the fact that the original settings were much
to sensitive for my taste, they are now easier configurable.

Change-Id: If1772367fc1f34fa1255f57b1831d1f33dc34558
Reviewed-on: http://gerrit.rockbox.org/772
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-04-03 07:35:47 +02:00
Michael Sevakis
f9d60e14c9 Apparently some builds still need string.h in buffering.c
Change-Id: I99b90ab7e5b7d074b1d2d1de72267f9f2eea975b
2014-04-02 21:07:30 -04:00
Michael Sevakis
36615815bf Buffering: Remove buf_ridx and buf_widx; these data are verbose.
It is trivial to obtain all required information from the allocated
handles without maintaining global indexes. In fact, it is less
complicated and increases general thread safety.

Other miscellaneous changes (some are nice to do at this time due to
required alterations, with some particularly more relevant than others):
* Handle value 0 will no longer be returned as a valid handle but all
failures will still return a negative value. Creates consistency with
buflib and removes the need to explicitly initialize them.

* Linking a new handle is delayed until explicitly
added by the code that called add_handle, keeping it invisible
until every operation succeeds, which is safer thread-wise. If anything
fails, the handle itself may just be abandoned rather than reqiring it
be freed.

* Dump the special handling to slow buffering when the PCM buffer
is low that calls PCM buffer functions. It doesn't seem to help much
of anything these days and it's a bit of a nasty hack to directly
tie those bits together. It can of course be put back (again!) if
there really is a need for it.

* Make data waiters ping the buffering thread more than just once if
the request is taking too long. Somehow I figured out how the requests
could get forgotten about but can't remember why months later after
making the change in my branch. :-)

* Neaten up some code by using (inline) functions and packing down
parameters; remember handle allocation and movement attributes in the
handle itself rather than figuring it out each time they're needed.

Change-Id: Ibf863370da3dd805132fc135e0ad104953365183
Reviewed-on: http://gerrit.rockbox.org/764
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-04-03 02:24:03 +02:00
Marcin Bukat
bfd0179042 Revert "Update lua plugin to 5.2.3"
FILE typedef to *void needs more work to not break sim and
application builds. I checked only a few random native builds
unfortunately. Sorry for inconvenience.
2014-04-02 20:46:06 +02:00
Richard Quirk
36378988ad Update lua plugin to 5.2.3
Prior to this patch the Lua plugin used version 5.1.4. This change
reduces the number of modifications in the Lua source using some new
defines and because the upstream source is now more flexible.

Unless otherwise stated, l*.[ch] files are taken unmodified from the
upstream lua-5.2.3.

fscanf.c:
file descriptors in rockbox are just ints, they are hidden behind a
void* now so liolib requires less modifications. fscanf is updated to
use void* too.

getc.c: this is a new file required for getc implementation in lauxlib.c

lauxlib.c: LoadF replaced FILE* with int, the rockbox file
descriptor int are cast to FILE* (actually void* due to typedef).
getc uses the PREFIX version. stdin is not used, as per 5.1.4.

lbaselib.c: now uses strspn in the number parsing. print uses DEBUGF now
rather than being commented out.

lbitlib.c: use the built-in version from 5.2.3 rather than Reuben
Thomas's external library. Backwards compatible and adds some new bit
operations.

ldo.c: the LUAI_THROW/TRY defines are now in the core lua code, so have
been removed from rockconf.h

liolib.c: here the implementation has changed to use the LStream from
the original source, and cast the FILE* pointers to int. This has
reduced the number of modifications from the upstream version.

llex.c: the only change from upstream is to remove the locale include.

lmathlib.c: updated from the 5.2.3 version and re-applied the changes
that were made vs 5.1.4 for random numbers and to remove unsupported
float functions.

loadlib.c: upstream version, with the 5.1.4 changes for missing
functions.

lobject.c: upstream version, with ctype.h added and sprintf changed to
snprintf.

loslib.c: upstream version with locale.h removed and 5.1.4 changes for
unsupportable functions.

lstrlib.c: sprintf changed to snprintf.

ltable.c: upstream with the hashnum function from 5.1.4 to avoid frexp
in luai_hashnum.

luaconf.h: updated to 5.2.3 version, restored relevant parts from the
original 5.1.4 configuration. The COMPAT defines that are no longer
available are not included.

lundump.c: VERSION macro conflicts with the core Rockbox equivalent.

rocklib.c: luaL_reg is no longer available, replaced by luaL_Reg
equivalent. Moved checkboolean/optboolean functions to this file and out
of core lua files. luaL_getn is no longer available, replaced by
luaL_rawlen. luaL_register is deprecated, use the newlib/setfuncs
replacements. rli_init has to be called before setting up the newlib to
avoid overwriting the rb table.

rocklib_aux.pl: use rli_checkboolean from rocklib.c.

rocklua.c: new default bits library used, update the library loading
code with idiomatic 5.2 code.

strcspn.c: no longer needed, but strspn.c is required for strspn in
lbaselib.c

Change-Id: I0c7945c755f79083afe98ec117e1e8cf13de2651
Reviewed-on: http://gerrit.rockbox.org/774
Tested: Richard Quirk <richard.quirk@gmail.com>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-04-02 20:31:54 +02:00
Dmitry Gamza
020f16a1c7 optimize Cypress chip power supply for iriver h100 series
Before, the Cypress chip power is always turn on either from internal battery
or from usb host. In this regard, the internal battery energy was spend on the
inactive chip. Now power of the Cypress chip is enabled only on the external usb host.

Change-Id: Iae7cddd1237ea9ed93fee5404575cc01543cb00c
Reviewed-on: http://gerrit.rockbox.org/433
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-04-02 20:28:37 +02:00
Avi Eisenberg
b4a09868e1 Boost CPU before loading operations in textviewer
Change-Id: I88c813227c1c4c79fbf9cc2e0288d576a981c995
Reviewed-on: http://gerrit.rockbox.org/758
Reviewed-by: Avi Eisenberg <613ike@gmail.com>
Tested: Avi Eisenberg <613ike@gmail.com>
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-04-01 02:37:32 +02:00
Szymon Dziok
0eae33c60a Sansa View: replace real bootloader with a simple test code.
After placing the firmware.mi4 file in the root dir of the player in UMS mode of
the OF, Sansa should do stupid blinking with the backlight and buttonlight
alternately. Recovering from this state is possible through the recovery mode
(see Wiki), by putting an original copy of the firmware.mi4.

Change-Id: Ia913442b97e8c405f55c4676b9a2bf0b1b1d05d6
2014-03-27 23:31:04 +00:00
Szymon Dziok
7b015f8681 Sansa View: implement proper backlight and buttonlight switching.
Change-Id: Iab05c1fa5356efa28a4ee774bfd994b22c5661da
2014-03-27 23:23:38 +00:00
Szymon Dziok
62ac0c78c3 Sansa View: adjust two things (define fake codec, missing header file) in order
to compile the bootloader (now it should).

Change-Id: Iba6aa2f118670d66e10451eaf43dd4d83176b06a
2014-03-27 22:35:04 +00:00
Szymon Dziok
938aa8eefe Sansa View: define a GPIO bit for USB detection in order to compile the bootloader.
Change-Id: I748a49f4b48385f328946e861d1f9a026b1efd7d
2014-03-27 22:29:34 +00:00
Szymon Dziok
173d9c6750 enable compiling of Sansa View
Change-Id: I3dda438cabf2a8f5f3ff5fed1ae16d0793341685
2014-03-27 21:47:35 +00:00
Szymon Dziok
ee1a1ce27c define more GPIO ports for the NVIDIA GoForce SoC (PP6100).
Change-Id: Ib02c44b9174fd968ed17640fc515b9c01c4a248d
2014-03-27 21:23:38 +00:00
Szymon Dziok
f8d367be94 Add Cabbiev2 port for 128x96x16 targets (Samsung YH-820), made by me.
Change-Id: I21c408e8c25c42a1e6c3d3e44c0999ae85d73154
2014-03-27 19:50:48 +00:00
Szymon Dziok
679d1e799c fix position of the repeat icon in cabbiev2.128x128x16.wps.
Change-Id: Ie159d19ab5e185256fe9fff0ff4986a27cf6886d
2014-03-27 19:50:48 +00:00
Szymon Dziok
828f880d40 HDD6330: enable AB repeat.
Change-Id: Ia8bb739cd60b1b2d8a8cd7ad2c536e22553083c6
2014-03-27 19:50:47 +00:00
Szymon Dziok
65ef2c9b1d HDD6330: enable backlight fading.
Change-Id: I60265237485e5892da2d45af0c44eb0aef40d22a
2014-03-27 19:50:47 +00:00
Szymon Dziok
ce28b180b3 SA9200: enable headphones detection.
Change-Id: Ieeeb59f9899a7de61cfc3604b127f1c4377774bf
2014-03-27 19:50:47 +00:00
Szymon Dziok
be6b65162c HDD1630: enable AB repeat.
Change-Id: I474e3cd300e2282de44f9d6e7bdc616e96e3496a
2014-03-27 19:50:47 +00:00
Szymon Dziok
c1d6ba19b9 change order of include headers and at the same time fix warning about
the implicit declaration of the _backlight_brightness().

Change-Id: I84ab4db19663d1918aaf5d98d51308d4ad2c4075
2014-03-27 19:50:47 +00:00
Szymon Dziok
71ee4b44ec HDD1630: enable backlight fading.
Change-Id: I767cab4ab51c17a262519d56d0a3071d3c7bbe16
2014-03-27 19:50:47 +00:00
Thomas Martitz
9cb9f763a9 Fix ALIGN_DOWN() macro on 64bit.
When the align parameter was a 32bit value (like all default integer literals),
and the to-be-aligned value is a pointer the upper 32bit got corrupted because
the value was casted down to 32bit.

Note: This hasnt been a problem because apparently the sim always gets 32bit
addresses (I found this when compiling Rockbox as a library).

Change-Id: I0d2d3fd8bfa210326b27162bb22c059da97d207a
2014-03-24 09:35:27 +01:00
Dominik Riebeling
3136465c42 Improve MSVC support in project file.
Enable MSVC specifics by checking QMAKESPEC instead of depending on a qmake
command line switch.

Change-Id: I77f72acd6661d5d7bc5776cc2dc877a11920dc7e
2014-03-23 20:47:45 +01:00
Amaury Pouly
5abe98dada zenxfi3: fix horrible bug which prevented the power button to work
Change-Id: Ic8e86762f84ca41e931801c1aee08007129eef20
2014-03-22 22:36:32 +01:00
Dominik Riebeling
202717d18f Fix MSVC not knowing inline for C code.
MSVC needs to use __inline instead of inline when compiling C code (the inline
keyword is only avaliable in C++). Use the preprocessor to work around this.

Change-Id: Ic9884a7421cee7dc7c943ab205312f50233fb100
2014-03-22 22:25:21 +01:00
Dominik Riebeling
d85a84fc83 Add msvc qmake config option for building with MSVC.
When building with MSVC we need to add the msvc folder to the include list, and
remove the libraries from the dependencies since they need to get built
separately.

Change-Id: I297787f32495da4541c67bfef549b4d1ad68dd18
2014-03-22 22:20:48 +01:00
Dominik Riebeling
258e4ad850 OS X: detect clang and build for x86 target only.
Newer versions of Xcode / OS X don't support PPC code anymore and replace gcc
with clang. When clang is detected assume we want to build for the default
architecture only and change the minimum OS X version to 10.5.

Change-Id: I5843fa9bb3d957ec6f0a537e857608ad99c31517
2014-03-20 22:26:24 +01:00
Dominik Riebeling
c18908d6bd OS X: update project file for Qt5 support.
- Qt5 doesn't support PPC anymore, so always build for x86 only.
- Qt5 requires the use of the multimedia module (as Windows).

Change-Id: I7d54faffe9d2fb557f55234ba7b81a508d92a38b
2014-03-20 22:26:24 +01:00
Dominik Riebeling
06a2e7c3bb OS X: use FSGetVolumeParms when targeting 10.5+.
PBHGetVolParmsSync() is not available when building with 64bit. The replacement
FSGetVolumeParms() is available on 10.5+ only. Use the latter when building
with target version 10.5+. This requires builds targeting 10.4 to 32bit and
allows building as 64bit when targeting 10.5+.

Change-Id: Ic53217f3090147bea473613335f9482623a470bd
2014-03-20 22:26:23 +01:00
Dominik Riebeling
f8e3b61565 OS X: don't include libusb headers.
We don't use libusb on OS X anymore, so don't include it anymore.

Change-Id: I32b721e097e5958a2e7359ccd79bf2d3b2d0ad9d
2014-03-20 22:26:23 +01:00
Dominik Riebeling
56a9255583 OS X: change include paths to use actual paths.
The old include path is actually a symlink for compatibility. Newer SDK
versions remove that symlink to the include breaks.

Change-Id: I74317557840f1886cebc1ce099e103dc415eabc0
2014-03-20 22:26:23 +01:00
Dmitry Gamza
7e85fe5be1 some optimization for iriver h100 and h300 series
Turn on 4x oversampling inside UDA1380 codec.

This allow will move the quantization noise to the higher frequencies,
that slightly improve the final sound quality.

Change-Id: Idf79cd877c526d8937a47c34e9c180d837a15db1
Reviewed-on: http://gerrit.rockbox.org/435
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
Reviewed-by: Björn Stenberg <bjorn@haxx.se>
2014-03-18 14:12:06 +01:00
Thomas Martitz
ea9621c018 Fix build reds caused by typos.
Change-Id: I71cdca3b6e73e29d487e0c6d02a69a31dcf3e6bf
2014-03-18 12:31:09 +01:00
Thomas Martitz
6f2726e79a usb screen: Stop scrolling the entire display.
It's not easy for the originating screen to perform cleanup in case of USB
because the usb screen is invoked indirectly via default_event_handler(). To
avoid stale scrolling lines perform the cleanup in the usb screen itself.

Side effect should be no worse than scrolling lines to restart in SBSes that
show during USB.

Change-Id: I9aa491b3d4b649c0b3be70048ebcb9d817c0356c
2014-03-18 12:24:44 +01:00
Thomas Martitz
395cdc5945 quickscreen: return true on USB connection.
This is consistent with other screens (pitch, id3) on the WPS and in other
places.

Change-Id: Iafae52507867ff9815a60cf44faaf09a29c55091
2014-03-18 12:24:16 +01:00
Thomas Martitz
331bf690b4 Add Dmitry Gamza and Sebastian Leonhardt to CREDITS.
Change-Id: I10c3c8963277905f3c74247fc16acc247323e30f
2014-03-18 11:10:30 +01:00
Dmitry Gamza
a98787148a fix quick screen write to config
Change-Id: Id55f81011a9ce47589d879203ca4f8fd4c54f593
Reviewed-on: http://gerrit.rockbox.org/757
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2014-03-18 10:58:24 +01:00
Sebastian Leonhardt
1cf17436b7 Fix (unintentional) linkage of HAVE_BUTTON_DATA with HAVE_TOUCHSCREEN
Defining HAVE_BUTTON_DATA without simultaneously defining HAVE_TOUCHSCREEN
caused compile errors. (I need them separated for a scrollstrip driver.)

Change-Id: I945d3437d840035ccc0c147f8155029b403c6ec2
Reviewed-on: http://gerrit.rockbox.org/771
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2014-03-18 10:56:19 +01:00
Thomas Martitz
915bc09996 Fix stupid typo in 470989b that triggered panics easily.
Change-Id: Ic998a0ea93141a5399e28dc286eea4e3d40663d6
2014-03-15 02:23:43 +01:00
Thomas Martitz
361aa9263d Fix reds.
Change-Id: I4f065a5b9f96df4d70ee8bb2836effc9b97b01fa
2014-03-14 23:43:45 +01:00
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-03-14 23:36:30 +01:00
Thomas Martitz
50f0dd80d6 ab_repeat: Move GUI bits to the skin engine. This allows ab_repeat to be compiled headless.
Change-Id: I4fa3b8ef7139313891ca70df11f7f17c5df38cb7
2014-03-10 22:55:26 +01:00
Thomas Martitz
4262e648eb android: Fix installToolchain.sh script.
Change-Id: I6c22043956cea5c5aec3e411045082e1a9b69442
2014-03-10 12:50:59 +01:00
Michael Sevakis
5ee13ebd39 Implements starting playback from a cuesheet.
Before time-based resume this was impossible since playback could not
be started at a specified elapsed time, only seeked with playback already
running.

Right now the "FILE" field is used, if present, to do the lookup from
from the .cue to the audio file when it is separate from the audio file.
If no path is specified, the .cue and audio file must be in the same
directory.

When the cuesheet is embedded, the containing file is used and the FILE
field is ignored.

Supports starting playback and seeking to cue points from the cuesheet
browser even without Cuesheet Support turned on.

Change-Id: Ib5b534c406f179a7f8c7042a31572b24a62c0731
Reviewed-on: http://gerrit.rockbox.org/522
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-10 04:13:53 +01:00
Michael Sevakis
31b7122867 Implement time-based resume and playback start.
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.

Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.

To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.

Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:

* Codecs not able to use an offset such as VGM or other atomic
formats

* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet

The change re-versions pretty much everything from tagcache to nvram.

Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-10 04:12:30 +01:00