diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2007-07-31 10:00:50 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2007-07-31 10:00:50 +0000 |
| commit | ec2d2c47a01e6f244ebba0b945565e0611d71efe (patch) | |
| tree | 71dae8aefb7c84a6d94fd952532356a2dee530b2 /apps | |
| parent | 44a8713bfe376234f3a9439ca1f07d628afa9e98 (diff) | |
| download | rockbox-ec2d2c47a01e6f244ebba0b945565e0611d71efe.zip rockbox-ec2d2c47a01e6f244ebba0b945565e0611d71efe.tar.gz rockbox-ec2d2c47a01e6f244ebba0b945565e0611d71efe.tar.bz2 rockbox-ec2d2c47a01e6f244ebba0b945565e0611d71efe.tar.xz | |
Hopefully fix the problems with voice not cancelling its CPU boost.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14094 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playback.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/apps/playback.c b/apps/playback.c index 6c9c006..0533ddc 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -914,10 +914,6 @@ static void swap_codec(void) } while (my_codec == current_codec); /* Wait for other codec to unlock */ - /* FIXME: We need some sort of timed boost cancellation here or the CPU - doesn't unboost during playback when the voice codec goes back to - waiting - recall that mutex_lock calls block_thread which is an - indefinite wait that doesn't cancel the thread's CPU boost */ mutex_lock(&mutex_codecthread); /* Take control */ @@ -1112,6 +1108,10 @@ static bool voice_on_voice_stop(bool aborting, size_t *realsize) voice_remaining = 0; voicebuf = NULL; + /* Cancel any automatic boost if no more clips requested. */ + if (!playing || !voice_thread_start) + sleep(0); + /* Force the codec to think it's changing tracks */ ci_voice.new_track = 1; @@ -1142,14 +1142,7 @@ static void* voice_request_buffer_callback(size_t *realsize, size_t reqsize) } else { - /* We must use queue_wait_w_tmo() because queue_wait() doesn't - unboost the CPU */ - /* FIXME: when long timeouts work correctly max out the the timeout - (we'll still need the timeout guard here) or an infinite timeout - can unboost, use that */ - do - queue_wait_w_tmo(&voice_queue, &ev, HZ*5); - while (ev.id == SYS_TIMEOUT); /* Fake infinite wait */ + queue_wait(&voice_queue, &ev); } switch (ev.id) { |