Commit graph

32364 commits

Author SHA1 Message Date
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
Thomas Martitz
dda54b85da ypr1: Add some commands to rockbox.sh which are needed for playback
Change-Id: I2772e218174b5d1fbc7c066fee41d6fb06c01900
2014-03-09 23:25:50 +01:00
Thomas Martitz
157562bdbd Fix ipod6g build.
Change-Id: I218e1721b8ddbb067581f4bc686a20f4c88694ae
2014-03-09 18:18:45 +01:00
Thomas Martitz
6499ce3e44 android: Get the port up and running again
The build system needed fixes because the tools paths changed and one tool that
we used (apkbuilder) was removed entirely. Recent NDKs don't ship gcc 4.4.3
anymore, therefore switch to 4.6. The code itself needed a fix for a jni
reference bug that was uncovered by KitKat.

The port now builds with latest sdk (r22) and ndk (r9d).

Change-Id: Id74fa54ba93bbb0ee30373fbe79e92c5ff03201d
2014-03-09 18:11:35 +01:00
Amaury Pouly
2a71c08533 zenxfi: enable speaker
Change-Id: I603112d2a348abf92d5c8975ea76d3a57fda7cfc
2014-03-09 01:25:51 +01:00
Amaury Pouly
88799b38cf zen(xfi): enable frequency scaling
With the lcd underflow code at work, it results in small flicker when
switching frequency but it should be fine because it doesn't happen very
often and I don't think there is a way to avoid it without disabling EMI
frequency scaling.

Change-Id: I458732d52bbf27cda2510c3836539db1fb24ea15
2014-03-08 18:51:54 +01:00
Amaury Pouly
9637f4486b imx233: rewrite frequency scaling to use the new function
Change-Id: I0f9968de76ce17710d31f7bc609440654e68b6f1
2014-03-08 18:51:54 +01:00
Amaury Pouly
1f3979821c imx233: add function to change cpu/hbus frequency safely
Change-Id: I88e9ad54ba65846ae4d94ae03009b3656f2489f2
2014-03-08 18:51:54 +01:00
Amaury Pouly
3e2f3efd89 imx233: prepare frequency scaling for stmp3700
Add entry for stmp3700 maximum frequency which is 320MHz.

Change-Id: I6db4aad4efa0a7c1347a1ceb262a0295f63057ae
2014-03-08 18:51:54 +01:00
Amaury Pouly
9fe3687923 imx233: fix regulator code on stmp3700
For some reason the power subsystem needs to know the relationship between
the VDD{D,A,IO} and uses a weird register to do so.

Change-Id: I7fcc75f6cc0460b4997914986deda7ca544a4940
2014-03-08 18:51:54 +01:00
Amaury Pouly
4b2f59b3db zen: handle lcd underflow by hand
Contrary to the imx233, the stmp37xx lcdif doesn't know how to properly
recover from underflow and things are worse because of the errata which
makes the lcdif not clear the fifo. Workaround this by detecting underflow
and taking action: stop dotclk mode (will clear fifo) and schedule next frame.
The dma transfers now write the ctrl register as part of the PIO writes,
making the code simpler.

Change-Id: I15abc24567f322cd03bf2ef7903094f7f0178427
2014-03-08 18:51:54 +01:00
Amaury Pouly
b0940b1dd3 imx233: add lcdif underflow irq support
Change-Id: Ie3fe223ff40abff38bb9b09f398eb5411fa0be4c
2014-03-08 18:51:53 +01:00
Michael Sevakis
61d0583384 Greatly reduce volume-change zipper artifacts with SW volume.
Uses a cosine factor to smoothly shift the PCM level from the old level
to the new one over the length of a frame.

Implements indirect calls to PCM scaling function instead of testing
conditions on every callback, cleanly assigning a different call to
do the volume transition. The volume change call then assigns the final
scaling function.

Change-Id: If1004b92a91c5ca766dd0e4014ec274636e8ed26
Reviewed-on: http://gerrit.rockbox.org/763
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-08 08:04:41 +01:00
Michael Sevakis
62b10e383c Oscilloscope: Fix loading of the speed setting for waveform view
Somehow, a long long time ago, I put MAX*/MAX* in the config data range
fields instead of MIN*/MAX* which forced the settings loader to acknowledge
only 100 as a valid setting other than the default.

Change-Id: Ifbfcafad27e239942449848d6a09426173bbde54
2014-03-06 19:10:46 -05:00
Michael Sevakis
669fa9a130 Gigabeat S: Improve headphone thread implementation.
Implement scanning as binary tree in array.

Make the ADC calls fewer without compromising read quality.

Declare the thread function as 'noreturn' to save some stack. Reduce
stack size (regardless, % use is now a bit lower).

Change-Id: I239792fd2a0a2c019d1ec4af1d6d4b466cdf0ef5
2014-03-06 17:28:26 -05:00
Marcin Bukat
c64b59fc5e atj213x: various fixes in sample code snippets
Change-Id: I78781e1a56cb6705d011ee2296f1789b497a566a
2014-03-04 11:07:07 +01:00
Marcin Bukat
2f21f77ade ingenic: crt0.S fixes #3
Hopefyly this time is the final one.

Change-Id: I386964f407ca98499e9a482507e4d5dfa02ee891
2014-03-04 10:28:02 +01:00
Marcin Bukat
7066197ccc ingenic: fix bugs introduced by 5900bf7
I must have been blind and copied some intermediate file
instead of final version. No functional change, only fixes.

Change-Id: Icaa868225517662c88f8492b1f04808407853361
2014-03-04 10:24:43 +01:00
Thomas Martitz
c35e1db832 Fix last warnings.
Change-Id: If0a7e11c3e107cb7756c0d70ed5b17fda92b166e
2014-03-03 20:34:46 +01:00
Thomas Martitz
68768260e8 Fix more reds.
Change-Id: I4b58dda0953b7f9799238c32b78037b0a5403c04
2014-03-03 20:26:08 +01:00
Thomas Martitz
c245de029d Fix various reds. Some includes needed fixup.
Change-Id: I4327740bae17054131feb917abdd58846c451988
2014-03-03 19:10:48 +01:00
Amaury Pouly
e5ce28ca09 zen/zenxfi: correctly implement lcdif errata
Change-Id: Ib2a6000035d70d687025a78bbea416d77af562fe
2014-03-03 18:33:04 +01:00
Thomas Martitz
382d1861af kernel: Break out kernel primitives into separate files and move to separate dir.
No code changed, just shuffling stuff around. This should make it easier to
build only select parts kernel and use different implementations.

Change-Id: Ie1f00f93008833ce38419d760afd70062c5e22b5
2014-03-03 18:11:57 +01:00
Thomas Martitz
8bae5f2644 Iaudio m3: implement lcd_get_dpi() (aka fix red).
Change-Id: I66dbbb4d8795cf1274fc721bf0e8769b8f757c31
2014-03-03 17:38:43 +01:00
Thomas Martitz
fff981bf6d Implement lcd_get_dpi() for X-Fi Style (aka fix red).
Change-Id: I9cab3a08c9e28558db2c16e8df30afcef6e11004
2014-03-03 17:01:36 +01:00
Thomas Martitz
00434be0f1 Fix greyscale and mono builds.
Change-Id: I511376eb42d1109dbe10d4fc5aa849b21d9f7582
2014-03-03 16:34:36 +01:00
Thomas Martitz
05a67d021c Touchscreen: Show a line separator in lists.
This patch adds a configurable line separator between list items, very
similar to lists in Android. Additionally, below the list item there is a
thicker line. It can be disabled in the settings. Its color can
be configured as well.

Remote and monochrome displays are explicitly unsupported. If there is desire
this can be changed but it doesn't seem useful to me.

Change-Id: I005313b0d8f5ecd15864bf20e66ea4e3390d8b7d
2014-03-03 15:14:16 +01:00
Thomas Martitz
20e114c1a0 wpsbuild: The setting strings can now contain an additional feature constraint.
The setting strings are now of the form setting[.resolution[&feature]]
(resolution can be a regex, .+ to match all resultions). wpsbuild.pl will
check against features.txt to see if the target meets it.

This can be used, for example, to add/override default settings for
touchscreen devices.

Change-Id: I2eafa02f10b362a8e7de8e1f3a53115e70d28084
2014-03-03 15:14:15 +01:00
Thomas Martitz
62524237f0 Implement lcd_get_dpi() for all bitmap targets.
DPI values are autogenerated from the resolution and collected display size
values. These values are inserted as comments as well.

Change-Id: Id03aedf9af18348f773dfce002805e480f6751e8
2014-03-03 15:14:15 +01:00
Thomas Martitz
ee28a706d4 Fix regression introduced by eec89a9.
The icon pixel position must be calculated before y is modified.

Change-Id: I16947dd8862683530dd7c5f00cfa7cf8d9636e61
2014-03-03 15:14:07 +01:00
Marcin Bukat
5900bf7315 ingenic: Tweak a few details in crt0.S
1) Avoid load/store delay slot by reorganizing instructions
   in copy loops
2) Fix off-by-one error in cache initialization code.
   This was harmless as it simply set line0 twice, now it sets
   every cacheline only once.
3) Fix off-by-word error in .bss clearing loop.
   The addiu in branch delay slot even if calculated is not seen
   by the branch instruction itself, so the code did one word
   too much in clearing.
4) Fix off-by-word error in deadbeefing stack.
   See above.

Change-Id: Iabb09a55979de7aa2e2b9234273683fc7e9762c5
2014-03-03 13:21:32 +01:00
Thomas Martitz
3ae07d48a2 Fix FS#12951: The icons could be a pixel to far down.
Since eec89a9 icons have been centered using same calculation as for fonts.
In edge cases this is visually different from before and didn't align
well to the font's baseline. Revert to the old calculation just for centering
icons to fix.

A proper aligorithm would take the baseline into account but this has
worked sufficiently well for us (fix this if needed)

Change-Id: I86593529b16cd28ae4552641e216e73795f2450c
2014-03-03 11:20:13 +01:00
Thomas Martitz
05999ed86d Fix hostfs_init() return value.
Change-Id: Ic8048e3fa0075de234e8879ba9faad101168bf09
2014-03-03 11:19:56 +01:00
Thomas Martitz
506b8718fc application(ypr0): Fix mount option selected by the current codepage.
A missing comma messed the lookup table up :'( Be aware that the kernel
on the ypr0 doesn't support many codepages in which case its default (iso8859)
will be used.

Change-Id: Iaa4a4b8338fb047d29f6a4e2a80eba5c296d27ce
2014-02-28 07:22:37 +01:00
Thomas Martitz
6b01da8bed application: fix opendir() for "/" directory.
"/" couldn't be opened. This regression was introduced by 731072d. Trailing
slash should not be stripped for the root directory.

Change-Id: Idd2d9b1f33e7be789bcf432e586e6715eb4152f4
2014-02-26 00:24:51 +01:00
Thomas Martitz
191bd3da93 test_disk: Add an additional dirscan test that calls dir_get_info() also.
Especially on hosted dir_get_info() can be relatively. It is commonly called
after every readdir() for further information about the dir entry. So it's
peformance compared to readdir()-only is interesting.

Change-Id: I03ab41fb190acf738e04a5d3b2a4fe29276094f6
2014-02-25 09:57:18 +01:00
Thomas Martitz
731072de7a application: Remove trailing slashes from the input in opendir().
This is needed for readdir() and dir_get_info() to work properly because
they depend on hash/path matching.

Change-Id: Ibd23def10eebabd76cdddac2739a5274159e88a9
2014-02-25 09:52:07 +01:00
Thomas Martitz
5fd8dd1321 application: Speed up dir_get_info() further.
It's quite rare that it is called for a symlink to a directory. But it only
needs a second syscall to stat() if that happened. Therefore speed up the
common case by avoiding an unecessary second syscall.

Change-Id: I911105f76631ebccc7696a1540e9cf069a706000
2014-02-24 23:13:00 +01:00
Thomas Martitz
c27c3f10fd hosted/multidrive: Speed up readdir()/get_dir_info().
The two functions need to check whether they are called for a specific path
to implement the virtual mount point for the external storage. This
is statistically rare and a hit on the common case. Therefore speed up
the common case by performing integer comparision first, and only expensive
string construction and comparision if that succeeds.

Change-Id: I3c41fe073e1f4f8eb62d2b8556a36937c9cb8290
2014-02-24 23:07:37 +01:00
Thomas Martitz
3a3d26eee2 ypr0: Make it build without HAVE_MULTIDRIVE again.
Change-Id: I973f1b23497ba9c0ddb24cd36c24d0ce3ca06d06
2014-02-24 12:21:30 +01:00
Thomas Martitz
be967515ac hosted: Rename a bit in functions to avoid name clashes with unix headers.
Change-Id: I2baa5532ddcbca8a839c31434309013f02173ed8
2014-02-23 23:36:11 +01:00
Thomas Martitz
3b7057fdae Second try at undefing STORAGE_GET_INFO, the previous one was too hasty, sorry.
Change-Id: If938c132d46efcb531227d9fde8cce91104566e0
2014-02-23 23:03:18 +01:00
Thomas Martitz
d7ba70de41 undef HAVE_STORAGE_GET_INFO for the sim, there is no useful implementation right now.
Change-Id: I3050b97d10d9b4705321d8e37faf4d5a6c58485b
2014-02-23 22:57:37 +01:00
Thomas Martitz
3505ad3753 Fix reds
Change-Id: Ib2036d0786bd6fa39c5dadeeed83d74c7bd5c273
2014-02-23 22:33:35 +01:00
Thomas Martitz
3575372e01 Add forgotten file.
Change-Id: Ibd17bba201427b4bc0e45f29b246c20bd493c7d6
2014-02-23 22:16:15 +01:00