• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by lostlogic - 2006-01-29
Last edited by lostlogic - 2006-02-07

FS#2957 - RFC pcmbuffer rework

This is the first part of a general rework of the
swcodec system that I’m working on.

The eventual goals and whatnot are all on the wiki

I’m looking for comments about this proposed new
pcmbuffer organization using two linked lists of buffer
descriptors, loose (instead of strict) buffer hunk
definition, and less locking.

This code is still buggy. The #if(0)’d assembly
freezes hard at the end of tracks, and skipping between
tracks when the buffer fill is in progress, but the
target track is not currently in buffer freezes soft
(holding stop still kills it).

Comments or advice with the direction of this work are
most welcome.

Closed by  lostlogic
2006-02-07 22:01
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Logged In: YES

in CVS

Updated the patch slightly just changed some TODOs that were
done for ones that still need to be done.

Also, I haven’t tested crossfade, nor voice at all with
these changes, Paul_the_Nerd on IRC tested voice and said it
had issues after a few samples. Haven’t tested rockboy,
have tested metronome.

Whee, skipping a version!
V5 breaks even more cases of skipping, but is higher
performance than V3. I hope to fix skipping in all cases
this week.

Project Manager

Why assembly code? Is the timing really that critical?

It’s called approximately every 1/5 of a second, and called
on the interrupt handler. Seems to me that interrupt
handlers need to be as short as possible.

By using assembly, I can keep it confined to the scratch
registers and specifically optimize the typical path.

For most of the critical functions throughout the pcmbuf,
I’m able to reorganize C code to get about the same compiled
code as I would write, but on this function GCC was being
particularly stubborn.

I’ll do some performance comparisons before I finish this
project to make sure it’s worth it. From what I saw before
I started this agressive reworking, optimizing the callback
has a statistically significant performance impact.

Here’s a new version that works great on Hxx0 but breaks on
iPod on skip / stop.

Also breaks after a few voice clips on Hxx0, I’m working on
that one.

(Version numbering restarted because I dropped a bunch of
the playback.c changes in favor of smaller pieces of work)

The new version 4 fixes voice and down pitch, and should
improve performance on low bitrate files.

in CVS


Available keyboard shortcuts


Task Details

Task Editing