Commit graph

389 commits

Author SHA1 Message Date
William Wilgus
f7bb9e2167 Add custom action mapping to core
results of an idea I discussed in IRC

changed the way the lookup in the remap file works..

 entries consist of 3 int [action, button, prebtn]
 context look up table is at the beginning
 action_code contains the (context | CONTEXT_REMAPPED)
 button_code contains the index of the first remapped action for the matched context
 [0] CORE_CONTEXT_REMAP(ctx1) offset1=(3), count=(1)
 [1] CORE_CONTEXT_REMAP(ctx2, offset2=(5), count=(1)
 [2] sentinel, 0, 0
 [3] act0, btn, 0
 [4] sentinel 0, 0
 [5] act1, btn, 0
 [6] sentinel, 0, 0

 Note:
 last entry of each group is always the sentinel [CONTEXT_STOPSEARCHING, BUTTON_NONE, BUTTON_NONE]
 contexts must match exactly -- re-mapped contexts run before the built in w/ fall through contexts
 ie. you can't remap std_context and expect it to match std_context actions from the WPS context.

-- Done --

Code for reading core remap entries

-- Done --

import of core remap entires from disk
-- Done --

plugin to set new key mapping (the hard part)

The plugin is started and FULLY functional
you can add actions and contexts
you can change context, action, button, prebtn
delete keymap files
load keymapfiles
save user keymaps
test keymaps before applying them
loading keymaps to core still requires restart
-----------------------------------------------------------------------------------------------

Change-Id: Ib8b88c5ae91af4d540e1829de5db32669cd68203
2022-02-23 08:47:12 -05:00
Aidan MacDonald
8eb685ffdf Remove a couple of #ifdefs
Give iBasso DX50/DX90 empty adc-target.h headers like all
the other hosted targets to avoid special cases.

Change-Id: Iaae15642fdec4ff18bc9ac01245753135128f676
2021-12-05 13:14:47 -05:00
Aidan MacDonald
5a4cc8da3f Drop HAVE_RTC_RAM
Only Archos players ever used this feature and it isn't implemented
on any current targets.

Change-Id: I39c8455480a3fe33cd25b667e8d4d6ff3a092d3e
2021-08-15 20:41:58 +01:00
Tomasz Moń
e11fa5f74e Sansa Connect: Initial libertas WiFi driver port
Import non-free firmware image from linux-firmware package.

Firmware loading works but is disabled at compile time because just
loading firmware without configuring device results in higher power
consumption without any benefit to end user.

Change-Id: I8fd252c49385ede1ea4e0f9b1e29adeb331ab8ae
2021-07-04 07:41:44 +00:00
Dana Conrad
8056b7fd1a Yes/No Screen: Allow accept to be button release
Allows the ACTION_YESNO_ACCEPT action to be set
to a button release by ignoring certain system events.

Moving USB init in main.c to the last thing to prevent
getting stuck in the USB prompt, if enabled.
Also changing ACTION_YESNO_ACCEPT to button release on erosq

Change-Id: I5e7498521a13cb4e840223dd0b9c8633e99093bc
2021-05-27 19:58:09 -05:00
William Wilgus
2ffe87902d Add Invalid Voice Announcement to the voice system FS#13216
When a voice file is invalid or fails to load the voice system splash a
message 'Invalid Voice'

Now we supply a single voice file (currently only english is used)
the support for other languages is in but I haven't set it up to
look for anything but InvalidVoice_english.talk

Also adds a one time kill voice thread function
 ie. it doesn't allow re-init after killing the voice thread & queue

Change-Id: I7b43f340c3cc65c65110190f0e0075b31218a7ac
2020-09-20 16:08:49 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
Sylvain Saubier
1224919f3a Comment details, typos
Change-Id: I71a283b8e705ad8b9274858bc3cde19d25fc7253
2020-05-24 14:31:15 +02:00
Marcin Bukat
7692558674 Agptek Rocker: Implement USB mass storage driver
Agptek uses composite android driver.

Change-Id: Iece188ad640f3dfd24c171946c14da4c3516b6d5
2018-06-12 10:31:15 +02:00
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
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
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 Sevakis
7d1a47cf13 Rewrite filesystem code (WIP)
This patch redoes the filesystem code from the FAT driver up to the
clipboard code in onplay.c.

Not every aspect of this is finished therefore it is still "WIP". I
don't wish to do too much at once (haha!). What is left to do is get
dircache back in the sim and find an implementation for the dircache
indicies in the tagcache and playlist code or do something else that
has the same benefit. Leaving these out for now does not make anything
unusable. All the basics are done.

Phone app code should probably get vetted (and app path handling
just plain rewritten as environment expansions); the SDL app and
Android run well.

Main things addressed:
1) Thread safety: There is none right now in the trunk code. Most of
what currently works is luck when multiple threads are involved or
multiple descriptors to the same file are open.

2) POSIX compliance: Many of the functions behave nothing like their
counterparts on a host system. This leads to inconsistent code or very
different behavior from native to hosted. One huge offender was
rename(). Going point by point would fill a book.

3) Actual running RAM usage: Many targets will use less RAM and less
stack space (some more RAM because I upped the number of cache buffers
for large memory). There's very little memory lying fallow in rarely-used
areas (see 'Key core changes' below). Also, all targets may open the same
number of directory streams whereas before those with less than 8MB RAM
were limited to 8, not 12 implying those targets will save slightly
less.

4) Performance: The test_disk plugin shows markedly improved performance,
particularly in the area of (uncached) directory scanning, due partly to
more optimal directory reading and to a better sector cache algorithm.
Uncached times tend to be better while there is a bit of a slowdown in
dircache due to it being a bit heavier of an implementation. It's not
noticeable by a human as far as I can say.

Key core changes:
1) Files and directories share core code and data structures.

2) The filesystem code knows which descriptors refer to same file.
This ensures that changes from one stream are appropriately reflected
in every open descriptor for that file (fileobj_mgr.c).

3) File and directory cache buffers are borrowed from the main sector
cache. This means that when they are not in use by a file, they are not
wasted, but used for the cache. Most of the time, only a few of them
are needed. It also means that adding more file and directory handles
is less expensive. All one must do in ensure a large enough cache to
borrow from.

4) Relative path components are supported and the namespace is unified.
It does not support full relative paths to an implied current directory;
what is does support is use of "." and "..". Adding the former would
not be very difficult. The namespace is unified in the sense that
volumes may be specified several times along with relative parts, e.g.:
"/<0>/foo/../../<1>/bar" :<=> "/<1>/bar".

5) Stack usage is down due to sharing of data, static allocation and
less duplication of strings on the stack. This requires more
serialization than I would like but since the number of threads is
limited to a low number, the tradoff in favor of the stack seems
reasonable.

6) Separates and heirarchicalizes (sic) the SIM and APP filesystem
code. SIM path and volume handling is just like the target. Some
aspects of the APP file code get more straightforward (e.g. no path
hashing is needed).

Dircache:
Deserves its own section. Dircache is new but pays homage to the old.
The old one was not compatible and so it, since it got redone, does
all the stuff it always should have done such as:

1) It may be update and used at any time during the build process.
No longer has one to wait for it to finish building to do basic file
management (create, remove, rename, etc.).

2) It does not need to be either fully scanned or completely disabled;
it can be incomplete (i.e. overfilled, missing paths), still be
of benefit and be correct.

3) Handles mounting and dismounting of individual volumes which means
a full rebuild is not needed just because you pop a new SD card in the
slot. Now, because it reuses its freed entry data, may rebuild only
that volume.

4) Much more fundamental to the file code. When it is built, it is
the keeper of the master file list whether enabled or not ("disabled"
is just a state of the cache). Its must always to ready to be started
and bind all streams opened prior to being enabled.

5) Maintains any short filenames in OEM format which means that it does
not need to be rebuilt when changing the default codepage.

Miscellaneous Compatibility:
1) Update any other code that would otherwise not work such as the
hotswap mounting code in various card drivers.

2) File management: Clipboard needed updating because of the behavioral
changes. Still needs a little more work on some finer points.

3) Remove now-obsolete functionality such as the mutex's "no preempt"
flag (which was only for the prior FAT driver).

4) struct dirinfo uses time_t rather than raw FAT directory entry
time fields. I plan to follow up on genericizing everything there
(i.e. no FAT attributes).

5) unicode.c needed some redoing so that the file code does not try
try to load codepages during a scan, which is actually a problem with
the current code. The default codepage, if any is required, is now
kept in RAM separarately (bufalloced) from codepages specified to
iso_decode() (which must not be bufalloced because the conversion
may be done by playback threads).

Brings with it some additional reusable core code:
1) Revised file functions: Reusable code that does things such as
safe path concatenation and parsing without buffer limitations or
data duplication. Variants that copy or alter the input path may be
based off these.

To do:
1) Put dircache functionality back in the sim. Treating it internally
as a different kind of file system seems the best approach at this
time.

2) Restore use of dircache indexes in the playlist and database or
something effectively the same. Since the cache doesn't have to be
complete in order to be used, not getting a hit on the cache doesn't
unambiguously say if the path exists or not.

Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8
Reviewed-on: http://gerrit.rockbox.org/566
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-08-30 03:48:23 +02:00
Michael Sevakis
981d028c09 Do some kernel cleanup
* Seal away private thread and kernel definitions and declarations
into the internal headers in order to better hide internal structure.

* Add a thread-common.c file that keeps shared functions together.
List functions aren't messed with since that's about to be changed to
different ones.

* It is necessary to modify some ARM/PP stuff since GCC was complaining
about constant pool distance and I would rather not force dump it. Just
bl the cache calls in the startup and exit code and let it use veneers
if it must.

* Clean up redundant #includes in relevant areas and reorganize them.

* Expunge useless and dangerous stuff like remove_thread().

Change-Id: I6e22932fad61a9fac30fd1363c071074ee7ab382
2014-08-08 01:59:59 -04:00
Amaury Pouly
c13f21a4d5 Fix logdisk
The code was broken in a subtle but crucial way: storage idle
callbacks are oneshot so after the first flush everything would
stay in the buffer forever and would never be written to the disk
thus resulting into many events being lost. This changed correctly
registers the idle callback each time the buffer is not empty.
Note that the idle storage code checks if a callback
has is in the queue already so we don't register twice.

Change-Id: Ifdf331d4b757e05b8a6902bf5926cbc7689f5109
2013-08-16 21:59:16 +02:00
Michael Sevakis
023f6b6efd Get rid of some superfluous single-purpose functions in playback.
* Remove explicit tracking of elapsed time of previous track.
* Remove function to obtain auto skip flag.
* Most playback events now carry the extra information instead and
  pass 'struct track_event *' for data.
* Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes
  it cleaner and removes the struct mp3entry.

Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
2013-07-13 00:08:51 -04:00
Michael Sevakis
ffa8626b0c Fix whitespace in files for following commit.
Change-Id: I4adb8a152e9b99fcd26d95da7334d7d0cbe2a036
2013-07-12 21:39:06 -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 Giacomelli
d46b090771 Introduce logging to disk feature into rockbox.
Logs information, errors, etc to disk using the register_storage_idle_func
mechanism to write to the disk when available.  Currently, this is disabled
in normal builds, but can be enabled by adding ROCKBOX_HAS_LOGDISKF to the
config file.  By default, it uses a 2KB buffer and drops text if the buffer
overflows.

The system includes a simple warning level mechanism that can be used to by
default exclude non-serious errors from logging on release builds.

Change-Id: I0a3d186a93625c7c93dae37b993a0d37e5a3a925
Reviewed-on: http://gerrit.rockbox.org/288
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Tested-by: Michael Giacomelli <mgiacomelli@gmail.com>
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
2012-08-07 00:53:46 +02:00
Michael Sevakis
ba8e4367fb Disable attempts to voice init_tagcache.
It just cannot work anyways because init_tagcache is called before
audio_init. Besides, FS#12684 may be helped for now as well.

Change-Id: I2bb4f81f807bae509b220ee6656a6a109b5eb011
2012-05-30 18:42:16 -04:00
Michael Sevakis
c9bcbe202d Fundamentally rewrite much of the audio DSP.
Creates a standard buffer passing, local data passing and messaging
system for processing stages. Stages can be moved to their own source
files to reduce clutter and ease assimilation of new ones. dsp.c
becomes dsp_core.c which supports an engine and framework for effects.

Formats and change notifications are passed along with the buffer so
that they arrive at the correct time at each stage in the chain
regardless of the internal delays of a particular one.

Removes restrictions on the number of samples that can be processed at
a time and it pays attention to destination buffer size restrictions
without having to limit input count, which also allows pcmbuf to
remain fuller and safely set its own buffer limits as it sees fit.
There is no longer a need to query input/output counts given a certain
number of input samples; just give it the sizes of the source and
destination buffers.

Works in harmony with stages that are not deterministic in terms of
sample input/output ratio (like both resamplers but most notably
the timestretch). As a result it fixes quirks with timestretch hanging
up with certain settings and it now operates properly throughout its
full settings range.
Change-Id: Ib206ec78f6f6c79259c5af9009fe021d68be9734
Reviewed-on: http://gerrit.rockbox.org/200
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-29 10:00:56 +02:00
Thomas Martitz
2406005d8f Remove a useless sleep() from hosted's init().
Speeds up startup by 0.5s yay!

Change-Id: I3bc00748680acd236c412eae84f5e924e0462889
2012-04-10 10:36:58 +02:00
Thomas Martitz
a5b0a1dcba Call radio_init() from hosted's init() too.
Change-Id: Ib18874ab5ed4a57ae352a9c78bf3501247668a06
2012-04-10 10:34:36 +02:00
Boris Gjenero
5cd8aec39a Fix FS#7631 : Archos V2 and FM Recorder charging screen problems
ATA power is off in the charging screen to avoid problems when the battery
is deeply discharged. Without ATA power, Archos FM and V2 Recorders measure
battery voltage as 0V, leading to an unwanted low battery shutdown. This
change delays powermgmt_init() on those targets until after ATA power is
turned on by storage_init(). The charging screen displays input current,
so there is some visible feedback on charging progress.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31484 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:31:47 +00:00
Jonathan Gordon
0ca4b38b1b skinengine: Rework skin loading so skins can be un/loaded individually. This also means that loading a .cfg which doesnt change themes shouldnt have them reloaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31037 a1c6a512-1295-4272-9138-f99709370657
2011-11-21 10:02:23 +00:00
Thomas Martitz
71d73fd470 Remove sim_tasks from the sdl application build.
This unfortunately removes the screendump feature, but usually there are better desktop apps for that.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31011 a1c6a512-1295-4272-9138-f99709370657
2011-11-17 19:52:59 +00:00
Jonathan Gordon
be716c0be8 Finally commit FS#5111 - piezo clicker for ipods!
Origional implementation by Robert Keevil with contributions from Frederik Vestre,  Stoyan Stratev, Craig Elliott, Michael Sparmann,  Thomas Schott, Rosso Maltese, and syncs from a bunch of other people!

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30995 a1c6a512-1295-4272-9138-f99709370657
2011-11-16 10:25:43 +00:00
Jonathan Gordon
101693fd30 FS#12251 - User shortcuts in the main menu.
Custom shortcuts which give the user fast access to regularly used files/folders/settings/whatever.
Thanks to Alexander Levin for the manual part of the patch

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30990 a1c6a512-1295-4272-9138-f99709370657
2011-11-15 13:22:02 +00:00
Thomas Martitz
d3c21023e0 Add pcm_rec_init() to the sim's init.
It makes sim behavior a little more target-like and enables to reproduce FS#12241.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30839 a1c6a512-1295-4272-9138-f99709370657
2011-10-26 18:28:45 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Thomas Martitz
6efb3f0760 Revert r30599 "Check for the magic file "/.rockbox/skin_buffer_size.txt" [...]"
It's not clear whether a user setting is the right/accepted fix for the skin buffer.
But even if it is, this implementation of it is considered bad, even by the author.

See http://www.rockbox.org/mail/archive/rockbox-dev-archive-2011-09/0054.shtml

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30718 a1c6a512-1295-4272-9138-f99709370657
2011-10-05 17:43:51 +00:00
Fred Bauer
a1d3a1d143 Delay settings_reset() until after font_init(). Fixes boot crash on Fuze(v1) and probably others.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30613 a1c6a512-1295-4272-9138-f99709370657
2011-09-27 21:06:12 +00:00
Jonathan Gordon
f7c2978cc4 Check for the magic file "/.rockbox/skin_buffer_size.txt" on bootup which can have a number which is the amount of kilobytes to allocate for the skin buffer. This is only checked on boot so if you need to change it you must reboot to enable.
Currently the default size is 80KB on colour targets which can be way too much or not enough for users.
The format of the /.rockbox/skin_buffer_size.txt file is simply a number (so 120 if you want 120 kilobytes), NO trainling spaces or text of any kind

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30599 a1c6a512-1295-4272-9138-f99709370657
2011-09-25 12:55:40 +00:00
Jonathan Gordon
b71c66ec56 Fix the build errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30590 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:29:21 +00:00
Jonathan Gordon
aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +00:00
Thomas Martitz
baa070cca6 GSoC/Buflib: Enable compaction in buflib.
This enables the ability to allocate (and free) memory dynamically
without fragmentation, through compaction. This means allocations can move
and fragmentation be reduced. Most changes are preparing Rockbox for this,
which many times means adding a move callback which can temporarily disable
movement when the corresponding code is in a critical section.

For now, the audio buffer allocation has a central role, because it's the one
having allocated most. This buffer is able to shrink itself, for which it
needs to stop playback for a very short moment. For this,
audio_buffer_available() returns the size of the audio buffer which can
possibly be used by other allocations because the audio buffer can shrink.

lastfm scrobbling and timestretch can now be toggled at runtime without
requiring a reboot.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:45 +00:00
Thomas Martitz
d0b72e2590 GSoC/Buflib: Add buflib memory alocator to the core.
The buflib memory allocator is handle based and can free and
compact, move or resize memory on demand. This allows to effeciently
allocate memory dynamically without an MMU, by avoiding fragmentation
through memory compaction.

This patch adds the buflib library to the core, along with
convinience wrappers to omit the context parameter. Compaction is
not yet enabled, but will be in a later patch. Therefore, this acts as a
replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug
menu.

See buflib.h for some API documentation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:33 +00:00
Thomas Martitz
d1322b7159 GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.
Namely, introduce buffer_get_buffer() and buffer_release_buffer().
buffer_get_buffer() aquires all available and grabs a lock, attempting to
call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause
a panicf() (doesn't actually happen, but is for debugging purpose).
buffer_release_buffer() unlocks that lock and can additionally increment the
audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was
used temporarily only.
buffer_available() is a replacement function to query audiobuflen, i.e. what's
left in the buffer.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.

Further changes happened to mp3data.c and talk.c as to not call the above API
functions, but get the buffer from callers. The caller is the audio system
which has the buffer lock while mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.

audiobuf and audiobufend are local to buffer.c now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 15:13:00 +00:00
Thomas Jarosch
15a358099c Introduce "power" thread for RaaA
I tried to move the #ifdefs and the code
in firmware/powermgmt.c around and it was still
a big mess for hosted applications (RaaA/sim builds).

Create our own "power" thread as recently discussed on IRC.

Fixes the sleep timer for RaaA.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29501 a1c6a512-1295-4272-9138-f99709370657
2011-03-02 19:12:55 +00:00
Dave Chapman
793eab19b9 Remove a redundant part of a #if
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29461 a1c6a512-1295-4272-9138-f99709370657
2011-02-28 12:05:22 +00:00
Thomas Jarosch
6e9e6a7571 RaaA: Add initial Pandora support
More information: www.openpandora.org

Possible things to implement:
- Special button mappings
- Battery monitoring
- ALSA audio backend
- Automate creation of "pnd" (=binary) file

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29451 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 23:42:37 +00:00
Thomas Martitz
95e24dd7a5 Android:
* Re-create RockboxFramebuffer instance with every time there's a new Activity.
* Also, allow Rockbox to be started via multimedia buttons, immediately starting playback if wanted.

We don't need to keep the fb instance around when it backround, and it makes us less depending on it and the activity (less race conditions). And this is how you usually do it in Android apps.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29384 a1c6a512-1295-4272-9138-f99709370657
2011-02-23 01:10:54 +00:00
Thomas Jarosch
5f037ac015 Initial maemo platform support
Adds Nokia N900, N810 and N800 support.

Features:
- Introduce maemo specific platform defines
- Play audio in silent mode
- Stop playback on incoming calls
- Battery level readout
- Bluetooth headset support
- Save CPU by disabling screen updates if the display
  is off or the app doesn't have input focus
- N900: GStreamer audio backend

Kudos to kugel for the code review.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657
2011-02-08 20:05:25 +00:00
Andree Buschmann
5d849a963e Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 17:43:32 +00:00
Michael Sparmann
886e97221b Fix an ugly-looking comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28945 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 22:22:51 +00:00
Thomas Martitz
f5a461d182 Android: Rework notification and change icon sizes to better meet the systems' standard.
The notification now announces the new track on track change, and the the area in the scrolled down notification area shows track infos (title, artist, album).

Someone should check if it looks good on hdpi and ldpi screens as I can't verify it right now (emulator crashes).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28785 a1c6a512-1295-4272-9138-f99709370657
2010-12-10 18:41:09 +00:00
Thomas Martitz
2c2416094f Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Frank Gevaerts
c8c40c5291 Add a "early_usb" argument to gui_usb_screen_run(), and don't do skin unloading/reloading in gui_usb_screen_run() in the early usb case. Fixes the crash part of FS#11589
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28229 a1c6a512-1295-4272-9138-f99709370657
2010-10-10 13:17:39 +00:00