Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nxaudio: fix audio stop logic to prevent buffer addition after STOP signal #2830

Merged
merged 1 commit into from
Nov 7, 2024

Commits on Nov 7, 2024

  1. 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]>
    W-Mai committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    e37e0fa View commit details
    Browse the repository at this point in the history