summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/buffering.c6
-rw-r--r--apps/playback.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index e642142b58..e7dda9835f 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -1338,8 +1338,10 @@ void buffering_thread(void)
while (true)
{
- cancel_cpu_boost();
- queue_wait_w_tmo(&buffering_queue, &ev, filling?5:HZ/2);
+ if (!filling)
+ cancel_cpu_boost();
+
+ queue_wait_w_tmo(&buffering_queue, &ev, filling ? 5 : HZ/2);
switch (ev.id)
{
diff --git a/apps/playback.c b/apps/playback.c
index 053181891f..328f6fc87c 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1848,6 +1848,7 @@ static void audio_fill_file_buffer(bool start_play, size_t offset)
bool continue_buffering;
filling = STATE_FILLING;
+ trigger_cpu_boost();
/* No need to rebuffer if there are track skips pending. */
if (ci.new_track != 0)
@@ -2357,7 +2358,9 @@ static void audio_thread(void)
while (1)
{
- cancel_cpu_boost();
+ if (filling != STATE_FILLING)
+ cancel_cpu_boost();
+
if (!pcmbuf_queue_scan(&ev))
queue_wait_w_tmo(&audio_queue, &ev, HZ/2);