Commit graph

31683 commits

Author SHA1 Message Date
Amaury Pouly
c5357940ab hwstub: major improvement in the stub and the tools
Fix the stub in many way to correctly detect the STMP family and
act upon that. Drop some unused commands and bump version.
Rewrite the tool to allows scripting in lua and load the register
description from an XML file using the regtools. Introduce a new
tool to load and run code using the hwstub (either binary format
or Rockbox additive scramble format). Also switch to an optimise
version of the memcpy/move/set functions to correctly handle
alignement issue (like writing a full word/half-word when
possible for registers which is crucial)

Change-Id: Id1d5cfe0b1b47e8b43900d32c5cd6eafae6414f6
2013-06-13 02:25:15 +02:00
Amaury Pouly
934e1e15af regtools: add the STMP3600 register map
Change-Id: Ief34c219bbe05c9aeed665235942bb158bb0f4d4
2013-06-13 02:25:14 +02:00
Amaury Pouly
73db73dbd3 regtools: modify description format and refactor tools
Change the XML description to unify multi dev/reg in a clean
fashion. Move the description parser to its own library. Fix
the tester and headergen tools to work with the new format and
library. Move the STMP3700/3780 descriptions to the new format
(and fixes many errors as well). Drop the hwemulgen tool
in favor on the upcoming hwstub tools revamp.

Change-Id: I7119a187aab5c8b083cc5228cb1b248ee29f184d
2013-06-13 02:25:08 +02:00
Amaury Pouly
7143ea681c imxtools: move regtools to its own directory
The register tools are in no way stmp specific. The XML
description of the registers is powerful enough to describe
the STMP register which should be more than enough to describe
virtually all other SoCs. The generators follow the STMP coding
convention but others could be used as well.

Change-Id: If1a9f56e4a3594161688de34adbea698e5aaecd8
2013-06-12 19:49:26 +02:00
Amaury Pouly
11da9d23fe imxtools: move hwemul to its own directory
The hwemul is only partly imx specific: the stub is stmp specific
but could be ported to other targets, the computer side and the
protocol are mostly stmp independent (or should be).

Change-Id: If88febffe591b0de86ea11cb740455ba20ddc401
2013-06-12 19:46:04 +02:00
Amaury Pouly
3f4eeb850e Enable key lock in radio screen
Change-Id: I75efbf1077359e4218ad33f4c1d885b24c0b7b01
Reviewed-on: http://gerrit.rockbox.org/421
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-06-10 15:19:45 +02:00
Max Zerzouri
575cb63a92 Fix rockblox instadrop behaviour
Prevents the player from moving an instadropped block (could happen
before the next game tick when using left/right buttons anticipatorily).

Change-Id: Id62168842d8458f864a2e05c5d236f054bf54f65
Reviewed-on: http://gerrit.rockbox.org/473
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-06-09 21:44:01 +02:00
Thomas Martitz
4263f67e4b Fix warning (move variable into #ifdef section).
Change-Id: Ic6ba4b786eef00eab7f20abd5fbf2bcb8977993a
2013-06-09 21:08:49 +02:00
Thomas Martitz
770fadddd6 Fix reds (this code needs #ifdef HAVE_ALBUMART)
Change-Id: Ia50cd846d5451b0cb5cf3a6f8097ea9fe3b3c60a
2013-06-09 21:01:47 +02:00
Dominik Riebeling
67e1de7b43 Only show mountpoints containing a supported filesystem in dropdown.
Change configuration to use filtered mountpoints list. Add HFS+ to the list of
supported filesystems -- while Rockbox doesn't run on HFS+ MacPods will use
that format, and not having them in the list will then make OS X users wonder
why their Ipod isn't showing up. This might need to get revised later.

Change-Id: I5eeeb05be6780cb3952a0081df0ce782eca01589
2013-06-09 19:51:08 +02:00
Dominik Riebeling
a2c3e3fd0d Add note to AMS bootloader installation about OF file.
Some devices contain a bin file in the root folder of the player. This caused
confusion a couple of times, since the installer asks for a bin file. Add a
note that the required file is not present on the player and will get removed
automatically.

Change-Id: I6cd5c25b319770555c3939377a3ed86ed3181dad
2013-06-09 19:51:08 +02:00
Dominik Riebeling
9574b30066 time-sync: allow passing an arbitrary time.
During testing it can be useful to set an arbitrary (non-current) time on the
device. Extend time-sync to accept an additional (optional) parameter with the
time to set. Only changes date / time, no timezone.

Change-Id: Ib320777cb245cff19ca00b20540db3a43a4e488f
2013-06-09 19:51:08 +02:00
Dominik Riebeling
11280e20cc Don't pass -Wno-unused-local-typedefs on OS X.
OS X' gcc 4.0 (still used to be able building fat binaries) doesn't ignore that
option and instead errors out.

Change-Id: Id5927ff04dc606480af9add554eeaa75c169510f
2013-06-09 19:45:16 +02:00
Dominik Riebeling
33bda05469 Treat arch flags separately when building libraries.
On OS X we're passing -arch twice which dependency generation doesn't like.
Since we don't have dependencies that differ between architectures simply don't
add them during dependency generation.

Change-Id: Ie3d58bf9af31edcacb88345c7debf39eb798e302
2013-06-09 19:43:37 +02:00
Thomas Martitz
836cf14860 Fix multiple problems in radioart.c
The code was pretty broken with regard to the handle management of radio art
images, e.g. passing the wrong data to bufopen().

Change-Id: I3480f40bce81af05d14dbf045a78485c857fb261
2013-06-09 17:44:11 +02:00
Thomas Martitz
58b4e71d32 skin_engine: Fix albumart logic on skin reloading.
This logic checks whether the skin's albumart dimensions differ from the
previous skin to force rebuffering if necessary. This was broken since
a while as the necessary information was reset.

Change-Id: I3b9f3a819c6af202af8ad66c13742f704ce45ab1
Reviewed-on: http://gerrit.rockbox.org/476
Tested-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-06-09 17:39:08 +02:00
Dominik Riebeling
280a0eb27e Fix temporary files stored in current folder on first start.
If Rockbox Utility has no configuration file on the machine updateSettings()
will overwrite the global cache folder settings with an empty string before the
value is set properly by the user confirming the configuration dialog.  QDir()
getting an empty string will result in the current working directory getting
used, and thus the temporary files ending up there.

On Windows most users are unlikely to have noticed this since running the
executable from within the distribution zip file will make Windows execute it
in the systems temporary path.

Change-Id: I7724a82af403955786798c7380198086837e128f
2013-06-09 16:55:15 +02:00
Dominik Riebeling
9edc63b0d4 Suppress unused-local-typedefs warning with Qt4.
gcc 4.8 introduces this new warning which some Qt4 headers triggers. Since we
don't want to change Qt simply disable it. The warning doesn't show up when
compiling with Qt5, so only disable it for Qt4.

Change-Id: Ia8fcf0859e0a370def36bc9b43ed4d096a80db28
2013-06-09 16:54:59 +02:00
Dominik Riebeling
6b3c4beba4 Rework langstat.
- Generally improve code and make it compliant to PEP8.
- Make it work with Python3 as well.

Change-Id: I9e99999c59dc501664c36dd38fcb85fb60d6d9e6
2013-06-09 16:54:59 +02:00
Dominik Riebeling
43d8d6fece Don't pass ar output to /dev/null.
Since ar is not running in verbose mode there is normally no output to get rid
of, and in case of errors it's useful to see them. Also, Windows doesn't know
about /dev/null.
Make dependency generation for librbspeex more silent as well.

Change-Id: Ie0d4a406e665ebd67331d6cd1fa2fc02f8bf21b9
2013-06-09 16:54:59 +02:00
Boris Gjenero
15fa7f866f Fix color of files with no extension.
Based on all other references, unknown_file.color is a color, not an
index into custom_colors[]. Previously, custom_colors[-1] was returned
for files without an extension, accessing outside array boundaries
and making files without an extension black, which is hard to see.

Change-Id: Ia0883aba929582324b767df7828a36a84c0b36b9
2013-06-05 18:35:09 -04:00
Michael Sevakis
98c34d8723 Argh, move a comment to the (now) proper location. :)
Change-Id: I13847b99d9aeaa05efa5b22a8e4842f193f01a3c
2013-05-31 19:01:24 -04:00
Michael Sevakis
e62cb56644 Have voice fire an event when it starts and stops playing.
Further decouples voice_thread.c from other playback areas. Also allows
other audio sources, such as FM radio, to be attenuated when voice is
playing by implementing a callback.

Defined as another playback event rather than a new event class:
PLAYBACK_EVENT_VOICE_PLAYING

Change-Id: I2e3e218be6cd6bebbf39e7883a8c0e4ed42b62bb
2013-05-31 18:45:51 -04:00
Michael Sevakis
1b4135ec0d Should use HAVE_RECORDING, not AUDIO_HAVE_RECORDING in playback.c
SIM should work like target, sort of, when recording is initialized.

Change-Id: I12314bb98cec53d574f4b25984ef803b2c038a96
2013-05-31 06:24:06 -04:00
Michael Sevakis
92f1ecfc7b Just init audio thread event with Q_NULL instead of SYS_TIMEOUT.
What was I thinking? Anyway, it's a little nicer and it's reserved so
shouldn't end up as a case value anywhere.

Change-Id: If745c24951518608e3f4fc51f7419ef07d7cf2ac
2013-05-31 05:17:11 -04:00
Michael Sevakis
344b9d0986 Some corrections after 5857c44.
Playback needs to receive a couple of settings-related messages even
when not playing.

Put the message reply back where it was when loading an encoder for
recording.

Change-Id: I8cc80f46e42a0afd119991d698510e1ebef38ead
2013-05-31 04:13:39 -04:00
Michael Sevakis
5857c44017 Refactor audio thread to run both recording and playback.
Eliminates the pcmrec thread and keeps playback and recording engine
operation mutually-exclusive.

audio_thread.c contains the audio thread which branches to the
correct engine depending upon the request. It also handles the main
audio initialization.

Moves pcm_init into main.c just before dsp_init because I don't want
that one in audio_init in the new file.

(Also makes revision df6e1bc pointless ;)

Change-Id: Ifc1db24404e6d8dd9ac42d9f4dfbc207aa9a26e1
2013-05-31 03:20:35 -04:00
Michael Sevakis
df6e1bcce5 pcm_record: Track initialization state
It should not access audio hardware and change settings unless it has
been initialized first and given control of it.

Change-Id: I5004602d7caa604ded751f6838b792d1ff24b3fb
2013-05-30 18:42:59 -04:00
Michael Sevakis
5a1e697e2a PP Sansa: Use better I2S divider settings for 48kHz.
The previous ones produced some crackling.

Change-Id: I70de901172aba156f58d4b1088d0038b2ed53d49
2013-05-30 03:34:10 -04:00
Michael Sevakis
46688a60db Missed removing a couple unwanted includes in previous commit.
Get those too.

Change-Id: Id2a39afe7a61d6ec0cea38633b94fe1b7122204f
2013-05-27 03:40:02 -04:00
Michael Sevakis
b5a6517e9d Remove explicit config.h and system.h includes from DSP code.
Replace with rbcodecconfig.h and platform.h includes. Remove now-
unneeded ones as well.

Change-Id: I6111b71e90bf86d9fe272a7916f2d34a5c6dd724
2013-05-27 03:23:33 -04:00
Michael Sevakis
30fe6eb66c SPC Codec ARMv5: I didn't have fast gauss quite right.
Fix wrapping hazard which did eventually manifest on the right file.

Change-Id: I996a6efd3181b56fd172b5c3a526c7434f88bbbe
2013-05-26 00:33:30 -04:00
Andrew Ryabinin
00b8563654 df1704: Add filter roll-off selection.
Change-Id: I732ebd3446858b497105cf03fc81e934a749a57b
2013-05-24 11:32:20 +04:00
Andrew Ryabinin
0519f7e5ab Add DAC's oversampling filter roll-off selection to sound settings.
Change-Id: I1258ba50dd9308f49d97965562f3a423c9bfb785
2013-05-24 11:18:16 +04:00
Boris Gjenero
f6e179bd8e Remove data_abort_handler from ARM crt0 files.
This causes data_abort_handler from lib/unwarminder/safe_read.S to be
used instead. It allows unwarminder to avoid data aborts when
displaying the backtrace. A data_abort_handler remains in system-arm.c,
but it is not used because it is declared as a weak symbol.

Change-Id: I832066ed514347fe697e219872e90fbdd937f477
Reviewed-on: http://gerrit.rockbox.org/475
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested-by: Boris Gjenero <boris.gjenero@gmail.com>
2013-05-24 02:02:04 +02:00
Boris Gjenero
4077eac839 Fix return address when data_abort_handler skips faulting instruction.
When writing a value to PC, execution continues at that location,
so subtracting 4 returns to the next instruction. Previously, two
instructions after the faulting instruction were being skipped, causing
safe_read functions to return true even if a data abort happened.

Change-Id: I3fd02d54646323ea2050d0504e38f6d22f09c749
2013-05-23 19:51:19 -04:00
Michael Sevakis
9b65f8e658 Fix 6e211ab errors and warnings.
If target has HW tone controls but no HW prescaler (non-implemented or
non-existent), audiohw_set_prescaler() should, for now, do nothing.

Change-Id: If1b1a36970dca82fda1c350fbaa4d6ce068a6d32
2013-05-23 14:58:57 -04:00
Michael Sevakis
6e211ab3ac Remove dsp_callback because DSP is now library code, not app code.
Yep, nope, not necessary anymore. Just call functions directly.

Change-Id: I21dc35f8d674c2a9c8379b7cebd5613c1f05b5eb
2013-05-23 14:25:37 -04:00
Michael Sevakis
b7e0e1a0a3 buflib: Remove compulsory IRQ disable during buffer move.
It can cause excessively long interrupt outages if moving a larger
buffer and disrupt audio where DMA is not at a higher interrupt priority
such as FIQ.

Some targets, like Gigabeat S, have very low audio interrupt latency
requirements and will even channel swap if they are missed. Pictureflow
will make the issue very obvious. Even then, moves could take
milliseconds or more depending on the buffer size which is far too long
for any target.

Change-Id: I8e7817213e901da67c36b7eb25d7cb1c1e3ba802
Reviewed-on: http://gerrit.rockbox.org/472
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-05-23 18:25:29 +02:00
Michael Sevakis
33f3af2b8d SPC Codec: Add ARMv5 optimized code. Easy peasy.
Why? Why not? Cuts a few MHz.

Change-Id: Ied5c70b1aedd255cbe5d42b7d3028bbe47aad01d
2013-05-23 03:15:12 -04:00
Michael Sevakis
7738660eff USB: Detect charging-only mode upon cable insert, not host detect.
Letting go of the button before the host is detected allows storage mode
to be entered even though a button was down when plugging. Sometimes the
host would try several times and the button would have to be held down
for several seconds to avoid a storage connection.

The adjustment wasn't made when switching to setup request host
detection.

Change-Id: Iab3bced5bfb1478d4d9a7baab2a2a1144afaf437
2013-05-22 02:28:31 -04:00
Michael Sevakis
39946a56d8 Fix CPU boosting in test_codec.
Boost only for tests and unboost immediately afterwards. It was leaving
the CPU boosted after exiting.

Change-Id: I010c4b975bd27e8990dc057ddd244dab233411ca
2013-05-21 22:19:57 -04:00
Michael Sevakis
9b43f14165 SPC Codec: Simplify configuration and assume nothing need be disabled.
Most SoCs are these days are fast enough for realtime BRR, gaussian
interpolation and echo processing.

Change-Id: I180ce8ad45242c67b5e573a406b9522098a3f12b
2013-05-21 20:39:22 -04:00
Michael Sevakis
ed24e62029 SPC Codec: Have metadata parser fill in frequency and bitrate.
Change-Id: I6c72f4d1c79b1a99a11fb28e7d46886c08a56a75
2013-05-21 20:01:17 -04:00
Michael Sevakis
1f76edabf9 SPC Codec: Need to restore a bit more data from cached waves.
'Nuff said. Last update wasn't quite right.

Change-Id: I082a79c4e0c82b968fe2375cb82ee5c3a64a208b
2013-05-21 16:59:58 -04:00
Nils Wallménius
de86b4a3c5 Opus: fix glitch caused by 2e9aa3d
Change-Id: I1519f3bf2cdf74f3d4741951973352b2678b7722
2013-05-21 22:38:18 +02:00
Michael Sevakis
71b9685dcd Fix FS#9577 - SNES player missing tracks on certain SPCs
Affected BRR cached waveforms but not realtime BRR decode as far as
I could ascertain. BRR cached waves required loop points to be inside
the initial waveform but this change removes that restriction.

Change-Id: I0ef4db720e5c28bd7b2fb9ae255d27c0a7213f79
2013-05-21 04:29:04 -04:00
Michael Sevakis
00e55d0451 Fix 87021f7 errors. There is no this->echo_pos when SPC_NOECHO != 0.
Anyway, that's true now.

Change-Id: I247ea9a10543a8b65f3e73495f0e2ea725ec533e
2013-05-21 00:20:06 -04:00
Michael Sevakis
87021f7c0a SPC Codec: Refactor for CPU and clean up some things.
CPU optimization gets its own files in which to fill-in optimizable
routines.

Some pointless #if 0's for profiling need removal. Those macros are
empty if not profiling.

Force some functions that are undesirable to be force-inlined by the
compiler to be not inlined.

Change-Id: Ia7b7e45380d7efb20c9b1a4d52e05db3ef6bbaab
2013-05-21 00:02:14 -04:00
Nils Wallménius
a17d6de5bc Opus: fix seeking to start of track
Change-Id: I8a8604d6726304d04281671b475b2f75f9bfc0e5
2013-05-19 14:20:31 +02:00