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: Battery level voice crumbled at start-up

Re: Battery level voice crumbled at start-up

From: Frank Gevaerts <frank_at_gevaerts.be>
Date: Fri, 15 Oct 2010 00:40:18 +0200

On Thu, Oct 14, 2010 at 04:48:00PM +0200, asettico wrote:
> Hi all.
>
> Booting the DAP when the battery level is under the 50% of charge, RB
> speaks how much battery still remains, but the voice message is crumbled
> by the current playlist buffering thread. Also, I normally use the
> dircache, draining further CPU cycles.

Dircache won't use much CPU. It eats RAM, and just after boot it does a
lot of disk IO, but that disk IO should be low priority, so I don't
think it will have a real effect on what you're seeing.

> I was thinking to raise just the voice thread priority, but, looking at
> the code, I read this comment in apps/pcmbuf.c:278 (r28276): "Keep voice
> and codec threads at the same priority or else voice will starve if the
> codec thread's priority is boosted".

If that comment is accurate and I read it right, raising voice thread
priority should be harmless. It warns against the opposite effect, which
may well be what you're seeing (in which case the comment and code
don't go far enough to avoid this starvation)

You could try always setting the voice thread priority to
PRIORITY_PLAYBACK_MAX in the boost case, or possibly always one higher than
codec.

Frank


>
> There is a simple way to avoid this annoying behaviour?
> Thanks for any help.
> --
> ,= ,-_-. =. asettico ~ [ http://rossomaltese.it/ ]
> ((_/)o o(\_)) OpenPGP ~~ [ 1024D/1CB926BA 2003-11-29 ]
> `-'(. .)`-'
> \_/

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Received on 2010-10-15

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy