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

aplay: Print '=== PAUSE ===' only if it is supported #271

Closed

Conversation

ujfalusi
Copy link
Contributor

Instead of printing the '=== PAUSE ===' unconditionally before calling do_pause(), move it to the function and only print it if the stream can be paused.

If the stream cannot be paused that the '=== PAUSE ===' will be replaced by PAUSE command ignored (no hw support) immediately, which is not observable by users but automation scripts will catch the '=== PAUSE ===' and might think that the stream is indeed got paused.

Move the print into do_pause() function after the snd_pcm_pause() have returned without error to make sure it is only printed if the stream is paused and we are waiting for the pause release from user to proceed.

Instead of printing the '=== PAUSE ===' unconditionally before calling
do_pause(), move it to the function and only print it if the stream can
be paused.

If the stream cannot be paused that the '=== PAUSE ===' will be replaced
by `PAUSE command ignored (no hw support)` immediately, which is not
observable by users but automation scripts will catch the '=== PAUSE ==='
and might think that the stream is indeed got paused.

Move the print into do_pause() function after the snd_pcm_pause() have
returned without error to make sure it is only printed if the stream is
paused and we are waiting for the pause release from user to proceed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Copy link
Contributor

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very useful, thank you.

@perexg perexg closed this in cbebb86 Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants