3 Oct
2011
3 Oct
'11
11:50 p.m.
Colin Guthrie wrote:
Would a POLLERR|POLLNVAL be received any time when normal operations will continue afterwards? e.g. should we use this error as an indicator to ignore it forever or, e.g., just for a finite period of time like 1s.
POLLERR means that the PCM device is in a state where it cannot transfer data. This typically happens on an xrun or when the device is unplugged, if the first system call after that event is poll() and not write(). The error handling should be the same (snd_pcm_prepare(), which might fail).
A disconnected device returns POLLERR|POLLNVAL, while any other error state returns POLLOUT|POLLERR.
Regards, Clemens