This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9910 - Use DMA engine for audio playback on PP502x targets
Attached to Project:
Rockbox
Opened by Michael Sevakis (MikeS) - Sunday, 15 February 2009, 06:00 GMT+2
Last edited by Michael Sevakis (MikeS) - Thursday, 19 February 2009, 21:48 GMT+2
Opened by Michael Sevakis (MikeS) - Sunday, 15 February 2009, 06:00 GMT+2
Last edited by Michael Sevakis (MikeS) - Thursday, 19 February 2009, 21:48 GMT+2
|
DetailsChanges playback on PP502x based targets to use DMA. More battery life is possible since not as many CPU cycles will be needed in order to transfer audio to the codec and a reduction is buffering time is possible too. Needs testing just to make sure everything works alright for all relevant targets and if possible I'm curious about battery benches, etc.
No recording work with the DMA engine is done here. If playback is reliable, it's likely just about the details for that. It appears on my e260 there is a couple megahertz reduction in boost compared to the same tracks doing it the old way. |
This task depends upon
Closed by Michael Sevakis (MikeS)
Thursday, 19 February 2009, 21:48 GMT+2
Reason for closing: Accepted
Additional comments about closing: Added to r20053 with some changes. Seems ok enough so I'll keep an eye on things with it "out there" now.
Thursday, 19 February 2009, 21:48 GMT+2
Reason for closing: Accepted
Additional comments about closing: Added to r20053 with some changes. Seems ok enough so I'll keep an eye on things with it "out there" now.
SVNr20007: CPU load varies between 37.4-37.8 MHz and settled to 37.7 after 4 minutes.
FS#9910: CPU load varied less, and settled to 37.0 MHz.Both tests were the same track, begun measuring about 30 second in to avoid buffering.
e260, using r20017, MP3 ~200kb VBR with tone controls on (I use them), same track, Hold ON to force backlight (thus screen updates) off:
1.8% (30.9 MHz) without
FS#99100.6% (30.3 MHz) with
FS#9910The H10 troubles may be from the constant rapid boost/unboost cycles that were present before r20017. I'm not sure they're because of this patch as much as an existing issue manifested by it. Any induced breaks would be very short with SVN (1/3675 seconds) but since buffers are about 1/2 second, the gap would be quite noticeable with the patch. If they persist with the newer patch, they'll now be about 1/256 seconds.
One other benefit here is greater PCM reserve on the audio FIFOs both from being able to have a higher watermark level to being able to complete a block of audio without having to leave a final one or two samples for a final interrupt. The current SVN method can leave the FIFO nearly empty which requires a rapid series of interrupts to finish the current block and start the next. In short, it greatly reduces the chance of IIS FIFO underruns besides giving a few cycles back better used for other things (including no audio-related cache activity during transfers, just writeback at callback time).
I probably haven't tested is as thoroughly as MikeS, but so far I haven't run into any problems on my e200 with the v2 patch applied (played around a lot with general playback quite a lot).