FS#4902 - Work-in-progress PCM (wav) playback for archos

Attached to Project: Rockbox
Opened by Jens Arnold (amiconn) - Thursday, 23 March 2006, 23:39 GMT
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Operating System Archos Recorder
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch contains a research plugin for integrating PCM playback into rockbox for Archos (Recorders and Ondios only, no player suppor possible, sorry).
It loads and plays (after adding it to viewers.config) 44.1 kHz WAV files.

Note that this is work in progress. The plugin fiddles with SCI0, so mp3 playback won't work afterwards, better reboot. WAV parameters are hardcoded for now. Data transfer to the MAS is done in a rather trivial software trasnfer loop, no DMA yet. No file buffering either, the disk is spinning all the time.
This task depends upon

Closed by  Jens Arnold (amiconn)
Sunday, 26 March 2006, 23:16 GMT
Reason for closing:  Accepted
Comment by Jens Arnold (amiconn) - Friday, 24 March 2006, 00:05 GMT
First optimisation - leave out the MAS PCM buffer init (a bunch of zeroes) for smaller footprint & faster codec download.
Comment by Jens Arnold (amiconn) - Friday, 24 March 2006, 08:37 GMT
Some code cleanup, use rockbox' mas_* functions where appropriate. Needs current cvs sources for the mas_writereg() fix.
Comment by Jens Arnold (amiconn) - Sunday, 26 March 2006, 08:33 GMT
Vastly extended the plugin:

- Simple playback engine. No more continuously spinning disk.
- Uses DMA. Works realtime on Ondio now.
- Ability to stop playback.
- Restores MAS for mp3 playback. No reboot necessary.
- Read parameters from WAV file. Plays 16bit PCM WAV files with all common samplerates, both mono and stereo.
- Better error handling and reporting
- Handles USB

The patch now also includes the necessary changes to viewers.config.
Comment by Jens Arnold (amiconn) - Sunday, 26 March 2006, 19:22 GMT
Further improvements:

- Properly apply all core sound settings (most settings are audiocodec features unaffected by the DSP code change, but the channel settings are a DSP feature)
- Also restore channel settings properly, for the same reason