-
Notifications
You must be signed in to change notification settings - Fork 172
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
snd_pcm_wait_nocheck - use more finer timeout for the the poll wait #228
Comments
I filed PR alsa-project/alsa-utils#31 . However, even if merging the patchset, poll(2) system call is called without timeout inner alsa-lib. This occurs in cases that some alsa-lib PCM plugins (e.g. plug) is used which call below alsa-lib APIs internally:
These two APIs call poll(2) internally without explicit timeout (-1). Furthermore, even if returning due to emitted signal (errno = EINTR), poll(2) is called again in internal loop. This disables users to terminate runtime by SIGINT.
|
The maximal timeout can be estimated for those callers wait callers. I agree that the timeout should be set to a more sane value, because we know the stream parameters (thus the real time timing). |
Add possibility to return -EINTR instead waiting for the event. The applications may want to handle -EINTR condition themselves. BugLink: #228 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add possibility to return -EINTR instead waiting for the event. The applications may want to handle -EINTR condition themselves. BugLink: #228 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Axfer calls polling system call(i.e. poll(2), epoll(7), select(7)) without explicit timeout when running for IRQ-based scheduling model. In a case that driver achieves to control sound hardware for periodical hardware IRQ, the call can return due to any event queued by the driver in hardware IRQ context. However, in a case that driver fails to control it, the call cannot return.
Especially, this situation easily occurs when developers work to support hardware newly. It's better to care for the situation.
How to reproduce:
--sched-model=irq
--test-nowait
The text was updated successfully, but these errors were encountered: