Skip to contentSkip to conversation

aplay: avoid any further PCM writing if in abort

DISCUSSION GitHub pull_request - opened 1 participant 1 message Mar 19, 2021 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/alsa-utils pull request #81 was opened from aditpape:

Terminating stream with CTRL-C will set in_aborting flag which is used to leave any
write/read loop on the ALSA device.
After ending the read/write loop aplay tries to drain the stream which is not required and can also lead to malfunctions:
-If user interrupts a blocked/non responsive PCM (e.g. usb uac2 gadget which does not consume data due to stream stopped by host) it will successfully terminate the write loop but will hang again in drain call. This would require to hit CTRL-C again to unblock which should be avoided.
Aplay currently anyhow allows signal handler to get invoked only once.

Request URL : https://github.com/alsa-project/alsa-utils/pull/81
Patch URL : https://github.com/alsa-project/alsa-utils/pull/81.patch
Repository URL: https://github.com/alsa-project/alsa-utils