Support and General Use > Hardware
I2SOUT and sound processing pipeline
(1/1)
Mihail Zenkov:
As I mention before we still have room for improvement. We spend too much power for playing even basic format like wav. At last week I try fight again with DMA/I2SOUT/etc. And have some interesting result:
1. DMA for audio output consume too much and can't be improved. So I decide disable it and use CPU to fill I2SOUT FIFO.
2. If we send data from DCache we have fantastic result: we spend for it only 0.1 mA (7.1 mA at idle, 7.2 mA at playing loop with size < 8 KB) !
3. If we send data from memory we still have quite good result - 0.65 mA.
4. We have quite long sound processing pipeline: in basic case (stereo wav 16/44.1, no dsp, no voice) we copy audio signal four times:
file buffer > decode to pcm buffer > dsp process to main (linked) buffer > pcm mixer buffer > I2SOUT_DATA
It would be great for all rockbox target if we can eliminate useless copy when it possible.
Measurements: all on clip zip, without sd card, volume -38dB, screen off.
Idle: 7.1 mA.
wavflacmp3Current state (with freq and voltage scaling):10.210.6511.7Without DMA:8.959.511.1Without DMA + eliminated copy in pcm mixer:8.959.410.35Previous + eliminated copy in wav codec: 8.6
saratoga:
Does it make sense to just disable dma then? Only 10% but still nice to have.
The pcm mixer does a lot, things like voice interface and DSP effects. How optional are those copies?
Mihail Zenkov:
--- Quote from: saratoga on January 30, 2016, 11:20:15 PM ---Does it make sense to just disable dma then? Only 10% but still nice to have.
--- End quote ---
Yes, but only as first step ;)
--- Quote from: saratoga on January 30, 2016, 11:20:15 PM ---The pcm mixer does a lot, things like voice interface and DSP effects. How optional are those copies?
--- End quote ---
PCM mixer useless 99% of whole playing time. It mix pcm+voice+beep. When we don't have voice and beep it just copy pcm buffer.
DSP effects have separate buffer - it harder for eliminate as it output to main (linked) buffer.
I think we should eliminate copy when it possible. We already have decoded pcm buffer in memory. Why we copy it again and again if we don't change data in it?
I think we should just pass pointer for previous buffer.
P.S. Do you already have some mp3 optimization for testing?
Navigation
[0] Message Index
Go to full version