FS#13996: Have audio_hard_stop() kill the PCM output path entirely

We already shut down the playback path and the voice path, but that
doesn't necessarily mean the PCM hardware is idle.

Add a call to pcm_play_stop() to ensure the PCM sink is completely idle.
This will prevent a badly-timed callback from firing during a ROLO
operation.

Change-Id: I1eb8c105895fb47bc3d0af91b4d87345f5399aa4
This commit is contained in:
Solomon Peachy 2026-09-23 16:54:55 -04:00
parent 3bd18f5a44
commit bd615cf125

View file

@ -27,6 +27,7 @@
#include "core_alloc.h"
#include "sound.h"
#include "pcm_sink.h"
#include "pcm-internal.h"
#include "codecs.h"
#include "codec_thread.h"
#include "voice_thread.h"
@ -3996,8 +3997,11 @@ void audio_hard_stop(void)
LOGFQUEUE("audio >| audio Q_AUDIO_STOP: 1");
audio_queue_send(Q_AUDIO_STOP, 1);
#ifdef PLAYBACK_VOICE
/* Stop voice */
voice_stop();
#endif
/* Stop PCM */
pcm_play_stop();
audiobuf_handle = core_free(audiobuf_handle);
}