summaryrefslogtreecommitdiffstats
path: root/apps/playback.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-10-15 11:57:52 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-10-15 11:57:52 +0000
commit70587527898345fdb7245be7c8723b338323fceb (patch)
tree2cd1f4570c34db202f2a4b4cc9fa867e1f7582f1 /apps/playback.c
parent450f619dcf4904e5aee00b89c417a5ba8a1bf23f (diff)
downloadrockbox-70587527898345fdb7245be7c8723b338323fceb.tar.gz
rockbox-70587527898345fdb7245be7c8723b338323fceb.zip
Removed ugly boosting solutions from playback code and let scheduler
handle unboosting instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11226 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 44aa8696fc..feba1d1c6c 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -292,11 +292,6 @@ struct voice_info {
char *buf;
};
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
-static void voice_boost_cpu(bool state);
-#else
-#define voice_boost_cpu(state) do { } while(0)
-#endif
static void voice_thread(void);
#endif /* PLAYBACK_VOICE */
@@ -316,7 +311,7 @@ void mp3_play_data(const unsigned char* start, int size,
LOGFQUEUE("mp3 > voice Q_VOICE_PLAY");
queue_post(&voice_queue, Q_VOICE_PLAY, &voice_clip);
voice_thread_start = true;
- voice_boost_cpu(true);
+ trigger_cpu_boost();
#else
(void) start;
(void) size;
@@ -815,19 +810,6 @@ static const char * get_codec_filename(int enc_spec)
#ifdef PLAYBACK_VOICE
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
-static void voice_boost_cpu(bool state)
-{
- static bool voice_cpu_boosted = false;
-
- if (state != voice_cpu_boosted)
- {
- voice_cpu_boosted = state;
- cpu_boost_id(state, CPUBOOSTID_PLAYBACK_VOICE);
- }
-}
-#endif
-
static bool voice_pcmbuf_insert_split_callback(
const void *ch1, const void *ch2, size_t length)
{
@@ -976,7 +958,6 @@ static void* voice_request_buffer_callback(size_t *realsize, size_t reqsize)
voice_getmore = NULL;
voice_remaining = 0;
voicebuf = NULL;
- voice_boost_cpu(false);
/* Force the codec to think it's changing tracks */
ci_voice.new_track = 1;
@@ -1005,7 +986,7 @@ static void* voice_request_buffer_callback(size_t *realsize, size_t reqsize)
/* Set up new voice data */
struct voice_info *voice_data;
voice_is_playing = true;
- voice_boost_cpu(true);
+ trigger_cpu_boost();
voice_data = ev.data;
voice_remaining = voice_data->size;
voicebuf = voice_data->buf;
@@ -1666,7 +1647,7 @@ static bool codec_load_next_track(void)
automatic_skip = true;
}
- cpu_boost_id(true, CPUBOOSTID_PLAYBACK_CODEC);
+ trigger_cpu_boost();
LOGFQUEUE("codec > audio Q_AUDIO_CHECK_NEW_TRACK");
queue_post(&audio_queue, Q_AUDIO_CHECK_NEW_TRACK, 0);
while (1)
@@ -1680,7 +1661,7 @@ static bool codec_load_next_track(void)
else
break;
}
- cpu_boost_id(false, CPUBOOSTID_PLAYBACK_CODEC);
+
switch (ev.id)
{
case Q_CODEC_REQUEST_COMPLETE:
@@ -2153,7 +2134,7 @@ static void audio_read_file(bool quick)
return ;
}
- cpu_boost_id(true, CPUBOOSTID_PLAYBACK_AUDIO);
+ trigger_cpu_boost();
while (tracks[track_widx].filerem > 0)
{
int overlap;
@@ -2218,7 +2199,6 @@ static void audio_read_file(bool quick)
logf("Partially buf:%dB",
tracks[track_widx].filesize - tracks[track_widx].filerem);
}
- cpu_boost_id(false, CPUBOOSTID_PLAYBACK_AUDIO);
}
static bool audio_loadcodec(bool start_play)
@@ -3338,8 +3318,6 @@ static void audio_thread(void)
case SYS_TIMEOUT:
LOGFQUEUE("audio < SYS_TIMEOUT");
- if (pcmbuf_output_completed())
- pcmbuf_play_stop(); /* Stop to ensure unboosted */
break;
default: