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 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'apps/recorder') 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 -- cgit v1.2.3