Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Use SLEEP instruction for longer (?) runtime
From: Simon ElÚn (simel346_at_student.liu.se)
Date: 2003-01-21


Bj÷rn Stenberg wrote:
> Yeah, I was curious about your choice of method. We have discussed
> this method previously, but rejected it since so very little time (a
> fraction of a tick) is actually spent sleeping.

True, but not very much is done before it goes to sleep again. Also, when
playing it still needs to wake up every 1ms to poll the MAS, right?

> We didn't think it
> would make any noticeable difference on power use. Have you made any
> measurements?

Since I've just made the patch, I haven't been able to check the runtime
yet. I was hoping someone would have a more exact way of checking it, since
runtime varies by at least an hour depending on the bitrate of the MP3:s I
play.

Try compiling with USE_LED_FOR_CPU_BUSY #defined. This is probably a grossly
inaccurate way of checking, but it was the best debugging aid I could come
up with. I just tried inverting it to make it light up when sleeping instead
of when busy, and it is generally brighter this way. This should at least
indicate that the CPU is sleeping more than half of the time, which should
already have some impact on the power consumption. I welcome any better
ideas for checking this without opening the Archos.

> The more efficient, but also more difficult, solution is to rewrite
> the scheduler to use a sorted sleep queue with a timeout for each
> thread and a wakeup timer interrupt. That way we can sleep for farily
> long periods of time. (At least on Recorder.)

And at least while not playing, unless we can successfully guess when the
MAS will want more data sent to it.

--
Simon ElÚn



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa