Date: Thu, 17 Aug 2017 18:25:22 +0000 (UTC) From: Thomas Zander <riggs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r448166 - in branches/2017Q3/audio/jack: . files Message-ID: <201708171825.v7HIPMOe069719@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: riggs Date: Thu Aug 17 18:25:21 2017 New Revision: 448166 URL: https://svnweb.freebsd.org/changeset/ports/448166 Log: MFH: r447818 Enable COOKEDMODE for more versatile soundcard support; use GitHub Detailed log: * Add COOKEDMODE option that turns on SNDCTL_DSP_COOKEDMODE. Without the cooked mode Jack's OSS driver currently fails for some soundcards (it chooses wrong sample rate). It's better to have COOKEDMODE=on by default since it often appears broken otherwise. Professionals probably want COOKEDMODE=off, after they make sure their soundcard works with jack. * Switch to github for fetching the sources. * Include the merged upstream pull request #60 to enable the realtime mode (-R). * Add USES=autoreconf (github source doesn't include a configure script) * Install more manpages. PR: 220785 Submitted by: yuri@rawbw.com Approved by: portmgr (feld) Added: branches/2017Q3/audio/jack/files/patch-configure.ac - copied unchanged from r447818, head/audio/jack/files/patch-configure.ac branches/2017Q3/audio/jack/files/patch-jackd_jackd.c - copied unchanged from r447818, head/audio/jack/files/patch-jackd_jackd.c branches/2017Q3/audio/jack/pkg-message - copied unchanged from r447818, head/audio/jack/pkg-message Modified: branches/2017Q3/audio/jack/Makefile branches/2017Q3/audio/jack/distinfo branches/2017Q3/audio/jack/files/jackd.in branches/2017Q3/audio/jack/files/patch-drivers_oss_oss__driver.c branches/2017Q3/audio/jack/files/patch-libjack_client.c branches/2017Q3/audio/jack/pkg-plist Directory Properties: branches/2017Q3/ (props changed) Modified: branches/2017Q3/audio/jack/Makefile ============================================================================== --- branches/2017Q3/audio/jack/Makefile Thu Aug 17 18:21:01 2017 (r448165) +++ branches/2017Q3/audio/jack/Makefile Thu Aug 17 18:25:21 2017 (r448166) @@ -3,10 +3,8 @@ PORTNAME= jackit PORTVERSION= 0.125.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio -MASTER_SITES= http://jackaudio.org/downloads/ -DISTNAME= jack-audio-connection-kit-${PORTVERSION} MAINTAINER= multimedia@FreeBSD.org COMMENT= Low latency audio server @@ -19,22 +17,36 @@ LIB_DEPENDS= libsndfile.so:audio/libsndfile \ libcelt0.so:audio/celt \ libuuid.so:misc/e2fsprogs-libuuid -GNU_CONFIGURE= yes +USES= autoreconf gmake pathfix pkgconfig libtool localbase bdb +USE_GITHUB= yes +GH_ACCOUNT= jackaudio +GH_PROJECT= jack1 +GH_TAGNAME= 90f9dd3 +GH_TUPLE= jackaudio:headers:07f1ecf:h/jack +GH_TUPLE+= jackaudio:tools:8d13c31:t/tools +GH_TUPLE+= jackaudio:example-clients:7fa0890:e/example-clients USE_LDCONFIG= yes -USES= gmake pathfix pkgconfig libtool localbase bdb +GNU_CONFIGURE= yes USE_RC_SUBR= jackd CONFIGURE_ARGS= --disable-portaudio \ + --enable-optimize \ --enable-force-install \ --with-default-tmpdir=/tmp -CFLAGS+= -I${BDB_INCLUDE_DIR} -LIBS+= -L${BDB_LIB_DIR} -INSTALL_TARGET= install-strip +CFLAGS+= -I${BDB_INCLUDE_DIR} +LIBS+= -L${BDB_LIB_DIR} +INSTALL_TARGET= install-strip -OPTIONS_DEFINE= ALSA DOXYGEN READLINE SNDIO -OPTIONS_DEFAULT=READLINE -OPTIONS_SUB= yes +OPTIONS_DEFINE= ALSA DOXYGEN READLINE SNDIO COOKEDMODE +OPTIONS_DEFINE_i386= DYNSIMD +OPTIONS_DEFINE_amd64= DYNSIMD +OPTIONS_DEFAULT= READLINE COOKEDMODE +OPTIONS_DEFAULT_i386= DYNSIMD +OPTIONS_DEFAULT_amd64= DYNSIMD +OPTIONS_SUB= yes +COOKEDMODE_DESC= Use OSS COOKEDMODE (OSS driver is broken without it) +DYNSIMD_DESC= Use dynamic SIMD selection (only i386/amd64) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_CONFIGURE_ENABLE= alsa @@ -50,21 +62,11 @@ READLINE_CONFIGURE_ENV_OFF= ac_cv_lib_readline_readlin SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_CONFIGURE_ENABLE= sndio +COOKEDMODE_CFLAGS= -DOPTION_COOKEDMODE + +DYNSIMD_CONFIGURE_ENABLE=dynsimd + post-patch: - @${REINPLACE_CMD} -e 's|define USE_MLOCK|undef USE_MLOCK|' \ - -e 's|alloca.h||' \ - ${WRKSRC}/configure - @${REINPLACE_CMD} -e "s,-lpthread,-pthread," \ - ${WRKSRC}/configure ${WRKSRC}/libjack/Makefile.in \ - ${WRKSRC}/jackd/Makefile.in \ - ${WRKSRC}/example-clients/Makefile.in ${WRKSRC}/jack.pc.in - @${REINPLACE_CMD} -e "s,-lrt,," ${WRKSRC}/libjack/Makefile.in \ - ${WRKSRC}/jackd/Makefile.in \ - ${WRKSRC}/example-clients/Makefile.in - @${REINPLACE_CMD} -e "s,-ldl,," ${WRKSRC}/jackd/Makefile.in \ - ${WRKSRC}/example-clients/Makefile.in - @${REINPLACE_CMD} -e 's|md5sum|md5 -q|g' \ - ${WRKSRC}/jackd/Makefile.in @${RM} ${WRKSRC}/doc/reference/html/* post-build: Modified: branches/2017Q3/audio/jack/distinfo ============================================================================== --- branches/2017Q3/audio/jack/distinfo Thu Aug 17 18:21:01 2017 (r448165) +++ branches/2017Q3/audio/jack/distinfo Thu Aug 17 18:25:21 2017 (r448166) @@ -1,3 +1,9 @@ -TIMESTAMP = 1491234945 -SHA256 (jack-audio-connection-kit-0.125.0.tar.gz) = 3517b5bff82139a76b2b66fe2fd9a3b34b6e594c184f95a988524c575b11d444 -SIZE (jack-audio-connection-kit-0.125.0.tar.gz) = 1217977 +TIMESTAMP = 1500250305 +SHA256 (jackaudio-jack1-0.125.0-90f9dd3_GH0.tar.gz) = e0ba7dcf58fa934af51329cd329f466fe8d2bc180d07e4ab8be21ed80c60aa8a +SIZE (jackaudio-jack1-0.125.0-90f9dd3_GH0.tar.gz) = 392822 +SHA256 (jackaudio-headers-07f1ecf_GH0.tar.gz) = 04a3bb87d278923985ba44045b7a27439c90776cc5d4a6016d062fc7a6aa5023 +SIZE (jackaudio-headers-07f1ecf_GH0.tar.gz) = 36704 +SHA256 (jackaudio-tools-8d13c31_GH0.tar.gz) = 23e6bc60c8cef4283677206f2687a408367203a725c091c923f48554ae6e8cc8 +SIZE (jackaudio-tools-8d13c31_GH0.tar.gz) = 45544 +SHA256 (jackaudio-example-clients-7fa0890_GH0.tar.gz) = 79e2ac1d38d7d77b1afb71aa97414c339e8c00613a5d9b725861232b5c995223 +SIZE (jackaudio-example-clients-7fa0890_GH0.tar.gz) = 16174 Modified: branches/2017Q3/audio/jack/files/jackd.in ============================================================================== --- branches/2017Q3/audio/jack/files/jackd.in Thu Aug 17 18:21:01 2017 (r448165) +++ branches/2017Q3/audio/jack/files/jackd.in Thu Aug 17 18:25:21 2017 (r448166) @@ -27,8 +27,10 @@ start_jackd() { if [ $jackd_rtprio = "YES" ]; then local rt="rtprio 1" fi + # log the date and parameters + echo -e "\n[`date`] Starting the daemon, user=$jackd_user rtprio=$jackd_rtprio args=\"$jackd_args\"" >> /var/log/${name}.log # daemon(8) should be able to set the realtime priority, but it isn't - $rt daemon -p /var/run/${name}.pid -u ${jackd_user} %%PREFIX%%/bin/jackd ${jackd_args} >/var/log/${name}.log 2>&1 + $rt daemon -p /var/run/${name}.pid -o /var/log/${name}.log -u "${jackd_user}" %%PREFIX%%/bin/jackd ${jackd_args} } load_rc_config ${name} Copied: branches/2017Q3/audio/jack/files/patch-configure.ac (from r447818, head/audio/jack/files/patch-configure.ac) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2017Q3/audio/jack/files/patch-configure.ac Thu Aug 17 18:25:21 2017 (r448166, copy of r447818, head/audio/jack/files/patch-configure.ac) @@ -0,0 +1,10 @@ +--- configure.ac.orig 2017-01-10 10:20:51 UTC ++++ configure.ac +@@ -172,6 +172,7 @@ case "${host_os}" in + # barrier code, this may be fixed in 5.3, stay tuned. + USE_BARRIER="no" + USE_MD5SUM=0 ++ JACK_DO_NOT_MLOCK=0 + ;; + openbsd*) + # pthread_barrier* not implemented Modified: branches/2017Q3/audio/jack/files/patch-drivers_oss_oss__driver.c ============================================================================== --- branches/2017Q3/audio/jack/files/patch-drivers_oss_oss__driver.c Thu Aug 17 18:21:01 2017 (r448165) +++ branches/2017Q3/audio/jack/files/patch-drivers_oss_oss__driver.c Thu Aug 17 18:25:21 2017 (r448166) @@ -1,4 +1,4 @@ ---- drivers/oss/oss_driver.c.orig 2016-02-23 15:13:53 UTC +--- drivers/oss/oss_driver.c.orig 2017-01-10 10:20:51 UTC +++ drivers/oss/oss_driver.c @@ -23,6 +23,7 @@ @@ -83,7 +83,20 @@ dstidx += chcount; } break; -@@ -441,19 +454,7 @@ static int oss_driver_start (oss_driver_ +@@ -429,7 +442,11 @@ static int oss_driver_detach (oss_driver + + static int oss_driver_start (oss_driver_t *driver) + { +- int flags = 0; ++#if defined(OPTION_COOKEDMODE) ++ int cookedmode = 1; ++#else ++ int cookedmode = 0; ++#endif + int format; + int channels; + int samplerate; +@@ -441,19 +458,7 @@ static int oss_driver_start (oss_driver_ const char *indev = driver->indev; const char *outdev = driver->outdev; @@ -104,7 +117,52 @@ driver->trigger = 0; if (strcmp (indev, outdev) != 0) { if (driver->capture_channels > 0) { -@@ -705,7 +706,9 @@ static int oss_driver_start (oss_driver_ +@@ -464,7 +469,7 @@ static int oss_driver_start (oss_driver_ + indev, __FILE__, __LINE__, errno); + } + #ifndef OSS_NO_COOKED_MODE +- ioctl (infd, SNDCTL_DSP_COOKEDMODE, &flags); ++ ioctl (infd, SNDCTL_DSP_COOKEDMODE, &cookedmode); + #endif + fragsize = driver->period_size * + driver->capture_channels * samplesize; +@@ -479,7 +484,7 @@ static int oss_driver_start (oss_driver_ + outdev, __FILE__, __LINE__, errno); + } + #ifndef OSS_NO_COOKED_MODE +- ioctl (outfd, SNDCTL_DSP_COOKEDMODE, &flags); ++ ioctl (outfd, SNDCTL_DSP_COOKEDMODE, &cookedmode); + #endif + fragsize = driver->period_size * + driver->playback_channels * samplesize; +@@ -497,7 +502,7 @@ static int oss_driver_start (oss_driver_ + return -1; + } + #ifndef OSS_NO_COOKED_MODE +- ioctl (infd, SNDCTL_DSP_COOKEDMODE, &flags); ++ ioctl (infd, SNDCTL_DSP_COOKEDMODE, &cookedmode); + #endif + } else if (driver->capture_channels == 0 && + driver->playback_channels != 0) { +@@ -510,7 +515,7 @@ static int oss_driver_start (oss_driver_ + return -1; + } + #ifndef OSS_NO_COOKED_MODE +- ioctl (outfd, SNDCTL_DSP_COOKEDMODE, &flags); ++ ioctl (outfd, SNDCTL_DSP_COOKEDMODE, &cookedmode); + #endif + } else { + infd = outfd = open (indev, O_RDWR | O_EXCL); +@@ -521,7 +526,7 @@ static int oss_driver_start (oss_driver_ + return -1; + } + #ifndef OSS_NO_COOKED_MODE +- ioctl (infd, SNDCTL_DSP_COOKEDMODE, &flags); ++ ioctl (infd, SNDCTL_DSP_COOKEDMODE, &cookedmode); + #endif + } + if (infd >= 0 && outfd >= 0) { +@@ -705,7 +710,9 @@ static int oss_driver_start (oss_driver_ sem_post (&driver->sem_start); } @@ -115,7 +173,7 @@ driver->next_periodtime = 0; driver->iodelay = 0.0F; -@@ -1143,6 +1146,23 @@ jack_driver_t * driver_initialize (jack_ +@@ -1143,6 +1150,23 @@ jack_driver_t * driver_initialize (jack_ pnode = jack_slist_next (pnode); } @@ -139,7 +197,7 @@ driver->sample_rate = sample_rate; driver->period_size = period_size; driver->nperiods = nperiods; -@@ -1163,58 +1183,6 @@ jack_driver_t * driver_initialize (jack_ +@@ -1163,58 +1187,6 @@ jack_driver_t * driver_initialize (jack_ } driver->infd = -1; driver->outfd = -1; Copied: branches/2017Q3/audio/jack/files/patch-jackd_jackd.c (from r447818, head/audio/jack/files/patch-jackd_jackd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2017Q3/audio/jack/files/patch-jackd_jackd.c Thu Aug 17 18:25:21 2017 (r448166, copy of r447818, head/audio/jack/files/patch-jackd_jackd.c) @@ -0,0 +1,22 @@ +--- jackd/jackd.c.orig 2017-07-17 17:10:09 UTC ++++ jackd/jackd.c +@@ -521,11 +521,17 @@ jack_drivers_load () + + static void copyright (FILE* file) + { +- fprintf (file, "jackd " VERSION "\n" ++ fprintf (file, "jackd " VERSION " (COOKEDMODE=%s)\n" + "Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.\n" + "jackd comes with ABSOLUTELY NO WARRANTY\n" + "This is free software, and you are welcome to redistribute it\n" +- "under certain conditions; see the file COPYING for details\n\n"); ++ "under certain conditions; see the file COPYING for details\n\n", ++#if defined(OPTION_COOKEDMODE) ++ "on" ++#else ++ "off" ++#endif ++ ); + } + + static void usage (FILE *file) Modified: branches/2017Q3/audio/jack/files/patch-libjack_client.c ============================================================================== --- branches/2017Q3/audio/jack/files/patch-libjack_client.c Thu Aug 17 18:21:01 2017 (r448165) +++ branches/2017Q3/audio/jack/files/patch-libjack_client.c Thu Aug 17 18:25:21 2017 (r448166) @@ -1,6 +1,6 @@ ---- libjack/client.c.orig 2016-09-14 17:41:53 UTC +--- libjack/client.c.orig 2017-01-10 10:20:51 UTC +++ libjack/client.c -@@ -69,6 +69,30 @@ +@@ -68,6 +68,30 @@ static pthread_mutex_t client_lock; static pthread_cond_t client_ready; @@ -31,7 +31,7 @@ static int jack_client_close_aux(jack_client_t *client); -@@ -252,7 +276,7 @@ oop_client_deliver_request (void *ptr, j +@@ -251,7 +275,7 @@ oop_client_deliver_request (void *ptr, j int wok, rok; jack_client_t *client = (jack_client_t*)ptr; @@ -40,7 +40,7 @@ == sizeof(*req)); /* if necessary, add variable length key data after a PropertyChange request -@@ -260,7 +284,7 @@ oop_client_deliver_request (void *ptr, j +@@ -259,7 +283,7 @@ oop_client_deliver_request (void *ptr, j if (req->type == PropertyChangeNotify) { if (req->x.property.keylen) { @@ -49,7 +49,7 @@ jack_error ("cannot send property key of length %d to server", req->x.property.keylen); req->status = -1; -@@ -269,7 +293,7 @@ oop_client_deliver_request (void *ptr, j +@@ -268,7 +292,7 @@ oop_client_deliver_request (void *ptr, j } } @@ -58,7 +58,7 @@ == sizeof(*req)); if (wok && rok) { /* everything OK? */ -@@ -838,14 +862,14 @@ server_event_connect (jack_client_t *cli +@@ -837,14 +861,14 @@ server_event_connect (jack_client_t *cli jack_uuid_copy (&req.client_id, client->control->uuid); @@ -76,7 +76,7 @@ jack_error ("cannot read event connect result from server (%s)", strerror (errno)); close (fd); -@@ -1110,14 +1134,14 @@ jack_request_client (ClientType type, +@@ -1109,14 +1133,14 @@ jack_request_client (ClientType type, snprintf (req.object_data, sizeof(req.object_data), "%s", va->load_init); @@ -93,7 +93,7 @@ if (errno == 0) { /* server shut the socket */ -@@ -1513,7 +1537,7 @@ jack_internal_client_close (const char * +@@ -1512,7 +1536,7 @@ jack_internal_client_close (const char * return; } @@ -102,7 +102,7 @@ jack_error ("cannot deliver ClientUnload request to JACK " "server."); } -@@ -1649,7 +1673,7 @@ jack_session_notify (jack_client_t* clie +@@ -1648,7 +1672,7 @@ jack_session_notify (jack_client_t* clie request.x.session.type = code; @@ -111,7 +111,7 @@ != sizeof(request)) ) { jack_error ("cannot send request type %d to server", request.type); -@@ -1659,7 +1683,7 @@ jack_session_notify (jack_client_t* clie +@@ -1658,7 +1682,7 @@ jack_session_notify (jack_client_t* clie while ( 1 ) { jack_uuid_t uid; @@ -120,7 +120,7 @@ jack_error ("cannot read result for request type %d from" " server (%s)", request.type, strerror (errno)); goto out; -@@ -1681,19 +1705,19 @@ jack_session_notify (jack_client_t* clie +@@ -1680,19 +1704,19 @@ jack_session_notify (jack_client_t* clie break; } @@ -143,7 +143,7 @@ != sizeof(retval[num_replies - 1].flags) ) { jack_error ("cannot read result for request type %d from" " server (%s)", request.type, strerror (errno)); -@@ -1812,7 +1836,7 @@ jack_client_process_events (jack_client_ +@@ -1811,7 +1835,7 @@ jack_client_process_events (jack_client_ /* server has sent us an event. process the * event and reply */ @@ -152,7 +152,7 @@ != sizeof(event)) { jack_error ("cannot read server event (%s)", strerror (errno)); -@@ -1822,7 +1846,7 @@ jack_client_process_events (jack_client_ +@@ -1821,7 +1845,7 @@ jack_client_process_events (jack_client_ if (event.type == PropertyChange) { if (event.y.key_size) { key = (char*)malloc (event.y.key_size); @@ -161,7 +161,7 @@ event.y.key_size) { jack_error ("cannot read property change key (%s)", strerror (errno)); -@@ -1941,7 +1965,7 @@ jack_client_process_events (jack_client_ +@@ -1940,7 +1964,7 @@ jack_client_process_events (jack_client_ DEBUG ("client has dealt with the event, writing " "response on event fd"); @@ -170,7 +170,7 @@ != sizeof(status)) { jack_error ("cannot send event response to " "engine (%s)", strerror (errno)); -@@ -1961,7 +1985,7 @@ jack_wake_next_client (jack_client_t* cl +@@ -1960,7 +1984,7 @@ jack_wake_next_client (jack_client_t* cl int pret = 0; char c = 0; @@ -179,7 +179,7 @@ != sizeof(c)) { DEBUG ("cannot write byte to fd %d", client->graph_next_fd); jack_error ("cannot continue execution of the " -@@ -1989,7 +2013,7 @@ jack_wake_next_client (jack_client_t* cl +@@ -1988,7 +2012,7 @@ jack_wake_next_client (jack_client_t* cl } if (pret > 0 && (pfds[0].revents & POLLIN)) { Copied: branches/2017Q3/audio/jack/pkg-message (from r447818, head/audio/jack/pkg-message) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2017Q3/audio/jack/pkg-message Thu Aug 17 18:25:21 2017 (r448166, copy of r447818, head/audio/jack/pkg-message) @@ -0,0 +1,26 @@ +====================================================================== +It is recommended to run Jack with real-time priority (-R). + +The recommended way to start Jack is to add the following +lines to /etc/rc.conf: + +jackd_enable="YES" +jackd_user="{your-jack-user}" +jackd_rtprio="YES" +jackd_args="-R -doss -r{sample-rate} -p1024 -n3 -w16 \ + --capture /dev/dsp{N} --playback /dev/dsp{N}" + +Where: +- your-jack-user: is the user who is going to use jack; currently + only one user is supported +- sample-rate: can be 44100, 48000, etc. +- /dev/dsp{N}: your OSS devices, usually /dev/dsp0 + +Please note that the port option COOKEDMODE is "on" by default, which +makes your system to automatically scale the sample-rate between +Jack and audio hardware. One reason COOKEDMODE=on is because +Jack's OSS driver doesn't support some sample-rate and hardware +combinations when COOKEDMODE=off. To achieve the best sound quality +please make sure your hardware natively supports the sample-rate set +in jackd_args, and set COOKEDMODE=off. +====================================================================== Modified: branches/2017Q3/audio/jack/pkg-plist ============================================================================== --- branches/2017Q3/audio/jack/pkg-plist Thu Aug 17 18:21:01 2017 (r448165) +++ branches/2017Q3/audio/jack/pkg-plist Thu Aug 17 18:25:21 2017 (r448166) @@ -61,7 +61,28 @@ lib/libjackserver.so lib/libjackserver.so.0 lib/libjackserver.so.0.0.28 libdata/pkgconfig/jack.pc +man/man1/alsa_in.1.gz +man/man1/alsa_out.1.gz +man/man1/jack_bufsize.1.gz +man/man1/jack_connect.1.gz +man/man1/jack_disconnect.1.gz +man/man1/jack_freewheel.1.gz +man/man1/jack_impulse_grabber.1.gz +man/man1/jack_iodelay.1.gz +man/man1/jack_load.1.gz +man/man1/jack_load_test.1.gz +man/man1/jack_lsp.1.gz +man/man1/jack_metro.1.gz +man/man1/jack_monitor_client.1.gz +man/man1/jack_netsource.1.gz +man/man1/jack_property.1.gz +man/man1/jack_samplerate.1.gz +man/man1/jack_showtime.1.gz +man/man1/jack_transport.1.gz +man/man1/jack_unload.1.gz +man/man1/jack_wait.1.gz man/man1/jackd.1.gz +man/man1/jackrec.1.gz man/man1/jackstart.1.gz %%DOXYGEN%%share/jack-audio-connection-kit/reference/html/annotated.html %%DOXYGEN%%share/jack-audio-connection-kit/reference/html/classes.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708171825.v7HIPMOe069719>