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 stripwax - 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.

Updated to fix nano builds

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?

MikeS 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.

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

Updated to get rid of build warning on gigabeat

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.

Fix sim builds (no icache)

MikeS 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.

MikeS 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)

MikeS 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.

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)

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?

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?

Sync again, for the changed interface of switch_core

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