jack/jack-1.9.6-suspend_resume.patch
Silvan Calarco 8063faef39 add wrapper script jackdbus2qjackctl to launch qjackctl via dbus if installed
built with new libopus requirement [release 1.9.9.5-2mamba;Thu Jul 25 2013]
2024-01-06 00:00:46 +01:00

23 lines
988 B
Diff

Index: /jack2/trunk/jackmp/linux/alsa/JackAlsaDriver.cpp
===================================================================
--- /jack2/trunk/jackmp/linux/alsa/JackAlsaDriver.cpp (revision 4081)
+++ /jack2/trunk/jackmp/linux/alsa/JackAlsaDriver.cpp (revision 4088)
@@ -1189,4 +1189,17 @@
}
}
+
+ if (snd_pcm_status_get_state(status) == SND_PCM_STATE_SUSPENDED) {
+ jack_error("**** alsa_pcm: pcm in suspended state, resuming it" );
+ if (driver->capture_handle) {
+ if ((res = snd_pcm_prepare(driver->capture_handle)) < 0) {
+ jack_error("error preparing after suspend: %s", snd_strerror(res));
+ }
+ } else {
+ if ((res = snd_pcm_prepare(driver->playback_handle)) < 0) {
+ jack_error("error preparing after suspend: %s", snd_strerror(res));
+ }
+ }
+ }
if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN