Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9210 - ASAP plugin

Attached to Project: Rockbox
Opened by Dominik Wenger (Domonoky) - Wednesday, 23 July 2008, 21:07 GMT+2
Last edited by Dominik Wenger (Domonoky) - Saturday, 26 July 2008, 17:43 GMT+2
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Low
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Hi,

i made a first attempt for a ASAP (http://asap.sourceforge.net/) port to Rockbox.
This is a very crude port of the asap2wav program to a rockbox plugin.
It works as a Viewer and converts a .sap file to "test.wav" in the root folder. (test.wav has to exist before).

On Simulator it works nicly, but not on Target.
It tested it on a m:robe100 and it runs without error, but does not produce correct sound.
I only get loud cracking and such in the wav file.

I suspect this is because of some endianess problems. (our targets are big-endian, where pc is little-endian).
EDIT: m:robe100 is LE, so it cant be endian problems.

At the moment i dont know where and how to attack this problem, as the asap code seems to have nearly no way to tell if something is gone wrong. (and its full of a MACRO hell )

so if others want to join the fun, jump in :-)


   asap.patch (613.1 KiB)
 apps/plugins/asap/SOURCES         |    8 
 apps/plugins/asap/asap.c          | 4000 ++++++++++++++++++++++++++++++++++++++
 apps/plugins/asap/asap2wav.c      |  358 +++
 apps/plugins/asap/players.h       | 1894 +++++++++++++++++
 apps/plugins/asap/asap_internal.h |  204 +
 apps/plugins/asap/raw2c.pl        |   32 
 apps/plugins/asap/acpu.c          | 2524 +++++++++++++++++++++++
 apps/plugins/asap/asap.h          |  598 +++++
 apps/plugins/asap/Makefile        |  210 +
 apps/plugins/asap/apokeysnd.c     | 1074 ++++++++++
 apps/plugins/asap/players/mpt.asx | 1808 +++++++++++++++++
 apps/plugins/asap/players/cmc.asx | 1888 +++++++++++++++++
 apps/plugins/asap/players/rmt.asx | 2652 +++++++++++++++++++++++++
 apps/plugins/asap/players/tm2.asx | 3102 +++++++++++++++++++++++++++++
 apps/plugins/asap/players/tmc.asx | 1926 ++++++++++++++++++
 apps/plugins/CATEGORIES           |    1 
 apps/plugins/SUBDIRS              |    2 
 apps/plugins/viewers.config       |    1 
 18 files changed, 22281 insertions(+), 1 deletion(-)

This task depends upon

Closed by  Dominik Wenger (Domonoky)
Saturday, 26 July 2008, 17:43 GMT+2
Reason for closing:  Accepted
Comment by Dave Chapman (linuxstb) - Wednesday, 23 July 2008, 22:03 GMT+2
I also did the same thing... Here's my attempt (just the apps/plugins/asap2wav/ directory, not a patch).
Comment by Dominik Wenger (Domonoky) - Friday, 25 July 2008, 21:24 GMT+2
Here is now a patch with asap as a codec.

Its still very early, no metadata parser is in place, so songlengh others are fake.

But it plays sound without problems. I tested on sim and on m:robe100.
On m:robe100 i got ~850% realtime. so no performance problems :-)

edit:
forgot to remove the memset.
delete line 118 in apps/codecs/asap.c
   asap_codec.patch (424.2 KiB)
 apps/codecs.c                    |    2 
 apps/codecs.h                    |    1 
 apps/codecs/asap/SOURCES         |    6 
 apps/codecs/asap/asap.c          | 4010 +++++++++++++++++++++++++++++++++++++++
 apps/codecs/asap/players.h       | 1894 ++++++++++++++++++
 apps/codecs/asap/asap_internal.h |  186 +
 apps/codecs/asap/acpu.c          | 2524 ++++++++++++++++++++++++
 apps/codecs/asap/asap.h          |  598 +++++
 apps/codecs/asap/Makefile        |   88 
 apps/codecs/asap/apokeysnd.c     | 1072 ++++++++++
 apps/codecs/asap.c               |  130 +
 apps/codecs/Makefile             |   12 
 apps/codecs/SOURCES              |    1 
 apps/filetypes.c                 |    1 
 apps/metadata.c                  |   12 
 apps/metadata/metadata_parsers.h |    1 
 apps/metadata/sap.c              |   46 
 apps/plugins/SOURCES             |    1 
 apps/plugins/test_codec.c        |    2 
 apps/SOURCES                     |    1 
 firmware/export/id3.h            |    1 
 firmware/id3.c                   |    3 
 22 files changed, 10586 insertions(+), 6 deletions(-)

Comment by Dominik Wenger (Domonoky) - Friday, 25 July 2008, 21:59 GMT+2
i think i messed up the patch.
new try:
   test-codec2.patch (216.4 KiB)
 apps/codecs.c                    |    2 
 apps/codecs.h                    |    1 
 apps/metadata/sap.c              |  100 +
 apps/metadata/metadata_parsers.h |    1 
 apps/plugins/keybox.c            |    2 
 apps/plugins/SOURCES             |    1 
 apps/plugins/test_codec.c        |    2 
 apps/metadata.c                  |   12 
 apps/SOURCES                     |    1 
 apps/filetypes.c                 |    1 
 apps/codecs/Makefile             |   12 
 apps/codecs/SOURCES              |    1 
 apps/codecs/asap/SOURCES         |    3 
 apps/codecs/asap/asap.c          | 2005 +++++++++++++++++++++++++++++++++++++++
 apps/codecs/asap/players.h       |  947 ++++++++++++++++++
 apps/codecs/asap/asap_internal.h |   93 +
 apps/codecs/asap/acpu.c          | 1262 ++++++++++++++++++++++++
 apps/codecs/asap/asap.h          |  299 +++++
 apps/codecs/asap/Makefile        |   44 
 apps/codecs/asap/apokeysnd.c     |  536 ++++++++++
 firmware/export/id3.h            |    1 
 firmware/font.c                  |    2 
 firmware/id3.c                   |    3 
 23 files changed, 5323 insertions(+), 8 deletions(-)

Comment by Bertrik Sikken (bertrik) - Saturday, 26 July 2008, 00:06 GMT+2
Attached is a fixed test-codec2.patch (apps/codecs/asap.c was missing)
   test-codec2-fixed.patch (219.8 KiB)
 apps/codecs.c                    |    2 
 apps/codecs.h                    |    1 
 apps/metadata/sap.c              |  100 +
 apps/metadata/metadata_parsers.h |    1 
 apps/plugins/SOURCES             |    1 
 apps/plugins/test_codec.c        |    2 
 apps/metadata.c                  |   12 
 apps/SOURCES                     |    1 
 apps/filetypes.c                 |    1 
 apps/codecs/Makefile             |   12 
 apps/codecs/SOURCES              |    1 
 apps/codecs/asap/SOURCES         |    3 
 apps/codecs/asap/asap.c          | 2006 +++++++++++++++++++++++++++++++++++++++
 apps/codecs/asap/players.h       |  947 ++++++++++++++++++
 apps/codecs/asap/asap_internal.h |   93 +
 apps/codecs/asap/acpu.c          | 1262 ++++++++++++++++++++++++
 apps/codecs/asap/asap.h          |  299 +++++
 apps/codecs/asap/Makefile        |   44 
 apps/codecs/asap/apokeysnd.c     |  536 ++++++++++
 apps/codecs/asap.c               |  129 ++
 firmware/export/id3.h            |    1 
 firmware/font.c                  |    2 
 firmware/id3.c                   |    3 
 23 files changed, 5452 insertions(+), 7 deletions(-)

Comment by Robert Menes (RMenes379) - Saturday, 26 July 2008, 00:25 GMT+2
bertrik's patch worked successfully. I managed to compile a working build with SAP support on my Sansa c240.

I get ~160.19% realtime, according to test_codec.

Decode time - 16.23s
File duration - 26.00s
Comment by Dominik Wenger (Domonoky) - Saturday, 26 July 2008, 00:38 GMT+2
last patch for today.

now with metadata parser.

elapsed_time and sub_songs, seeking handling still missing.

   asap_codec3.patch (223.9 KiB)
 apps/codecs.c                    |    2 
 apps/codecs.h                    |    1 
 apps/metadata/sap.c              |  270 +++++
 apps/metadata/metadata_parsers.h |    1 
 apps/plugins/keybox.c            |    2 
 apps/plugins/SOURCES             |    1 
 apps/plugins/test_codec.c        |    2 
 apps/metadata.c                  |   12 
 apps/SOURCES                     |    1 
 apps/filetypes.c                 |    1 
 apps/codecs/Makefile             |   12 
 apps/codecs/SOURCES              |    1 
 apps/codecs/asap/SOURCES         |    3 
 apps/codecs/asap/asap.c          | 2004 +++++++++++++++++++++++++++++++++++++++
 apps/codecs/asap/players.h       |  947 ++++++++++++++++++
 apps/codecs/asap/asap_internal.h |   93 +
 apps/codecs/asap/acpu.c          | 1262 ++++++++++++++++++++++++
 apps/codecs/asap/asap.h          |  299 +++++
 apps/codecs/asap/Makefile        |   44 
 apps/codecs/asap/apokeysnd.c     |  536 ++++++++++
 apps/codecs/asap.c               |  129 ++
 firmware/export/id3.h            |    1 
 firmware/id3.c                   |    3 
 23 files changed, 5620 insertions(+), 7 deletions(-)

Comment by Dominik Wenger (Domonoky) - Saturday, 26 July 2008, 15:24 GMT+2
Now it plays and seeks correctly.
Only thing missing is SubSong handling. At the moment it always plays the default song.

Edit:
small fix, so it correctly works on big-endian targets.
   asap_codec4.patch (223.5 KiB)
 apps/codecs.c                    |    2 
 apps/codecs.h                    |    1 
 apps/metadata/metadata_parsers.h |    1 
 apps/metadata/asap.c             |  256 ++++
 apps/plugins/SOURCES             |    1 
 apps/plugins/test_codec.c        |    2 
 apps/metadata.c                  |   12 
 apps/SOURCES                     |    1 
 apps/filetypes.c                 |    1 
 apps/codecs/Makefile             |   12 
 apps/codecs/SOURCES              |    1 
 apps/codecs/asap/SOURCES         |    3 
 apps/codecs/asap/asap.c          | 2004 +++++++++++++++++++++++++++++++++++++++
 apps/codecs/asap/players.h       |  947 ++++++++++++++++++
 apps/codecs/asap/asap_internal.h |   93 +
 apps/codecs/asap/acpu.c          | 1262 ++++++++++++++++++++++++
 apps/codecs/asap/asap.h          |  299 +++++
 apps/codecs/asap/Makefile        |   44 
 apps/codecs/asap/apokeysnd.c     |  536 ++++++++++
 apps/codecs/asap.c               |  127 ++
 firmware/export/id3.h            |    1 
 firmware/id3.c                   |    3 
 22 files changed, 5603 insertions(+), 6 deletions(-)

   asap_codec5.patch (224.1 KiB)
 apps/codecs.c                    |    2 
 apps/codecs.h                    |    1 
 apps/metadata/metadata_parsers.h |    1 
 apps/metadata/asap.c             |  256 ++++
 apps/plugins/keybox.c            |    2 
 apps/plugins/SOURCES             |    1 
 apps/plugins/test_codec.c        |    2 
 apps/metadata.c                  |   12 
 apps/SOURCES                     |    1 
 apps/filetypes.c                 |    1 
 apps/codecs/Makefile             |   12 
 apps/codecs/SOURCES              |    1 
 apps/codecs/asap/SOURCES         |    3 
 apps/codecs/asap/asap.c          | 2004 +++++++++++++++++++++++++++++++++++++++
 apps/codecs/asap/players.h       |  947 ++++++++++++++++++
 apps/codecs/asap/asap_internal.h |   93 +
 apps/codecs/asap/acpu.c          | 1262 ++++++++++++++++++++++++
 apps/codecs/asap/asap.h          |  299 +++++
 apps/codecs/asap/Makefile        |   44 
 apps/codecs/asap/apokeysnd.c     |  536 ++++++++++
 apps/codecs/asap.c               |  131 ++
 firmware/export/id3.h            |    1 
 firmware/id3.c                   |    3 
 23 files changed, 5608 insertions(+), 7 deletions(-)

Loading...