diff options
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 6c9c0065cd..0533ddcf4c 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -914,10 +914,6 @@ static void swap_codec(void) | |||
914 | } while (my_codec == current_codec); | 914 | } while (my_codec == current_codec); |
915 | 915 | ||
916 | /* Wait for other codec to unlock */ | 916 | /* Wait for other codec to unlock */ |
917 | /* FIXME: We need some sort of timed boost cancellation here or the CPU | ||
918 | doesn't unboost during playback when the voice codec goes back to | ||
919 | waiting - recall that mutex_lock calls block_thread which is an | ||
920 | indefinite wait that doesn't cancel the thread's CPU boost */ | ||
921 | mutex_lock(&mutex_codecthread); | 917 | mutex_lock(&mutex_codecthread); |
922 | 918 | ||
923 | /* Take control */ | 919 | /* Take control */ |
@@ -1112,6 +1108,10 @@ static bool voice_on_voice_stop(bool aborting, size_t *realsize) | |||
1112 | voice_remaining = 0; | 1108 | voice_remaining = 0; |
1113 | voicebuf = NULL; | 1109 | voicebuf = NULL; |
1114 | 1110 | ||
1111 | /* Cancel any automatic boost if no more clips requested. */ | ||
1112 | if (!playing || !voice_thread_start) | ||
1113 | sleep(0); | ||
1114 | |||
1115 | /* Force the codec to think it's changing tracks */ | 1115 | /* Force the codec to think it's changing tracks */ |
1116 | ci_voice.new_track = 1; | 1116 | ci_voice.new_track = 1; |
1117 | 1117 | ||
@@ -1142,14 +1142,7 @@ static void* voice_request_buffer_callback(size_t *realsize, size_t reqsize) | |||
1142 | } | 1142 | } |
1143 | else | 1143 | else |
1144 | { | 1144 | { |
1145 | /* We must use queue_wait_w_tmo() because queue_wait() doesn't | 1145 | queue_wait(&voice_queue, &ev); |
1146 | unboost the CPU */ | ||
1147 | /* FIXME: when long timeouts work correctly max out the the timeout | ||
1148 | (we'll still need the timeout guard here) or an infinite timeout | ||
1149 | can unboost, use that */ | ||
1150 | do | ||
1151 | queue_wait_w_tmo(&voice_queue, &ev, HZ*5); | ||
1152 | while (ev.id == SYS_TIMEOUT); /* Fake infinite wait */ | ||
1153 | } | 1146 | } |
1154 | 1147 | ||
1155 | switch (ev.id) { | 1148 | switch (ev.id) { |