FiiO M3K: disable CPU frequency switching
After conducting some simplistic tests, I found that the power usage did not appear to be affected by the CPU frequency. I tested by playing back a 44.1 KHz FLAC file on single track repeat, and measured current with the AXP173's battery discharge current ADC. The button and LCD backlights were set to always on. Headphones were unplugged and the volume was muted to eliminate any influence from the headphone amp. On average the current usage was between 78-81 mA at 1008 MHz, 252 MHz, and 112 MHz. If anything, 1008 MHz drew _less_ current than the lower frequencies, by about 1-3 mA. A possible explanation for this, assuming it's not just a bias of the test, is that the CPU idle state saves so much power that it's better to maximize the real time that the CPU spends idling. More systematic testing is needed to confirm this. Change-Id: I527473e8c4c12bc1e94f8d4e849fecc108022abe
This commit is contained in:
parent
fceffb7d4a
commit
92140752d7
2 changed files with 1 additions and 28 deletions
|
@ -10,19 +10,12 @@
|
|||
/* CPU defines */
|
||||
#define CONFIG_CPU X1000
|
||||
#define X1000_EXCLK_FREQ 24000000
|
||||
#define CPU_FREQ 1008000000
|
||||
|
||||
#ifndef SIMULATOR
|
||||
#define TIMER_FREQ X1000_EXCLK_FREQ
|
||||
#endif
|
||||
|
||||
#define CPU_FREQ 1008000000
|
||||
#define CPUFREQ_MAX CPU_FREQ
|
||||
/* TODO: figure out if this does in fact affect power consumption. */
|
||||
#define CPUFREQ_DEFAULT (CPUFREQ_MAX/4)
|
||||
#define CPUFREQ_NORMAL (CPUFREQ_MAX/4)
|
||||
#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||
#define HAVE_GUI_BOOST
|
||||
|
||||
/* Kernel defines */
|
||||
#define INCLUDE_TIMEOUT_API
|
||||
#define HAVE_SEMAPHORE_OBJECTS
|
||||
|
|
|
@ -23,26 +23,6 @@
|
|||
#include "system.h"
|
||||
#include "x1000/ost.h"
|
||||
|
||||
/* TODO: implement a CPU frequency switching policy based on CPU utilization
|
||||
*
|
||||
* The basic assumption is that the workload consumes a fixed number of CPU
|
||||
* cycles per second on average (= utilization), so we can set the frequency
|
||||
* based on that value. Audio playback should fit this usage pattern well, so
|
||||
* it's a good fit for Rockbox.
|
||||
*
|
||||
* It's easier to understand in terms of fluid flow -- we need to keep
|
||||
* a reservoir of water topped up, CPU frequency is the inflow rate, and
|
||||
* CPU utilization is the outflow rate. The goal is to avoid running dry
|
||||
* and minimize the inflow rate.
|
||||
*
|
||||
* The only tricky part here is handing usage spikes -- CPU frequency has to
|
||||
* increase faster than utilization or there's a risk of audio dropouts.
|
||||
*
|
||||
* Rockbox CPU boost could be used as a hint to scale up frequency faster.
|
||||
* If that's not necessary to get good results, HAVE_ADJUSTABLE_CPU_FREQ can
|
||||
* be disabled entirely.
|
||||
*/
|
||||
|
||||
#define CPU_IDLE_SAMPLES 100
|
||||
|
||||
void tick_start(unsigned interval_in_ms)
|
||||
|
|
Loading…
Reference in a new issue