summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/pcm-android.c (follow)
Commit message (Collapse)AuthorAge
* Do not include kernel.h in system.h.Thomas Martitz2014-01-05
| | | | | | | system.h doesn't need it on its own and this change makes it less dependant on Rockbox internals. Change-Id: I4e1e4108a52a7b599627a829204eb82b392fc6d6
* android: Rewrite PCM playback without OnPlaybackPositionUpdateListener.Thomas Martitz2013-04-01
| | | | | | | | | | | | | | | The old way actually mis-used the API (I misunderstood the docs) because it specified the marker position as a "low buffer watermark" but instead of a future playback head position. The replacement is a simple thread that writes the data regardless of the filling level of the buffer (write() will just block) and polls the playback state periodically. Change-Id: If29237cee4ce78dc42f5a8320878bab0cafe78f7 Reviewed-on: http://gerrit.rockbox.org/422 Tested-by: Dominik Riebeling <Dominik.Riebeling@gmail.com> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* Tweak some PCM drivers for less typecasting with the data pointer.Michael Sevakis2012-03-04
| | | | | | | Yeah, sizeof (void) here with GCC is 1. If something has a problem with that, we'll set it straight. Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9
* Revise the PCM callback system after adding multichannel audio.Michael Sevakis2012-03-03
| | | | | | | | | | | | | | | | | | Additional status callback is added to pcm_play/rec_data instead of using a special function to set it. Status includes DMA error reporting to the status callback. Playback and recording callback become more alike except playback uses "const void **addr" (because the data should not be altered) and recording uses "void **addr". "const" is put in place throughout where appropriate. Most changes are fairly trivial. One that should be checked in particular because it isn't so much is telechips, if anyone cares to bother. PP5002 is not so trivial either but that tested as working. Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2 Reviewed-on: http://gerrit.rockbox.org/166 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Shuffle some functions around so that interfacing with playback.c in ↵Michael Sevakis2011-09-01
| | | | | | particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
* Fix typo in and clarify comment.Thomas Martitz2011-08-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30309 a1c6a512-1295-4272-9138-f99709370657
* Remove hosted_get_volume(), as event data is available in button_get_data().Thomas Martitz2011-08-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30300 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#12150 - Fully-functional audio mixer - and finally whip old ↵Michael Sevakis2011-06-29
| | | | | | 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
* Android: Greatly simplify the pcm callback mechanism on both, the Java and ↵Thomas Martitz2011-06-05
| | | | | | the C side. Should be more reliable now (if the old wasn't already). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29963 a1c6a512-1295-4272-9138-f99709370657
* Fix whitespace errors aka tabs.Dominik Riebeling2011-05-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29826 a1c6a512-1295-4272-9138-f99709370657
* Android: Implement app shutdown and thus, sleep timer.Thomas Martitz2011-03-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29602 a1c6a512-1295-4272-9138-f99709370657
* Android: Partly revert r29569 and only call the new getJavaEnvironment() ↵Thomas Martitz2011-03-16
| | | | | | | | | when needed. The environment is fine to share in general, just not across OS threads, so it's only needed for functions which are possibly called from multiple OS threads (only 1 currently). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29601 a1c6a512-1295-4272-9138-f99709370657
* Listen to and follow external Android volume changes. (Based on FS#11914 by ↵Björn Stenberg2011-03-14
| | | | | | Maurus Cuelenaere) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29586 a1c6a512-1295-4272-9138-f99709370657
* Android: no need to keep RockboxPCM_class aroundMaurus Cuelenaere2011-03-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29571 a1c6a512-1295-4272-9138-f99709370657
* Partly revert "Android: use NewGlobalRef for references that are used globally"Maurus Cuelenaere2011-03-11
| | | | | | | The added complexity wasn't needed for most subsystems, as main() never returns so local references can't be freed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29570 a1c6a512-1295-4272-9138-f99709370657
* Android: Don't share the JNI environment across threads, but obtain it theMaurus Cuelenaere2011-03-11
| | | | | | correct way git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29569 a1c6a512-1295-4272-9138-f99709370657
* Android: use NewGlobalRef for references that are used globallyMaurus Cuelenaere2011-03-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29568 a1c6a512-1295-4272-9138-f99709370657
* Redirect (L)DEBUGFs to adb logcat in DEBUG enabled builds.Thomas Martitz2010-09-20
| | | | | | Exclude compilation of firmware/debug.c for hosted platforms. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28125 a1c6a512-1295-4272-9138-f99709370657
* A bit of work in the pcm driver. Should be a bit more efficient, but more ↵Thomas Martitz2010-08-04
| | | | | | importantly more dependable. Stopping playback now properly recovers if playback crashed for some reason (shouldn't happen of course). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27698 a1c6a512-1295-4272-9138-f99709370657
* Run Rockbox as a service, which allows for music decoding&playback in the ↵Thomas Martitz2010-08-03
| | | | | | | | | | | | background, the activity only attaches to the framebuffer for displaying it. An icon in the notification area is displayed (it could be prettier I guess). Note: Some HTC phones won't, includng mine, get enough CPU time to do background decoding fluently, see: http://code.google.com/p/android/issues/detail?id=9663 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27686 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Commit current Android port progress.Thomas Martitz2010-08-02
General state is: Rockbox is usable (plays music, saves configuration, touchscreen works too). Problems: - Playing music in the background (i.e. when switching to another app) doesn't work reliably, but I'm working on that now. - no cabbiev2 (only some preliminary files for it), no other default theme. - screen flickers sometimes if the updates are too frequent - no multi screen apk/package - strange behavior when a phone call comes in The java files (and the eclipse project) resides in android/, which is also supposed to be the build folder. I've put a small README in there for instructions. There are some steps needed after the make part, which are described there, and which eclipse mostly handles. But there ought to be some script/makefile rules which do that instead in the future. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27668 a1c6a512-1295-4272-9138-f99709370657