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

Rockbox mail archive

Subject: Re: WAV Codec for Archos

Re: WAV Codec for Archos

From: Jens Arnold <>
Date: Wed, 25 Jan 2006 18:29:20 +0100

On 25.01.2006, [IDC]Dragon wrote:

>> > For full quality wav pumping, our poor CPU would be pretty
>> > busy with bitswapping.

>> Could you explain why the recorded data has to be bitswapped?
>> Do the most significant byte and the least significant byte
>> have to be swapped in order to get a proper WAV stream?

> It's a shortcoming of the serial interface. It streams the
> bits in UART order (LSB first), but internal serial interfaces
> are SPI, which is MSB first. Since the order can't be
> programmed, we have to twist every byte, can't DMA it
> directly.

This is only true for playback, as the CPU is hooked to the
MAS serial input. Recording uses a parallel interface, so no
bitswap necessary.

> A similar problem exists for the disk I/O, here we have to
> endian swap byte pairs. Archos unfortunately wired the 16 bit
> data bus directly 1:1, not taking into account that IDE is
> little endian and the SH CPU is big endian.

Not a big issue though; the asm-optimised routines transfer
~4MB/sec. :-)

The Ondio is a different matter, as the MMC is also hooked up to
SPI. For one this makes bitswap necessary for both transfer

Another limitation for WAV playback on Ondio is that the CPU's
SPI can only do 3MBit/s (CPUCLK/4), 44.1kHz 16 bit stereo WAV
already is ~1.4MBit/s, and for playback we have two serial
transfers running in parallel (MMC->CPU and CPU->MAS).
Fortunately rockbox uses DMA for these serial transfers, and
we can drop the double bitswap if we make special provisions
in the filesystem and MMC driver

Regards, Jens
Received on 2006-01-25

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