Commit graph

15243 commits

Author SHA1 Message Date
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
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
828f880d40 HDD6330: enable AB repeat.
Change-Id: Ia8bb739cd60b1b2d8a8cd7ad2c536e22553083c6
2014-03-27 19:50:47 +00: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
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
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
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
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
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
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
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
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
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
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
cbc57af0f3 Fix for HAVE_MULTIDRIVE on application builds.
Change-Id: I089ea4756e0c824993c65062290c40b3e67f9181
2014-02-23 20:23:52 +01:00
Thomas Martitz
77f19f75eb storage: Add STORAGE_HOSTFS
CONFIG_STORAGE & STORAGE_HOSTFS allows to use parts of the storage_* API to be
compiled for application targets without compiling storage.c or performing
actually raw storage access. This is primarily to enable application targets to
implement HAVE_MULTIVOMULE/HAVE_HOTSWAP (in a later commit).

SIMULATOR uses the same mechanism without explicitely defining STORAGE_HOSTFS
(how to add a bit to an existing preprocessor token?).

Change-Id: Ib3f8ee0d5231e2ed21ff00842d51e32bc4fc7292
2014-02-23 20:23:51 +01:00
Thomas Martitz
706e6b7a75 Move VOL_NAMES definition to mv.h
Fits better and including dir.h is more messy for some places.

Change-Id: I3ec30dcc1ac2734ad3844c903238b6cc2f4e134c
2014-02-23 20:23:51 +01:00
Dmitry Gamza
7f0b7b720a fix russian translate in 0f72c73b5b
Change-Id: I5237f4bdf49f2fb7d5a6e072f0e8a7bb58daa8de
Reviewed-on: http://gerrit.rockbox.org/759
Reviewed-by: Andrew Ryabinin <ryabinin.a.a@gmail.com>
2014-02-17 07:00:19 +01:00
Jonathan Gordon
4b1221d556 fix red, strtok_r being annoying on sim builds
Change-Id: Ifb884a53d801db9534dd0c5ab5921800e971963e
2014-02-13 22:24:29 +11:00
Jonathan Gordon
6dbfd44b6e main_menu_config: New plugin to configur the main menu order
Plugins/Applications/main_menu_config allows you to edit the
main menu order without having to manually edit config.cfg.

Press the standard OK button to access the internal menu
which allows you to move items up/down in the order and toggle
their visibility. Exit via this menu to have the order saved.

(Suggestions welcome to improve this UI)

Change-Id: I59715ef1ca265aeb6f9666ef27026bc1093f2579
2014-02-13 22:11:23 +11:00
Jeremy Goodwin
0f72c73b5b FS#12949 - Diff to fill in incomplete Russian translation items.
Change-Id: I8f53d8811a3c6ee6507f1a81e3b007073909ca38
2014-02-11 20:52:28 +01:00
Avi Eisenberg
f723ca5805 Fixed bug where exiting textviewer after using up all the bookmarks caused that file unable to be read the next time.
Change-Id: I1924fe68c8528c03c4197f74a4f014edb0ac9f2a
2014-02-07 17:57:17 +01:00
Lorenzo Miori
e876f4df6d Samsung YP-R1 target port
This is the basic port to the new target Samsung
YP-R1, which runs on a similar platform as YP-R0.
Port is usable, although there are still
some optimizations that have to be done.

Change-Id: If83a8e386369e413581753780c159026d9e41f04
2014-02-05 09:56:21 +01:00
Thomas Martitz
0b7a90722a talk: On hwcodec disabling DMA interrupt is required during buflib move
Even though the DMA buffer itself does not move the ISR copies from a movable
buffer into the static commit buffer. To ensure this copying yields consistent
data it must not be interrupted by this ISR..

Also bump the commit buffer size to 2k, this should reduce the overhead
considerably because many clips are smaller than that (especially on
swcodec/speex).

Change-Id: I4e1ab83074f31fc91b51a58baa1df55ce659ac73
2014-02-03 12:43:05 +01:00
Thomas Martitz
10b3bc78f6 Fix warnings.
Change-Id: If3cbcd7557797684f1b7fea8e1bb134777680dee
2014-02-03 12:33:33 +01:00
Thomas Martitz
e5eb74592e talk/voice: Reduce the size of the commit buffer.
The voice engine can now request more voice data during decoding, it does
not require the entire clip to be available before start of decoding anymore.
Therefore the commit buffer does not need to hold an entire voice clip anymore,
and can be made greatly smaller.

Change-Id: I3eca9026448e725b9b8d0dae1efca0ad185371da
2014-02-02 19:40:39 +01:00
Thomas Martitz
af02a674c5 talk.c: The new cache management is good enough to use it for .talk clips as well.
This unifies the talk.c for all possible voice payload. .talk clips are placed
onto the same unified clip cache, along with normal clips. This allows for more
effecient memory usage.

The cache handling makes a slight difference between normal clips and .talk
ones: .talk clips can be cached multiple and are always freed first.The extra
logic to avoid loading multiple copies of .talks is not necessary because the
will be freed first anyway.

Change-Id: I88d056a0a613b129f5875f50fdb757b58bac0a42
2014-02-02 19:40:39 +01:00
Thomas Martitz
03f373c9cd talk.c: The new cache management is good enough to use it on all targets.
This unifies the talk.c for all targets. The only separation is left is
TALK_PROGRESSIVE_LOAD: When this is defined the talk buffer will not be
initially prefilled. This is useful for super slow storage or when the buffer
is not large enough to prefill it with useful clips (the prefill code could
be made smarter too).

The buffer size can be adjusted. By default lowmem uses 100k while
other targets load the entire file. The bigger the more clips can be cached
but with diminishing returns.

Change-Id: Ife38fb101c53093117e6638c40c65f7d177a31d4
2014-02-02 19:40:39 +01:00
Thomas Martitz
c46f9be10a talk: Smarter cache management for TALK_PARTIAL_LOAD.
Previously the clip cache of TALK_PARTIAL_LOAD reserved space N clips, each slot
was as big as the maximum sized clip which was necessary to replace clips
in-memory in MRU-style.

The cache management now uses buflib to allocate and free each clip, using the
clip's real size. This allows the clip cache to be much more compact, because
no space is wasted for the max. sized clip. This makes use of buflib's ability
to easily manage differently-sized memory chunks by moving them to make free
space.

As an example: for english.voice TALK_PARTIAL_LOAD allocated 288k in advance.
for just 64 clips. With this patch ~70 clips can be stored in a 100k buffer.
This, the memory usage is cut by 2/3 and almost optimal (there's still the
buflib per-alloc cookie overhead).

As a result the TALK_PARTIAL_LOAD buffer is restricted to 100k which still
allows for more clips than previously, on average.

Change-Id: I257654071e9a95770cd6db2c2765f020befce412
2014-02-02 19:40:39 +01:00
Thomas Martitz
dac40fdd60 talk: Add debug menu entry to view statistics about talk engine.
This engine includes voicefile, memory usage and cache
hits/misses for TALK_PARTIAL_LOAD.

Change-Id: I331981ddda39ea30c57b4b74504accb3c556c3b9
2014-02-02 19:40:39 +01:00
Thomas Martitz
57000b513b talk: Make talk_voice_required() local to talk.c
Change-Id: I3a04760d550efab7f011a917597ef29c039b05bd
2014-02-02 19:40:39 +01:00
Thomas Martitz
60dea95cad talk/hwcodec: Do always free the clip buffer in shrink_callback().
This is necessary because when voice is active audio is disabled. But only
audio was able to shrink it's buffer to let other memory allocs succeed.
talk needs to be able to do this too when it owns the audio buffer exclusively.

Change-Id: Idea8ab90da7169f977c0c766cccb42c4fe6d6e81
2014-02-02 19:40:39 +01:00
Thomas Martitz
428f069a1f talk: Remove superflous call to talk_init().
talk_init() is called by settings_apply() already which is called on boot.
Doing it again means loading the voicefile a second time which isn't necessary.

Change-Id: I4decd16401e63bf87338d3163c99d06d69fe3a3c
2014-02-02 19:40:38 +01:00
Dominik Riebeling
f63b42ad41 Correct the number of codepages on charcell.
63cfbe0 fixed the number of codepages for bitmap targets. The same issue is
present on charcell, so update the number for that as well, fixing UTF-8
missing in the list.

Change-Id: Ib5d3494ed3d80e839ae3f59ec0a4277e5aa9d6fd
2014-01-27 20:27:15 +01:00
Thomas Martitz
efc20ec164 talk: When no voice file is loaded don't even attempt to load the clip, it's hopeless.
Change-Id: I420155d7f01ca0ea301c0678ac7245d251d365b0
2014-01-27 10:05:48 +01:00
Thomas Martitz
543027564c hwcodec/talk.c: Give the thumbnail buffer regardless of the talk buffer policy.
When the policy is not set, it'll by default not give the clip buffer away.
Callers of core_alloc_maximum() suffer from this. However, the thumbnail
buffer can be easily freed when needed because nothing needs to be
reloaded from disk when it is reallocated (thumbnail clips are loaded on
demand, when in the file browser). Do this to give core_alloc_maximum() callers
a better chance to succeed with the default talk buffer policy.

Change-Id: I8c0da29c520612ca903f6c930bd7c74ae97eca3b
2014-01-26 19:14:47 +01:00
Purling Nayuki
946c348e5c Fix incorrect language string reference in eq_menu.c
In most of the translations strings with SYSFONT in title is
translated. This leads to displaying problem in (at least) graphical
equalizer due to the lack of non-latin character support in the
built-in font.

Change-Id: I0d27a5358e4eb539d4247c84975d8501d7668836
Reviewed-on: http://gerrit.rockbox.org/727
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2014-01-26 16:26:00 +01:00
Thomas Martitz
8142c68bd2 Fix red on monochrome.
Change-Id: Ice40c81d0d07f7ec2014697e4de446dcb956afe8
2014-01-22 17:31:24 +01:00
Thomas Martitz
6cb11764e0 skin_engine/backdrops: Have to reload default backdrops from setting when it changed.
When skins use the default backdrop (via %X(-) or no %X at all) and the setting
changes it needs to be reloaded, otherwise when changing themes the new theme
could show the backdrop from the previous theme. The same needs to be
done when re-selecting the same theme after USB because the backdrop file was
potentially overwritten.

Fixes FS#12892 and FS#12942.

Change-Id: Ic2d20740cc385fa99667ce8a71507dbda2efceaf
2014-01-22 16:58:58 +01:00
Thomas Martitz
6879af9784 rockbox: Improve button repeat handling.
Change-Id: I1259c43019c51828b2af73f312aee9cf399d57cf
2014-01-18 23:06:55 +01:00
Frank Gevaerts
63cfbe096b There are 15 codepages to choose from, not 14.
2d9c0bab added a codepage but didn't increase the number of choices
for the setting, so UTF8 dropped off the list.

Change-Id: I154032bddaabcb783212370a12b2e5cdea305302
2014-01-18 20:39:13 +01:00
Thomas Martitz
c448d7e79c rockboy: Fix button read method.
The old method simply polled the lastbtn variable in button.c. This approach
does not clear the button event queue which overflows as a result (panic
in the simulator). Use proper APIs to fix that and adopt the
method from the old read_scroll_wheel() function, which reads buttons until
the button queue is empty, for all targets.

Change-Id: Ibf198f6e597e7f51ab4ebcfcae4ebebbe8d7845c
2014-01-18 19:47:55 +01:00
Thomas Martitz
33f5fdeadf rockblox: Fix compilation under recent mingw-w64-gcc.
Change-Id: I703d967e9288e5c74556b54ad4f72ef2f6247083
2014-01-17 11:14:00 +01:00
Purling Nayuki
335d708c99 Fix chinese-trad translation
Change-Id: Ifccb5c17d165d18e5076fb7ebc1af3cda3e2f778
Reviewed-on: http://gerrit.rockbox.org/726
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2014-01-16 11:26:03 +01:00