dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Playing Lossless Files on the Archos

Re: Playing Lossless Files on the Archos

From: Jens Arnold <>
Date: Thu, 03 May 2007 06:48:10 +0200

On 02.05.2007, Dominik Riebeling wrote:

> On 5/2/07, Bluechip <> wrote:
>> I'm afraid you are mistaken. The MAS DOES have CoDec support.
>> Rockbox just don't have what it takes to write them. The WAV
>> CoDec was eventually given to Rockbox by Micronas (iirc), but
>> has still never been integrated.

> The WAV codec exsists as a plugin, but hasn't been integrated
> into the core.

Yes, the PCM codec was given to us by micronas with written
permission to use it, and there is a wavplay plugin that plays
WAV on the recorders and Ondios. The MAS in the player is a
different one (less RAM and some interfaces missing) and so
cannot run this PCM codec.

There will soon be a WAV recording plugin as well. I already
have it working; all that's missing is samplerate/ channels/
input selection.

>> What we need is someone with the political and technical
>> skills required to bring MAS CoDec integration to Rockbox.

> I'm aware that it's technically possible to support other
> codecs with the MAS. Still, afaik there is no knowledge on how
> to program that chip itself (is there even a free compiler
> around?) so it's highly unlikely to happen. Another issue is
> the CPU power that is needed inside of the MAS, and afaik it
> isn't capable of decoding higher demanding formats like
> ...

There are some leaked docs about the MAS DSP core itself, but
none about the interfaces and the associated DMA engine.
Together with the MAS PCM codec binary it might be possible to
RE this knowledge though.

And as there is no compiler, all code needs to be written in MAS
assembler, which is quite difficult as it is DSP asm (hardvard
architecture, and you need to take care of pipeline
synchronisation manually).

The MAS core is relatively powerful, as it does not only allow
to *decode* MP3 in realtime but also *encode* it. And another
MAS with the same core (MAS3509F) does decode AAC...
The MAS core runs from a programmable PLL (standard clock
~22MHz for 44/22/11 kHz MP2/MP3, ~24MHz for the others) and can
be overclocked a lot without overheating, that's what we use
for pitch control. 200% pitch means the MAS core is running at
up to ~48MHz, and it does so for hours without problems.

But the main limitation is the internal memory. There are only
2x 4Kwords (words are 20 bit wide) of RAM, so codecs needing
large tables like ogg vorbis are simply out of question.
All the RAM can be used by the MP3 codec as it resides in the
built-in ROM, but a loadable codec has to fit into this space
*together* with its working data.

So to sum up:

1) We need multi-codec support in the core. This should be
   possible by unifying playback engines, and will hopefully
   happen. It will also require some fundamental work on
   integrating PCM codec handling in the core, which I hope
   to be able to do soon.

2) For other codecs than MP2/MP3, WAV, AIFF and 8SVX, someone
   with a lot of knowledge about DSPs and DSP asm and a lot of
   time would need to RE the PCM codec and write the codec in
   pure MAS assembler, keeping RAM usage down as much as
   possible. Even then some formats like ogg vorbis (and iirc
   WMA) will never be possible on the MAS.

(1) will probably happen, (2) is rather unlikely afaics.

Regards, Jens
Received on 2007-05-03

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy