Browse Source

Changed jackd alsa driver to reprepare the kernel alsa driver upon each xrun

tags/v1.9.13
Arnout Diels Filipe Coelho <falktx@falktx.com> 7 years ago
parent
commit
487632577d
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      linux/alsa/alsa_driver.c

+ 14
- 1
linux/alsa/alsa_driver.c View File

@@ -1213,7 +1213,8 @@ alsa_driver_xrun_recovery (alsa_driver_t *driver, float *delayed_usecs)
< 0) {
jack_error("error preparing after suspend: %s", snd_strerror(res));
}
} else {
}
if (driver->playback_handle) {
if ((res = snd_pcm_prepare(driver->playback_handle))
< 0) {
jack_error("error preparing after suspend: %s", snd_strerror(res));
@@ -1230,6 +1231,18 @@ alsa_driver_xrun_recovery (alsa_driver_t *driver, float *delayed_usecs)
timersub(&now, &tstamp, &diff);
*delayed_usecs = diff.tv_sec * 1000000.0 + diff.tv_usec;
jack_log("**** alsa_pcm: xrun of at least %.3f msecs",*delayed_usecs / 1000.0);
if (driver->capture_handle) {
jack_log("Repreparing capture");
if ((res = snd_pcm_prepare(driver->capture_handle)) < 0) {
jack_error("error preparing after xrun: %s", snd_strerror(res));
}
}
if (driver->playback_handle) {
jack_log("Repreparing playback");
if ((res = snd_pcm_prepare(driver->playback_handle)) < 0) {
jack_error("error preparing after xrun: %s", snd_strerror(res));
}
}
}

if (alsa_driver_restart (driver)) {


Loading…
Cancel
Save