Skip to content

Conversation

@W-Mai
Copy link
Contributor

@W-Mai W-Mai commented Nov 7, 2024

Summary

  • 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.

Impact

N/A

Testing

N/A

…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 <xinbingnan@xiaomi.com>
@lupyuen
Copy link
Member

lupyuen commented Nov 7, 2024

Sorry I have to cancel the CI Check, there's a problem with CI Test:

@W-Mai
Copy link
Contributor Author

W-Mai commented Nov 7, 2024

Sorry I have to cancel the CI Check, there's a problem with CI Test:

That's OK, let's wait for the issue to be resolved

@xiaoxiang781216 xiaoxiang781216 merged commit febd738 into apache:master Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants