[alsa-devel] axfer: break transmission of audio data frame when transmission backend queues no PCM event within timeout

GitHub pull_request - opened github at alsa-project.org
Wed Oct 30 04:32:38 CET 2019


alsa-project/alsa-utils pull request #31 was opened from takaswie:

Axfer internally has the waiter abstraction for polling system call. This is used without explicit timeout for IRQ-based scheduling model. As a result, axfer process is corrupted to be blocked due to a call of polling system call when transmission backend has a bug to queue PCM event in I/O thread or hardware IRQ context.

This patchset implements error reporting for such buggy backend. When call of polling system call returns with timeout, axfer reports it as a bug. The timeout is equivalent to the size of buffer. Precisely it should be the size of period, however the larger size is used to stabilize runtime for existent PCM plugins.

```
Takashi Sakamoto (6):
  axfer: return the number of file descriptors for I/O events from select(2) waiter
  axfer: fix to return error code when a call of select(2) fails
  axfer: return ETIMEDOUT when no event occurs after waiter expiration
  axfer: handle -ETIMEDOUT before handle mmap I/O operation
  axfer: code refactoring for a helper function to wait for avail buffer space
  axfer: handle -ETIMEDOUT before non-block I/O operation

 axfer/waiter-select.c           |  4 +--
 axfer/xfer-libasound-irq-mmap.c | 19 +++++++++-
 axfer/xfer-libasound-irq-rw.c   | 62 +++++++++++++++++++--------------
 axfer/xfer-libasound.c          | 21 +++++++----
 4 files changed, 70 insertions(+), 36 deletions(-)
```

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


More information about the Alsa-devel mailing list