Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  I2SOUT and sound processing pipeline
« previous next »
  • Print
Pages: [1]

Author Topic: I2SOUT and sound processing pipeline  (Read 1495 times)

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
I2SOUT and sound processing pipeline
« on: January 30, 2016, 12:38:31 PM »
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.
wavflacmp3
Current state (with freq and voltage scaling):10.210.6511.7
Without DMA:8.959.511.1
Without DMA + eliminated copy in pcm mixer:8.959.410.35
Previous + eliminated copy in wav codec: 8.6

* rockbox-i2sout_without_dma.patch.txt (9.96 kB - downloaded 129 times.)
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: I2SOUT and sound processing pipeline
« Reply #1 on: January 30, 2016, 11:20:15 PM »
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?
Logged

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
Re: I2SOUT and sound processing pipeline
« Reply #2 on: January 31, 2016, 07:12:32 AM »
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.

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?

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?
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  I2SOUT and sound processing pipeline
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.064 seconds with 15 queries.