Commit graph

64 commits

Author SHA1 Message Date
Nils Wallménius
2f50cd58b9 Codec memory reorganization
Based on a patch by Tomasz Malesinski
* Merge Codec buffer and Malloc buffer into one large buffer.
* The new merged buffer is now 1MB on targets with lots of memory.
* Renamed codec_get_memory to codec_get_buffer and made it behave more. 
like plugin_get_buffer.
* Bumped Codec api and min api versions.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18834 a1c6a512-1295-4272-9138-f99709370657
2008-10-19 12:35:53 +00:00
Nils Wallménius
01729e7a18 FS#9281 Rename of splash functions.
* Remove gui_splash()
* Rename gui_syncsplash() to splashf() and remove its voice 
capabilities.
* Rename the internal splash() to splash_internal() and introduce an 
externally visible splash() that handles simple splashing  without 
printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, 
"foo"); if a LANG_* id is passed it will be voiced.
* Adjust all places that called gui_syncsplash() to use the correct 
variant from above.
* Export both new functions to plugins and adjust places calling 
rb->splash() to use the correct variant so that we now have naming 
consistency between the core and plugins.
* Fix one latent bug that would cause my sim to crash with the above 
changes and correct P2STR and P2ID macros, thanks to pondlife.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
2008-08-15 08:27:39 +00:00
Jens Arnold
4ad26dbfcc Fix one printf format string warning by applying a simplification.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18276 a1c6a512-1295-4272-9138-f99709370657
2008-08-14 07:04:24 +00:00
Michael Giacomelli
52bdcbae85 Commit FS#9170 by Dave Hooper. Adds support for profiling on ARM, and fixes various issues with compiling profile builds. Also, note that profile_reader.pl syntax has changed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18142 a1c6a512-1295-4272-9138-f99709370657
2008-07-28 22:43:41 +00:00
Dominik Wenger
25bb37bb68 commit asap codec. plays .sap files. At the moment it only plays the default song. So subSongs are ignored.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18121 a1c6a512-1295-4272-9138-f99709370657
2008-07-26 15:16:10 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Nicolas Pennequin
357ffb3c46 Convert the whole codebase to UTF-8, except docs/COMMITTERS and tools/creative.c, which need checking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17369 a1c6a512-1295-4272-9138-f99709370657
2008-05-05 10:32:46 +00:00
Bertrik Sikken
2843469876 Moved atoi declaration to stdlib.h. Deleted atoi.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 16:18:04 +00:00
Bertrik Sikken
c97e503a10 Cleaned up playblack.h header file and usage of it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17276 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 14:13:13 +00:00
Michael Sevakis
4855e734f3 Move codec_get_file_pos somewhere else like the comment said should be done. Codec API version increment was needed so update all codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16874 a1c6a512-1295-4272-9138-f99709370657
2008-03-29 06:36:53 +00:00
Michael Sevakis
27cf677339 Add a complete priority inheritance implementation to the scheduler (all mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
2008-03-25 02:34:12 +00:00
Michael Sevakis
5323fe996b Move encoder CPU boost control to the core. Allow CPU to sleep a bit when PCM buffer is empty and save some power. Codec API becomes incompatible so full updates! :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15854 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 05:16:56 +00:00
Michael Sevakis
1a41c8afee SPC Codec: Run SPC emulation on COP and audio sample processing on CPU on dual-core PortalPlayer targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15673 a1c6a512-1295-4272-9138-f99709370657
2007-11-18 19:03:45 +00:00
Michael Sevakis
99617d71ba Make speex the new voice format for SWCODEC targets (non-Archos). Remove codec swapping and build speex voice decoding directly into the core binary.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15668 a1c6a512-1295-4272-9138-f99709370657
2007-11-18 17:12:19 +00:00
Brandon Low
86919f4609 Misc. buffering related playback tweaks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15435 a1c6a512-1295-4272-9138-f99709370657
2007-11-03 17:55:29 +00:00
Nicolas Pennequin
b838a62adf Make bufread and bufgetdata blocking. They now return when enough data is available or when EOF is reached. This improves the API and removes the need for several duplicate waiting loops.
Also fix a few logfqueue messages.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15412 a1c6a512-1295-4272-9138-f99709370657
2007-11-02 19:13:03 +00:00
Brandon Low
bfc870f07e Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15409 a1c6a512-1295-4272-9138-f99709370657
2007-11-02 14:20:44 +00:00
Brandon Low
dcca586a9b Improve upon my hackity hack from before by separating audio into two types: that which may be large and can be streamed and that which is small and cannot be streamed. While modifying types, allow codecs to split across the buffer wrap and dig out/move around the code that reads a codec off of the buffer to facilitate that simple sounding change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15408 a1c6a512-1295-4272-9138-f99709370657
2007-11-02 14:06:48 +00:00
Nicolas Pennequin
fb70952228 logf changes:
* Disable logf by default and allow per-file enabling with "#define LOGF_ENABLE". To enable globally add that define in the config.h file.
* Transform logf calls into DEBUGF calls when ROCKBOX_HAS_LOGF isn't defined, so that they get printed to the console in the sim.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15291 a1c6a512-1295-4272-9138-f99709370657
2007-10-24 22:06:36 +00:00
Michael Sevakis
7914e90738 Commit a subset of the dual core changes that have to do with cache handling, stacks, firmware startup and thread startup. Tested on e200, H10-20GB, iPod Color and 5.5G. Thread function return implemented for all targets. Some changes to plugins to follow shortly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14879 a1c6a512-1295-4272-9138-f99709370657
2007-09-28 10:20:02 +00:00
Dave Chapman
9a011f3a80 Clean up the codec API - remove all unused (and in many cases inappropriate) functions, move functions used only by encoders into the HAVE_RECORDING part of the API and document the reasons for the more unexpected functions being present.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13343 a1c6a512-1295-4272-9138-f99709370657
2007-05-07 11:09:45 +00:00
Michael Sevakis
26d242ae65 General housekeeping: Make plugin buffer functions take size_t * instead of int * to match the parameter type of the buffer functions called in the core. Get rid of unsafe int * <==> size_t * casting. Use ssize_t where int was used and size_t where unsigned int was used in the buffer calls to not alter signedness in the plugins. No API version change since it should only be an issue for 64-bit sim builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13233 a1c6a512-1295-4272-9138-f99709370657
2007-04-21 18:38:25 +00:00
Jens Arnold
4d6374c923 Get rid of the 'center' parameter for splashes. There were only 2 of almost 500 splashes which were not centered.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12807 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 21:56:08 +00:00
Daniel Ankers
82f9056988 Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
2007-03-04 20:06:41 +00:00
Michael Sevakis
598629c3bf SWCODEC Recording Codecs: Fix problems with hanging recording screen (chiefly on x5) when no voice file present and source is not FMRadio. Caused by extra audio stops causing encoder to unload prematurely. Fix is to have separate stop flags for each codec type to prevent collisions. Also now safe to plug into USB when recording and encoder will stay loaded and not be stopped by the call to audio_stop_playback. Additional discovery: playback will not be able to restart after a USB plug during recording. Probably an old bug. I recommend in the future that recording have higher priority on system resources than playback and playback be denied access explicitly if recording requires them. Codec API becomes incompatible so do full updates.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12579 a1c6a512-1295-4272-9138-f99709370657
2007-03-04 04:16:53 +00:00
Michael Sevakis
aba6ca0881 Fix resampling clicking as much as possible at the moment. 1) Upsampling clicked because of size inaccuracies returned by DSP. Fix by simplifying audio system to use per-channel sample count from codec to pcm buffer. 2) Downsampling affected by 1) and was often starting passed the end of the data when not enough was available to generate an output sample. Fix by clamping input range to last sample in buffer and using the last sample value in the buffer. A perfect fix will require a double buffering scheme on the resampler to sufficient data during small data transients on both ends at all times of the down ratio on input and the up ratio on output.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12218 a1c6a512-1295-4272-9138-f99709370657
2007-02-07 00:51:50 +00:00
Jonathan Gordon
f8c68c7912 Simple cpu boost tracker for LOGF builds. Shows the last 64 cpu_boost() calls from the debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12087 a1c6a512-1295-4272-9138-f99709370657
2007-01-22 10:41:25 +00:00
Nils Wallménius
ed15e2994d 1) Delete unused files from old database and old gui files 2) Remove unneccesary includes of the old database header 3) Delete the deprecated databox plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11715 a1c6a512-1295-4272-9138-f99709370657
2006-12-11 20:21:36 +00:00
Tomasz Malesinski
80da8b141c FS#6357, patch 1: let iramcopy and bss share the same space in codecs and
plugins. Currently, in case of plugins using IRAM bss is cleared twice,
once in the loader, once in PLUGIN_IRAM_INIT. For codecs, bss is cleared only
during codec initialization. Also, removed double variables in codecs
storing a pointer to codec_api.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11606 a1c6a512-1295-4272-9138-f99709370657
2006-11-26 18:31:41 +00:00
Michael Sevakis
0f5cb94aa4 Big Patch adds primarily: Samplerate and format selection to recording for SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
2006-11-06 18:07:30 +00:00
Jonathan Gordon
7ae8e44c95 add some consistancy to the path #defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11114 a1c6a512-1295-4272-9138-f99709370657
2006-10-03 10:38:27 +00:00
Linus Nielsen Feltzing
80ec47f683 Oops
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11058 a1c6a512-1295-4272-9138-f99709370657
2006-09-26 10:10:36 +00:00
Linus Nielsen Feltzing
537c7546f9 Patch #4899 by Robert Keevil - Automatic pause on iPod when removing the headphones
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11057 a1c6a512-1295-4272-9138-f99709370657
2006-09-26 10:03:56 +00:00
Miika Pekkarinen
a85044bf9e New scheduler, with priorities for swcodec platforms. Frequent task
switching should be more efficient and tasks are stored in linked
lists to eliminate unnecessary task switching to improve performance.
Audio should no longer skip on swcodec targets caused by too CPU
hungry UI thread or background threads.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
2006-09-16 16:18:11 +00:00
Michael Sevakis
4fc717a4c1 Added FS#2939 Encoder Codec Interface + Codecs by Antonius Hellmann with additional FM Recording support and my modifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10789 a1c6a512-1295-4272-9138-f99709370657
2006-08-28 22:38:41 +00:00
Tomasz Malesinski
3f7602b0e8 Added discard_codec to simulator code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10144 a1c6a512-1295-4272-9138-f99709370657
2006-06-21 19:14:18 +00:00
Brandon Low
ebadcc633a Put new_track on the codec_api, and use it instead of the reload_codec variable in most places. Should help with problems people have had with GUI vs. playback sync.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9670 a1c6a512-1295-4272-9138-f99709370657
2006-04-15 02:03:11 +00:00
Brandon Low
62ccbbb418 Rework track skipping. Full playback stop is no longer involved in track skipping. Further simplification of the play related functions can be achieved with this in place, but that's for later. Known skip related bug, high pitched noise sometimes, otherwise stuff is better
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9601 a1c6a512-1295-4272-9138-f99709370657
2006-04-11 03:55:58 +00:00
Miika Pekkarinen
7c4e0c8730 Initial version of tagcache! There are still some bugs in the engine
and much more problems with the UI.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9256 a1c6a512-1295-4272-9138-f99709370657
2006-03-26 11:33:42 +00:00
Brandon Low
86f1e2ead2 Convert playback.c to use unsigned byte counters, and _minor_ refactoring of buffer callbacks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9227 a1c6a512-1295-4272-9138-f99709370657
2006-03-24 13:43:15 +00:00
Jens Arnold
38b7547ef4 Simulators: Fix pointer size vs. int size problems (64bit hosts) in plugin loader and codec loader.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8880 a1c6a512-1295-4272-9138-f99709370657
2006-03-02 01:08:38 +00:00
Jens Arnold
e6e8aa9519 Added memmove() to codec API & plugin API, and changed codeclib and plugin libs to use it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8602 a1c6a512-1295-4272-9138-f99709370657
2006-02-06 16:04:01 +00:00
Brandon Low
d2e75bf02d Remove exported pcm functions. Codecs should never be allowed to access
the pcm directly.  Only through the callbacks in playback.c.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8544 a1c6a512-1295-4272-9138-f99709370657
2006-02-03 00:12:11 +00:00
Miika Pekkarinen
33914a7dfc Fixed the codec loader bug.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8403 a1c6a512-1295-4272-9138-f99709370657
2006-01-21 08:17:40 +00:00
Brandon Low
05dccc3551 Profiling support, tools and documentation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8375 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 20:54:13 +00:00
Jens Arnold
a8c408c6a3 More consistent error checking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8364 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 08:34:32 +00:00
Jens Arnold
b8749fdf21 New codec loader, using the same mechanism as the new plugin loader. API version numbering restarted for the new system. Uses the target ID from configure, so don't change that too often. * Fixed sim_plugin_load_ram() to truncate the tempfile. * Reduced plugin buffer size to 512KB for iriver and iPod.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8362 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 00:05:14 +00:00
Dave Chapman
77bf6bf370 iPod: current_tick is now a variable, so we can export it via the plugin and codec APIs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8225 a1c6a512-1295-4272-9138-f99709370657
2005-12-12 14:05:14 +00:00
Kevin Ferrare
e991beed6d replaced all the splash calls by gui_sync_splash, added some missing remote key in the playlist viewer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7909 a1c6a512-1295-4272-9138-f99709370657
2005-11-16 15:12:15 +00:00
Dave Chapman
e12f797311 iPod: current_tick is (currently) a macro - so we exclude it from the plugin and codec APIs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7826 a1c6a512-1295-4272-9138-f99709370657
2005-11-12 15:45:48 +00:00