diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-09-29 01:10:04 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-09-29 01:18:00 -0400 |
commit | cb2ee6b6cbb3a0031da4c3156d1ed6af8981d6b1 (patch) | |
tree | 3650865700cfe805e89b8f49b6118a973081d3ee /apps/voice_thread.c | |
parent | b662ff945ac36b314ecf91177b271578622e2694 (diff) | |
download | rockbox-cb2ee6b6cbb3a0031da4c3156d1ed6af8981d6b1.tar.gz rockbox-cb2ee6b6cbb3a0031da4c3156d1ed6af8981d6b1.zip |
voice_thread.c ensure cpu gets re-boosted after Q_VOICE_STOP event
when the voice system is doing queued voice clips you can get a
voice_stop event which cancels the cpu boost
but the quiet count was not reset to 0
next clip may play unboosted causing stuttering
just boost unconditionally on Q_PLAY
it'll unboost after timeout if unneeded
Change-Id: Ib39df5d9f8a9e41299147a885048cf1361180dd6
Diffstat (limited to 'apps/voice_thread.c')
-rw-r--r-- | apps/voice_thread.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/voice_thread.c b/apps/voice_thread.c index 77bdd08d44..6ce0f6a408 100644 --- a/apps/voice_thread.c +++ b/apps/voice_thread.c | |||
@@ -361,12 +361,11 @@ static enum voice_state voice_message(struct voice_thread_data *td) | |||
361 | { | 361 | { |
362 | case Q_VOICE_PLAY: | 362 | case Q_VOICE_PLAY: |
363 | LOGFQUEUE("voice < Q_VOICE_PLAY"); | 363 | LOGFQUEUE("voice < Q_VOICE_PLAY"); |
364 | if (quiet_counter == 0) | 364 | |
365 | { | 365 | /* Boost CPU now */ |
366 | /* Boost CPU now */ | 366 | trigger_cpu_boost(); |
367 | trigger_cpu_boost(); | 367 | |
368 | } | 368 | if (quiet_counter != 0) |
369 | else | ||
370 | { | 369 | { |
371 | /* Stop any clip still playing */ | 370 | /* Stop any clip still playing */ |
372 | voice_stop_playback(); | 371 | voice_stop_playback(); |