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
This commit is contained in:
William Wilgus 2021-09-29 01:10:04 -04:00 committed by William Wilgus
parent b662ff945a
commit cb2ee6b6cb

View file

@ -361,12 +361,11 @@ static enum voice_state voice_message(struct voice_thread_data *td)
{ {
case Q_VOICE_PLAY: case Q_VOICE_PLAY:
LOGFQUEUE("voice < Q_VOICE_PLAY"); LOGFQUEUE("voice < Q_VOICE_PLAY");
if (quiet_counter == 0)
{
/* Boost CPU now */ /* Boost CPU now */
trigger_cpu_boost(); trigger_cpu_boost();
}
else if (quiet_counter != 0)
{ {
/* Stop any clip still playing */ /* Stop any clip still playing */
voice_stop_playback(); voice_stop_playback();