-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pcm: ioplug: Implement proper drain behavior
This patch fixes the draining behavior of ioplug in the following ways: - When no draining ioplug callback is defined, implement the draining loop using snd_pcm_wait*() and sync with the drain finishes. This is equivalent with the implementation in the kernel write(). Similarly as in kernel code, for non-blocking mode, it returns immediately after setting DRAINING state. - The hw_ptr update function checks the PCM state and stops the stream if the draining finishes. - When draining ioplug callback is defined, leave the whole draining operation to it. The callback is supposed to return -EAGAIN for non-blocking case, too. - When an error happens during draining, it drops the stream, for a safety reason. Signed-off-by: Takashi Iwai <tiwai@suse.de>
- Loading branch information
Showing
1 changed file
with
67 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters