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.
| wav | flac | mp3 |
| Current state (with freq and voltage scaling): | 10.2 | 10.65 | 11.7 |
| Without DMA: | 8.95 | 9.5 | 11.1 |
| Without DMA + eliminated copy in pcm mixer: | 8.95 | 9.4 | 10.35 |
| Previous + eliminated copy in wav codec: | 8.6 | | |