Commit graph

239 commits

Author SHA1 Message Date
Thomas Martitz
1da1b70e26 Fix panic after usb extraction if lastfm logging is enabled.
Previously the scrobbler was shutdown, probably to force a log flush,
and the cache was re-allocated afterwards. Now don't shut down or
re-allocate, but instead rely on the ata idle callback which is
called called on usb insertion to do the log flush.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30325 a1c6a512-1295-4272-9138-f99709370657
2011-08-17 11:27: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
Bertrik Sikken
b2d0ea204c Remove a couple of duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30301 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 13:42:32 +00:00
Thomas Martitz
dbdbc242ac Remove hosted_get_volume(), as event data is available in button_get_data().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30300 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 13:38:10 +00:00
Amaury Pouly
eb90d95693 imx233/fuze+: huge rework
- enable MMU
-rework lcd frame buffer
- add rtc/adc/power stubs (or not)
- fix a few MMC related defines (hopefully)
- implement cache handling for DMA
- more SD work
- add keymap (based on clip)
- add virtual buttons
- update linker scripts
- big step toward apps actually compiling

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30200 a1c6a512-1295-4272-9138-f99709370657
2011-07-23 11:45:22 +00:00
Michael Sevakis
b2dbc2fe70 Fix r30130 red. New functions in misc.c shouldn't be compiled if '__PCTOOL__' is defined.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30131 a1c6a512-1295-4272-9138-f99709370657
2011-07-08 22:51:12 +00:00
Michael Sevakis
5663e1cd0a Have mpegplayer use the mixer (the playback channel, since it's mutually exclusive to audio playback) so the clicks and skip beep can be used according to user settings. Introduce some system sound functions to make easier playing event sounds from various places and convert files calling 'beep_play' to use 'system_sound_play' and 'keyclick_click'. Event sound could be become themeable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30130 a1c6a512-1295-4272-9138-f99709370657
2011-07-08 22:31:15 +00:00
Michael Sevakis
7996d6d3f9 Knock out at least some red/yellow from r30097.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30098 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 07:06:10 +00:00
Michael Sevakis
a2b6703a36 Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 06:37:04 +00:00
Miika Pekkarinen
d0084ffd7a Fixed a regression caused in r30021: tagnavi_custom.config parsing
fails if lines ended with <CR><LF> sequence.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30058 a1c6a512-1295-4272-9138-f99709370657
2011-06-23 20:22:00 +00:00
Miika Pekkarinen
f2ef42c1da Fixed a changelog export/import problem with tagcache where <CR> or <LF>
characters in a tag could cause the parser fail to import a track
statistics correctly. Now line feeds are escaped properly and carriage
returns ignored on import.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30021 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 15:53:33 +00:00
Dominik Riebeling
482e83d09a Center Rockbox logo when smaller than the screen size.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29954 a1c6a512-1295-4272-9138-f99709370657
2011-06-04 18:55:51 +00:00
Jonathan Gordon
b58d3656d7 FS#11925 - Add a proper system to keep track of the current screen/activity to make %cs far more useful
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29944 a1c6a512-1295-4272-9138-f99709370657
2011-06-01 14:41:49 +00:00
Michael Hohmuth
5aec3c2400 FS#11931 part 2: Allow a short rewind when playback is paused. Patch
by John Morris.

This patch adds an option to rewind the current track by a few seconds
when it is paused, irrespective of what has caused the pause.  This is
useful for audiobooks and podcasts to allow the listener to recall
where the track was left off.

The patch subsumes the existing rewind-on-headphone-unplug feature and
extends it to all invocations of pause: play/pause button (or touch
area), headphone removal, and power-supply unplug in car-adapter
mode. It also subsumes FS#9448 (rewind on fade).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29876 a1c6a512-1295-4272-9138-f99709370657
2011-05-13 22:28:47 +00:00
Michael Hohmuth
84301c1e2d FS#11931 part 1: Make fade in/out behavior more consistent across the
various causes of pause and unpause.

Patch by John Morris.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29844 a1c6a512-1295-4272-9138-f99709370657
2011-05-09 12:59:46 +00:00
Michael Hohmuth
9b7027232f unplug_change: Precede call to audio_ff_rewind with
audio_pre_ff_rewind (for SWCODEC).

This became necessary with the recent playback-code renovation.
Thanks to jethead for the hint!

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29843 a1c6a512-1295-4272-9138-f99709370657
2011-05-09 12:51:19 +00:00
Michael Sevakis
82e97363f1 Get rid of a committed #define from kernel.h that didn't make the final cut. Put voice_wait in voice_thread.h where it ought.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29787 a1c6a512-1295-4272-9138-f99709370657
2011-04-27 04:00:48 +00:00
Björn Stenberg
ce755dd9c5 Only set volume on SYS_VOLUME_CHANGED the first time. Workaround for FS#12034.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29663 a1c6a512-1295-4272-9138-f99709370657
2011-03-31 07:04:44 +00:00
Thomas Martitz
8c46ddf9d7 Android: Implement app shutdown and thus, sleep timer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29602 a1c6a512-1295-4272-9138-f99709370657
2011-03-16 15:17:24 +00:00
Björn Stenberg
e50cc0e3d7 Listen to and follow external Android volume changes. (Based on FS#11914 by Maurus Cuelenaere)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29586 a1c6a512-1295-4272-9138-f99709370657
2011-03-14 12:25:48 +00:00
Michael Sevakis
48b1a2d39d Fix the r29343 red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29344 a1c6a512-1295-4272-9138-f99709370657
2011-02-20 11:46:57 +00:00
Michael Sevakis
03862292a2 Make format_time properly format negative times because sometimes they are shown if track length estimates are off from seeking. Example: -0:15 instead of 0:-15. -1000ms < t < 0 is shown as -0:00.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29343 a1c6a512-1295-4272-9138-f99709370657
2011-02-20 11:33:25 +00:00
Thomas Martitz
1e391fbdbc Fix yellows and checkwps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29328 a1c6a512-1295-4272-9138-f99709370657
2011-02-18 23:17:07 +00:00
Thomas Jarosch
258626f455 Fix the shutdown sequence for maemo, SDL and simulator builds
Do proper shutdown in RaaA builds like writeout of
last.FM scrobbler file and other neat things.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29309 a1c6a512-1295-4272-9138-f99709370657
2011-02-15 19:43:04 +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
Mustapha Senhaji
ccad6d0daf Few whitespace fixes by Michael Hohmuth FS#11885
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29082 a1c6a512-1295-4272-9138-f99709370657
2011-01-18 00:37:17 +00:00
Teruaki Kawashima
930a8a5050 set mode argument for open() where O_CREAT flag is/can be set.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28527 a1c6a512-1295-4272-9138-f99709370657
2010-11-07 11:45:20 +00:00
Thomas Martitz
49f1ec8e8a Add support multimedia keys/buttons to the core, and adapt Rockbox on android for it (multimedia buttons are found on wired headsets and the lock screen in cyanogenmod).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28421 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 15:32:57 +00:00
Thomas Martitz
bd573c47aa Fix FS#11676 - audio_status() returns AUDIO_STATUS_PLAY|AUDIO_STATUS_PAUSE if paused so only resume if AUDIO_STATUS_PLAY is the only bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28301 a1c6a512-1295-4272-9138-f99709370657
2010-10-17 17:52:35 +00:00
Nils Wallménius
7f8b70f70c Oops #ifdef -> #if
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28296 a1c6a512-1295-4272-9138-f99709370657
2010-10-17 08:49:25 +00:00
Nils Wallménius
65ee5eb5e7 Accept FS#11606 by Michael Gentry, making ACTION_TREE_STOP stop radio too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28295 a1c6a512-1295-4272-9138-f99709370657
2010-10-17 08:47:56 +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
Thomas Martitz
6eaab4d004 Ged rid of uisimulator/common/io.c for android builds.
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants.
Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know).
For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one,
the values can be retrieved via the new dir_get_info().

Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:29:34 +00:00
Rafaël Carré
bf82ac06bf output_dyn_value() : don't use strlen() to check string emptiness
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27933 a1c6a512-1295-4272-9138-f99709370657
2010-08-28 23:11:59 +00:00
Jonathan Gordon
2e0217774f try again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27770 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 14:32:08 +00:00
Jonathan Gordon
dbf44a6a4d fid red/yellow... does database really need to compile all of misc.c?
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27769 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 14:26:53 +00:00
Jonathan Gordon
489962dc4e Fix FS#11526 - %Vf(<hex>) was acceptable on grey remotes with colour main
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27768 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 14:15:03 +00:00
Thomas Martitz
ca4439ff65 Android port: handle incoming calls.
Stop explicitely if a call comes in, and resume playback (if it was playing before the call) upon hang up.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27746 a1c6a512-1295-4272-9138-f99709370657
2010-08-07 21:30:22 +00:00
Jonathan Gordon
bc046ff899 make grey targets reject viewport colours if theyare more than one letter (i.e %Vb(333333) )
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27664 a1c6a512-1295-4272-9138-f99709370657
2010-08-02 12:50:16 +00:00
Thomas Martitz
9c0b2479f7 Rockbox as an application: add get_user_file_path().
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox).
This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local.

On the DAPs it's a no-op, returing /.rockbox directly.

Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:15:27 +00:00
Jonathan Gordon
2d31d77a8b FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 12:37:48 +00:00
Thomas Martitz
35e8b1429a Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently).
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.

Should be no functional change to targets or the simulator.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 16:53:00 +00:00
Teruaki Kawashima
a444eb57d4 simplify parse_list. don't search for terminating separator or parenthesis when '-' is set.
this change disallows something like %V(0,0,-foo,-,-).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26721 a1c6a512-1295-4272-9138-f99709370657
2010-06-09 12:58:02 +00:00
Jonathan Gordon
268c0644bf fix - not being accepted for viewport font.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26699 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 15:35:52 +00:00
Jonathan Gordon
5b0521c9aa Changeover to the new skin format. SkinBreakingChange in the wiki has the runown of the changes.
Major changes are paramerterised tags now use %tag(param,param), colours are removed from the %V() tag, %Vi gets a required (but can be -) label as its first param).

utils/skinupdater/ has a program to update individual skins, and a perl script to update a whole zip.
Themesite will be unusable for the time being (you should be able to upload new themes once it updates checkwps though).

I obviously havnt tested every updated wps in this change so let me know if one doesnt load


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26641 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 03:44:11 +00:00
Rafaël Carré
5d236b2bfd Generate C file / header for svn version string
It's now easier to force rebuild of files depending on the svn revision

version.c/version.h are generated once with new tools/genversion.sh
Changes in the VCS are still not auto detected, so you'll have to remove
builddir/version.* if you want to change the string in your binaries

APPSVERSION is now called RBVERSION and is defined in the generated
header instead of being defined by the Makefiles
appsversion is now called rbversion (the plugin api number didn't change
since old modules are still binary compatible)

Change some bootloaders to use knwon-at-buildtime RBVERSION instead of
"%s" + rbversion

You'll need to run make clean to regenerate dependencies after the
removal of apps/version.h

To build binaries with a different version string, hand-edit
tools/version.sh or tools/genversion.sh (which calls the former)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 09:41:46 +00:00
Thomas Martitz
bc2f8bbc07 Since the sdl to target tree move, the main thread cannot be removed anymore,
since it's now the default thread which is implicitely created by starting the sim.

This caused a segfault that r26283 tried to fix. Revert r26283 and protect
the main thread from being removed.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26315 a1c6a512-1295-4272-9138-f99709370657
2010-05-26 17:16:19 +00:00
Michael Sevakis
964dcb33b6 Revert r26055 since it breaks certain Archos targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26067 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 21:27:22 +00:00
Michael Sevakis
414dad42c5 If HAVE_POWEROFF_WHILE_CHARGING is not defined and the charging configuration specifies CHARGING_MONITOR or greater, allow poweroff while plugged but not actually charging the battery.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26055 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 15:03:16 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00