maintainence update, plus
- fix build on alpha by not comparing a va_list to NULL. problem noticed and fix tested by merdely@. - fix possible 100% cpu usage in full-duplex mode - fix net client/server - add @bin markers to PLIST
This commit is contained in:
parent
d357eb8343
commit
781094ad81
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2008/04/22 09:34:58 jakemsr Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2008/06/28 05:49:30 jakemsr Exp $
|
||||
|
||||
SHARED_ONLY = Yes
|
||||
|
||||
COMMENT = low latency sound server
|
||||
|
||||
DISTNAME = jack-0.111.2.1169
|
||||
DISTNAME = jack-0.112.0.2524
|
||||
|
||||
SHARED_LIBS += jack 0.0 # 0.28
|
||||
SHARED_LIBS += jackserver 0.0 # 0.28
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (jack-0.111.2.1169.tar.gz) = v0w5TtFm45gYQftGnBfoGg==
|
||||
RMD160 (jack-0.111.2.1169.tar.gz) = aRPjYG3DEmh7nujTr5v/XIIC7Lk=
|
||||
SHA1 (jack-0.111.2.1169.tar.gz) = UVz2IA1ygUfWKcgLfd7w895C7Uo=
|
||||
SHA256 (jack-0.111.2.1169.tar.gz) = RHGKAVfFZA/27qU8obAIRMSHnGmDdZupiqYYYTtgKMA=
|
||||
SIZE (jack-0.111.2.1169.tar.gz) = 369451
|
||||
MD5 (jack-0.112.0.2524.tar.gz) = QDNzmIm9FkKxTAFN9XMU4Q==
|
||||
RMD160 (jack-0.112.0.2524.tar.gz) = P4RU9P7fIoAFrKNjy038uIF3QjY=
|
||||
SHA1 (jack-0.112.0.2524.tar.gz) = so7zOMD4f6vpkHI4+xrMVkrGsYI=
|
||||
SHA256 (jack-0.112.0.2524.tar.gz) = B3wPJ6rWJXyu86LpEAoihYwgciHtc7yKzn6rSqFv6+g=
|
||||
SIZE (jack-0.112.0.2524.tar.gz) = 374515
|
||||
|
@ -1,13 +1,17 @@
|
||||
$OpenBSD: patch-config_sysdeps_atomicity_h,v 1.1.1.1 2008/03/24 03:01:28 jakemsr Exp $
|
||||
--- config/sysdeps/atomicity.h.orig Sun Mar 16 21:46:02 2008
|
||||
+++ config/sysdeps/atomicity.h Sun Mar 16 21:47:43 2008
|
||||
@@ -15,6 +15,10 @@
|
||||
$OpenBSD: patch-config_sysdeps_atomicity_h,v 1.2 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- config/sysdeps/atomicity.h.orig Thu Mar 13 16:39:46 2008
|
||||
+++ config/sysdeps/atomicity.h Mon Jun 16 21:00:28 2008
|
||||
@@ -15,6 +15,14 @@
|
||||
|
||||
#include <config/cpu/powerpc/atomicity.h>
|
||||
|
||||
+#elif defined(__mips__) || defined(__mips64__)
|
||||
+
|
||||
+#include <config/cpu/mips/atomicity.h>
|
||||
+
|
||||
+#elif defined(__alpha__)
|
||||
+
|
||||
+#include <config/cpu/alpha/atomicity.h>
|
||||
+
|
||||
#else
|
||||
|
||||
|
14
audio/jack/patches/patch-config_sysdeps_cycles_h
Normal file
14
audio/jack/patches/patch-config_sysdeps_cycles_h
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-config_sysdeps_cycles_h,v 1.1 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- config/sysdeps/cycles.h.orig Tue Jun 17 11:36:41 2008
|
||||
+++ config/sysdeps/cycles.h Tue Jun 17 11:37:11 2008
|
||||
@@ -19,6 +19,10 @@
|
||||
|
||||
#include <config/cpu/powerpc/cycles.h>
|
||||
|
||||
+#elif defined(__alpha__)
|
||||
+
|
||||
+#include <config/cpu/alpha/cycles.h>
|
||||
+
|
||||
#else
|
||||
|
||||
#include <config/cpu/generic/cycles.h>
|
@ -1,40 +1,15 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.2 2008/04/22 09:34:58 jakemsr Exp $
|
||||
--- configure.ac.orig Sun Apr 13 00:12:24 2008
|
||||
+++ configure.ac Sun Apr 13 00:55:01 2008
|
||||
@@ -88,12 +88,15 @@ case "${host_os}" in
|
||||
# current FreeBSD header files conflict with the OSS driver's
|
||||
# barrier code, this may be fixed in 5.3, stay tuned.
|
||||
USE_BARRIER="no"
|
||||
+ JACK_HOST_HAS_BSD_POLL="yes"
|
||||
;;
|
||||
openbsd*)
|
||||
# pthread_barrier* not implemented
|
||||
$OpenBSD: patch-configure_ac,v 1.3 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- configure.ac.orig Sat Jun 14 16:46:11 2008
|
||||
+++ configure.ac Sun Jun 15 11:24:47 2008
|
||||
@@ -94,6 +94,7 @@ case "${host_os}" in
|
||||
USE_BARRIER="no"
|
||||
# need small realtime stack
|
||||
JACK_THREAD_STACK_TOUCH=10000
|
||||
+ JACK_HOST_HAS_BSD_POLL="yes"
|
||||
+ HOST_DEFAULT_TMP_DIR=/tmp
|
||||
;;
|
||||
darwin*)
|
||||
JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack
|
||||
@@ -103,11 +106,16 @@ case "${host_os}" in
|
||||
OS_LDFLAGS="-framework CoreAudio -framework CoreServices -framework AudioUnit"
|
||||
TRY_POSIX_SHM=yes # POSIX shm works better
|
||||
HOST_DEFAULT_TMP_DIR=/tmp
|
||||
+ JACK_HOST_HAS_BSD_POLL="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(OS_LDFLAGS)
|
||||
|
||||
+if test x"$JACK_HOST_HAS_BSD_POLL" = x"yes"; then
|
||||
+ AC_DEFINE(JACK_HOST_HAS_BSD_POLL, 1, [must use read() to signal eof])
|
||||
+fi
|
||||
+
|
||||
#
|
||||
# We need to establish suitable defaults for a 64-bit OS
|
||||
libnn=lib
|
||||
@@ -370,7 +378,7 @@ AC_ARG_ENABLE(dynsimd,
|
||||
@@ -393,7 +394,7 @@ AC_ARG_ENABLE(dynsimd,
|
||||
if test "x$enable_dynsimd" = xyes; then
|
||||
AC_DEFINE(USE_DYNSIMD, 1, [Define to 1 to use dynamic SIMD selection.])
|
||||
dnl This needs update once there's more than x86/x86-64 supported
|
||||
|
22
audio/jack/patches/patch-drivers_dummy_dummy_driver_c
Normal file
22
audio/jack/patches/patch-drivers_dummy_dummy_driver_c
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-drivers_dummy_dummy_driver_c,v 1.1 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- drivers/dummy/dummy_driver.c.orig Thu May 22 23:20:25 2008
|
||||
+++ drivers/dummy/dummy_driver.c Mon Jun 16 18:36:24 2008
|
||||
@@ -109,6 +109,7 @@ dummy_driver_wait (dummy_driver_t *driver, int extra_f
|
||||
{
|
||||
jack_nframes_t nframes = driver->period_size;
|
||||
struct timespec now;
|
||||
+ struct timespec ts;
|
||||
|
||||
*status = 0;
|
||||
/* this driver doesn't work so well if we report a delay */
|
||||
@@ -133,7 +134,9 @@ dummy_driver_wait (dummy_driver_t *driver, int extra_f
|
||||
}
|
||||
driver->next_wakeup = add_ts(driver->next_wakeup, driver->wait_time);
|
||||
} else {
|
||||
- if(clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &driver->next_wakeup, NULL)) {
|
||||
+ ts.tv_sec = 0;
|
||||
+ ts.tv_nsec = ts_to_nsec(driver->next_wakeup) - ts_to_nsec(now);
|
||||
+ if(nanosleep(&ts, NULL)) {
|
||||
jack_error("error while sleeping");
|
||||
*status = -1;
|
||||
} else {
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-jack_pc_in,v 1.1.1.1 2008/03/24 03:01:28 jakemsr Exp $
|
||||
$OpenBSD: patch-jack_pc_in,v 1.2 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- jack.pc.in.orig Thu Mar 13 16:40:00 2008
|
||||
+++ jack.pc.in Sun Mar 16 17:36:13 2008
|
||||
+++ jack.pc.in Wed Jun 18 00:42:56 2008
|
||||
@@ -6,5 +6,5 @@ includedir=@includedir@
|
||||
Name: jack
|
||||
Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server
|
||||
Version: @JACK_VERSION@
|
||||
-Libs: -L${libdir} -ljack -lpthread @OS_LDFLAGS@
|
||||
+Libs: -L${libdir} -ljack @LIBS@ @OS_LDFLAGS@
|
||||
+Libs: -L${libdir} -ljack -lm -pthread @OS_LDFLAGS@
|
||||
Cflags: -I${includedir}
|
||||
|
12
audio/jack/patches/patch-jackd_Makefile_am
Normal file
12
audio/jack/patches/patch-jackd_Makefile_am
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-jackd_Makefile_am,v 1.1 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- jackd/Makefile.am.orig Fri Jun 27 21:49:10 2008
|
||||
+++ jackd/Makefile.am Fri Jun 27 21:50:41 2008
|
||||
@@ -40,6 +40,8 @@ endif
|
||||
jackstart_SOURCES = jackstart.c md5.c
|
||||
jackstart_LDFLAGS = -lcap
|
||||
|
||||
+LIBS = -lm -pthread
|
||||
+
|
||||
lib_LTLIBRARIES = libjackserver.la
|
||||
|
||||
libjackserver_la_CFLAGS = $(AM_CFLAGS)
|
@ -1,25 +1,12 @@
|
||||
$OpenBSD: patch-jackd_engine_c,v 1.3 2008/04/22 09:34:58 jakemsr Exp $
|
||||
--- jackd/engine.c.orig Mon Apr 21 21:53:02 2008
|
||||
+++ jackd/engine.c Mon Apr 21 21:56:34 2008
|
||||
@@ -1471,10 +1471,8 @@ jack_server_thread (void *arg)
|
||||
(engine, pfd[i].fd)) {
|
||||
jack_error ("could not handle external"
|
||||
" client request");
|
||||
$OpenBSD: patch-jackd_engine_c,v 1.4 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- jackd/engine.c.orig Sun Jun 15 12:49:49 2008
|
||||
+++ jackd/engine.c Sun Jun 15 12:55:19 2008
|
||||
@@ -1383,7 +1383,7 @@ handle_external_client_request (jack_engine_t *engine,
|
||||
if ((r = read (client->request_fd, &req, sizeof (req)))
|
||||
< (ssize_t) sizeof (req)) {
|
||||
if (r == 0) {
|
||||
-#ifdef JACK_USE_MACH_THREADS
|
||||
- /* poll is implemented using
|
||||
- select (see the macosx/fakepoll
|
||||
- code). When the socket is closed
|
||||
+#ifdef JACK_HOST_HAS_BSD_POLL
|
||||
+ /* When the socket is closed
|
||||
select does not return any error,
|
||||
POLLIN is true and the next read
|
||||
will return 0 bytes. This
|
||||
@@ -1484,7 +1482,7 @@ jack_server_thread (void *arg)
|
||||
and remove the client.
|
||||
*/
|
||||
jack_client_disconnect(engine, pfd[i].fd);
|
||||
-#endif /* JACK_USE_MACH_THREADS */
|
||||
+#endif /* JACK_HOST_HAS_BSD_POLL */
|
||||
}
|
||||
}
|
||||
}
|
||||
+#if defined(JACK_USE_MACH_THREADS) || defined __OpenBSD__
|
||||
/* poll is implemented using
|
||||
select (see the macosx/fakepoll
|
||||
code). When the socket is closed
|
||||
|
12
audio/jack/patches/patch-libjack_Makefile_am
Normal file
12
audio/jack/patches/patch-libjack_Makefile_am
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-libjack_Makefile_am,v 1.1 2008/06/28 05:49:30 jakemsr Exp $
|
||||
--- libjack/Makefile.am.orig Fri Jun 27 06:28:57 2008
|
||||
+++ libjack/Makefile.am Fri Jun 27 06:29:24 2008
|
||||
@@ -27,6 +27,8 @@ SOURCE_FILES = \
|
||||
simd.lo: simd.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(JACK_CFLAGS) $(SIMD_CFLAGS) -c -o simd.lo simd.c
|
||||
|
||||
+LIBS = -pthread -lm
|
||||
+
|
||||
lib_LTLIBRARIES = libjack.la
|
||||
|
||||
noinst_HEADERS = local.h
|
@ -1,12 +1,78 @@
|
||||
$OpenBSD: patch-libjack_client_c,v 1.1 2008/03/30 08:46:15 jakemsr Exp $
|
||||
--- libjack/client.c.orig Sat Mar 29 21:30:38 2008
|
||||
+++ libjack/client.c Sat Mar 29 21:50:43 2008
|
||||
@@ -1533,7 +1533,7 @@ jack_wake_next_client (jack_client_t* client)
|
||||
jack_error ("cannot complete execution of the "
|
||||
"processing graph (%s)",
|
||||
strerror(errno));
|
||||
- return -1;
|
||||
+ // return -1;
|
||||
$OpenBSD: patch-libjack_client_c,v 1.2 2008/06/28 05:49:31 jakemsr Exp $
|
||||
--- libjack/client.c.orig Thu May 22 23:20:23 2008
|
||||
+++ libjack/client.c Mon Jun 16 20:56:49 2008
|
||||
@@ -969,10 +969,7 @@ jack_client_open_aux (const char *client_name,
|
||||
}
|
||||
|
||||
/* parse variable arguments */
|
||||
- if (ap)
|
||||
jack_varargs_parse(options, ap, &va);
|
||||
- else
|
||||
- jack_varargs_init(&va);
|
||||
|
||||
/* External clients need to know where the tmpdir used for
|
||||
communication with the server lives
|
||||
@@ -1114,10 +1111,13 @@ jack_client_t* jack_client_open(const char* ext_client
|
||||
jack_client_t *
|
||||
jack_client_new (const char *client_name)
|
||||
{
|
||||
+ va_list ap;
|
||||
+
|
||||
jack_options_t options = JackUseExactName;
|
||||
if (getenv("JACK_START_SERVER") == NULL)
|
||||
options |= JackNoStartServer;
|
||||
- return jack_client_open_aux (client_name, options, NULL, NULL);
|
||||
+
|
||||
+ return jack_client_open_aux(client_name, options, NULL, ap);
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -1519,6 +1519,8 @@ jack_client_core_wait (jack_client_t* client)
|
||||
static int
|
||||
jack_wake_next_client (jack_client_t* client)
|
||||
{
|
||||
+ struct pollfd pfds[1];
|
||||
+ int pret = 0;
|
||||
char c = 0;
|
||||
|
||||
if (write (client->graph_next_fd, &c, sizeof (c))
|
||||
@@ -1530,20 +1532,29 @@ jack_wake_next_client (jack_client_t* client)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- DEBUG ("client sent message to next stage by %" PRIu64
|
||||
- ", client reading on graph_wait_fd==%d",
|
||||
- jack_get_microseconds(), client->graph_wait_fd);
|
||||
+ DEBUG ("client sent message to next stage by %" PRIu64 "",
|
||||
+ jack_get_microseconds());
|
||||
|
||||
DEBUG("reading cleanup byte from pipe %d\n", client->graph_wait_fd);
|
||||
|
||||
- if ((read (client->graph_wait_fd, &c, sizeof (c))
|
||||
- != sizeof (c))) {
|
||||
- jack_error ("cannot complete execution of the "
|
||||
- "processing graph (%s)",
|
||||
- strerror(errno));
|
||||
- return -1;
|
||||
+ pfds[0].fd = client->graph_wait_fd;
|
||||
+ pfds[0].events = POLLIN;
|
||||
+
|
||||
+ pret = poll(pfds, 1, 0);
|
||||
+
|
||||
+ if (pret > 0 && (pfds[0].revents & POLLIN)) {
|
||||
+ if ((read (client->graph_wait_fd, &c, sizeof (c))
|
||||
+ != sizeof (c))) {
|
||||
+ jack_error ("cannot complete execution of the "
|
||||
+ "processing graph (%s)",
|
||||
+ strerror(errno));
|
||||
+ return -1;
|
||||
+ }
|
||||
+ } else {
|
||||
+ DEBUG("cleanup byte from pipe %d not available?\n",
|
||||
+ client->graph_wait_fd);
|
||||
}
|
||||
-
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
$OpenBSD: patch-tools_netsource_c,v 1.1 2008/04/22 09:34:58 jakemsr Exp $
|
||||
--- tools/netsource.c.orig Mon Apr 21 21:58:12 2008
|
||||
+++ tools/netsource.c Mon Apr 21 21:58:35 2008
|
||||
@@ -31,10 +31,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, U
|
||||
$OpenBSD: patch-tools_netsource_c,v 1.2 2008/06/28 05:49:31 jakemsr Exp $
|
||||
--- tools/netsource.c.orig Sat Apr 19 17:35:52 2008
|
||||
+++ tools/netsource.c Mon Jun 16 18:38:25 2008
|
||||
@@ -30,11 +30,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, U
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <fcntl.h>
|
||||
|
||||
+#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
@ -15,3 +17,49 @@ $OpenBSD: patch-tools_netsource_c,v 1.1 2008/04/22 09:34:58 jakemsr Exp $
|
||||
|
||||
#include <jack/jack.h>
|
||||
|
||||
@@ -206,10 +210,11 @@ process (jack_nframes_t nframes, void *arg)
|
||||
|
||||
/* ---------- Receive ---------- */
|
||||
if (reply_port)
|
||||
- size = netjack_recv (insockfd, (char *) packet_buf, rx_bufsize, MSG_DONTWAIT, mtu);
|
||||
+ size = netjack_recv (insockfd, (char *) packet_buf, rx_bufsize, NULL, mtu);
|
||||
else
|
||||
- size = netjack_recv (outsockfd, (char *) packet_buf, rx_bufsize, MSG_DONTWAIT, mtu);
|
||||
+ size = netjack_recv (outsockfd, (char *) packet_buf, rx_bufsize, NULL, mtu);
|
||||
packet_header_ntoh (pkthdr);
|
||||
+
|
||||
/* Loop till we get the right packet at the right momment */
|
||||
while (size == rx_bufsize && (framecnt - pkthdr->framecnt) > latency)
|
||||
{
|
||||
@@ -217,9 +222,9 @@ process (jack_nframes_t nframes, void *arg)
|
||||
//printf ("Frame %d \tLate packet received with a latency of %d frames\n", framecnt, framecnt - pkthdr->framecnt);
|
||||
|
||||
if (reply_port)
|
||||
- size = netjack_recv (insockfd, (char *) packet_buf, rx_bufsize, MSG_DONTWAIT, mtu);
|
||||
+ size = netjack_recv (insockfd, (char *) packet_buf, rx_bufsize, NULL, mtu);
|
||||
else
|
||||
- size = netjack_recv (outsockfd, (char *) packet_buf, rx_bufsize, MSG_DONTWAIT, mtu);
|
||||
+ size = netjack_recv (outsockfd, (char *) packet_buf, rx_bufsize, NULL, mtu);
|
||||
packet_header_ntoh (pkthdr);
|
||||
}
|
||||
|
||||
@@ -367,6 +372,7 @@ main (int argc, char *argv[])
|
||||
int peer_port = 3000;
|
||||
jack_options_t options = JackNullOption;
|
||||
jack_status_t status;
|
||||
+ int ff;
|
||||
|
||||
/* Torben's famous state variables, aka "the reporting API" ! */
|
||||
int statecopy_connected, statecopy_latency, statecopy_netxruns;
|
||||
@@ -471,6 +477,11 @@ main (int argc, char *argv[])
|
||||
"Is the JACK server running ?\n", status);
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+ fcntl(outsockfd, F_GETFL, &ff);
|
||||
+ fcntl(outsockfd, F_SETFL, ff | O_NONBLOCK);
|
||||
+ fcntl(insockfd, F_GETFL, &ff);
|
||||
+ fcntl(insockfd, F_SETFL, ff | O_NONBLOCK);
|
||||
|
||||
/* Set up jack callbacks */
|
||||
jack_set_process_callback (client, process, 0);
|
||||
|
@ -1,23 +1,23 @@
|
||||
@comment $OpenBSD: PLIST,v 1.2 2008/04/22 09:34:58 jakemsr Exp $
|
||||
bin/jack_alias
|
||||
bin/jack_connect
|
||||
bin/jack_disconnect
|
||||
bin/jack_evmon
|
||||
bin/jack_freewheel
|
||||
bin/jack_impulse_grabber
|
||||
bin/jack_load
|
||||
bin/jack_lsp
|
||||
bin/jack_metro
|
||||
bin/jack_midiseq
|
||||
bin/jack_midisine
|
||||
bin/jack_monitor_client
|
||||
bin/jack_netsource
|
||||
bin/jack_showtime
|
||||
bin/jack_simple_client
|
||||
bin/jack_transport
|
||||
bin/jack_unload
|
||||
bin/jackd
|
||||
bin/jackrec
|
||||
@comment $OpenBSD: PLIST,v 1.3 2008/06/28 05:49:31 jakemsr Exp $
|
||||
@bin bin/jack_alias
|
||||
@bin bin/jack_connect
|
||||
@bin bin/jack_disconnect
|
||||
@bin bin/jack_evmon
|
||||
@bin bin/jack_freewheel
|
||||
@bin bin/jack_impulse_grabber
|
||||
@bin bin/jack_load
|
||||
@bin bin/jack_lsp
|
||||
@bin bin/jack_metro
|
||||
@bin bin/jack_midiseq
|
||||
@bin bin/jack_midisine
|
||||
@bin bin/jack_monitor_client
|
||||
@bin bin/jack_netsource
|
||||
@bin bin/jack_showtime
|
||||
@bin bin/jack_simple_client
|
||||
@bin bin/jack_transport
|
||||
@bin bin/jack_unload
|
||||
@bin bin/jackd
|
||||
@bin bin/jackrec
|
||||
include/jack/
|
||||
include/jack/intclient.h
|
||||
include/jack/jack.h
|
||||
|
Loading…
Reference in New Issue
Block a user