Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nxaudio: fix audio stop logic to prevent buffer addition after STOP s…
…ignal - Ensure `AUDIO_STOP` via `ioctrl` is followed by `mq_send STOP` without race conditions. - Modify loop condition to correctly handle `running = false` upon receiving STOP signal. - Resolve potential issue where `AUDIO_MSG_DEQUEUE` could still accept buffers after STOP signal due to timing. Before: - `nxaudio_stop` would call `ioctrl AUDIO_STOP` followed by `mq_send STOP`, which might lead to `AUDIO_MSG_DEQUEUE` accepting buffers after STOP. After: - Synchronized the sequence of `ioctrl AUDIO_STOP` and `mq_send STOP` to prevent buffer addition after STOP. - Enhanced loop condition to accurately reflect the STOP state. Signed-off-by: xinbingnan <[email protected]>
- Loading branch information