Rockbox

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Patches
  • Category Games
  • Assigned To No-one
  • Operating System PortalPlayer-based
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by Dave Hooper - 2007-11-25

FS#8226 - Enable audio menu for pacbox; enable audio for ipod 5g by putting emu on cop

This patch puts the pacbox emulator onto the cop, leaving the main cpu for audio codec. The COP behaviour is controller by a #define in pacbox.h

If PACBOX_ON_COP is defined, then all iram usage is also turned off, to prevent interference with audio thread.

Additionally, this patch adds an Audio menu (using the playback_control library), which is enabled for all PACBOX_ON_COP and GIGABEAT F-Series builds.

Patch from directly within the apps/plugins/pacbox directory.

Dave Hooper commented on 2007-11-25 20:47

Updated to fix nano builds

Dave Hooper commented on 2007-11-25 21:07

Only tested on ipod 5g (as that is all I have). Could someone with a Gigabeat confirm that pacbox still runs but now has a working Audio Playback menu? Also could someone with any other device confirm that pacbox still works for them?

Michael Sevakis commented on 2007-11-28 02:03

This is cool though the ultimate plan is to do playback decoding on COP to leave the CPU available for foreground tasks. This would probably keep the SPC codec from operating with the COP trying to run two emulators at once.

Dave Hooper commented on 2007-11-29 00:07

When all codecs get moved to COP, pacbox can get moved back to CPU

Dave Hooper commented on 2007-11-29 00:07

Updated to get rid of build warning on gigabeat

Dave Hooper commented on 2007-12-03 21:59

At jhMikeS’s suggestion, adding cache flush and cachealign_attr code. Probably, it would have been better to use a separate (cachealigned) section for data that needs to be local to cop only rather than sprinkling CACHEALIGN_ATTR thru the codebase.

Dave Hooper commented on 2007-12-03 23:40

Fix sim builds (no icache)

Michael Sevakis commented on 2007-12-04 04:11

The section idea for writeable data is one I’ve been thinking about for awhile and would be preferrable as the general one. I’m not sure how to pull it off in a scalable way (need to read up on the linker script syntax myself). Can we ensure that its size is 0 if nothing is allocated there?

Add to the list any I forgot for sections the COP should have to iself (in core, plugins, and
.data

Of course the same sections must be aligned for CPU so that adjacent and shared .rodata and such don’t play ping-pong.

I think 16 bytes is actually the correct value as well but I played cautious for the moment.

Michael Sevakis commented on 2007-12-04 04:16

BTW, threads can also switch cores. An implementation that flip-flops the main thread from CPU⇔COP would be a nice test of that capability.

EDIT to clarify: you could switch the main thread to the COP when it’s running emulation and switch back to CPU when leaving the emulation to display menus or whatever. Just use switch_core(int core_num)

Michael Sevakis commented on 2007-12-04 04:27

For the framebuffer CACHEALIGN_AT_LEAST(16) is preferrable since that automatically selects the greater of the
the cache functions, CACHE_FUNCTION_WRAPPERS(rb) allows use without the “rb→” and allows for the case where cache maintenence APIs are inlines instead of calls.

Dave Hooper commented on 2007-12-06 23:59

Fantastic ideas. So while I haven’t taken a look at the linker specs either, I have added the rest. Switching cores seems to work fine (and of course makes the code a touch simpler)

Dave Hooper commented on 2007-12-07 00:14

I think just .bss and .data covers it. Would it even be worthwhile having yet another section for data used by /both/ cop and cpu?

Dave Hooper commented on 2007-12-09 17:48

I think just .bss and .data covers it. Would it even be worthwhile having yet another section for data used by /both/ cop and cpu?

Dave Hooper commented on 2007-12-30 10:30
Dave Hooper commented on 2008-01-06 21:13
Dave Hooper commented on 2008-08-12 21:59

Sync again, for the changed interface of switch_core

Dave Hooper commented on 2009-03-03 23:39

I realise that this hasn’t been sync’d in a while, but a big part of that reason is that putting pacbox emulation on COP no longer interacts nicely with having mp3 parallelised decoder on cpu/cop , which was added to svn at some point after the last update above. I’ll try and figure out a clean solution at some point (maybe just as simple as improve the pacbox emulation so it doesn’t need so much juice)

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing