Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

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

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

Details

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.
   wavplay.diff (179.3 KiB)
 apps/plugin.c          |    5 
 apps/plugin.h          |    5 
 apps/plugins/SOURCES   |    4 
 apps/plugins/wavplay.c | 4845 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 4859 insertions(+)

This task depends upon

Closed by  Jens Arnold (amiconn)
Monday, 27 March 2006, 01:16 GMT+2
Reason for closing:  Accepted
Comment by Jens Arnold (amiconn) - Friday, 24 March 2006, 01:05 GMT+2
First optimisation - leave out the MAS PCM buffer init (a bunch of zeroes) for smaller footprint & faster codec download.
   wavplay.diff (121.8 KiB)
 apps/plugin.c          |    5 
 apps/plugin.h          |    5 
 apps/plugins/SOURCES   |    4 
 apps/plugins/wavplay.c | 3289 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 3303 insertions(+)

Comment by Jens Arnold (amiconn) - Friday, 24 March 2006, 09:37 GMT+2
Some code cleanup, use rockbox' mas_* functions where appropriate. Needs current cvs sources for the mas_writereg() fix.
   wavplay.diff (120.9 KiB)
 apps/plugin.c          |    5 
 apps/plugin.h          |    5 
 apps/plugins/SOURCES   |    4 
 apps/plugins/wavplay.c | 3245 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 3259 insertions(+)

Comment by Jens Arnold (amiconn) - Sunday, 26 March 2006, 10:33 GMT+2
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.
   wavplay.diff (131.1 KiB)
 apps/filetypes.c            |    2 
 apps/plugin.c               |    6 
 apps/plugin.h               |    5 
 apps/plugins/SOURCES        |    4 
 apps/plugins/viewers.config |    1 
 apps/plugins/wavplay.c      | 3593 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 3609 insertions(+), 2 deletions(-)

Comment by Jens Arnold (amiconn) - Sunday, 26 March 2006, 21:22 GMT+2
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
   wavplay.diff (135.2 KiB)
 apps/filetypes.c            |    2 
 apps/plugin.c               |    6 
 apps/plugin.h               |   11 
 apps/plugins/SOURCES        |    4 
 apps/plugins/viewers.config |    1 
 apps/plugins/vu_meter.c     |    2 
 apps/plugins/wavplay.c      | 3680 ++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 3701 insertions(+), 5 deletions(-)

Loading...