alsa_driver: Moved the check for poll timeout before getting the revents
Currently only poll_result is checked for < 0 before doing the further processing, and not for timeout. After this movement the revents is checked only if the poll doesn't timeout. Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
This commit is contained in:
parent
fb11c75fdc
commit
45ab755883
|
@ -1383,6 +1383,14 @@ alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *status, float
|
|||
|
||||
poll_ret = jack_get_microseconds ();
|
||||
|
||||
if (poll_result == 0) {
|
||||
jack_error ("ALSA: poll time out, polled for %" PRIu64
|
||||
" usecs",
|
||||
poll_ret - poll_enter);
|
||||
*status = -5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// JACK2
|
||||
SetTime(poll_ret);
|
||||
|
||||
|
@ -1479,15 +1487,6 @@ alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *status, float
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (poll_result == 0) {
|
||||
jack_error ("ALSA: poll time out, polled for %" PRIu64
|
||||
" usecs",
|
||||
poll_ret - poll_enter);
|
||||
*status = -5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (driver->capture_handle) {
|
||||
|
|
Loading…
Reference in New Issue