Hello community, here is the log from the commit of package alsa-plugins for openSUSE:Factory checked in at Mon Aug 8 15:41:29 CEST 2011. -------- --- alsa-plugins/alsa-plugins.changes 2011-07-27 09:41:13.000000000 +0200 +++ /mounts/work_src_done/STABLE/alsa-plugins/alsa-plugins.changes 2011-08-08 09:23:53.000000000 +0200 @@ -1,0 +2,5 @@ +Mon Aug 8 09:23:39 CEST 2011 - tiwai@suse.de + +- Fix hanging applications when using jack plugin + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- 0005-jack-Fix-hanging-applications-when-using-jack-plugin.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa-plugins.spec ++++++ --- /var/tmp/diff_new_pack.St4rZl/_old 2011-08-08 15:41:03.000000000 +0200 +++ /var/tmp/diff_new_pack.St4rZl/_new 2011-08-08 15:41:03.000000000 +0200 @@ -38,7 +38,7 @@ Url: http://www.alsa-project.org/ Summary: Extra Plug-Ins for the ALSA Library Version: 1.0.24 -Release: 9 +Release: 11 License: LGPLv2.1+ Group: System/Libraries AutoReqProv: on @@ -53,6 +53,7 @@ Patch2: 0002-Pulse-Fix-snd_pcm_avail-returning-0-in-some-cases.patch Patch3: 0003-pulse-Add-fallback-option.patch Patch4: 0004-pulse-Set-PA_CONTEXT_NOAUTOSPAWN-when-fallback-is-av.patch +Patch5: 0005-jack-Fix-hanging-applications-when-using-jack-plugin.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -171,6 +172,7 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build export AUTOMAKE_JOBS=%{?jobs:%jobs} ++++++ 0005-jack-Fix-hanging-applications-when-using-jack-plugin.patch ++++++
From 21f66868d24e97930f826fb9970a9d1e4b144cf9 Mon Sep 17 00:00:00 2001 From: Kevin Ross <kevin@familyross.net> Date: Thu, 4 Aug 2011 16:19:56 +0200 Subject: [PATCH] jack: Fix hanging applications when using jack plugin
As described in issue #2727 https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2727 applications hang after some seconds when using the jack plugin. Kevin Ross <kevin@familyross.net> writes: The cause: The plugin creates a pipe, so that the fd's could be polled to indicate completion of a transfer. However, the call to write() blocks when playing audio, as nothing actually reads from the pipe, and it fills up until it blocks. Making the socket non-blocking fixes the problem, and testing with playback and capture both work properly for me now. [Adrian: I've also tested Kevin's patch and confirm it works.] Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> --- jack/pcm_jack.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/jack/pcm_jack.c b/jack/pcm_jack.c index 3370a26..eb3359c 100644 --- a/jack/pcm_jack.c +++ b/jack/pcm_jack.c @@ -307,6 +307,19 @@ static int parse_ports(snd_pcm_jack_t *jack, snd_config_t *conf) return 0; } +static int make_nonblock(int fd) +{ + int fl; + + if ((fl = fcntl(fd, F_GETFL)) < 0) + return fl; + + if (fl & O_NONBLOCK) + return 0; + + return fcntl(fd, F_SETFL, fl | O_NONBLOCK); +} + static int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name, snd_config_t *playback_conf, snd_config_t *capture_conf, @@ -363,6 +376,9 @@ static int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name, socketpair(AF_LOCAL, SOCK_STREAM, 0, fd); + make_nonblock(fd[0]); + make_nonblock(fd[1]); + jack->fd = fd[0]; jack->io.version = SND_PCM_IOPLUG_VERSION; -- 1.7.6 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org