From 630c300660ed6c0aec9f8458b31fa2d7a578429f Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sun, 3 Sep 2006 16:20:35 +0000 Subject: Fixed cpu incorrectly unboosted at boot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10871 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/recording.c | 16 +++++++++++++++- apps/tagtree.c | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index e964db1e23..ff002d7685 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -534,6 +534,20 @@ int rec_create_directory(void) } #if CONFIG_CODEC == SWCODEC && !defined(SIMULATOR) + +#ifdef HAVE_ADJUSTABLE_CPU_FREQ +static void rec_boost(bool state) +{ + static bool cpu_boosted = false; + + if (state != cpu_boosted) + { + cpu_boost(state); + cpu_boosted = state; + } +} +#endif + /** * Selects an audio source for recording or playback * powers/unpowers related devices. @@ -567,7 +581,7 @@ void rec_set_source(int source, int flags) #ifdef HAVE_SPDIF_IN if ((source == AUDIO_SRC_SPDIF) != (source == last_source)) - cpu_boost(source == AUDIO_SRC_SPDIF); + rec_boost(source == AUDIO_SRC_SPDIF); #ifdef HAVE_SPDIF_POWER /* Check if S/PDIF output power should be switched off or on. NOTE: assumes diff --git a/apps/tagtree.c b/apps/tagtree.c index 8ef78699dd..7ef8e89d4f 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -1062,6 +1062,7 @@ bool insert_all_playlist(struct tree_context *c, int position, bool queue) if (!tagcache_search(&tcs, tag_filename)) { gui_syncsplash(HZ, true, str(LANG_TAGCACHE_BUSY)); + cpu_boost(false); return false; } @@ -1207,6 +1208,7 @@ struct tagentry* tagtree_get_entry(struct tree_context *c, int id) false) < 0) { logf("retrieve failed"); + cpu_boost(false); return NULL; } realid = id - current_offset; -- cgit v1.2.3