From cb2ee6b6cbb3a0031da4c3156d1ed6af8981d6b1 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 29 Sep 2021 01:10:04 -0400 Subject: 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 --- apps/voice_thread.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apps') 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) { case Q_VOICE_PLAY: LOGFQUEUE("voice < Q_VOICE_PLAY"); - if (quiet_counter == 0) - { - /* Boost CPU now */ - trigger_cpu_boost(); - } - else + + /* Boost CPU now */ + trigger_cpu_boost(); + + if (quiet_counter != 0) { /* Stop any clip still playing */ voice_stop_playback(); -- cgit v1.2.3