From 4f074e1775d815379517483ddc466b7395a3e5ff Mon Sep 17 00:00:00 2001 From: davehome Date: Sat, 5 Nov 2011 04:00:30 -0600 Subject: [PATCH] alsa-plugins: add patch (from alsa git) to fix JACK problem --- .../patches/fix-jack-blocking-pipe.patch | 32 +++++++++++++++++++ srcpkgs/alsa-plugins/template | 4 +-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/alsa-plugins/patches/fix-jack-blocking-pipe.patch diff --git a/srcpkgs/alsa-plugins/patches/fix-jack-blocking-pipe.patch b/srcpkgs/alsa-plugins/patches/fix-jack-blocking-pipe.patch new file mode 100644 index 0000000000..aa4823f1ed --- /dev/null +++ b/srcpkgs/alsa-plugins/patches/fix-jack-blocking-pipe.patch @@ -0,0 +1,32 @@ +--- jack/pcm_jack.c.old 2011-11-05 00:39:14.238794519 -0600 ++++ jack/pcm_jack.c 2011-11-05 00:43:07.936817855 -0600 +@@ -307,6 +307,19 @@ + 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 @@ + + 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; diff --git a/srcpkgs/alsa-plugins/template b/srcpkgs/alsa-plugins/template index 24f9ddd051..cc8fe118aa 100644 --- a/srcpkgs/alsa-plugins/template +++ b/srcpkgs/alsa-plugins/template @@ -1,7 +1,7 @@ # Template build file for 'alsa-plugins'. pkgname=alsa-plugins -version=1.0.24 -revision=3 +version=1.0.24 # NOTE: Remove fix-jack-blocking-pipe.patch on next release! +revision=4 distfiles="ftp://ftp.alsa-project.org/pub/plugins/$pkgname-$version.tar.bz2" build_style=gnu-configure configure_args="--disable-maemo-plugin --with-speex=lib"