Age | Commit message (Collapse) | Author |
|
Must now be h->size, not sizeof (type).
Change-Id: Ia0b1b552a486ddbc28b80542cfa76bed9e7cfdb3
|
|
Change-Id: I0e5a20e042291180391b0b0059e44705c256d3e5
|
|
Playback checked the files' presence before attempting to buffer
the track. Just get rid of that and save an extra open/close call.
It will find out if the path is bad when the metadata fails.
Fix some size_t/off_t conflation. No need to update plugin version
because no plugin actually uses bufopen().
Change-Id: I3db112449dc0b2eeb91c546f308880ac82494fc7
|
|
Paths are stored after the structure at their actual length plus
any aligment padding. In principle, any type of auxilliary data
could go there.
Change-Id: Ic5487dc4089781b5cc52414d1691ba6d9dc1893c
|
|
The location of the handle cannot be kept across calls to
shrink_handle() since it may move the structure. The error was
there in one place at the inception, corrected, then reintroduced.
Make shrink_handle() return the new location and use it, which
makes the side effects of the function clearer.
Change-Id: Icae6a0ad6f7bb0d6645b044cccfa4aef88db42ad
|
|
There's no need for it any longer since the list is now doubly-
linked. As a bonus, stack limits pose no barrier to the length of
the list.
Change-Id: I41c567f946b640ef1e3c2d93da2f5aef9a763c66
|
|
Does away the statically-allocated track list which frees quite
a fair amount of in-RAM size.
There's no compile-time hard track limit.
Recommended TODO (but not right away): Have data small enough use
the handle structure as its buffer data area. Almost the entire
handle structure is unused for simple allocations without any
associated filesystem path.
Change-Id: I74a4561e5a837e049811ac421722ec00dadc0d50
|
|
It sort of implemented an MRU cache but just kept track of the most
recent access and checked the one after it, otherwise searching from
the beginning.
Implement a true MRU list of all open handles. Handles of the current
track will tend to stay up front for faster access.
Switch to common linked list functions
Use double-linked lists to have insert, remove and move_handle
operations in O(1)-- no more searching to find the previous handle,
which is very often required.
Smaller code too. :)
Change-Id: I9ae8f3f96d225a5d54b94133f499268007274784
|
|
I'm not sure all the situations it affects, to be honest. The fix
aimed to address the strange symptom here:
http://forums.rockbox.org/index.php/topic,50793.0.html
It turns out that ringbuf_add_cross was used when handles were
butted up against one another with the first parameter equal to
the last, which it interprets as being an empty case when it should
be interpreted as full in the context it was used. To fix this,
introduce full/empty variants of ringbuf_add_cross and ringbuf_sub
and use them at the appropriate time.
The other way to address the problem is ensure there's always at
least a space byte between the end of one handle and the start of
another but this make the code a bit trickier to reason about than
using additional function variants.
bufopen() may yield after creating a handle and so do some more
locking so that the buffering thread doesn't mess things up by
moving anything or not seeing the yet-to-be linked-in allocation.
Add alignof() macro to use proper method to get alignment of
struct memory_handle. That should be useful in general anyway.
It's merely defined as __alignof__ but looks nicer.
Change-Id: If21739eaa33a4f6c084a28ee5b3c8fceecfd87ce
|
|
Change-Id: I10aac94906607a74f05a687cb3d0029cb6faea6e
|
|
HAVE_IO_PRIORITY was defined for native targets with dircache.
It is already effectively disabled for the most part since dircache no
longer lowers its thread's I/O priority. It existed primarily for the
aforementioned configuration.
Change-Id: Ia04935305397ba14df34647c8ea29c2acaea92aa
|
|
Originating from 3661581
Some build clients finding their "standard" string.h's that don't declare
strlcpy?
Change-Id: I50d19c7cecf5ae96ee1855f77d3c2e1f42620108
|
|
Change-Id: I99b90ab7e5b7d074b1d2d1de72267f9f2eea975b
|
|
It is trivial to obtain all required information from the allocated
handles without maintaining global indexes. In fact, it is less
complicated and increases general thread safety.
Other miscellaneous changes (some are nice to do at this time due to
required alterations, with some particularly more relevant than others):
* Handle value 0 will no longer be returned as a valid handle but all
failures will still return a negative value. Creates consistency with
buflib and removes the need to explicitly initialize them.
* Linking a new handle is delayed until explicitly
added by the code that called add_handle, keeping it invisible
until every operation succeeds, which is safer thread-wise. If anything
fails, the handle itself may just be abandoned rather than reqiring it
be freed.
* Dump the special handling to slow buffering when the PCM buffer
is low that calls PCM buffer functions. It doesn't seem to help much
of anything these days and it's a bit of a nasty hack to directly
tie those bits together. It can of course be put back (again!) if
there really is a need for it.
* Make data waiters ping the buffering thread more than just once if
the request is taking too long. Somehow I figured out how the requests
could get forgotten about but can't remember why months later after
making the change in my branch. :-)
* Neaten up some code by using (inline) functions and packing down
parameters; remember handle allocation and movement attributes in the
handle itself rather than figuring it out each time they're needed.
Change-Id: Ibf863370da3dd805132fc135e0ad104953365183
Reviewed-on: http://gerrit.rockbox.org/764
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
|
|
Change-Id: Ie7b04ecf3b3535e0ed45a6e0e8d81af89e38378e
|
|
Change-Id: I2072c355f05b6e709a5c179512bc2b71756163a5
|
|
...by default where they would be interpreted as valid but not actually
be which would cause calls to buffering while it was not initialized.
Add BUFFER_EVENT_BUFFER_RESET to inform users of buffering that the
buffer is being reinitialized. Basically, this wraps all the
functionality being provided by three events (...START_PLAYBACK,
RECORDING_EVENT_START, RECORDING_EVENT_STOP) into one for radioart.c,
the only user of those events (perhaps remove them?) and closes some
loopholes.
Change-Id: I99ec46b9b5fb4e36605db5944c60ed986163db3a
|
|
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
|
|
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
|
|
there as there should be data left to read. The loop wouldn't break until there was a message in the queue. I just experienced the case with crosslinked files and read stopped making progress, returning 0 each time it was called.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29626 a1c6a512-1295-4272-9138-f99709370657
|
|
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
|
|
non-wrapping data. The result of the shortcut would have been wrong if the handle used space exactly to the end of the buffer since buf_widx wouldn't have been properly wrapped to index 0.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29578 a1c6a512-1295-4272-9138-f99709370657
|
|
request must completely succeed before buffer can later shrink a handle or else it must reset the handle.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29491 a1c6a512-1295-4272-9138-f99709370657
|
|
need to be handled properly. In the best case, buffer useful would be wrong and in the worst, a packet audio move_handle delta would be quite incorrect, causing the handle to be moved too far.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29490 a1c6a512-1295-4272-9138-f99709370657
|
|
should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
|
|
lines over 80 cols.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29304 a1c6a512-1295-4272-9138-f99709370657
|
|
reliably on buffer thread using a single message send.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29303 a1c6a512-1295-4272-9138-f99709370657
|
|
pointers as empty, corruption guard check could fail to detect overlap if buffering ran right up to the next handle and it gets asked to buffer again before freeing the following handles (adds a byte on average). Storage alignment on handle reset must at times avoid alignment increments if after a stopped rebuffer, the handle was shrunk too close to the next one or the reading position in a prior rebuffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29302 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29294 a1c6a512-1295-4272-9138-f99709370657
|
|
actually seems ok and I'm not sure if's responsible for anything, but it's more sane and keeps buffer_handle from regressing buf_widx later if buffering cur_handle.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29291 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29289 a1c6a512-1295-4272-9138-f99709370657
|
|
incorrect. Switch handle movement to memmove calls exclusively.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29288 a1c6a512-1295-4272-9138-f99709370657
|
|
(atomic) and must be kept fully buffered. Manage handle corruption guard and handle buffering with one set of logic which allows reading of the maximum amount of data without overflow. 'FIXME' regarding handle corruption guard is really part of expected operation when thread that does the handle closing hasn't yet performed the delegated task before rebuffering starts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29270 a1c6a512-1295-4272-9138-f99709370657
|
|
It's not useful to do it since you need to write back the code to disk to be able to load it from memory, it also requires writing to an executable directory.
Keep it for the simulator for the sake of simulating.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29261 a1c6a512-1295-4272-9138-f99709370657
|
|
- Support is limited to non-desync jpeg in id3v2 tags. Other formats (hopefully) follow in the future.
- Embedded album art takes precedence over files in album art files.
- No additional buffers are used, the jpeg is read directly from the audio file.
Flyspray: FS#11216
Author: Yoshihisa Uchida and I
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29259 a1c6a512-1295-4272-9138-f99709370657
|
|
when storage alignment matters so that wrapped reads maintain alignment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29258 a1c6a512-1295-4272-9138-f99709370657
|
|
overflow the ringbuffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29257 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29200 a1c6a512-1295-4272-9138-f99709370657
|
|
AAC / AAC-HE and MPC SV7 / SV8. Additionally handle ATARI soundfiles in get_codec_base_type() as intended.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29199 a1c6a512-1295-4272-9138-f99709370657
|
|
(code), use the already defined MEMORYSIZE instead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
|
|
several m4a files. Thanks to Magnus Holmgren.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27950 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27790 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27183 a1c6a512-1295-4272-9138-f99709370657
|
|
ideally all targets should define CACHEALIGN_BITS, for now we default it
to 16 bytes if it's not specified
Since the buffer is already aligned in playback.c no need to align it
again in buffering.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27073 a1c6a512-1295-4272-9138-f99709370657
|
|
#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
|
|
corrects valid type.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26249 a1c6a512-1295-4272-9138-f99709370657
|
|
Base Skin when the radio is running.
put your station images in .rockbox/fmpresets/<preset name>.bmp or .jpg. Must be in preset mode and the preset name must match the filename
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26078 a1c6a512-1295-4272-9138-f99709370657
|
|
formatter kept generating type mismatch warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26040 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26036 a1c6a512-1295-4272-9138-f99709370657
|
|
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26035 a1c6a512-1295-4272-9138-f99709370657
|