summaryrefslogtreecommitdiff
path: root/apps/plugin.c (follow)
Commit message (Collapse)AuthorAge
* ...and mixer_set/get_frequency is SWCODEC only! :-)Michael Sevakis2013-07-05
| | | | Change-Id: I6badf687ef330abf79f2e1a809d8b2f93ba4e911
* Enable setting of global output samplerate on certain targets.Michael Sevakis2013-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the NATIVE_FREQUENCY constant with a configurable frequency. The user may select 48000Hz if the hardware supports it. The default is still 44100Hz and the minimum is 44100Hz. The setting is located in the playback settings, under "Frequency". "Frequency" was duplicated in english.lang for now to avoid having to fix every .lang file for the moment and throwing everything out of sync because of the new play_frequency feature in features.txt. The next cleanup should combine it with the one included for recording and generalize the ID label. If the hardware doesn't support 48000Hz, no setting will be available. On particular hardware where very high rates are practical and desireable, the upper bound can be extended by patching. The PCM mixer can be configured to play at the full hardware frequency range. The DSP core can configure to the hardware minimum up to the maximum playback setting (some buffers must be reserved according to the maximum rate). If only 44100Hz is supported or possible on a given target for playback, using the DSP and mixer at other samperates is possible if the hardware offers them. Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622 Reviewed-on: http://gerrit.rockbox.org/479 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Use crc32 of filename to resume tracksRichard Quirk2013-01-02
| | | | | | | | | | | | | | | | | As well as using an index, which breaks when a file is added or removed, use the crc32 of the filename. When the crc32 check passes the index is used directly. When it fails, the slow path is taken checking each file name in the playlist until the right crc is found. If that fails the playlist is started from the beginning. See http://www.rockbox.org/tracker/6411 Bump plugin API and nvram version numbers Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10 Reviewed-on: http://gerrit.rockbox.org/372 Tested-by: Jonathan Gordon <rockbox@jdgordon.info> Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
* Adapt OSD in plugin lib to be greylib compatible.Michael Sevakis2012-12-18
| | | | | | | | | | | | | | | Requires addition of viewports and alternate framebuffers to greylib which are essentially similar to the core implementation except that the framebuffer can be any size and relationship to a viewport. Drawing is always fully clipped to the intersecting area. Adapt oscilloscope.c to the API change. FFT will use the new features (later update). Get rid of silly and wrong lcd_bmp_part use in OSD. Remove it from plugin API (must be made incompatible now). Change-Id: Iafa5e2174148fb8ad11db6b9d4add0dcabc5c563
* Add a true waveform display to the oscilloscope plugin.Michael Sevakis2012-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds some additional niftyness like a floating popup display that is implemented in an OSD library for use by other plugins. * Speed changes are now gradual for both views and follow a curve derived from some fiddling around to get a nice feel. * Refined a few behavioral things overall. It needs a bit of help from a direct PCM channel callback so it may capture PCM for waveform display. Also need a few other core routines to help out for the OSD. Messes with some keymaps. Some targets need keymaps to access the different views. Some devices can't support the additional view because it requires a large buffer ( > 1 s) for samples. If the plugin buffer is small, they can still use the popup display since the plugin is also much smaller in that case. Slow speed waveform needs some refining so it draws gradually like a real oscilloscope but I'll stick with what it is, for the moment. Change-Id: Ieb5b7922a2238264e9b19a58cb437739194eb036 Reviewed-on: http://gerrit.rockbox.org/245 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* New crossfeed algorithm for Rockbox: "Meier" crossfeedBertrik Sikken2012-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emulates the basic "Meier" crossfeed (2 capacitors, 3 resistors) as discussed in http://www.meier-audio.homepage.t-online.de/passivefilter.htm This crossfeed blends a bit of low-pass filtered L signal into the R signal (and vice versa) while adding about 300 us delay to the crossfed-signal. A difference with the crossfeed already present in rockbox, is that this algorithm keeps the total spectrum flat (the one currently in rockbox accentuates low-frequency signals, making it sound a bit muffled). This implementation is quite lightweight, just 3 multiplies per left-right pair of samples. Has a default C implementation and optimized assembly versions for ARM and Coldfire. The crossfeed effect is quite subtle and is noticeable mostly one albums that have very strong left-right separation (e.g. one instrument only on the left, another only on the right). In the user interface, the new crossfeed option appears as "Meier" and is not configureable. The existing crossfeed is renamed to "Custom" as it allows itself to be customised. There is no entry for the user manual yet. Change-Id: Iaa100616fe0fcd7e16f08cdb9a7f41501973eee1
* Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROLNils Wallménius2012-05-09
| | | | | | | | Also move the definition to config.h Change-Id: I36bb5020c5e06b2344292bc05e8c13ccc7a6a1ff Reviewed-on: http://gerrit.rockbox.org/234 Reviewed-by: Nils Wallménius <nils@rockbox.org>
* fix yellow introduced in 10829b2Marcin Bukat2012-05-08
| | | | Change-Id: Ice66e976f90ad5d37c116b27f94c96e17e97e70f
* Fix fat test program not compiling (FS#12646).Marcin Bukat2012-05-08
| | | | | | | | | | | | | This changes the way creat() is wrapped around in native builds so more experienced devs should look at it. This patch forces to compile fat test in 32bit mode. Building natively on x86-64 works just fine but our fat code apparently can't deal with 64bit pointers/ints correctly. Change-Id: I000015094f7db957ce826c22672608cd419908b0 Reviewed-on: http://gerrit.rockbox.org/228 Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* Fundamentally rewrite much of the audio DSP.Michael Sevakis2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* One more *_filesize() to removeFrank Gevaerts2012-03-03
| | | | Change-Id: I82884712a660ad91c0e5c329ca0f8488edec21c8
* filesize() isn't prefixed anymore for sims.Frank Gevaerts2012-03-03
| | | | Change-Id: Icc08b874785ab2b8e0ebefa5e35dae4ce94e068a
* lcd drivers: Convert lcd_[remote_]framebuffer to a pointerJonathan Gordon2012-02-28
| | | | | | | | | | Change all lcd drivers to using a pointer to the static framebuffer instead of directly accessing the static array. This will let us later do fun things like dynamic framebuffer sizes (RaaA) or ability to use different buffers for different layers (dynamic skin backdrops!) Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
* Bump plugin api and abi version needed for b8439f2. Sort too.Thomas Martitz2012-01-27
| | | | Change-Id: Idcff29c9b89e7dbe7e9c7d2413737e0d598b7831
* Add touchscreen_get_mode() to plugin and lua.Thomas Martitz2012-01-27
| | | | Change-Id: I44b8693c689da00f57c14622f4ba3dc554dbbfc9
* Rework powermgmt to enable code re-use on appliation and sims.Thomas Martitz2012-01-03
| | | | | | | | | | | | | | | | | | | | | * Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application) to break powermgmt.c's assumption about the ability to read battery voltage. There's now additionally percentage (android) and remaining time measure (maemo). No measure at all also works (sdl app). If voltage can't be measured, then battery_level() is king and it'll be used for power_history and runtime estimation. * Implement target's API in the simulator, i.e. _battery_voltage(), so it doesn't need to implement it's own powermgmt.c and other stubs. Now the sim behaves much more like a native target, although it still changes the simulated battery voltage quickly, * Other changes include include renaming battery_adc_voltage() to _battery_voltage(), for consistency with the new target functions and making some of the apps code aware that voltage and runtime estimation is not always available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
* ypr0: Enable battery voltage read-out, charging monitoring and charger ↵Thomas Martitz2011-12-31
| | | | | | | | | | | | | | detection. Voltage can be read using as3543 adc (i.e. ascodec api, on this target implemented via ioctl()). TODO: Look into possibly controlling charging more by re-using powermgmt-ascodec.c. However, charging seems to be controlled by the kernel, so may not be needed. Charger state can be read using /dev/minivet. It allows to differentiate between wall charger and usb charging, but that's not implemented (is it even worthwhile?) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31470 a1c6a512-1295-4272-9138-f99709370657
* Commit to certain names for cache coherency APIs and discard the aliases.Michael Sevakis2011-12-17
| | | | | | | Wouldn't surprise me a bit to get some non-green. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
* FS#12414 : Fix directory functions in plugins on targets which ↵Boris Gjenero2011-11-29
| | | | | | HAVE_DIRCACHE. In rockbox_api, PREFIX( ) is removed around directory functions because that's now handled in directory header files. Thanks to Fred Bauer for reporting this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31089 a1c6a512-1295-4272-9138-f99709370657
* FS#12412 : Delete old buffer allocation code which has been replaced by ↵Boris Gjenero2011-11-29
| | | | | | core_alloc, and move buffer setup code to core_alloc.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31088 a1c6a512-1295-4272-9138-f99709370657
* - Fix some reds by implementing lcd_get_dpi().Thomas Martitz2011-10-17
| | | | | | | - Use the list item centering capabilities in the plugin lib - Bump plugin ABI for the changed viewport struct (sort the API too). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30775 a1c6a512-1295-4272-9138-f99709370657
* Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg2011-10-15
| | | | | | 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
* FS#12273 - use buflib for font storage. thanks to the testers :)Jonathan Gordon2011-09-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
* Remove some old code which tries to clear/set the backdrop when starting ↵Jonathan Gordon2011-09-14
| | | | | | plugins which is broken and potentially can cause backdrop corruption if the backdrop buffers move during the plugin lifetime git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30545 a1c6a512-1295-4272-9138-f99709370657
* Remove buflib from the pluginlib and use the core one.Thomas Martitz2011-08-30
| | | | | | buflib_get_data() isn't inlined for plugins anymore, but can be if really needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30387 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Enable compaction in buflib.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | | | 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
* GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz2011-08-14
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add a plugin activity which to the %cs screen option listJonathan Gordon2011-08-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30253 a1c6a512-1295-4272-9138-f99709370657
* Plugin API/ABI got incompatible r30242. Bump and sort.Thomas Martitz2011-08-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30243 a1c6a512-1295-4272-9138-f99709370657
* Have mpegplayer use the mixer (the playback channel, since it's mutually ↵Michael Sevakis2011-07-08
| | | | | | 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
* Use playback channel directly for peakmeters and plugins using peak ↵Michael Sevakis2011-07-02
| | | | | | calculation. Also, for now, don't allow mixer playback to overlap recording, even if full duplex works. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30119 a1c6a512-1295-4272-9138-f99709370657
* Knock out at least some red/yellow from r30097.Michael Sevakis2011-06-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30098 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
* Provide a reasonable fix for FS#12093 - Playback hanging after ↵Michael Sevakis2011-05-09
| | | | | | codec/playback rework. Also, get rid of an impossible buffering case (BUF_USED is always less than buffer_len) and remove a buffering API that is not used anywhere and shouldn't be needed (plugin API has to be incompatible). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29849 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#12069 - Playback rework - first stages. Gives as thorough as ↵Michael Sevakis2011-04-27
| | | | | | possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
* Purge buffer and codec APIs existing exclusively in support of mpa.codec and ↵Michael Sevakis2011-03-16
| | | | | | fix that to not require them: buf_get_offset and ci.advance_buffer_loc. Sort APIs; everything must become incompatible. :( git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29595 a1c6a512-1295-4272-9138-f99709370657
* Change the thread api a bit.Thomas Martitz2011-03-05
| | | | | | | * Remove THREAD_ID_CURRENT macro in favor of a thread_self() function, this allows thread functions to be simpler. * thread_self_entry() shortcut for kernel.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29521 a1c6a512-1295-4272-9138-f99709370657
* Give playback engine better control over the codec. Codec simply follows ↵Michael Sevakis2011-02-23
| | | | | | commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657
* Fuze v2: Do button reading more efficiently by mapping button codes directly ↵Michael Sevakis2011-01-20
| | | | | | to the GPIO pin states where possible (all but 'home' and hold). This makes plugins incompatible; up the min version and sort things. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29097 a1c6a512-1295-4272-9138-f99709370657
* FS#11822: use rockbox_browse() in plugins to select file.Teruaki Kawashima2011-01-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29069 a1c6a512-1295-4272-9138-f99709370657
* SA9200: Add YUV blitting, do full-screen updates more efficiently and ↵Michael Sevakis2011-01-11
| | | | | | properly clip partial updates. Plugin struct becomes incompatible for this target but leave version alone since it's still dev-only. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29028 a1c6a512-1295-4272-9138-f99709370657
* Add some app_*() wrappers for file IO functions to make app_ work the same ↵Frank Gevaerts2011-01-07
| | | | | | as sim_, thereby fixing application builds git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28993 a1c6a512-1295-4272-9138-f99709370657
* Also PREFIX() other filesystem functions. I hope I got them all now...Frank Gevaerts2010-12-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28929 a1c6a512-1295-4272-9138-f99709370657
* Properly prefix the creat function for sim builds, otherwise the system ↵Frank Gevaerts2010-12-29
| | | | | | creat() is called, which doesn't do proper root-mangling to make the file end up in the right place. Fixes FS#11844 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28927 a1c6a512-1295-4272-9138-f99709370657
* git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28917 ↵Mustapha Senhaji2010-12-28
| | | | a1c6a512-1295-4272-9138-f99709370657
* Get rid of get_user_file_path and do the path handling in wrappers for ↵Thomas Martitz2010-12-06
| | | | | | open() and friends. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
* Remove some inconsistent guarding around cpucache_* functions to fix a ↵Nils Wallménius2010-10-16
| | | | | | test_codec crash on coldfire, breaks plugin api compatibility so sorted and bumped version numbers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28287 a1c6a512-1295-4272-9138-f99709370657
* Fix for FS #10097 - Sometimes keys do work after exiting plugins.Bertrik Sikken2010-10-10
| | | | | | | | This removes the call to button_clear_queue which interfered with the mechanism in action.c to wait for a key release event when the button context is changed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28232 a1c6a512-1295-4272-9138-f99709370657
* use correct condition for #if for tagcache_fill_tags().Teruaki Kawashima2010-09-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28188 a1c6a512-1295-4272-9138-f99709370657
* Make disabling HAVE_PITCHSCREEN actually work without breaking the buildFrank Gevaerts2010-09-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28102 a1c6a512-1295-4272-9138-f99709370657