From 9612371fa1d2bb177a95e905df19da31fe9b5f1f Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 26 May 2006 17:15:12 +0000 Subject: [PATCH 001/107] auto-import jack-audio-connection-kit-0.101.1-8 on branch devel from jack-audio-connection-kit-0.101.1-8.src.rpm --- .cvsignore | 1 + jack-audio-connection-kit-README.Fedora | 63 ++++++ jack-audio-connection-kit.spec | 187 +++++++++++++++++ jack-clock3.patch | 268 ++++++++++++++++++++++++ sources | 1 + 5 files changed, 520 insertions(+) create mode 100644 jack-audio-connection-kit-README.Fedora create mode 100644 jack-audio-connection-kit.spec create mode 100644 jack-clock3.patch diff --git a/.cvsignore b/.cvsignore index e69de29..b80256d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +jack-audio-connection-kit-0.101.1.tar.gz diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora new file mode 100644 index 0000000..0da075c --- /dev/null +++ b/jack-audio-connection-kit-README.Fedora @@ -0,0 +1,63 @@ +Running JACK server in realtime mode. + +The JACK server jackd has the capability to run in a real-time mode +which greatly decreases the chance of audio glitches. The real-time mode +is enabled by passing the -R or --realtime option to jackd when starting +the server. It is only possible to run jackd in real-time mode as a +non-root user by modifying your PAM configuration, PAM stands for +Pluggable Authentication Modules and is the primary authentification +mechanism used on Fedora. The primary source of PAM documentation can be +found at the following at http://www.kernel.org/pub/linux/libs/pam/ + +The specific PAM configuration file that needs to be modified is +/etc/security/limits.conf and it controls the system resource limits. It +is important to understand that modifying the resource limits +configuration files can decrease the security of your system. +Documentation specific to the resource limits PAM module can be found at +http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam-6.html#ss6.12 + +The resource limits that need to be changed to allow jackd to run in +realtime mode are named rtprio and memlock. To increase the limits for a +specific user named fred you would add the following to +/etc/security/limits.conf + +fred - rtprio 20 +fred - memlock 50000 + +The value of rtprio can be set in the range 0 - 99 where any value +greater that 0 will allow the user to change the scheduling policy to +"real-time". By default the JACK server requires a minimum rtprio +setting of 20 but jackd will accept a command line parameter -P or +--realtime-priority which will change the minimum required value of +rtprio that is needed, but the default of 20 is nearly always +sufficient. + +The appropriate value for memlock is dependent on the amount of memory +present in the system but a minimum value of 50000(50MB) and a maximum +value of half the available memory can be used as a rough guideline. + +To verify that the resource limits have been modified you can use the +bash built-in ulimit command, for example: + +$ulimit -a +core file size (blocks, -c) 0 +data seg size (kbytes, -d) unlimited +max nice (-e) 0 +file size (blocks, -f) unlimited +pending signals (-i) 8191 +max locked memory (kbytes, -l) 50000 +max memory size (kbytes, -m) unlimited +open files (-n) 1024 +pipe size (512 bytes, -p) 8 +POSIX message queues (bytes, -q) 819200 +max rt priority (-r) 20 +stack size (kbytes, -s) 10240 +cpu time (seconds, -t) unlimited +max user processes (-u) 8191 +virtual memory (kbytes, -v) unlimited +file locks (-x) unlimited +file locks (-x) unlimited + +Keep in mind that you may have to re-login before changes to limits.conf +take effect. + diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec new file mode 100644 index 0000000..a29e026 --- /dev/null +++ b/jack-audio-connection-kit.spec @@ -0,0 +1,187 @@ +Summary: The Jack Audio Connection Kit +Name: jack-audio-connection-kit +Version: 0.101.1 +Release: 8%{?dist} +License: GPL/LGPL +Group: System Environment/Daemons +Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz +Source1: %{name}-README.Fedora +Patch0: http://lalists.stanford.edu/lad/2006/01/att-0167/jack-clock3.patch +URL: http://jackit.sourceforge.net +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: alsa-lib-devel +BuildRequires: libsndfile-devel >= 1.0.0 +BuildRequires: pkgconfig +BuildRequires: doxygen +BuildRequires: readline-devel, libtermcap-devel, ncurses-devel + +%description +JACK is a low-latency audio server, written primarily for the Linux +operating system. It can connect a number of different applications to +an audio device, as well as allowing them to share audio between +themselves. Its clients can run in their own processes (ie. as a +normal application), or can they can run within a JACK server (ie. a +"plugin"). + +JACK is different from other audio server efforts in that it has been +designed from the ground up to be suitable for professional audio +work. This means that it focuses on two key areas: synchronous +execution of all clients, and low latency operation. + +%package devel +Summary: Header files for Jack +Group: Development/Libraries +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +Header files for the Jack Audio Connection Kit. + +%package example-clients +Summary: Example clients that use Jack +Group: Applications/Multimedia +Requires: %{name} = %{version} + +%description example-clients +Small example clients that use the Jack Audio Connection Kit. + +%prep +%setup -q +%patch0 -p1 -b .clock3 + +%build +# x86_64 issue reported by Rudolf Kastl (not checked, but not bad). +# Also patch0 touches configure.ac. +autoreconf --force --install + +%configure --enable-stripped-jackd \ + --with-html-dir=%{_docdir} \ +%ifarch i386 + --enable-sse=no --enable-mmx=no \ +%endif + --disable-oss \ + --disable-portaudio \ + --enable-optimize \ + --with-default-tmpdir=/dev/shm +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT + +# can't use the makeinstall macro, jack needs DESTDIR and prefix gets +# added to it and messes up part of the install +make install DESTDIR=$RPM_BUILD_ROOT + +# prepare README.Fedora for documentation including +cp -p %{SOURCE1} README.Fedora + +# remove extra install of the documentation +rm -fr $RPM_BUILD_ROOT%{_docdir} + +# remove *.la files +rm -f $RPM_BUILD_ROOT%{_libdir}/jack/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc AUTHORS TODO COPYING* +%doc README.Fedora +%{_bindir}/jackd +%{_bindir}/jack_load +%{_bindir}/jack_unload +%{_bindir}/jack_bufsize +%{_bindir}/jack_freewheel +%{_bindir}/jack_transport +%{_libdir}/jack/ +%{_mandir}/man1/jack*.1* +%{_libdir}/libjack.so.* + +%files devel +%defattr(-,root,root) +%doc doc/reference +%{_includedir}/jack/ +%{_libdir}/libjack.so +%{_libdir}/pkgconfig/jack.pc + +%files example-clients +%defattr(-,root,root) +%{_bindir}/jackrec +%{_bindir}/jack_connect +%{_bindir}/jack_disconnect +%{_bindir}/jack_impulse_grabber +%{_bindir}/jack_lsp +%{_bindir}/jack_metro +%{_bindir}/jack_showtime +%{_bindir}/jack_monitor_client +%{_bindir}/jack_simple_client + +%changelog +* Fri May 19 2006 Andy Shevchenko 0.101.1-8 +- uniform directories items at %files section + +* Wed May 17 2006 Andy Shevchenko 0.101.1-7 +- change License tag to GPL/LGPL +- remove --enable-shared (it should be default) +- add a -p flag to the line that copies README.Fedora + +* Wed May 10 2006 Andy Shevchenko 0.101.1-6 +- apply clock fix for AMD X2 CPUs (please, refer to + http://sourceforge.net/mailarchive/forum.php?thread_id=8085535&forum_id=3040) + +* Wed May 03 2006 Andy Shevchenko 0.101.1-5 +- adjust spec after reviewing + +* Thu Apr 27 2006 Andy Shevchenko 0.101.1-4 +- reformatting README.Fedora to 72 symbols width + +* Wed Apr 26 2006 Andy Shevchenko 0.101.1-3 +- add README.Fedora +- remove useless BRs + +* Mon Apr 24 2006 Andy Shevchenko 0.101.1-2 +- disable oss and portaudio engines +- use /dev/shm as jack tmpdir +- remove capabilities stuff + +* Tue Apr 04 2006 Andy Shevchenko 0.101.1-1 +- update to 0.101.1 + +* Mon Mar 27 2006 Andy Shevchenko +- update to 0.100.7 (#183912) +- adjust BR (add versions) +- replace files between examples and main packages +- own jack tmpdir + +* Fri Mar 17 2006 Andy Shevchenko +- no libs subpackage +- From Fernando Lopez-Lezcano : + - added configuration variable to build with/without capabilities + - added --enable-optimize flag to configure script + - disabled sse/mmx instructions in i386 build + - create temporary directory as /var/lib/jack/tmp + - create and erase tmp directory at install or uninstall + - try to umount the temporary directory before uninstalling the package + +* Fri Mar 03 2006 Andy Shevchenko +- fix spec for extras injection + +* Fri Nov 18 2005 Andy Shevchenko +- exclude *.la files +- use dist tag + +* Fri Oct 14 2005 Andy Shevchenko +- 0.100.0 +- no optimization + +* Tue Sep 28 2004 Andy Shevchenko +- 0.99.1 + +* Fri Aug 20 2004 Andy Shevchenko +- rebuild from Mandrake diff --git a/jack-clock3.patch b/jack-clock3.patch new file mode 100644 index 0000000..ffad0e6 --- /dev/null +++ b/jack-clock3.patch @@ -0,0 +1,268 @@ +diff -ur jack-audio-connection-kit-0.100.7/config/os/generic/time.h jack/config/os/generic/time.h +--- jack-audio-connection-kit-0.100.7/config/os/generic/time.h 2004-04-07 07:52:58.000000000 +0300 ++++ jack/config/os/generic/time.h 2005-12-06 12:24:03.000000000 +0200 +@@ -1,5 +1,6 @@ + /* + Copyright (C) 2001-2004 Paul Davis, Tilman Linneweh ++ Copyright (C) 2005 Jussi Laako + + Generic version, overridden by OS-specific definition when needed. + +@@ -23,48 +24,24 @@ + #define __jack_time_h__ + + #include ++#include + #include +-#include +- +-/* This is a kludge. We need one global instantiation of this +- * variable in each address space. So, libjack/client.c declares the +- * actual storage. Other source files will see it as an extern. */ +-#define JACK_TIME_GLOBAL_DECL jack_time_t __jack_cpu_mhz +-extern JACK_TIME_GLOBAL_DECL; + + static inline jack_time_t + jack_get_microseconds (void) { +- return get_cycles() / __jack_cpu_mhz; +-} ++ jack_time_t jackTime; ++ struct timeval time; + +-/* This function is inspired by similar code in MPLayer. +- * It should be quite portable +- */ +-static inline jack_time_t +-jack_get_mhz (void) +-{ +- jack_time_t tsc_start, tsc_end; +- struct timeval tv_start, tv_end; +- long usec_delay; +- jack_time_t mhz; +- +- tsc_start = get_cycles(); +- gettimeofday(&tv_start, NULL); +- usleep(100000); +- tsc_end = get_cycles(); +- gettimeofday(&tv_end, NULL); +- +- usec_delay = 1000000 * (tv_end.tv_sec - tv_start.tv_sec) +- + (tv_end.tv_usec - tv_start.tv_usec); +- mhz = (tsc_end - tsc_start) / usec_delay; +- return mhz; ++ gettimeofday(&time, NULL); ++ jackTime = (jack_time_t) time.tv_sec * 1e6 + ++ (jack_time_t) time.tv_usec; ++ return jackTime; + } + + /* This should only be called ONCE per process. */ + static inline void + jack_init_time () + { +- __jack_cpu_mhz = jack_get_mhz (); + } + + #endif /* __jack_time_h__ */ +diff -ur jack-audio-connection-kit-0.100.7/config/os/gnu-linux/time.h jack/config/os/gnu-linux/time.h +--- jack-audio-connection-kit-0.100.7/config/os/gnu-linux/time.h 2004-03-25 21:31:44.000000000 +0200 ++++ jack/config/os/gnu-linux/time.h 2005-12-06 16:30:20.000000000 +0200 +@@ -1,5 +1,6 @@ + /* + Copyright (C) 2001-2003 Paul Davis ++ Copyright (C) 2005 Jussi Laako + + This is the GNU/Linux version. + +@@ -23,18 +24,35 @@ + #define __jack_time_h__ + + #include ++#include ++#include + #include + #include + +-/* This is a kludge. We need one global instantiation of this +- * variable in each address space. So, libjack/client.c declares the +- * actual storage. Other source files will see it as an extern. */ ++/* This is a kludge. We need one global instantiation of these ++ * variables in each address space. So, libjack/client.c declares the ++ * actual storage. Other source files will see those as an externs. */ + #define JACK_TIME_GLOBAL_DECL jack_time_t __jack_cpu_mhz ++#define JACK_TIME_SOURCE_DECL int __jack_clock_source ++#define JACK_TIME_FUNC_DECL jack_time_t (*jack_get_microseconds) (void) + extern JACK_TIME_GLOBAL_DECL; ++extern JACK_TIME_SOURCE_DECL; ++extern JACK_TIME_FUNC_DECL; + +-static inline jack_time_t +-jack_get_microseconds (void) { +- return get_cycles() / __jack_cpu_mhz; ++static jack_time_t ++jack_get_microseconds0 (void) { ++ jack_time_t jackTime; ++ struct timespec time; ++ ++ clock_gettime(CLOCK_MONOTONIC, &time); ++ jackTime = (jack_time_t) time.tv_sec * 1e6 + ++ (jack_time_t) time.tv_nsec / 1e3; ++ return jackTime; ++} ++ ++static jack_time_t ++jack_get_microseconds1 (void) { ++ return get_cycles() / __jack_cpu_mhz; + } + + /* +@@ -94,4 +112,21 @@ + __jack_cpu_mhz = jack_get_mhz (); + } + ++/* Set time function. */ ++static inline void ++jack_set_clock_source (int clocksrc) ++{ ++ __jack_clock_source = clocksrc; ++ switch (__jack_clock_source) ++ { ++ case 1: ++ jack_get_microseconds = jack_get_microseconds1; ++ break; ++ case 0: ++ default: ++ jack_get_microseconds = jack_get_microseconds0; ++ break; ++ } ++} ++ + #endif /* __jack_time_h__ */ +diff -ur jack-audio-connection-kit-0.100.7/configure.ac jack/configure.ac +--- jack-audio-connection-kit-0.100.7/configure.ac 2005-10-30 13:01:31.000000000 +0200 ++++ jack/configure.ac 2005-12-06 14:13:09.000000000 +0200 +@@ -126,6 +126,7 @@ + AC_CHECK_FUNCS(on_exit atexit) + AC_CHECK_FUNCS(posix_memalign) + AC_CHECK_LIB(m, sin) ++AC_CHECK_FUNC(clock_gettime, [], AC_CHECK_LIB(rt, clock_gettime)) + + # should we use mlockall() on this platform? + if test "x$JACK_DO_NOT_MLOCK" = "x"; then +diff -ur jack-audio-connection-kit-0.100.7/jack/engine.h jack/jack/engine.h +--- jack-audio-connection-kit-0.100.7/jack/engine.h 2004-12-19 20:41:28.000000000 +0200 ++++ jack/jack/engine.h 2005-12-06 13:47:39.000000000 +0200 +@@ -169,6 +169,8 @@ + int jack_get_fifo_fd (jack_engine_t *engine, + unsigned int which_fifo); + ++extern int clock_source; ++ + extern jack_client_internal_t * + jack_client_internal_by_id (jack_engine_t *engine, jack_client_id_t id); + +diff -ur jack-audio-connection-kit-0.100.7/jack/internal.h jack/jack/internal.h +--- jack-audio-connection-kit-0.100.7/jack/internal.h 2005-08-22 23:48:24.000000000 +0300 ++++ jack/jack/internal.h 2005-12-06 13:50:48.000000000 +0200 +@@ -130,6 +130,7 @@ + jack_time_t sync_time_left; + jack_frame_timer_t frame_timer; + int32_t internal; ++ int clock_source; + pid_t engine_pid; + jack_nframes_t buffer_size; + int8_t real_time; +diff -ur jack-audio-connection-kit-0.100.7/jackd/engine.c jack/jackd/engine.c +--- jack-audio-connection-kit-0.100.7/jackd/engine.c 2005-06-15 12:18:40.000000000 +0300 ++++ jack/jackd/engine.c 2005-12-06 16:21:50.000000000 +0200 +@@ -78,6 +78,8 @@ + dlhandle handle; + } jack_driver_info_t; + ++int clock_source = 0; ++ + static int jack_port_assign_buffer (jack_engine_t *, + jack_port_internal_t *); + static jack_port_internal_t *jack_get_port_by_name (jack_engine_t *, +@@ -1679,6 +1681,13 @@ + engine->control->xrun_delayed_usecs = 0; + engine->control->max_delayed_usecs = 0; + ++#ifdef JACK_TIME_FUNC_DECL ++ jack_set_clock_source(clock_source); ++#else ++ __jack_clock_source = clock_source; ++#endif ++ engine->control->clock_source = clock_source; ++ + engine->control->frame_timer.frames = 0; + engine->control->frame_timer.reset_pending = 0; + engine->control->frame_timer.current_wakeup = 0; +diff -ur jack-audio-connection-kit-0.100.7/jackd/jackd.c jack/jackd/jackd.c +--- jack-audio-connection-kit-0.100.7/jackd/jackd.c 2005-06-15 12:18:40.000000000 +0300 ++++ jack/jackd/jackd.c 2005-12-06 13:52:15.000000000 +0200 +@@ -368,6 +368,7 @@ + " [ --verbose OR -v ]\n" + " [ --silent OR -s ]\n" + " [ --version OR -V ]\n" ++" [ --clock-source OR -c ]\n" + " -d driver [ ... driver args ... ]\n" + " where driver can be `alsa', `coreaudio', `dummy',\n" + " `oss' or `portaudio'\n\n" +@@ -463,7 +464,7 @@ + + { + jack_driver_desc_t * desc; +- const char *options = "-ad:P:uvshVRTFl:t:mn:p:"; ++ const char *options = "-ad:P:uvshVRTFl:t:mn:p:c:"; + struct option long_options[] = + { + { "driver", 1, 0, 'd' }, +@@ -479,6 +480,7 @@ + { "temporary", 0, 0, 'T' }, + { "version", 0, 0, 'V' }, + { "silent", 0, 0, 's' }, ++ { "clock-source", 1, 0, 'c' }, + { 0, 0, 0, 0 } + }; + int opt = 0; +@@ -586,6 +588,10 @@ + show_version = 1; + break; + ++ case 'c': ++ clock_source = atoi (optarg); ++ break; ++ + default: + fprintf (stderr, "unknown option character %c\n", + optopt); +diff -ur jack-audio-connection-kit-0.100.7/libjack/client.c jack/libjack/client.c +--- jack-audio-connection-kit-0.100.7/libjack/client.c 2005-09-11 02:58:43.000000000 +0300 ++++ jack/libjack/client.c 2005-12-06 16:21:12.000000000 +0200 +@@ -51,6 +51,10 @@ + + #include + JACK_TIME_GLOBAL_DECL; /* One instance per process. */ ++JACK_TIME_SOURCE_DECL; /* One instance per process. */ ++#ifdef JACK_TIME_FUNC_DECL ++JACK_TIME_FUNC_DECL; ++#endif + + #include "local.h" + +@@ -959,6 +963,13 @@ + + client->engine = (jack_control_t *) jack_shm_addr (&client->engine_shm); + ++ /* initialize clock source as early as possible */ ++#ifdef JACK_TIME_FUNC_DECL ++ jack_set_clock_source(client->engine->clock_source); ++#else ++ __jack_clock_source = client->engine->clock_source; ++#endif ++ + /* now attach the client control block */ + client->control_shm = res.client_shm; + if (jack_attach_shm (&client->control_shm)) { + diff --git a/sources b/sources index e69de29..892af0e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +bb25f7c1da5d488b70edcf39ff5a39b2 jack-audio-connection-kit-0.101.1.tar.gz From 73a1866e9b9d8d6d9cd302d8b7b82ace1d2fde4f Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sat, 27 May 2006 08:08:40 +0000 Subject: [PATCH 002/107] Remove optimization switcher. --- jack-audio-connection-kit.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index a29e026..511f0e0 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.101.1 -Release: 8%{?dist} +Release: 9%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -54,14 +54,10 @@ Small example clients that use the Jack Audio Connection Kit. # Also patch0 touches configure.ac. autoreconf --force --install -%configure --enable-stripped-jackd \ +%configure \ --with-html-dir=%{_docdir} \ -%ifarch i386 - --enable-sse=no --enable-mmx=no \ -%endif --disable-oss \ --disable-portaudio \ - --enable-optimize \ --with-default-tmpdir=/dev/shm make %{?_smp_mflags} @@ -123,6 +119,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_simple_client %changelog +* Sat May 27 2006 Andy Shevchenko 0.101.1-9 +- remove --enable-stripped-jackd and --enable-optimize (use default flags) + * Fri May 19 2006 Andy Shevchenko 0.101.1-8 - uniform directories items at %files section From b028bf1bb53ebfac6c85ec7ab2e48db022f17386 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 20 Jun 2006 11:29:31 +0000 Subject: [PATCH 003/107] Fix build requirements. --- jack-audio-connection-kit.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 511f0e0..2be4aef 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.101.1 -Release: 9%{?dist} +Release: 10%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -14,6 +14,7 @@ BuildRequires: libsndfile-devel >= 1.0.0 BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: readline-devel, libtermcap-devel, ncurses-devel +BuildRequires: autoconf >= 2.59, automake >= 1.9.3 %description JACK is a low-latency audio server, written primarily for the Linux @@ -119,6 +120,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_simple_client %changelog +* Tue Jun 20 2006 Andy Shevchenko 0.101.1-10 +- add BRs: autoconf, automake + (http://fedoraproject.org/wiki/QA/FixBuildRequires) + * Sat May 27 2006 Andy Shevchenko 0.101.1-9 - remove --enable-stripped-jackd and --enable-optimize (use default flags) From baeebbee059bbeaec6a38e248a20ecf48ea4705d Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 4 Jul 2006 15:49:30 +0000 Subject: [PATCH 004/107] Change URL, add libtool BR. --- jack-audio-connection-kit.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 2be4aef..9564b9a 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,20 +1,20 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.101.1 -Release: 10%{?dist} +Release: 11%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora Patch0: http://lalists.stanford.edu/lad/2006/01/att-0167/jack-clock3.patch -URL: http://jackit.sourceforge.net +URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel BuildRequires: libsndfile-devel >= 1.0.0 BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: readline-devel, libtermcap-devel, ncurses-devel -BuildRequires: autoconf >= 2.59, automake >= 1.9.3 +BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool %description JACK is a low-latency audio server, written primarily for the Linux @@ -120,6 +120,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_simple_client %changelog +* Tue Jul 04 2006 Andy Shevchenko 0.101.1-11 +- update URL +- add BR: libtool + * Tue Jun 20 2006 Andy Shevchenko 0.101.1-10 - add BRs: autoconf, automake (http://fedoraproject.org/wiki/QA/FixBuildRequires) From 251b512d5004e024a27313171fd35299527625ef Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 1 Aug 2006 15:20:47 +0000 Subject: [PATCH 005/107] Fix #200835 --- jack-audio-connection-kit.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 9564b9a..c45554e 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.101.1 -Release: 11%{?dist} +Release: 12%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -70,7 +70,7 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # prepare README.Fedora for documentation including -cp -p %{SOURCE1} README.Fedora +install -p -m644 %{SOURCE1} README.Fedora # remove extra install of the documentation rm -fr $RPM_BUILD_ROOT%{_docdir} @@ -120,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_simple_client %changelog +* Tue Aug 01 2006 Andy Shevchenko 0.101.1-12 +- use install instead of cp (#200835) + * Tue Jul 04 2006 Andy Shevchenko 0.101.1-11 - update URL - add BR: libtool From 96e19ab393df2555bb581d89f1762c4e8eefb587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 Aug 2006 20:32:08 +0000 Subject: [PATCH 006/107] http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild --- needs.rebuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild new file mode 100644 index 0000000..815fd29 --- /dev/null +++ b/needs.rebuild @@ -0,0 +1 @@ +http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From bdb2d3793e1e0028b0159d61ad95cd03390174a1 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 29 Aug 2006 13:00:40 +0000 Subject: [PATCH 007/107] mass rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index c45554e..199bac4 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.101.1 -Release: 12%{?dist} +Release: 13%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -120,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_simple_client %changelog +* Tue Aug 29 2006 Andy Shevchenko 0.101.1-13 +- http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild + * Tue Aug 01 2006 Andy Shevchenko 0.101.1-12 - use install instead of cp (#200835) From 99873ee2f1de09a3858032ecbb092964d0ba3aa2 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 30 Aug 2006 18:01:20 +0000 Subject: [PATCH 008/107] rebuilt --- needs.rebuild | 1 - 1 file changed, 1 deletion(-) delete mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From 34575da65adb63f7afe1af0a800400cdb13d98bc Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 11 Oct 2006 09:42:17 +0000 Subject: [PATCH 009/107] update to 0.102.20 --- .cvsignore | 2 +- jack-audio-connection-kit.spec | 11 +- jack-clock3.patch | 268 --------------------------------- sources | 2 +- 4 files changed, 8 insertions(+), 275 deletions(-) delete mode 100644 jack-clock3.patch diff --git a/.cvsignore b/.cvsignore index b80256d..c6a9984 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jack-audio-connection-kit-0.101.1.tar.gz +jack-audio-connection-kit-0.102.20.tar.gz diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 199bac4..67aa2c5 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,12 +1,11 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 0.101.1 -Release: 13%{?dist} +Version: 0.102.20 +Release: 1%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora -Patch0: http://lalists.stanford.edu/lad/2006/01/att-0167/jack-clock3.patch URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -48,11 +47,9 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q -%patch0 -p1 -b .clock3 %build # x86_64 issue reported by Rudolf Kastl (not checked, but not bad). -# Also patch0 touches configure.ac. autoreconf --force --install %configure \ @@ -120,6 +117,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_simple_client %changelog +* Wed Oct 11 2006 Andy Shevchenko 0.102.20-1 +- update to 0.102.20 +- drop patch0 (already in mainstream) + * Tue Aug 29 2006 Andy Shevchenko 0.101.1-13 - http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild diff --git a/jack-clock3.patch b/jack-clock3.patch deleted file mode 100644 index ffad0e6..0000000 --- a/jack-clock3.patch +++ /dev/null @@ -1,268 +0,0 @@ -diff -ur jack-audio-connection-kit-0.100.7/config/os/generic/time.h jack/config/os/generic/time.h ---- jack-audio-connection-kit-0.100.7/config/os/generic/time.h 2004-04-07 07:52:58.000000000 +0300 -+++ jack/config/os/generic/time.h 2005-12-06 12:24:03.000000000 +0200 -@@ -1,5 +1,6 @@ - /* - Copyright (C) 2001-2004 Paul Davis, Tilman Linneweh -+ Copyright (C) 2005 Jussi Laako - - Generic version, overridden by OS-specific definition when needed. - -@@ -23,48 +24,24 @@ - #define __jack_time_h__ - - #include -+#include - #include --#include -- --/* This is a kludge. We need one global instantiation of this -- * variable in each address space. So, libjack/client.c declares the -- * actual storage. Other source files will see it as an extern. */ --#define JACK_TIME_GLOBAL_DECL jack_time_t __jack_cpu_mhz --extern JACK_TIME_GLOBAL_DECL; - - static inline jack_time_t - jack_get_microseconds (void) { -- return get_cycles() / __jack_cpu_mhz; --} -+ jack_time_t jackTime; -+ struct timeval time; - --/* This function is inspired by similar code in MPLayer. -- * It should be quite portable -- */ --static inline jack_time_t --jack_get_mhz (void) --{ -- jack_time_t tsc_start, tsc_end; -- struct timeval tv_start, tv_end; -- long usec_delay; -- jack_time_t mhz; -- -- tsc_start = get_cycles(); -- gettimeofday(&tv_start, NULL); -- usleep(100000); -- tsc_end = get_cycles(); -- gettimeofday(&tv_end, NULL); -- -- usec_delay = 1000000 * (tv_end.tv_sec - tv_start.tv_sec) -- + (tv_end.tv_usec - tv_start.tv_usec); -- mhz = (tsc_end - tsc_start) / usec_delay; -- return mhz; -+ gettimeofday(&time, NULL); -+ jackTime = (jack_time_t) time.tv_sec * 1e6 + -+ (jack_time_t) time.tv_usec; -+ return jackTime; - } - - /* This should only be called ONCE per process. */ - static inline void - jack_init_time () - { -- __jack_cpu_mhz = jack_get_mhz (); - } - - #endif /* __jack_time_h__ */ -diff -ur jack-audio-connection-kit-0.100.7/config/os/gnu-linux/time.h jack/config/os/gnu-linux/time.h ---- jack-audio-connection-kit-0.100.7/config/os/gnu-linux/time.h 2004-03-25 21:31:44.000000000 +0200 -+++ jack/config/os/gnu-linux/time.h 2005-12-06 16:30:20.000000000 +0200 -@@ -1,5 +1,6 @@ - /* - Copyright (C) 2001-2003 Paul Davis -+ Copyright (C) 2005 Jussi Laako - - This is the GNU/Linux version. - -@@ -23,18 +24,35 @@ - #define __jack_time_h__ - - #include -+#include -+#include - #include - #include - --/* This is a kludge. We need one global instantiation of this -- * variable in each address space. So, libjack/client.c declares the -- * actual storage. Other source files will see it as an extern. */ -+/* This is a kludge. We need one global instantiation of these -+ * variables in each address space. So, libjack/client.c declares the -+ * actual storage. Other source files will see those as an externs. */ - #define JACK_TIME_GLOBAL_DECL jack_time_t __jack_cpu_mhz -+#define JACK_TIME_SOURCE_DECL int __jack_clock_source -+#define JACK_TIME_FUNC_DECL jack_time_t (*jack_get_microseconds) (void) - extern JACK_TIME_GLOBAL_DECL; -+extern JACK_TIME_SOURCE_DECL; -+extern JACK_TIME_FUNC_DECL; - --static inline jack_time_t --jack_get_microseconds (void) { -- return get_cycles() / __jack_cpu_mhz; -+static jack_time_t -+jack_get_microseconds0 (void) { -+ jack_time_t jackTime; -+ struct timespec time; -+ -+ clock_gettime(CLOCK_MONOTONIC, &time); -+ jackTime = (jack_time_t) time.tv_sec * 1e6 + -+ (jack_time_t) time.tv_nsec / 1e3; -+ return jackTime; -+} -+ -+static jack_time_t -+jack_get_microseconds1 (void) { -+ return get_cycles() / __jack_cpu_mhz; - } - - /* -@@ -94,4 +112,21 @@ - __jack_cpu_mhz = jack_get_mhz (); - } - -+/* Set time function. */ -+static inline void -+jack_set_clock_source (int clocksrc) -+{ -+ __jack_clock_source = clocksrc; -+ switch (__jack_clock_source) -+ { -+ case 1: -+ jack_get_microseconds = jack_get_microseconds1; -+ break; -+ case 0: -+ default: -+ jack_get_microseconds = jack_get_microseconds0; -+ break; -+ } -+} -+ - #endif /* __jack_time_h__ */ -diff -ur jack-audio-connection-kit-0.100.7/configure.ac jack/configure.ac ---- jack-audio-connection-kit-0.100.7/configure.ac 2005-10-30 13:01:31.000000000 +0200 -+++ jack/configure.ac 2005-12-06 14:13:09.000000000 +0200 -@@ -126,6 +126,7 @@ - AC_CHECK_FUNCS(on_exit atexit) - AC_CHECK_FUNCS(posix_memalign) - AC_CHECK_LIB(m, sin) -+AC_CHECK_FUNC(clock_gettime, [], AC_CHECK_LIB(rt, clock_gettime)) - - # should we use mlockall() on this platform? - if test "x$JACK_DO_NOT_MLOCK" = "x"; then -diff -ur jack-audio-connection-kit-0.100.7/jack/engine.h jack/jack/engine.h ---- jack-audio-connection-kit-0.100.7/jack/engine.h 2004-12-19 20:41:28.000000000 +0200 -+++ jack/jack/engine.h 2005-12-06 13:47:39.000000000 +0200 -@@ -169,6 +169,8 @@ - int jack_get_fifo_fd (jack_engine_t *engine, - unsigned int which_fifo); - -+extern int clock_source; -+ - extern jack_client_internal_t * - jack_client_internal_by_id (jack_engine_t *engine, jack_client_id_t id); - -diff -ur jack-audio-connection-kit-0.100.7/jack/internal.h jack/jack/internal.h ---- jack-audio-connection-kit-0.100.7/jack/internal.h 2005-08-22 23:48:24.000000000 +0300 -+++ jack/jack/internal.h 2005-12-06 13:50:48.000000000 +0200 -@@ -130,6 +130,7 @@ - jack_time_t sync_time_left; - jack_frame_timer_t frame_timer; - int32_t internal; -+ int clock_source; - pid_t engine_pid; - jack_nframes_t buffer_size; - int8_t real_time; -diff -ur jack-audio-connection-kit-0.100.7/jackd/engine.c jack/jackd/engine.c ---- jack-audio-connection-kit-0.100.7/jackd/engine.c 2005-06-15 12:18:40.000000000 +0300 -+++ jack/jackd/engine.c 2005-12-06 16:21:50.000000000 +0200 -@@ -78,6 +78,8 @@ - dlhandle handle; - } jack_driver_info_t; - -+int clock_source = 0; -+ - static int jack_port_assign_buffer (jack_engine_t *, - jack_port_internal_t *); - static jack_port_internal_t *jack_get_port_by_name (jack_engine_t *, -@@ -1679,6 +1681,13 @@ - engine->control->xrun_delayed_usecs = 0; - engine->control->max_delayed_usecs = 0; - -+#ifdef JACK_TIME_FUNC_DECL -+ jack_set_clock_source(clock_source); -+#else -+ __jack_clock_source = clock_source; -+#endif -+ engine->control->clock_source = clock_source; -+ - engine->control->frame_timer.frames = 0; - engine->control->frame_timer.reset_pending = 0; - engine->control->frame_timer.current_wakeup = 0; -diff -ur jack-audio-connection-kit-0.100.7/jackd/jackd.c jack/jackd/jackd.c ---- jack-audio-connection-kit-0.100.7/jackd/jackd.c 2005-06-15 12:18:40.000000000 +0300 -+++ jack/jackd/jackd.c 2005-12-06 13:52:15.000000000 +0200 -@@ -368,6 +368,7 @@ - " [ --verbose OR -v ]\n" - " [ --silent OR -s ]\n" - " [ --version OR -V ]\n" -+" [ --clock-source OR -c ]\n" - " -d driver [ ... driver args ... ]\n" - " where driver can be `alsa', `coreaudio', `dummy',\n" - " `oss' or `portaudio'\n\n" -@@ -463,7 +464,7 @@ - - { - jack_driver_desc_t * desc; -- const char *options = "-ad:P:uvshVRTFl:t:mn:p:"; -+ const char *options = "-ad:P:uvshVRTFl:t:mn:p:c:"; - struct option long_options[] = - { - { "driver", 1, 0, 'd' }, -@@ -479,6 +480,7 @@ - { "temporary", 0, 0, 'T' }, - { "version", 0, 0, 'V' }, - { "silent", 0, 0, 's' }, -+ { "clock-source", 1, 0, 'c' }, - { 0, 0, 0, 0 } - }; - int opt = 0; -@@ -586,6 +588,10 @@ - show_version = 1; - break; - -+ case 'c': -+ clock_source = atoi (optarg); -+ break; -+ - default: - fprintf (stderr, "unknown option character %c\n", - optopt); -diff -ur jack-audio-connection-kit-0.100.7/libjack/client.c jack/libjack/client.c ---- jack-audio-connection-kit-0.100.7/libjack/client.c 2005-09-11 02:58:43.000000000 +0300 -+++ jack/libjack/client.c 2005-12-06 16:21:12.000000000 +0200 -@@ -51,6 +51,10 @@ - - #include - JACK_TIME_GLOBAL_DECL; /* One instance per process. */ -+JACK_TIME_SOURCE_DECL; /* One instance per process. */ -+#ifdef JACK_TIME_FUNC_DECL -+JACK_TIME_FUNC_DECL; -+#endif - - #include "local.h" - -@@ -959,6 +963,13 @@ - - client->engine = (jack_control_t *) jack_shm_addr (&client->engine_shm); - -+ /* initialize clock source as early as possible */ -+#ifdef JACK_TIME_FUNC_DECL -+ jack_set_clock_source(client->engine->clock_source); -+#else -+ __jack_clock_source = client->engine->clock_source; -+#endif -+ - /* now attach the client control block */ - client->control_shm = res.client_shm; - if (jack_attach_shm (&client->control_shm)) { - diff --git a/sources b/sources index 892af0e..3cd0076 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb25f7c1da5d488b70edcf39ff5a39b2 jack-audio-connection-kit-0.101.1.tar.gz +d6881555a8b4c923b4ec706832f0d776 jack-audio-connection-kit-0.102.20.tar.gz From d6ab0f3599b8e1a9c2fd1881f41baff85bdb4863 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 11 Oct 2006 10:14:10 +0000 Subject: [PATCH 010/107] Possible fix build break --- jack-audio-connection-kit.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 67aa2c5..cad5a6a 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.102.20 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -92,7 +92,6 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_unload %{_bindir}/jack_bufsize %{_bindir}/jack_freewheel -%{_bindir}/jack_transport %{_libdir}/jack/ %{_mandir}/man1/jack*.1* %{_libdir}/libjack.so.* @@ -117,9 +116,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_simple_client %changelog -* Wed Oct 11 2006 Andy Shevchenko 0.102.20-1 +* Wed Oct 11 2006 Andy Shevchenko 0.102.20-2 - update to 0.102.20 - drop patch0 (already in mainstream) +- no pack jack_transport (build error) * Tue Aug 29 2006 Andy Shevchenko 0.101.1-13 - http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From 864e914cf993fd40eff1521df1435b4cd0401d4d Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 11 Oct 2006 11:33:41 +0000 Subject: [PATCH 011/107] Another build break fix. --- jack-audio-connection-kit.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index cad5a6a..7175cf1 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.102.20 -Release: 2%{?dist} +Release: 2.0%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -14,6 +14,7 @@ BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: readline-devel, libtermcap-devel, ncurses-devel BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool +#BuildRequires: libfreebob >= 1.0.0 %description JACK is a low-latency audio server, written primarily for the Linux @@ -114,12 +115,15 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_showtime %{_bindir}/jack_monitor_client %{_bindir}/jack_simple_client +%{_bindir}/jack_midiseq +%{_bindir}/jack_midisine %changelog -* Wed Oct 11 2006 Andy Shevchenko 0.102.20-2 +* Wed Oct 11 2006 Andy Shevchenko 0.102.20-2.0 - update to 0.102.20 - drop patch0 (already in mainstream) - no pack jack_transport (build error) +- pack new JACK MIDI files * Tue Aug 29 2006 Andy Shevchenko 0.101.1-13 - http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From e20b4a14ba4987cdcd1bb48062221cba6751b968 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 24 Oct 2006 08:52:48 +0000 Subject: [PATCH 012/107] close #211751 --- jack-audio-connection-kit.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 7175cf1..b151cba 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.102.20 -Release: 2.0%{?dist} +Release: 2.1%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -14,7 +14,7 @@ BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: readline-devel, libtermcap-devel, ncurses-devel BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool -#BuildRequires: libfreebob >= 1.0.0 +BuildRequires: libfreebob >= 1.0.0 %description JACK is a low-latency audio server, written primarily for the Linux @@ -55,6 +55,7 @@ autoreconf --force --install %configure \ --with-html-dir=%{_docdir} \ + --enable-freebob \ --disable-oss \ --disable-portaudio \ --with-default-tmpdir=/dev/shm @@ -119,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_midisine %changelog +* Tue Oct 24 2006 Andy Shevchenko 0.102.20-2.1 +- rebuild with libfreebob (should closed #211751) + * Wed Oct 11 2006 Andy Shevchenko 0.102.20-2.0 - update to 0.102.20 - drop patch0 (already in mainstream) From dff4fc9078aab73bb728eb550f8889752cb61a8f Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sat, 28 Oct 2006 08:24:53 +0000 Subject: [PATCH 013/107] fix BRs --- jack-audio-connection-kit.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index b151cba..26dd118 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.102.20 -Release: 2.1%{?dist} +Release: 3%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -14,7 +14,7 @@ BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: readline-devel, libtermcap-devel, ncurses-devel BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool -BuildRequires: libfreebob >= 1.0.0 +BuildRequires: libfreebob-devel >= 1.0.0 %description JACK is a low-latency audio server, written primarily for the Linux @@ -120,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_midisine %changelog +* Sat Oct 28 2006 Andy Shevchenko 0.102.20-3 +- fix BuildRequires: libfreebob -> libfreebob-devel + * Tue Oct 24 2006 Andy Shevchenko 0.102.20-2.1 - rebuild with libfreebob (should closed #211751) From b71da60bd0d78070aad6bf210e938e4dc49cd885 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 7 Mar 2007 15:19:46 +0000 Subject: [PATCH 014/107] Fix two bugs. --- jack-audio-connection-kit.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 26dd118..8648831 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.102.20 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -12,10 +12,16 @@ BuildRequires: alsa-lib-devel BuildRequires: libsndfile-devel >= 1.0.0 BuildRequires: pkgconfig BuildRequires: doxygen -BuildRequires: readline-devel, libtermcap-devel, ncurses-devel +BuildRequires: readline-devel, ncurses-devel BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool BuildRequires: libfreebob-devel >= 1.0.0 +%define uid 334 +%define username jackuser + +Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd +Requires(postun): /usr/sbin/userdel /usr/sbin/groupdel + %description JACK is a low-latency audio server, written primarily for the Linux operating system. It can connect a number of different applications to @@ -81,6 +87,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %clean rm -rf $RPM_BUILD_ROOT +%pre +/usr/sbin/groupadd %uid -r %username &>/dev/null || : + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -120,6 +129,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_midisine %changelog +* Wed Mar 07 2007 Andy Shevchenko 0.102.20-4 +- drop libtermcap-devel build requirement (#231203) +- create special jackuser group (#221785) + * Sat Oct 28 2006 Andy Shevchenko 0.102.20-3 - fix BuildRequires: libfreebob -> libfreebob-devel From 6e3f3c68c01acf799c6d0700aef26ee684082063 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 7 Mar 2007 21:24:44 +0000 Subject: [PATCH 015/107] Spec cleanup, --- jack-audio-connection-kit.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 8648831..0cf6c0a 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -16,11 +16,10 @@ BuildRequires: readline-devel, ncurses-devel BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool BuildRequires: libfreebob-devel >= 1.0.0 -%define uid 334 -%define username jackuser +%define gid 334 +%define groupname jackuser -Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd -Requires(postun): /usr/sbin/userdel /usr/sbin/groupdel +Requires(pre): /usr/sbin/groupadd %description JACK is a low-latency audio server, written primarily for the Linux @@ -88,7 +87,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -rf $RPM_BUILD_ROOT %pre -/usr/sbin/groupadd %uid -r %username &>/dev/null || : +/usr/sbin/groupadd -g %gid -r %groupname &>/dev/null || : %post -p /sbin/ldconfig From e7094a260a467d256955392d7e0bd9f6cdc2b081 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 23 May 2007 12:21:27 +0000 Subject: [PATCH 016/107] - update to the last official release - append defaults to the limits.conf (#221785) --- .cvsignore | 2 +- jack-audio-connection-kit.spec | 20 +++++++++++++++++--- sources | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index c6a9984..35f3826 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jack-audio-connection-kit-0.102.20.tar.gz +jack-audio-connection-kit-0.103.0.tar.gz diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 0cf6c0a..b4e9c12 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 0.102.20 -Release: 4%{?dist} +Version: 0.103.0 +Release: 1%{?dist} License: GPL/LGPL Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz @@ -20,6 +20,7 @@ BuildRequires: libfreebob-devel >= 1.0.0 %define groupname jackuser Requires(pre): /usr/sbin/groupadd +Requires(post): /sbin/ldconfig %description JACK is a low-latency audio server, written primarily for the Linux @@ -89,7 +90,16 @@ rm -rf $RPM_BUILD_ROOT %pre /usr/sbin/groupadd -g %gid -r %groupname &>/dev/null || : -%post -p /sbin/ldconfig +%post +/sbin/ldconfig + +# Add default limits for jackuser group +grep -q jackuser /etc/security/limits.conf || cat >> /etc/security/limits.conf << EOF + +## Automatically appended by jack-audio-connection-kit +* jackuser rtprio 20 +* jackuser memlock 4194304 +EOF %postun -p /sbin/ldconfig @@ -128,6 +138,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/jack_midisine %changelog +* Wed May 23 2007 Andy Shevchenko 0.103.0-1 +- update to the last official release +- append defaults to the limits.conf (#221785) + * Wed Mar 07 2007 Andy Shevchenko 0.102.20-4 - drop libtermcap-devel build requirement (#231203) - create special jackuser group (#221785) diff --git a/sources b/sources index 3cd0076..f212561 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d6881555a8b4c923b4ec706832f0d776 jack-audio-connection-kit-0.102.20.tar.gz +03a0f63b997ce7b83a1eeaa6b80f4388 jack-audio-connection-kit-0.103.0.tar.gz From 01c7221f16f99ef23ec2a2872c268c255d3c069b Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 23 May 2007 13:14:52 +0000 Subject: [PATCH 017/107] Fix limits.conf syntax. --- jack-audio-connection-kit.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index b4e9c12..53bc479 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -97,8 +97,8 @@ rm -rf $RPM_BUILD_ROOT grep -q jackuser /etc/security/limits.conf || cat >> /etc/security/limits.conf << EOF ## Automatically appended by jack-audio-connection-kit -* jackuser rtprio 20 -* jackuser memlock 4194304 +@jackuser - rtprio 20 +@jackuser - memlock 4194304 EOF %postun -p /sbin/ldconfig @@ -140,7 +140,7 @@ EOF %changelog * Wed May 23 2007 Andy Shevchenko 0.103.0-1 - update to the last official release -- append defaults to the limits.conf (#221785) +- append defaults to the limits.conf (#221785, #235624) * Wed Mar 07 2007 Andy Shevchenko 0.102.20-4 - drop libtermcap-devel build requirement (#231203) From 4ba380eef70092eeb619b64107066dd29735b3cd Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 16 Aug 2007 09:25:34 +0000 Subject: [PATCH 018/107] Fix according to new guidelines. --- jack-audio-connection-kit.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 53bc479..b304c81 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,8 +1,8 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.103.0 -Release: 1%{?dist} -License: GPL/LGPL +Release: 2%{?dist} +License: GPLv2 and LGPLv2.1 Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora @@ -16,10 +16,9 @@ BuildRequires: readline-devel, ncurses-devel BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool BuildRequires: libfreebob-devel >= 1.0.0 -%define gid 334 %define groupname jackuser -Requires(pre): /usr/sbin/groupadd +Requires(pre): shadow-utils Requires(post): /sbin/ldconfig %description @@ -88,7 +87,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -rf $RPM_BUILD_ROOT %pre -/usr/sbin/groupadd -g %gid -r %groupname &>/dev/null || : +getent group %groupname >/dev/null || groupadd -r %groupname +exit 0 %post /sbin/ldconfig @@ -138,6 +138,11 @@ EOF %{_bindir}/jack_midisine %changelog +* Thu Aug 16 2007 Andy Shevchenko 0.103.0-2 +- fix according to new guidelines: + - License tag + - group creation + * Wed May 23 2007 Andy Shevchenko 0.103.0-1 - update to the last official release - append defaults to the limits.conf (#221785, #235624) From ae735f9da36c70e725f2ea960325be488275fd9b Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 16 Aug 2007 13:42:02 +0000 Subject: [PATCH 019/107] Fix typo --- jack-audio-connection-kit.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index b304c81..9bacf64 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,8 +1,8 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.103.0 -Release: 2%{?dist} -License: GPLv2 and LGPLv2.1 +Release: 3%{?dist} +License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora @@ -138,7 +138,7 @@ EOF %{_bindir}/jack_midisine %changelog -* Thu Aug 16 2007 Andy Shevchenko 0.103.0-2 +* Thu Aug 16 2007 Andy Shevchenko 0.103.0-3 - fix according to new guidelines: - License tag - group creation From aa38a4c007ec0b9df1c138461c1e0fe83b176297 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 4 Sep 2007 09:47:12 +0000 Subject: [PATCH 020/107] Fix SF's URL scheme --- jack-audio-connection-kit.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 9bacf64..15e5a17 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,10 +1,10 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.103.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons -Source0: http://dl.sourceforge.net/sourceforge/jackit/%{name}-%{version}.tar.gz +Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -94,7 +94,7 @@ exit 0 /sbin/ldconfig # Add default limits for jackuser group -grep -q jackuser /etc/security/limits.conf || cat >> /etc/security/limits.conf << EOF +grep -q %groupname /etc/security/limits.conf || cat >> /etc/security/limits.conf << EOF ## Automatically appended by jack-audio-connection-kit @jackuser - rtprio 20 @@ -138,6 +138,9 @@ EOF %{_bindir}/jack_midisine %changelog +* Tue Sep 04 2007 Andy Shevchenko 0.103.0-4 +- fix Source Forge's URL scheme + * Thu Aug 16 2007 Andy Shevchenko 0.103.0-3 - fix according to new guidelines: - License tag From d7dcd722fe856593b0492ace3f9719d12c375627 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sun, 21 Oct 2007 06:37:22 +0000 Subject: [PATCH 021/107] Should fix #341621 --- jack-audio-connection-kit.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 15e5a17..f51a98f 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.103.0 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz @@ -83,6 +83,9 @@ rm -fr $RPM_BUILD_ROOT%{_docdir} rm -f $RPM_BUILD_ROOT%{_libdir}/jack/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +# Fix timestamps to avoid multiarch conflicts +find doc/reference -type f | xargs touch -r doc/reference.doxygen.in + %clean rm -rf $RPM_BUILD_ROOT @@ -138,6 +141,9 @@ EOF %{_bindir}/jack_midisine %changelog +* Sat Oct 20 2007 Andy Shevchenko 0.103.0-5 +- fix timestamps to avoid multiarch conflicts (#341621) + * Tue Sep 04 2007 Andy Shevchenko 0.103.0-4 - fix Source Forge's URL scheme From 46becfaa628c4bce1df6758e93f3c84e1e8e844c Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 21 Jan 2008 12:04:18 +0000 Subject: [PATCH 022/107] Update to 0.109.0 --- .cvsignore | 2 +- jack-audio-connection-kit.spec | 19 +++++++++++++------ sources | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index 35f3826..a2bae1f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jack-audio-connection-kit-0.103.0.tar.gz +jack-audio-connection-kit-0.109.0.tar.gz diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index f51a98f..7292bdb 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 0.103.0 -Release: 5%{?dist} +Version: 0.109.0 +Release: 1%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz @@ -90,18 +90,18 @@ find doc/reference -type f | xargs touch -r doc/reference.doxygen.in rm -rf $RPM_BUILD_ROOT %pre -getent group %groupname >/dev/null || groupadd -r %groupname +getent group %groupname > /dev/null || groupadd -r %groupname exit 0 %post /sbin/ldconfig # Add default limits for jackuser group -grep -q %groupname /etc/security/limits.conf || cat >> /etc/security/limits.conf << EOF +grep -q %groupname /etc/security/limits.conf > /dev/null 2>&1 || cat >> /etc/security/limits.conf << EOF ## Automatically appended by jack-audio-connection-kit -@jackuser - rtprio 20 -@jackuser - memlock 4194304 +@%groupname - rtprio 20 +@%groupname - memlock 4194304 EOF %postun -p /sbin/ldconfig @@ -129,18 +129,25 @@ EOF %files example-clients %defattr(-,root,root) %{_bindir}/jackrec +%{_bindir}/jack_alias %{_bindir}/jack_connect %{_bindir}/jack_disconnect +%{_bindir}/jack_evmon %{_bindir}/jack_impulse_grabber %{_bindir}/jack_lsp %{_bindir}/jack_metro %{_bindir}/jack_showtime +%{_bindir}/jack_transport %{_bindir}/jack_monitor_client %{_bindir}/jack_simple_client %{_bindir}/jack_midiseq %{_bindir}/jack_midisine %changelog +* Mon Jan 21 2008 Andy Shevchenko 0.109.0-1 +- update to the last official release (#429162) +- shut up the postinstall script (#359291) + * Sat Oct 20 2007 Andy Shevchenko 0.103.0-5 - fix timestamps to avoid multiarch conflicts (#341621) diff --git a/sources b/sources index f212561..9fa28ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -03a0f63b997ce7b83a1eeaa6b80f4388 jack-audio-connection-kit-0.103.0.tar.gz +f5aa904ca4fb76603634bf90e6ee0828 jack-audio-connection-kit-0.109.0.tar.gz From 8d2c34b0d998dc6e90f61445d2d941a9e55a0d64 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 14 Feb 2008 10:26:40 +0000 Subject: [PATCH 023/107] Update to 0.109.2 --- .cvsignore | 2 +- jack-audio-connection-kit.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index a2bae1f..2459abd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jack-audio-connection-kit-0.109.0.tar.gz +jack-audio-connection-kit-0.109.2.tar.gz diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 7292bdb..09ad1d3 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,6 +1,6 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 0.109.0 +Version: 0.109.2 Release: 1%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons @@ -144,6 +144,9 @@ EOF %{_bindir}/jack_midisine %changelog +* Wed Feb 13 2008 Andy Shevchenko 0.109.2-1 +- update to the last official release + * Mon Jan 21 2008 Andy Shevchenko 0.109.0-1 - update to the last official release (#429162) - shut up the postinstall script (#359291) diff --git a/sources b/sources index 9fa28ea..755c4cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f5aa904ca4fb76603634bf90e6ee0828 jack-audio-connection-kit-0.109.0.tar.gz +4d8f795a6c566b9753a86038367e7e32 jack-audio-connection-kit-0.109.2.tar.gz From f9802fa58c5020babf288bb0315587c5a3515d2b Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 14 Feb 2008 10:32:27 +0000 Subject: [PATCH 024/107] rebuild --- jack-audio-connection-kit.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 09ad1d3..83897c9 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.109.2 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz @@ -144,7 +144,7 @@ EOF %{_bindir}/jack_midisine %changelog -* Wed Feb 13 2008 Andy Shevchenko 0.109.2-1 +* Wed Feb 13 2008 Andy Shevchenko 0.109.2-1.1 - update to the last official release * Mon Jan 21 2008 Andy Shevchenko 0.109.0-1 From 84586aebcd90321c5ee8a78787f4d14facc19ef0 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sun, 20 Jul 2008 15:17:12 +0000 Subject: [PATCH 025/107] Fix #455193, #451531 --- ...udio-connection-kit-0.109.2-bz451531.patch | 21 ++++++ jack-audio-connection-kit-README.Fedora | 67 ++++++++++++++++++- jack-audio-connection-kit.spec | 10 ++- 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 jack-audio-connection-kit-0.109.2-bz451531.patch diff --git a/jack-audio-connection-kit-0.109.2-bz451531.patch b/jack-audio-connection-kit-0.109.2-bz451531.patch new file mode 100644 index 0000000..759218b --- /dev/null +++ b/jack-audio-connection-kit-0.109.2-bz451531.patch @@ -0,0 +1,21 @@ +--- config/cpu/powerpc/cycles.h.orig 2006-05-26 04:45:16.000000000 +0200 ++++ config/cpu/powerpc/cycles.h 2008-03-08 18:15:19.000000000 +0100 +@@ -36,16 +36,8 @@ + { + cycles_t ret = 0; + +- __asm__ __volatile__( +- "98: mftb %0\n" +- "99:\n" +- ".section __ftr_fixup,\"a\"\n" +- " .long %1\n" +- " .long 0\n" +- " .long 98b\n" +- " .long 99b\n" +- ".previous" +- : "=r" (ret) : "i" (CPU_FTR_601)); ++ __asm__ __volatile__("mftbl %0" : "=r" (ret)); ++ + return ret; + } + diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index 0da075c..000031b 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -1,4 +1,69 @@ -Running JACK server in realtime mode. + INTEGRATE JACK WITH PULSEAUDIO + +The original text is placed at: + http://www.harald-hoyer.de/linux/pulseaudio-and-jackd + +Switch to root account. + +Install the required packages: + yum install pulseaudio-module-jack alsa-plugins-jack jack-audio-connection-kit + +Add yourself to the pulse-rt and jackuser groups. + usermod -a -G pulse-rt,jackaudio "" + +Edit /etc/security/limits.conf: + +@jackuser - rtprio 20 +@jackuser - memlock 4194304 +@pulse-rt - rtprio 20 +@pulse-rt - nice -20 + +Switch to your normal user account. + +Create ~/bin subdirectory if absent: + mkdir -p ~/bin + +Create the pulseaudio start file ~/bin/jack.pa: + +#!/usr/bin/pulseaudio -nF + +load-module module-jack-sink +load-module module-jack-source + +load-module module-native-protocol-unix +load-module module-volume-restore +load-module module-default-device-restore +load-module module-rescue-streams +load-module module-suspend-on-idle +.ifexists module-gconf.so +.nofail +load-module module-gconf +.fail +.endif +.ifexists module-x11-publish.so +.nofail +load-module module-x11-publish +.fail +.endif + +Close all your sessions and relogin to get the new group permissions and +limits. + +Kill the current pulseaudio daemon: + killall pulseaudio + +Start the jack daemon (your parameters may be different): + jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0 + +Start the pulseaudio daemon: + pulseaudio -nF ~/bin/jack.pa + +Now everything should work. + +Next chapter describes steps for older Fedora vesions. + + + RUNNING JACK SERVER IN REALTIME MODE The JACK server jackd has the capability to run in a real-time mode which greatly decreases the chance of audio glitches. The real-time mode diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 83897c9..27729b7 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,11 +1,12 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.109.2 -Release: 1%{?dist}.1 +Release: 2%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora +Patch0: jack-audio-connection-kit-0.109.2-bz451531.patch URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -53,6 +54,9 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q +%ifarch ppc64 +%patch0 -p0 -b .bz451531 +%endif %build # x86_64 issue reported by Rudolf Kastl (not checked, but not bad). @@ -144,6 +148,10 @@ EOF %{_bindir}/jack_midisine %changelog +* Sun Jul 20 2008 Andy Shevchenko 0.109.2-2 +- apply patch to be work on ppc64 (#451531) +- update README.Fedora to describe integration jack with pulseaudio (#455193) + * Wed Feb 13 2008 Andy Shevchenko 0.109.2-1.1 - update to the last official release From 6e8b94cc7e44198315fa948cb2505443896b54bf Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 28 Jul 2008 18:20:36 +0000 Subject: [PATCH 026/107] Improve pulseaudio support. Fix postinstall script again (#456830) --- jack-audio-connection-kit-README.Fedora | 27 ++++--------------------- jack-audio-connection-kit-script.pa | 20 ++++++++++++++++++ jack-audio-connection-kit.spec | 24 +++++++++++++++++++++- 3 files changed, 47 insertions(+), 24 deletions(-) create mode 100644 jack-audio-connection-kit-script.pa diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index 000031b..c25e4a0 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -11,7 +11,7 @@ Install the required packages: Add yourself to the pulse-rt and jackuser groups. usermod -a -G pulse-rt,jackaudio "" -Edit /etc/security/limits.conf: +Check /etc/security/limits.conf (our package should provide these changes): @jackuser - rtprio 20 @jackuser - memlock 4194304 @@ -23,28 +23,9 @@ Switch to your normal user account. Create ~/bin subdirectory if absent: mkdir -p ~/bin -Create the pulseaudio start file ~/bin/jack.pa: - -#!/usr/bin/pulseaudio -nF - -load-module module-jack-sink -load-module module-jack-source - -load-module module-native-protocol-unix -load-module module-volume-restore -load-module module-default-device-restore -load-module module-rescue-streams -load-module module-suspend-on-idle -.ifexists module-gconf.so -.nofail -load-module module-gconf -.fail -.endif -.ifexists module-x11-publish.so -.nofail -load-module module-x11-publish -.fail -.endif +Copy the pulseaudio start file: + cp /usr/share/doc/jack-audio-connection-kit-*/jack-audio-connection-kit.pa ~/bin/jack.pa + chmod 755 ~/bin/jack.pa Close all your sessions and relogin to get the new group permissions and limits. diff --git a/jack-audio-connection-kit-script.pa b/jack-audio-connection-kit-script.pa new file mode 100644 index 0000000..21d376f --- /dev/null +++ b/jack-audio-connection-kit-script.pa @@ -0,0 +1,20 @@ +#!/usr/bin/pulseaudio -nF + +load-module module-jack-sink +load-module module-jack-source + +load-module module-native-protocol-unix +load-module module-volume-restore +load-module module-default-device-restore +load-module module-rescue-streams +load-module module-suspend-on-idle +.ifexists module-gconf.so +.nofail +load-module module-gconf +.fail +.endif +.ifexists module-x11-publish.so +.nofail +load-module module-x11-publish +.fail +.endif diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 27729b7..5477141 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,11 +1,12 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.109.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora +Source2: %{name}-script.pa Patch0: jack-audio-connection-kit-0.109.2-bz451531.patch URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -18,9 +19,11 @@ BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool BuildRequires: libfreebob-devel >= 1.0.0 %define groupname jackuser +%define pagroup pulse-rt Requires(pre): shadow-utils Requires(post): /sbin/ldconfig +Requires(post): pam %description JACK is a low-latency audio server, written primarily for the Linux @@ -80,6 +83,9 @@ make install DESTDIR=$RPM_BUILD_ROOT # prepare README.Fedora for documentation including install -p -m644 %{SOURCE1} README.Fedora +# install pulseaudio script for jack (as documentation part) +install -p -m644 %{SOURCE2} jack-audio-connection-kit.pa + # remove extra install of the documentation rm -fr $RPM_BUILD_ROOT%{_docdir} @@ -108,12 +114,21 @@ grep -q %groupname /etc/security/limits.conf > /dev/null 2>&1 || cat >> /etc/sec @%groupname - memlock 4194304 EOF +# Add default limits for pulse-rt group +grep -q %pagroup /etc/security/limits.conf > /dev/null 2>&1 || cat >> /etc/security/limits.conf << EOF + +## Automatically appended by jack-audio-connection-kit +@%pagroup - rtprio 20 +@%pagroup - nice -20 +EOF + %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc AUTHORS TODO COPYING* %doc README.Fedora +%doc jack-audio-connection-kit.pa %{_bindir}/jackd %{_bindir}/jack_load %{_bindir}/jack_unload @@ -148,6 +163,13 @@ EOF %{_bindir}/jack_midisine %changelog +* Mon Jul 28 2008 Andy Shevchenko 0.109.2-3 +- add a new requirement to be ensure we have /etc/security for postinstall + script (#359291, #456830) +- provide a pulseaudio start script from README.Fedora +- append values for pulse-rt group to the limits.conf +- update README.Fedora regarding to the recent changes + * Sun Jul 20 2008 Andy Shevchenko 0.109.2-2 - apply patch to be work on ppc64 (#451531) - update README.Fedora to describe integration jack with pulseaudio (#455193) From 4bee82a9c082be5c52ddb15b70f02edc4279a5d9 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sun, 9 Nov 2008 15:36:11 +0000 Subject: [PATCH 027/107] Fix typos in README.Fedora --- jack-audio-connection-kit-README.Fedora | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index c25e4a0..538fd2c 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -9,7 +9,7 @@ Install the required packages: yum install pulseaudio-module-jack alsa-plugins-jack jack-audio-connection-kit Add yourself to the pulse-rt and jackuser groups. - usermod -a -G pulse-rt,jackaudio "" + usermod -a -G pulse-rt,jackuser "" Check /etc/security/limits.conf (our package should provide these changes): @@ -37,15 +37,15 @@ Start the jack daemon (your parameters may be different): jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0 Start the pulseaudio daemon: - pulseaudio -nF ~/bin/jack.pa + ~/bin/jack.pa Now everything should work. -Next chapter describes steps for older Fedora vesions. - RUNNING JACK SERVER IN REALTIME MODE +NOTE: this chapter describes steps for older Fedora vesions. + The JACK server jackd has the capability to run in a real-time mode which greatly decreases the chance of audio glitches. The real-time mode is enabled by passing the -R or --realtime option to jackd when starting From dbd1fcf49dd62ff914794b4f33b9f915ba43e007 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sat, 15 Nov 2008 14:33:06 +0000 Subject: [PATCH 028/107] Update README.Fedora: add link to configure jack+alsa, mention qjackctl. --- jack-audio-connection-kit-README.Fedora | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index 538fd2c..23a590b 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -31,10 +31,13 @@ Close all your sessions and relogin to get the new group permissions and limits. Kill the current pulseaudio daemon: - killall pulseaudio + pulseaudio -k Start the jack daemon (your parameters may be different): jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0 +or use + qjackctl -s +if you have it installed and configured. Start the pulseaudio daemon: ~/bin/jack.pa @@ -42,6 +45,14 @@ Start the pulseaudio daemon: Now everything should work. + USING ALSA DIRECTLY + +Due to big amount of text lines and a few necessary graphics here is only link +to very useful article about jack-audio-connection-kit and ALSA. So, go by +following link: + http://www.legg.uklinux.net/rosegarden_sound_howto_fc7.html + + RUNNING JACK SERVER IN REALTIME MODE NOTE: this chapter describes steps for older Fedora vesions. From 2469867b1beb79b261ba3e002fdd805c6cbc2d3c Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 15 Dec 2008 18:27:18 +0000 Subject: [PATCH 029/107] Update to last release --- .cvsignore | 2 +- ...udio-connection-kit-0.109.2-bz451531.patch | 21 ------------------- jack-audio-connection-kit.spec | 19 ++++++++++------- sources | 2 +- 4 files changed, 13 insertions(+), 31 deletions(-) delete mode 100644 jack-audio-connection-kit-0.109.2-bz451531.patch diff --git a/.cvsignore b/.cvsignore index 2459abd..1865750 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jack-audio-connection-kit-0.109.2.tar.gz +jack-audio-connection-kit-0.116.1.tar.gz diff --git a/jack-audio-connection-kit-0.109.2-bz451531.patch b/jack-audio-connection-kit-0.109.2-bz451531.patch deleted file mode 100644 index 759218b..0000000 --- a/jack-audio-connection-kit-0.109.2-bz451531.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- config/cpu/powerpc/cycles.h.orig 2006-05-26 04:45:16.000000000 +0200 -+++ config/cpu/powerpc/cycles.h 2008-03-08 18:15:19.000000000 +0100 -@@ -36,16 +36,8 @@ - { - cycles_t ret = 0; - -- __asm__ __volatile__( -- "98: mftb %0\n" -- "99:\n" -- ".section __ftr_fixup,\"a\"\n" -- " .long %1\n" -- " .long 0\n" -- " .long 98b\n" -- " .long 99b\n" -- ".previous" -- : "=r" (ret) : "i" (CPU_FTR_601)); -+ __asm__ __volatile__("mftbl %0" : "=r" (ret)); -+ - return ret; - } - diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 5477141..655e142 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,13 +1,12 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 0.109.2 -Release: 3%{?dist} +Version: 0.116.1 +Release: 1%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons -Source0: http://downloads.sourceforge.net/jackit/%{name}-%{version}.tar.gz +Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora Source2: %{name}-script.pa -Patch0: jack-audio-connection-kit-0.109.2-bz451531.patch URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -57,9 +56,6 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q -%ifarch ppc64 -%patch0 -p0 -b .bz451531 -%endif %build # x86_64 issue reported by Rudolf Kastl (not checked, but not bad). @@ -132,17 +128,18 @@ EOF %{_bindir}/jackd %{_bindir}/jack_load %{_bindir}/jack_unload -%{_bindir}/jack_bufsize %{_bindir}/jack_freewheel %{_libdir}/jack/ %{_mandir}/man1/jack*.1* %{_libdir}/libjack.so.* +%{_libdir}/libjackserver.so.* %files devel %defattr(-,root,root) %doc doc/reference %{_includedir}/jack/ %{_libdir}/libjack.so +%{_libdir}/libjackserver.so %{_libdir}/pkgconfig/jack.pc %files example-clients @@ -159,10 +156,16 @@ EOF %{_bindir}/jack_transport %{_bindir}/jack_monitor_client %{_bindir}/jack_simple_client +%{_bindir}/jack_transport_client %{_bindir}/jack_midiseq %{_bindir}/jack_midisine %changelog +* Sun Dec 14 2008 Andy Shevchenko - 0.116.1-1 +- update to last official release +- update URL tag +- update file list accordingly + * Mon Jul 28 2008 Andy Shevchenko 0.109.2-3 - add a new requirement to be ensure we have /etc/security for postinstall script (#359291, #456830) diff --git a/sources b/sources index 755c4cf..b64b72d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4d8f795a6c566b9753a86038367e7e32 jack-audio-connection-kit-0.109.2.tar.gz +f2aeb463466084dfdc0ba4360b4998aa jack-audio-connection-kit-0.116.1.tar.gz From d4b2bf2c49e60e9d8df5f4cf9b79dba269a897aa Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 29 Dec 2008 21:57:27 +0000 Subject: [PATCH 030/107] Fix multiarch conflicts again (#477718) --- jack-audio-connection-kit-no_date_footer.html | 5 +++++ jack-audio-connection-kit.spec | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 jack-audio-connection-kit-no_date_footer.html diff --git a/jack-audio-connection-kit-no_date_footer.html b/jack-audio-connection-kit-no_date_footer.html new file mode 100644 index 0000000..6c9f46b --- /dev/null +++ b/jack-audio-connection-kit-no_date_footer.html @@ -0,0 +1,5 @@ +
Generated for $projectname by  + +doxygen$doxygenversion
+ + diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 655e142..6899329 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,12 +1,13 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.116.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora Source2: %{name}-script.pa +Source3: %{name}-no_date_footer.html URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -24,6 +25,9 @@ Requires(pre): shadow-utils Requires(post): /sbin/ldconfig Requires(post): pam +# To fix multilib conflicts take a basepoint as following +%define doxyfile doc/reference.doxygen.in + %description JACK is a low-latency audio server, written primarily for the Linux operating system. It can connect a number of different applications to @@ -57,6 +61,14 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q +# Put custom HTML_FOOTER to avoid timestamp inside +# (recipe was taken from http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks) +cp %{SOURCE3} doc/no_date_footer.html +# Fix Doxyfile - apply custom html footer +sed -e 's,^HTML_FOOTER[ \t]*=.*,HTML_FOOTER = no_date_footer.html,' %{doxyfile} > %{doxyfile}.new +touch -r %{doxyfile} %{doxyfile}.new +mv -f %{doxyfile}.new %{doxyfile} + %build # x86_64 issue reported by Rudolf Kastl (not checked, but not bad). autoreconf --force --install @@ -90,7 +102,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/jack/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.la # Fix timestamps to avoid multiarch conflicts -find doc/reference -type f | xargs touch -r doc/reference.doxygen.in +find doc/reference -type f | xargs touch -r %{doxyfile} %clean rm -rf $RPM_BUILD_ROOT @@ -161,6 +173,9 @@ EOF %{_bindir}/jack_midisine %changelog +* Mon Dec 29 2008 Andy Shevchenko - 0.116.1-2 +- fix multiarch conflict again (#477718, #341621) + * Sun Dec 14 2008 Andy Shevchenko - 0.116.1-1 - update to last official release - update URL tag From 0ea5b9bcd94ca4c3f88c3d29e62ebddfe57d81b0 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sun, 4 Jan 2009 16:55:53 +0000 Subject: [PATCH 031/107] Temporary fix for #477402 --- jack-audio-connection-kit.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 6899329..d7cc549 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.116.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz @@ -64,8 +64,11 @@ Small example clients that use the Jack Audio Connection Kit. # Put custom HTML_FOOTER to avoid timestamp inside # (recipe was taken from http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks) cp %{SOURCE3} doc/no_date_footer.html -# Fix Doxyfile - apply custom html footer -sed -e 's,^HTML_FOOTER[ \t]*=.*,HTML_FOOTER = no_date_footer.html,' %{doxyfile} > %{doxyfile}.new +# Fix Doxyfile: +# - apply custom html footer (#477718, #341621) +# - avoid font packaging (workaround for #477402, fix will come with #478747) +sed -e 's,^HTML_FOOTER[ \t]*=.*,HTML_FOOTER = no_date_footer.html,; + s,^GENERATE_LATEX[ \t]*=.*,GENERATE_LATEX = NO,;' %{doxyfile} > %{doxyfile}.new touch -r %{doxyfile} %{doxyfile}.new mv -f %{doxyfile}.new %{doxyfile} @@ -173,6 +176,9 @@ EOF %{_bindir}/jack_midisine %changelog +* Sun Jan 04 2009 Andy Shevchenko - 0.116.1-3 +- avoid creation of the LaTeX documentation (temporary fix for #477402) + * Mon Dec 29 2008 Andy Shevchenko - 0.116.1-2 - fix multiarch conflict again (#477718, #341621) From 519e42f5fb4e9b26705466a5d71e4caff0425101 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 08:33:04 +0000 Subject: [PATCH 032/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index d7cc549..ef1f4c0 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.116.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz @@ -176,6 +176,9 @@ EOF %{_bindir}/jack_midisine %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 0.116.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Sun Jan 04 2009 Andy Shevchenko - 0.116.1-3 - avoid creation of the LaTeX documentation (temporary fix for #477402) From a8e113a47461ea65c057814c2221f0c8c3d5adbb Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sun, 21 Jun 2009 11:19:57 +0000 Subject: [PATCH 033/107] Fix #506583 --- jack-audio-connection-kit-README.Fedora | 9 +----- jack-audio-connection-kit-limits.conf | 7 +++++ jack-audio-connection-kit.spec | 38 +++++++++++-------------- 3 files changed, 24 insertions(+), 30 deletions(-) create mode 100644 jack-audio-connection-kit-limits.conf diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index 23a590b..c2fe63f 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -11,20 +11,13 @@ Install the required packages: Add yourself to the pulse-rt and jackuser groups. usermod -a -G pulse-rt,jackuser "" -Check /etc/security/limits.conf (our package should provide these changes): - -@jackuser - rtprio 20 -@jackuser - memlock 4194304 -@pulse-rt - rtprio 20 -@pulse-rt - nice -20 - Switch to your normal user account. Create ~/bin subdirectory if absent: mkdir -p ~/bin Copy the pulseaudio start file: - cp /usr/share/doc/jack-audio-connection-kit-*/jack-audio-connection-kit.pa ~/bin/jack.pa + cp /usr/share/doc/jack-audio-connection-kit-*/jack.pa ~/bin/jack.pa chmod 755 ~/bin/jack.pa Close all your sessions and relogin to get the new group permissions and diff --git a/jack-audio-connection-kit-limits.conf b/jack-audio-connection-kit-limits.conf new file mode 100644 index 0000000..8208083 --- /dev/null +++ b/jack-audio-connection-kit-limits.conf @@ -0,0 +1,7 @@ +# Default limits for users of jack-audio-connection-kit + +@@groupname@ - rtprio 20 +@@groupname@ - memlock 4194304 + +@@pagroup@ - rtprio 20 +@@pagroup@ - nice -20 diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index ef1f4c0..cb59160 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,13 +1,14 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.116.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz Source1: %{name}-README.Fedora Source2: %{name}-script.pa Source3: %{name}-no_date_footer.html +Source4: %{name}-limits.conf URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -23,7 +24,7 @@ BuildRequires: libfreebob-devel >= 1.0.0 Requires(pre): shadow-utils Requires(post): /sbin/ldconfig -Requires(post): pam +Requires: pam # To fix multilib conflicts take a basepoint as following %define doxyfile doc/reference.doxygen.in @@ -91,11 +92,16 @@ rm -rf $RPM_BUILD_ROOT # added to it and messes up part of the install make install DESTDIR=$RPM_BUILD_ROOT +# install our limits to the /etc/security/limits.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d +sed -e 's,@groupname@,%groupname,g; s,@pagroup@,%pagroup,g;' \ + %{SOURCE4} > $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/99-jack.conf + # prepare README.Fedora for documentation including install -p -m644 %{SOURCE1} README.Fedora # install pulseaudio script for jack (as documentation part) -install -p -m644 %{SOURCE2} jack-audio-connection-kit.pa +install -p -m644 %{SOURCE2} jack.pa # remove extra install of the documentation rm -fr $RPM_BUILD_ROOT%{_docdir} @@ -114,24 +120,7 @@ rm -rf $RPM_BUILD_ROOT getent group %groupname > /dev/null || groupadd -r %groupname exit 0 -%post -/sbin/ldconfig - -# Add default limits for jackuser group -grep -q %groupname /etc/security/limits.conf > /dev/null 2>&1 || cat >> /etc/security/limits.conf << EOF - -## Automatically appended by jack-audio-connection-kit -@%groupname - rtprio 20 -@%groupname - memlock 4194304 -EOF - -# Add default limits for pulse-rt group -grep -q %pagroup /etc/security/limits.conf > /dev/null 2>&1 || cat >> /etc/security/limits.conf << EOF - -## Automatically appended by jack-audio-connection-kit -@%pagroup - rtprio 20 -@%pagroup - nice -20 -EOF +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -139,7 +128,7 @@ EOF %defattr(-,root,root) %doc AUTHORS TODO COPYING* %doc README.Fedora -%doc jack-audio-connection-kit.pa +%doc jack.pa %{_bindir}/jackd %{_bindir}/jack_load %{_bindir}/jack_unload @@ -148,6 +137,7 @@ EOF %{_mandir}/man1/jack*.1* %{_libdir}/libjack.so.* %{_libdir}/libjackserver.so.* +%{_sysconfdir}/security/limits.d/*.conf %files devel %defattr(-,root,root) @@ -176,6 +166,10 @@ EOF %{_bindir}/jack_midisine %changelog +* Sun Jun 21 2009 Andy Shevchenko - 0.116.1-5 +- create file under /etc/security/limits.d instead of limits.conf hack (#506583) +- rename jack-audio-connection-kit.pa to jack.pa in the documentation part + * Wed Feb 25 2009 Fedora Release Engineering - 0.116.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 02d1d882aeec782218507dc0092c43b63029b728 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 03:46:01 +0000 Subject: [PATCH 034/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index cb59160..35b4b2d 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.116.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz @@ -166,6 +166,9 @@ exit 0 %{_bindir}/jack_midisine %changelog +* Fri Jul 24 2009 Fedora Release Engineering - 0.116.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Sun Jun 21 2009 Andy Shevchenko - 0.116.1-5 - create file under /etc/security/limits.d instead of limits.conf hack (#506583) - rename jack-audio-connection-kit.pa to jack.pa in the documentation part From b0b21bb6154541350592224f751341f96495acc2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 27 Oct 2009 20:18:44 +0000 Subject: [PATCH 035/107] donbt build libfreebob support on s390 --- jack-audio-connection-kit.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 35b4b2d..ac6aaee 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 0.116.1 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz @@ -17,7 +17,9 @@ BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: readline-devel, ncurses-devel BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool +%ifnarch s390 s390x BuildRequires: libfreebob-devel >= 1.0.0 +%endif %define groupname jackuser %define pagroup pulse-rt @@ -79,7 +81,9 @@ autoreconf --force --install %configure \ --with-html-dir=%{_docdir} \ +%ifnarch s390 s390x --enable-freebob \ +%endif --disable-oss \ --disable-portaudio \ --with-default-tmpdir=/dev/shm @@ -166,6 +170,9 @@ exit 0 %{_bindir}/jack_midisine %changelog +* Tue Oct 27 2009 Dennis Gilmore - 0.116.1-7 +- dont build libfreebob support on s390 arches + * Fri Jul 24 2009 Fedora Release Engineering - 0.116.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 555ce5f711e9bfba0fc36b7b6e70c57b2ca1a383 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 4 Nov 2009 20:48:51 +0000 Subject: [PATCH 036/107] 0.116.2, fix segfaults due to unclosed threads --- ...ection-kit-0.116.1-cleanup-mb-thread.patch | 35 +++++++++++++++++++ jack-audio-connection-kit.spec | 11 ++++-- sources | 2 +- 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch diff --git a/jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch b/jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch new file mode 100644 index 0000000..47bcf78 --- /dev/null +++ b/jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch @@ -0,0 +1,35 @@ +--- jack-audio-connection-kit-0.116.1/libjack/client.c.cleanup-mb-thread 2009-11-04 14:48:04.686074485 -0500 ++++ jack-audio-connection-kit-0.116.1/libjack/client.c 2009-11-04 14:48:40.198074109 -0500 +@@ -970,6 +970,7 @@ jack_client_open_aux (const char *client + /* validate parameters */ + if ((options & ~JackOpenOptions)) { + *status |= (JackFailure|JackInvalidOption); ++ jack_messagebuffer_exit (); + return NULL; + } + +@@ -984,6 +985,7 @@ jack_client_open_aux (const char *client + */ + if (jack_get_tmpdir ()) { + *status |= JackFailure; ++ jack_messagebuffer_exit (); + return NULL; + } + +@@ -994,6 +996,7 @@ jack_client_open_aux (const char *client + + if (jack_request_client (ClientExternal, client_name, options, status, + &va, &res, &req_fd)) { ++ jack_messagebuffer_exit (); + return NULL; + } + +@@ -1088,6 +1091,8 @@ jack_client_open_aux (const char *client + return client; + + fail: ++ jack_messagebuffer_exit (); ++ + if (client->engine) { + jack_release_shm (&client->engine_shm); + client->engine = 0; diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index ac6aaee..9228289 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,7 +1,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 0.116.1 -Release: 7%{?dist} +Version: 0.116.2 +Release: 1%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz @@ -9,6 +9,7 @@ Source1: %{name}-README.Fedora Source2: %{name}-script.pa Source3: %{name}-no_date_footer.html Source4: %{name}-limits.conf +Patch0: jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -64,6 +65,8 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q +%patch0 -p1 -b .cleanup-mb-thread + # Put custom HTML_FOOTER to avoid timestamp inside # (recipe was taken from http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks) cp %{SOURCE3} doc/no_date_footer.html @@ -170,6 +173,10 @@ exit 0 %{_bindir}/jack_midisine %changelog +* Wed Nov 4 2009 Tom "spot" Callaway - 0.116.2-8 +- update to 0.116.2 +- make sure we cleanup threads that we open, fixes segfaults (thanks to Ray Strode) + * Tue Oct 27 2009 Dennis Gilmore - 0.116.1-7 - dont build libfreebob support on s390 arches diff --git a/sources b/sources index b64b72d..e5113ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f2aeb463466084dfdc0ba4360b4998aa jack-audio-connection-kit-0.116.1.tar.gz +9c0ae9880e9b6e081f1a238fe6a28bd5 jack-audio-connection-kit-0.116.2.tar.gz From a9836155c25eef4611e2a7ef64500c7678a87f8a Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sat, 21 Nov 2009 19:50:01 +0000 Subject: [PATCH 037/107] Update to 0.118.0 (fix #533419) --- .cvsignore | 2 +- ...ection-kit-0.116.1-cleanup-mb-thread.patch | 35 ------------------- jack-audio-connection-kit.spec | 14 +++++--- sources | 2 +- 4 files changed, 12 insertions(+), 41 deletions(-) delete mode 100644 jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch diff --git a/.cvsignore b/.cvsignore index 1865750..6e87eb9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jack-audio-connection-kit-0.116.1.tar.gz +jack-audio-connection-kit-0.118.0.tar.gz diff --git a/jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch b/jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch deleted file mode 100644 index 47bcf78..0000000 --- a/jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- jack-audio-connection-kit-0.116.1/libjack/client.c.cleanup-mb-thread 2009-11-04 14:48:04.686074485 -0500 -+++ jack-audio-connection-kit-0.116.1/libjack/client.c 2009-11-04 14:48:40.198074109 -0500 -@@ -970,6 +970,7 @@ jack_client_open_aux (const char *client - /* validate parameters */ - if ((options & ~JackOpenOptions)) { - *status |= (JackFailure|JackInvalidOption); -+ jack_messagebuffer_exit (); - return NULL; - } - -@@ -984,6 +985,7 @@ jack_client_open_aux (const char *client - */ - if (jack_get_tmpdir ()) { - *status |= JackFailure; -+ jack_messagebuffer_exit (); - return NULL; - } - -@@ -994,6 +996,7 @@ jack_client_open_aux (const char *client - - if (jack_request_client (ClientExternal, client_name, options, status, - &va, &res, &req_fd)) { -+ jack_messagebuffer_exit (); - return NULL; - } - -@@ -1088,6 +1091,8 @@ jack_client_open_aux (const char *client - return client; - - fail: -+ jack_messagebuffer_exit (); -+ - if (client->engine) { - jack_release_shm (&client->engine_shm); - client->engine = 0; diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 9228289..7d50600 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,6 +1,6 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 0.116.2 +Version: 0.118.0 Release: 1%{?dist} License: GPLv2 and LGPLv2 Group: System Environment/Daemons @@ -9,7 +9,6 @@ Source1: %{name}-README.Fedora Source2: %{name}-script.pa Source3: %{name}-no_date_footer.html Source4: %{name}-limits.conf -Patch0: jack-audio-connection-kit-0.116.1-cleanup-mb-thread.patch URL: http://www.jackaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -65,8 +64,6 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q -%patch0 -p1 -b .cleanup-mb-thread - # Put custom HTML_FOOTER to avoid timestamp inside # (recipe was taken from http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks) cp %{SOURCE3} doc/no_date_footer.html @@ -158,14 +155,18 @@ exit 0 %defattr(-,root,root) %{_bindir}/jackrec %{_bindir}/jack_alias +%{_bindir}/jack_bufsize %{_bindir}/jack_connect %{_bindir}/jack_disconnect %{_bindir}/jack_evmon %{_bindir}/jack_impulse_grabber %{_bindir}/jack_lsp %{_bindir}/jack_metro +%{_bindir}/jack_netsource +%{_bindir}/jack_samplerate %{_bindir}/jack_showtime %{_bindir}/jack_transport +%{_bindir}/jack_wait %{_bindir}/jack_monitor_client %{_bindir}/jack_simple_client %{_bindir}/jack_transport_client @@ -173,6 +174,11 @@ exit 0 %{_bindir}/jack_midisine %changelog +* Sat Nov 21 2009 Andy Shevchenko - 0.118.0-1 +- update to 0.118.0 (should fix #533419) +- remove upstreamed patch +- append new binaries to -example-clients subpackage + * Wed Nov 4 2009 Tom "spot" Callaway - 0.116.2-8 - update to 0.116.2 - make sure we cleanup threads that we open, fixes segfaults (thanks to Ray Strode) diff --git a/sources b/sources index e5113ba..e5be2fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9c0ae9880e9b6e081f1a238fe6a28bd5 jack-audio-connection-kit-0.116.2.tar.gz +d58e29a55f285d54e75134cec8e02a10 jack-audio-connection-kit-0.118.0.tar.gz From acdb66fd59a6d648f2e5a16915636d0904de55b4 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:41:09 +0000 Subject: [PATCH 038/107] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cd97b40..aec9dbf 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: jack-audio-connection-kit -# $Id$ +# $Id: Makefile,v 1.1 2006/05/26 17:14:15 andriy Exp $ NAME := jack-audio-connection-kit SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 387a56dc36a3b3b4cfc0de6530196d1fa5556bee Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Tue, 20 Jul 2010 05:53:44 +0000 Subject: [PATCH 039/107] - Jack 2! --- .cvsignore | 2 +- jack-DSO-linking.patch | 11 + jack-audio-connection-kit-no_date_footer.html | 5 - ...-audio-connection-kit-no_date_footer.patch | 22 + jack-audio-connection-kit.spec | 209 +- jack-celt08.patch | 30 + jack-infrastructure.patch | 3365 +++++++++++++++++ jack-manpages.patch | 1215 ++++++ jack-realtime-compat.patch | 56 + sources | 2 +- 10 files changed, 4827 insertions(+), 90 deletions(-) create mode 100644 jack-DSO-linking.patch delete mode 100644 jack-audio-connection-kit-no_date_footer.html create mode 100644 jack-audio-connection-kit-no_date_footer.patch create mode 100644 jack-celt08.patch create mode 100644 jack-infrastructure.patch create mode 100644 jack-manpages.patch create mode 100644 jack-realtime-compat.patch diff --git a/.cvsignore b/.cvsignore index 6e87eb9..8545362 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jack-audio-connection-kit-0.118.0.tar.gz +jack-1.9.5.tar.bz2 diff --git a/jack-DSO-linking.patch b/jack-DSO-linking.patch new file mode 100644 index 0000000..855e82f --- /dev/null +++ b/jack-DSO-linking.patch @@ -0,0 +1,11 @@ +--- jack-1.9.5/wscript~ 2010-02-12 05:58:08.000000000 -0500 ++++ jack-1.9.5/wscript 2010-05-18 14:14:27.000000000 -0400 +@@ -230,6 +230,8 @@ + print Logs.colors.NORMAL, + print + ++ conf.env.append_unique('LINKFLAGS', '-lm -lstdc++') ++ + if Options.options.mixed == True: + env_variant2 = conf.env.copy() + conf.set_env_name('lib32', env_variant2) diff --git a/jack-audio-connection-kit-no_date_footer.html b/jack-audio-connection-kit-no_date_footer.html deleted file mode 100644 index 6c9f46b..0000000 --- a/jack-audio-connection-kit-no_date_footer.html +++ /dev/null @@ -1,5 +0,0 @@ -
Generated for $projectname by  - -doxygen$doxygenversion
- - diff --git a/jack-audio-connection-kit-no_date_footer.patch b/jack-audio-connection-kit-no_date_footer.patch new file mode 100644 index 0000000..8509ee5 --- /dev/null +++ b/jack-audio-connection-kit-no_date_footer.patch @@ -0,0 +1,22 @@ +diff -rupN jack-1.9.5.old/doxyfile jack-1.9.5/doxyfile +--- jack-1.9.5.old/doxyfile 2010-02-12 05:57:30.000000000 -0500 ++++ jack-1.9.5/doxyfile 2010-07-19 23:18:57.000000000 -0400 +@@ -413,7 +413,7 @@ HTML_HEADER = + # each generated HTML page. If it is left blank doxygen will generate a + # standard footer. + +-HTML_FOOTER = ++HTML_FOOTER = no_date_footer.html + + # The HTML_STYLESHEET tag can be used to specify a user defined cascading + # style sheet that is used by each HTML page. It can be used to +diff -rupN jack-1.9.5.old/no_date_footer.html jack-1.9.5/no_date_footer.html +--- jack-1.9.5.old/no_date_footer.html 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/no_date_footer.html 2010-07-19 23:19:19.000000000 -0400 +@@ -0,0 +1,6 @@ ++
++Generated for $projectname by doxygen ++$doxygenversion
++ ++ diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 7d50600..1ffc83b 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,42 +1,56 @@ -Summary: The Jack Audio Connection Kit -Name: jack-audio-connection-kit -Version: 0.118.0 -Release: 1%{?dist} -License: GPLv2 and LGPLv2 -Group: System Environment/Daemons -Source0: http://www.jackaudio.org/downloads/%{name}-%{version}.tar.gz -Source1: %{name}-README.Fedora -Source2: %{name}-script.pa -Source3: %{name}-no_date_footer.html -Source4: %{name}-limits.conf -URL: http://www.jackaudio.org -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%global groupname jackuser +%global pagroup pulse-rt + +Summary: The Jack Audio Connection Kit +Name: jack-audio-connection-kit +Version: 1.9.5 +Release: 1%{?dist} +# The entire source (~500 files) is a mixture of these three licenses +License: GPLv2 and GPLv2+ and LGPLv2+ +Group: System Environment/Daemons +URL: http://www.jackaudio.org +Source0: http://www.grame.fr/~letz/jack-%{version}.tar.bz2 +Source1: %{name}-README.Fedora +Source2: %{name}-script.pa +Source3: %{name}-limits.conf +# No-date-footer hack to remove dates from doxygen documentation +Patch0: jack-audio-connection-kit-no_date_footer.patch +# Enables renaming of the jack ports based on a configuration file +# Under discussion upstream. We need it for CCRMA compatibility +Patch1: jack-infrastructure.patch +# Fix DSO linking +Patch2: jack-DSO-linking.patch +# Manpages. From ustream trunk +Patch3: jack-manpages.patch +# Make jack compatible with both the Fedora kernel and the realtime kernel +Patch4: jack-realtime-compat.patch +# Compile against celt-0.8.0 +Patch5: jack-celt08.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel -BuildRequires: libsndfile-devel >= 1.0.0 -BuildRequires: pkgconfig +BuildRequires: dbus-devel +BuildRequires: celt-devel BuildRequires: doxygen -BuildRequires: readline-devel, ncurses-devel -BuildRequires: autoconf >= 2.59, automake >= 1.9.3, libtool -%ifnarch s390 s390x -BuildRequires: libfreebob-devel >= 1.0.0 -%endif - -%define groupname jackuser -%define pagroup pulse-rt +BuildRequires: expat-devel +BuildRequires: libffado-devel +BuildRequires: libfreebob-devel +BuildRequires: libsamplerate-devel +BuildRequires: libsndfile-devel +BuildRequires: ncurses-devel +BuildRequires: pkgconfig +BuildRequires: python2 +BuildRequires: readline-devel Requires(pre): shadow-utils -Requires(post): /sbin/ldconfig -Requires: pam - -# To fix multilib conflicts take a basepoint as following -%define doxyfile doc/reference.doxygen.in +Requires: pam %description JACK is a low-latency audio server, written primarily for the Linux operating system. It can connect a number of different applications to an audio device, as well as allowing them to share audio between -themselves. Its clients can run in their own processes (ie. as a -normal application), or can they can run within a JACK server (ie. a +themselves. Its clients can run in their own processes (i.e. as a +normal application), or can they can run within a JACK server (i.e. a "plugin"). JACK is different from other audio server efforts in that it has been @@ -45,61 +59,58 @@ work. This means that it focuses on two key areas: synchronous execution of all clients, and low latency operation. %package devel -Summary: Header files for Jack -Group: Development/Libraries -Requires: %{name} = %{version} -Requires: pkgconfig +Summary: Header files for Jack +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig %description devel Header files for the Jack Audio Connection Kit. %package example-clients -Summary: Example clients that use Jack -Group: Applications/Multimedia -Requires: %{name} = %{version} +Summary: Example clients that use Jack +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} %description example-clients Small example clients that use the Jack Audio Connection Kit. %prep -%setup -q - -# Put custom HTML_FOOTER to avoid timestamp inside -# (recipe was taken from http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks) -cp %{SOURCE3} doc/no_date_footer.html -# Fix Doxyfile: -# - apply custom html footer (#477718, #341621) -# - avoid font packaging (workaround for #477402, fix will come with #478747) -sed -e 's,^HTML_FOOTER[ \t]*=.*,HTML_FOOTER = no_date_footer.html,; - s,^GENERATE_LATEX[ \t]*=.*,GENERATE_LATEX = NO,;' %{doxyfile} > %{doxyfile}.new -touch -r %{doxyfile} %{doxyfile}.new -mv -f %{doxyfile}.new %{doxyfile} +%setup -q -n jack-%{version} +%patch0 -p1 -b .nodate +%patch1 -p1 -b .infra +%patch2 -p1 -b .linking +%patch3 -p1 +%patch4 -p1 +%if 0%{?fedora} > 13 +%patch5 -p1 -b .celt08 +%endif -%build -# x86_64 issue reported by Rudolf Kastl (not checked, but not bad). -autoreconf --force --install +# Fix encoding issues +for file in ChangeLog README TODO; do + sed 's|\r||' $file > $file.tmp + iconv -f ISO-8859-1 -t UTF8 $file.tmp > $file.tmp2 + touch -r $file $file.tmp2 + mv -f $file.tmp2 $file +done -%configure \ - --with-html-dir=%{_docdir} \ -%ifnarch s390 s390x - --enable-freebob \ -%endif - --disable-oss \ - --disable-portaudio \ - --with-default-tmpdir=/dev/shm -make %{?_smp_mflags} +%build +export CPPFLAGS="$RPM_OPT_FLAGS" +./waf configure --prefix=%{_prefix} --libdir=/%{_lib} --doxygen --dbus --classic +./waf build %{?_smp_mflags} -v %install rm -rf $RPM_BUILD_ROOT +./waf --destdir=$RPM_BUILD_ROOT install -# can't use the makeinstall macro, jack needs DESTDIR and prefix gets -# added to it and messes up part of the install -make install DESTDIR=$RPM_BUILD_ROOT +# move doxygen documentation to the right place +mv $RPM_BUILD_ROOT%{_datadir}/jack-audio-connection-kit/reference . +rm -rf $RPM_BUILD_ROOT%{_datadir}/jack-audio-connection-kit # install our limits to the /etc/security/limits.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d sed -e 's,@groupname@,%groupname,g; s,@pagroup@,%pagroup,g;' \ - %{SOURCE4} > $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/99-jack.conf + %{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/99-jack.conf # prepare README.Fedora for documentation including install -p -m644 %{SOURCE1} README.Fedora @@ -107,15 +118,11 @@ install -p -m644 %{SOURCE1} README.Fedora # install pulseaudio script for jack (as documentation part) install -p -m644 %{SOURCE2} jack.pa -# remove extra install of the documentation -rm -fr $RPM_BUILD_ROOT%{_docdir} - -# remove *.la files -rm -f $RPM_BUILD_ROOT%{_libdir}/jack/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +# For compatibility with jack1 +mv $RPM_BUILD_ROOT%{_bindir}/jack_rec $RPM_BUILD_ROOT%{_bindir}/jackrec -# Fix timestamps to avoid multiarch conflicts -find doc/reference -type f | xargs touch -r %{doxyfile} +# Fix permissions of the modules +chmod 755 $RPM_BUILD_ROOT%{_libdir}/jack/*.so $RPM_BUILD_ROOT%{_libdir}/libjack*.so.*.*.* %clean rm -rf $RPM_BUILD_ROOT @@ -129,37 +136,56 @@ exit 0 %postun -p /sbin/ldconfig %files -%defattr(-,root,root) -%doc AUTHORS TODO COPYING* +%defattr(-,root,root,-) +%doc ChangeLog README README_NETJACK2 TODO %doc README.Fedora %doc jack.pa +%{_bindir}/alsa_in +%{_bindir}/alsa_out %{_bindir}/jackd %{_bindir}/jack_load %{_bindir}/jack_unload %{_bindir}/jack_freewheel +%exclude %{_bindir}/jackdbus +%exclude %{_bindir}/jack_control +%{_bindir}/jack_cpu +%{_bindir}/jack_cpu_load +%{_bindir}/jack_delay +%{_bindir}/jack_server_control +%{_bindir}/jack_test +%{_bindir}/jack_thru +%{_bindir}/jack_zombie +%{_datadir}/dbus-1/services/org.jackaudio.service %{_libdir}/jack/ -%{_mandir}/man1/jack*.1* %{_libdir}/libjack.so.* %{_libdir}/libjackserver.so.* -%{_sysconfdir}/security/limits.d/*.conf +%config(noreplace) %{_sysconfdir}/security/limits.d/*.conf +%{_mandir}/man1/alsa_*.1* +%{_mandir}/man1/jack_freewheel*.1* +%{_mandir}/man1/jack_load*.1* +%{_mandir}/man1/jack_unload*.1* +%{_mandir}/man1/jackd*.1* + %files devel -%defattr(-,root,root) -%doc doc/reference +%defattr(-,root,root,-) +%doc reference/* %{_includedir}/jack/ %{_libdir}/libjack.so %{_libdir}/libjackserver.so %{_libdir}/pkgconfig/jack.pc %files example-clients -%defattr(-,root,root) +%defattr(-,root,root,-) %{_bindir}/jackrec %{_bindir}/jack_alias %{_bindir}/jack_bufsize %{_bindir}/jack_connect %{_bindir}/jack_disconnect %{_bindir}/jack_evmon -%{_bindir}/jack_impulse_grabber +# These are not ready yet +#{_bindir}/jack_impulse_grabber +%exclude %{_mandir}/man1/jack_impulse_grabber.1* %{_bindir}/jack_lsp %{_bindir}/jack_metro %{_bindir}/jack_netsource @@ -169,11 +195,28 @@ exit 0 %{_bindir}/jack_wait %{_bindir}/jack_monitor_client %{_bindir}/jack_simple_client -%{_bindir}/jack_transport_client %{_bindir}/jack_midiseq %{_bindir}/jack_midisine +%{_bindir}/jack_multiple_metro +%{_mandir}/man1/jack_bufsize.1* +%{_mandir}/man1/jack_connect.1* +%{_mandir}/man1/jack_disconnect.1* +%{_mandir}/man1/jack_lsp.1* +%{_mandir}/man1/jack_metro.1* +%{_mandir}/man1/jack_monitor_client.1* +%{_mandir}/man1/jack_netsource.1* +%{_mandir}/man1/jack_samplerate.1* +%{_mandir}/man1/jack_showtime.1* +%{_mandir}/man1/jack_simple_client.1* +%{_mandir}/man1/jack_transport.1* +%{_mandir}/man1/jack_wait.1* +%{_mandir}/man1/jackrec.1* + %changelog +* Mon Jul 19 2010 Orcan Ogetbil - 1.9.5-1 +- Jack 2! + * Sat Nov 21 2009 Andy Shevchenko - 0.118.0-1 - update to 0.118.0 (should fix #533419) - remove upstreamed patch @@ -274,7 +317,7 @@ exit 0 - remove --enable-stripped-jackd and --enable-optimize (use default flags) * Fri May 19 2006 Andy Shevchenko 0.101.1-8 -- uniform directories items at %files section +- uniform directories items at %%files section * Wed May 17 2006 Andy Shevchenko 0.101.1-7 - change License tag to GPL/LGPL diff --git a/jack-celt08.patch b/jack-celt08.patch new file mode 100644 index 0000000..e728c94 --- /dev/null +++ b/jack-celt08.patch @@ -0,0 +1,30 @@ +diff -rupN jack-1.9.5.old/common/JackNetOneDriver.cpp jack-1.9.5/common/JackNetOneDriver.cpp +--- jack-1.9.5.old/common/JackNetOneDriver.cpp 2010-02-12 05:57:48.000000000 -0500 ++++ jack-1.9.5/common/JackNetOneDriver.cpp 2010-07-20 01:26:44.000000000 -0400 +@@ -709,9 +709,9 @@ JackNetOneDriver::render_payload_to_jack + + CELTDecoder *decoder = (CELTDecoder *)src_node->data; + if( !packet_payload ) +- celt_decode_float( decoder, NULL, net_period_down, buf ); ++ celt_decode_float( decoder, NULL, net_period_down, buf, NULL ); + else +- celt_decode_float( decoder, packet_bufX, net_period_down, buf ); ++ celt_decode_float( decoder, packet_bufX, net_period_down, buf, NULL ); + + src_node = jack_slist_next (src_node); + } +diff -rupN jack-1.9.5.old/common/netjack_packet.c jack-1.9.5/common/netjack_packet.c +--- jack-1.9.5.old/common/netjack_packet.c 2010-02-12 05:57:47.000000000 -0500 ++++ jack-1.9.5/common/netjack_packet.c 2010-07-20 01:12:42.000000000 -0400 +@@ -1428,9 +1428,9 @@ render_payload_to_jack_ports_celt (void + + CELTDecoder *decoder = src_node->data; + if( !packet_payload ) +- celt_decode_float( decoder, NULL, net_period_down, buf ); ++ celt_decode_float( decoder, NULL, net_period_down, buf, NULL ); + else +- celt_decode_float( decoder, packet_bufX, net_period_down, buf ); ++ celt_decode_float( decoder, packet_bufX, net_period_down, buf, NULL ); + + src_node = jack_slist_next (src_node); + } diff --git a/jack-infrastructure.patch b/jack-infrastructure.patch new file mode 100644 index 0000000..ed825b6 --- /dev/null +++ b/jack-infrastructure.patch @@ -0,0 +1,3365 @@ +diff -rupN jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp jack-1.9.5/linux/alsa/JackAlsaDriver.cpp +--- jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp 2010-02-12 05:58:07.000000000 -0500 ++++ jack-1.9.5/linux/alsa/JackAlsaDriver.cpp 2010-07-20 00:17:44.000000000 -0400 +@@ -49,6 +49,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg + #include "generic.h" + #include "memops.h" + #include "JackServerGlobals.h" ++#include "port_names.h" + + + //#define DEBUG_WAKEUP 1 +@@ -2091,6 +2092,8 @@ int JackAlsaDriver::Attach() + + alsa_driver_t* alsa_driver = (alsa_driver_t*)fDriver; + ++ char **portnames; ++ + if (alsa_driver->has_hw_monitoring) + port_flags |= JackPortCanMonitor; + +@@ -2100,13 +2103,15 @@ int JackAlsaDriver::Attach() + + jack_log("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); + ++ portnames = port_names_get_portnames(alsa_driver); ++ + for (int i = 0; i < fCaptureChannels; i++) { +- snprintf(alias, sizeof(alias) - 1, "%s:capture_%u", fAliasName, i + 1); +- snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1); +- if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { ++ snprintf(alias, sizeof(alias) - 1, "system:%s", portnames[i]); ++ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, alias, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { + jack_error("driver: cannot register port for %s", name); + return -1; + } ++ free(portnames[i]); + port = fGraphManager->GetPort(port_index); + port->SetAlias(alias); + port->SetLatency(alsa_driver->frames_per_cycle + alsa_driver->capture_frame_latency); +@@ -2117,12 +2122,12 @@ int JackAlsaDriver::Attach() + port_flags = (unsigned long)PlaybackDriverFlags; + + for (int i = 0; i < fPlaybackChannels; i++) { +- snprintf(alias, sizeof(alias) - 1, "%s:playback_%u", fAliasName, i + 1); +- snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1); +- if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { ++ snprintf(alias, sizeof(alias) - 1, "system:%s", portnames[i+fCaptureChannels]); ++ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, alias, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { + jack_error("driver: cannot register port for %s", name); + return -1; + } ++ free(portnames[i+fCaptureChannels]); + port = fGraphManager->GetPort(port_index); + port->SetAlias(alias); + // Add one buffer more latency if "async" mode is used... +@@ -2145,6 +2150,8 @@ int JackAlsaDriver::Attach() + } + } + ++ free(portnames); ++ + if (alsa_driver->midi) { + int err = (alsa_driver->midi->attach)(alsa_driver->midi); + if (err) +diff -rupN jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp.orig jack-1.9.5/linux/alsa/JackAlsaDriver.cpp.orig +--- jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp.orig 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/linux/alsa/JackAlsaDriver.cpp.orig 2010-02-12 05:58:07.000000000 -0500 +@@ -0,0 +1,2981 @@ ++/* ++Copyright (C) 2001 Paul Davis ++Copyright (C) 2004 Grame ++ ++This program is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2 of the License, or ++(at your option) any later version. ++ ++This program is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with this program; if not, write to the Free Software ++Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++*/ ++ ++#define __STDC_FORMAT_MACROS // For inttypes.h to work in C++ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "JackAlsaDriver.h" ++#include "JackEngineControl.h" ++#include "JackClientControl.h" ++#include "JackPort.h" ++#include "JackGraphManager.h" ++#include "JackLockedEngine.h" ++#include "JackPosixThread.h" ++#include "JackCompilerDeps.h" ++#include "hammerfall.h" ++#include "hdsp.h" ++#include "ice1712.h" ++#include "usx2y.h" ++#include "generic.h" ++#include "memops.h" ++#include "JackServerGlobals.h" ++ ++ ++//#define DEBUG_WAKEUP 1 ++ ++namespace Jack ++{ ++ ++#define jack_get_microseconds GetMicroSeconds ++ ++/* Delay (in process calls) before jackd will report an xrun */ ++#define XRUN_REPORT_DELAY 0 ++ ++void ++JackAlsaDriver::alsa_driver_release_channel_dependent_memory (alsa_driver_t *driver) ++{ ++ bitset_destroy (&driver->channels_done); ++ bitset_destroy (&driver->channels_not_done); ++ ++ if (driver->playback_addr) { ++ free (driver->playback_addr); ++ driver->playback_addr = 0; ++ } ++ ++ if (driver->capture_addr) { ++ free (driver->capture_addr); ++ driver->capture_addr = 0; ++ } ++ ++ if (driver->playback_interleave_skip) { ++ free (driver->playback_interleave_skip); ++ driver->playback_interleave_skip = NULL; ++ } ++ ++ if (driver->capture_interleave_skip) { ++ free (driver->capture_interleave_skip); ++ driver->capture_interleave_skip = NULL; ++ } ++ ++ if (driver->silent) { ++ free (driver->silent); ++ driver->silent = 0; ++ } ++ ++ if (driver->dither_state) { ++ free (driver->dither_state); ++ driver->dither_state = 0; ++ } ++} ++ ++int ++JackAlsaDriver::alsa_driver_check_capabilities (alsa_driver_t *driver) ++{ ++ return 0; ++} ++ ++static ++char * ++get_control_device_name (const char * device_name) ++{ ++ char * ctl_name; ++ regex_t expression; ++ ++ regcomp(&expression, "(plug)?hw:[0-9](,[0-9])?", REG_ICASE | REG_EXTENDED); ++ ++ if (!regexec(&expression, device_name, 0, NULL, 0)) { ++ /* the user wants a hw or plughw device, the ctl name ++ * should be hw:x where x is the card number */ ++ ++ char tmp[5]; ++ strncpy(tmp, strstr(device_name, "hw"), 4); ++ tmp[4] = '\0'; ++ //jack_log("control device %s", tmp); ++ ctl_name = strdup(tmp); ++ } else { ++ ctl_name = strdup(device_name); ++ } ++ ++ regfree(&expression); ++ ++ if (ctl_name == NULL) { ++ jack_error("strdup(\"%s\") failed.", ctl_name); ++ } ++ ++ return ctl_name; ++} ++ ++int ++JackAlsaDriver::alsa_driver_check_card_type (alsa_driver_t *driver) ++{ ++ int err; ++ snd_ctl_card_info_t *card_info; ++ char * ctl_name; ++ ++ snd_ctl_card_info_alloca (&card_info); ++ ++ ctl_name = get_control_device_name(driver->alsa_name_playback); ++ ++ // XXX: I don't know the "right" way to do this. Which to use ++ // driver->alsa_name_playback or driver->alsa_name_capture. ++ if ((err = snd_ctl_open (&driver->ctl_handle, ctl_name, 0)) < 0) { ++ jack_error ("control open \"%s\" (%s)", ctl_name, ++ snd_strerror(err)); ++ return -1; ++ } ++ ++ if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) { ++ jack_error ("control hardware info \"%s\" (%s)", ++ driver->alsa_name_playback, snd_strerror (err)); ++ snd_ctl_close (driver->ctl_handle); ++ return -1; ++ } ++ ++ driver->alsa_driver = strdup(snd_ctl_card_info_get_driver (card_info)); ++ jack_info("Using ALSA driver %s running on card %i - %s", driver->alsa_driver, snd_ctl_card_info_get_card(card_info), snd_ctl_card_info_get_longname(card_info)); ++ ++ free(ctl_name); ++ ++ return alsa_driver_check_capabilities (driver); ++} ++ ++int ++JackAlsaDriver::alsa_driver_hammerfall_hardware (alsa_driver_t *driver) ++{ ++ driver->hw = jack_alsa_hammerfall_hw_new (driver); ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_hdsp_hardware (alsa_driver_t *driver) ++{ ++ driver->hw = jack_alsa_hdsp_hw_new (driver); ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_ice1712_hardware (alsa_driver_t *driver) ++{ ++ driver->hw = jack_alsa_ice1712_hw_new (driver); ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_usx2y_hardware (alsa_driver_t *driver) ++{ ++ // TODO : will need so deeped redesign ++ // driver->hw = jack_alsa_usx2y_hw_new (driver); ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_generic_hardware (alsa_driver_t *driver) ++{ ++ driver->hw = jack_alsa_generic_hw_new (driver); ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_hw_specific (alsa_driver_t *driver, int hw_monitoring, ++ int hw_metering) ++{ ++ int err; ++ ++ if (!strcmp(driver->alsa_driver, "RME9652")) { ++ if ((err = alsa_driver_hammerfall_hardware (driver)) != 0) { ++ return err; ++ } ++ } else if (!strcmp(driver->alsa_driver, "H-DSP")) { ++ if ((err = alsa_driver_hdsp_hardware (driver)) != 0) { ++ return err; ++ } ++ } else if (!strcmp(driver->alsa_driver, "ICE1712")) { ++ if ((err = alsa_driver_ice1712_hardware (driver)) != 0) { ++ return err; ++ } ++ } /*else if (!strcmp(driver->alsa_driver, "USB US-X2Y")) { ++ if ((err = alsa_driver_usx2y_hardware (driver)) != 0) { ++ return err; ++ } ++ } */else { ++ if ((err = alsa_driver_generic_hardware (driver)) != 0) { ++ return err; ++ } ++ } ++ ++ if (driver->hw->capabilities & Cap_HardwareMonitoring) { ++ driver->has_hw_monitoring = TRUE; ++ /* XXX need to ensure that this is really FALSE or ++ * TRUE or whatever*/ ++ driver->hw_monitoring = hw_monitoring; ++ } else { ++ driver->has_hw_monitoring = FALSE; ++ driver->hw_monitoring = FALSE; ++ } ++ ++ if (driver->hw->capabilities & Cap_ClockLockReporting) { ++ driver->has_clock_sync_reporting = TRUE; ++ } else { ++ driver->has_clock_sync_reporting = FALSE; ++ } ++ ++ if (driver->hw->capabilities & Cap_HardwareMetering) { ++ driver->has_hw_metering = TRUE; ++ driver->hw_metering = hw_metering; ++ } else { ++ driver->has_hw_metering = FALSE; ++ driver->hw_metering = FALSE; ++ } ++ ++ return 0; ++} ++ ++void ++JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) ++{ ++ if (driver->playback_handle) { ++ if (SND_PCM_FORMAT_FLOAT_LE == driver->playback_sample_format) { ++ if (driver->playback_interleaved) { ++ driver->channel_copy = memcpy_interleave_d32_s32; ++ } else { ++ driver->channel_copy = memcpy_fake; ++ } ++ driver->read_via_copy = sample_move_floatLE_sSs; ++ driver->write_via_copy = sample_move_dS_floatLE; ++ } else { ++ ++ switch (driver->playback_sample_bytes) { ++ case 2: ++ if (driver->playback_interleaved) { ++ driver->channel_copy = memcpy_interleave_d16_s16; ++ } else { ++ driver->channel_copy = memcpy_fake; ++ } ++ ++ switch (driver->dither) { ++ case Rectangular: ++ jack_info("Rectangular dithering at 16 bits"); ++ driver->write_via_copy = driver->quirk_bswap? ++ sample_move_dither_rect_d16_sSs: ++ sample_move_dither_rect_d16_sS; ++ break; ++ ++ case Triangular: ++ jack_info("Triangular dithering at 16 bits"); ++ driver->write_via_copy = driver->quirk_bswap? ++ sample_move_dither_tri_d16_sSs: ++ sample_move_dither_tri_d16_sS; ++ break; ++ ++ case Shaped: ++ jack_info("Noise-shaped dithering at 16 bits"); ++ driver->write_via_copy = driver->quirk_bswap? ++ sample_move_dither_shaped_d16_sSs: ++ sample_move_dither_shaped_d16_sS; ++ break; ++ ++ default: ++ driver->write_via_copy = driver->quirk_bswap? ++ sample_move_d16_sSs : ++ sample_move_d16_sS; ++ break; ++ } ++ break; ++ ++ case 3: /* NO DITHER */ ++ if (driver->playback_interleaved) { ++ driver->channel_copy = memcpy_interleave_d24_s24; ++ } else { ++ driver->channel_copy = memcpy_fake; ++ } ++ ++ driver->write_via_copy = driver->quirk_bswap? ++ sample_move_d24_sSs: ++ sample_move_d24_sS; ++ ++ break; ++ ++ case 4: /* NO DITHER */ ++ if (driver->playback_interleaved) { ++ driver->channel_copy = memcpy_interleave_d32_s32; ++ } else { ++ driver->channel_copy = memcpy_fake; ++ } ++ ++ driver->write_via_copy = driver->quirk_bswap? ++ sample_move_d32u24_sSs: ++ sample_move_d32u24_sS; ++ break; ++ ++ default: ++ jack_error ("impossible sample width (%d) discovered!", ++ driver->playback_sample_bytes); ++ exit (1); ++ } ++ } ++ } ++ ++ if (driver->capture_handle) { ++ switch (driver->capture_sample_bytes) { ++ case 2: ++ driver->read_via_copy = driver->quirk_bswap? ++ sample_move_dS_s16s: ++ sample_move_dS_s16; ++ break; ++ case 3: ++ driver->read_via_copy = driver->quirk_bswap? ++ sample_move_dS_s24s: ++ sample_move_dS_s24; ++ break; ++ case 4: ++ driver->read_via_copy = driver->quirk_bswap? ++ sample_move_dS_s32u24s: ++ sample_move_dS_s32u24; ++ break; ++ } ++ } ++} ++ ++int ++JackAlsaDriver::alsa_driver_configure_stream (alsa_driver_t *driver, char *device_name, ++ const char *stream_name, ++ snd_pcm_t *handle, ++ snd_pcm_hw_params_t *hw_params, ++ snd_pcm_sw_params_t *sw_params, ++ unsigned int *nperiodsp, ++ unsigned long *nchns, ++ unsigned long sample_width) ++{ ++ int err, format; ++ unsigned int frame_rate; ++ snd_pcm_uframes_t stop_th; ++ static struct { ++ char Name[32]; ++ snd_pcm_format_t format; ++ int swapped; ++ } formats[] = { ++ {"32bit float little-endian", SND_PCM_FORMAT_FLOAT_LE}, ++ {"32bit integer little-endian", SND_PCM_FORMAT_S32_LE, IS_LE}, ++ {"32bit integer big-endian", SND_PCM_FORMAT_S32_BE, IS_BE}, ++ {"24bit little-endian", SND_PCM_FORMAT_S24_3LE, IS_LE}, ++ {"24bit big-endian", SND_PCM_FORMAT_S24_3BE, IS_BE}, ++ {"16bit little-endian", SND_PCM_FORMAT_S16_LE, IS_LE}, ++ {"16bit big-endian", SND_PCM_FORMAT_S16_BE, IS_BE}, ++ }; ++#define NUMFORMATS (sizeof(formats)/sizeof(formats[0])) ++#define FIRST_16BIT_FORMAT 5 ++ ++ if ((err = snd_pcm_hw_params_any (handle, hw_params)) < 0) { ++ jack_error ("ALSA: no playback configurations available (%s)", ++ snd_strerror (err)); ++ return -1; ++ } ++ ++ if ((err = snd_pcm_hw_params_set_periods_integer (handle, hw_params)) ++ < 0) { ++ jack_error ("ALSA: cannot restrict period size to integral" ++ " value."); ++ return -1; ++ } ++ ++ if ((err = snd_pcm_hw_params_set_access (handle, hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED)) < 0) { ++ if ((err = snd_pcm_hw_params_set_access (handle, hw_params, SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0) { ++ if ((err = snd_pcm_hw_params_set_access ( ++ handle, hw_params, ++ SND_PCM_ACCESS_MMAP_COMPLEX)) < 0) { ++ jack_error ("ALSA: mmap-based access is not possible" ++ " for the %s " ++ "stream of this audio interface", ++ stream_name); ++ return -1; ++ } ++ } ++ } ++ ++ format = (sample_width == 4) ? 0 : NUMFORMATS - 1; ++ ++ while (1) { ++ if ((err = snd_pcm_hw_params_set_format ( ++ handle, hw_params, formats[format].format)) < 0) { ++ ++ if ((sample_width == 4 ++ ? format++ >= NUMFORMATS - 1 ++ : format-- <= 0)) { ++ jack_error ("Sorry. The audio interface \"%s\"" ++ " doesn't support any of the" ++ " hardware sample formats that" ++ " JACK's alsa-driver can use.", ++ device_name); ++ return -1; ++ } ++ } else { ++ if (formats[format].swapped) { ++ driver->quirk_bswap = 1; ++ } else { ++ driver->quirk_bswap = 0; ++ } ++ jack_info ("ALSA: final selected sample format for %s: %s", stream_name, formats[format].Name); ++ break; ++ } ++ } ++ ++ frame_rate = driver->frame_rate ; ++ err = snd_pcm_hw_params_set_rate_near (handle, hw_params, ++ &frame_rate, NULL) ; ++ driver->frame_rate = frame_rate ; ++ if (err < 0) { ++ jack_error ("ALSA: cannot set sample/frame rate to %" ++ PRIu32 " for %s", driver->frame_rate, ++ stream_name); ++ return -1; ++ } ++ if (!*nchns) { ++ /*if not user-specified, try to find the maximum ++ * number of channels */ ++ unsigned int channels_max ; ++ err = snd_pcm_hw_params_get_channels_max (hw_params, ++ &channels_max); ++ *nchns = channels_max ; ++ ++ if (*nchns > 1024) { ++ ++ /* the hapless user is an unwitting victim of ++ the "default" ALSA PCM device, which can ++ support up to 16 million channels. since ++ they can't be bothered to set up a proper ++ default device, limit the number of ++ channels for them to a sane default. ++ */ ++ ++ jack_error ( ++"You appear to be using the ALSA software \"plug\" layer, probably\n" ++"a result of using the \"default\" ALSA device. This is less\n" ++"efficient than it could be. Consider using a hardware device\n" ++"instead rather than using the plug layer. Usually the name of the\n" ++"hardware device that corresponds to the first sound card is hw:0\n" ++ ); ++ *nchns = 2; ++ } ++ } ++ ++ if ((err = snd_pcm_hw_params_set_channels (handle, hw_params, ++ *nchns)) < 0) { ++ jack_error ("ALSA: cannot set channel count to %u for %s", ++ *nchns, stream_name); ++ return -1; ++ } ++ ++ if ((err = snd_pcm_hw_params_set_period_size (handle, hw_params, ++ driver->frames_per_cycle, ++ 0)) ++ < 0) { ++ jack_error ("ALSA: cannot set period size to %" PRIu32 ++ " frames for %s", driver->frames_per_cycle, ++ stream_name); ++ return -1; ++ } ++ ++ *nperiodsp = driver->user_nperiods; ++ snd_pcm_hw_params_set_periods_min (handle, hw_params, nperiodsp, NULL); ++ if (*nperiodsp < driver->user_nperiods) ++ *nperiodsp = driver->user_nperiods; ++ if (snd_pcm_hw_params_set_periods_near (handle, hw_params, ++ nperiodsp, NULL) < 0) { ++ jack_error ("ALSA: cannot set number of periods to %u for %s", ++ *nperiodsp, stream_name); ++ return -1; ++ } ++ ++ if (*nperiodsp < driver->user_nperiods) { ++ jack_error ("ALSA: got smaller periods %u than %u for %s", ++ *nperiodsp, (unsigned int) driver->user_nperiods, ++ stream_name); ++ return -1; ++ } ++ jack_info ("ALSA: use %d periods for %s", *nperiodsp, stream_name); ++#if 0 ++ if (!jack_power_of_two(driver->frames_per_cycle)) { ++ jack_error("JACK: frames must be a power of two " ++ "(64, 512, 1024, ...)\n"); ++ return -1; ++ } ++#endif ++ ++ if ((err = snd_pcm_hw_params_set_buffer_size (handle, hw_params, ++ *nperiodsp * ++ driver->frames_per_cycle)) ++ < 0) { ++ jack_error ("ALSA: cannot set buffer length to %" PRIu32 ++ " for %s", ++ *nperiodsp * driver->frames_per_cycle, ++ stream_name); ++ return -1; ++ } ++ ++ if ((err = snd_pcm_hw_params (handle, hw_params)) < 0) { ++ jack_error ("ALSA: cannot set hardware parameters for %s", ++ stream_name); ++ return -1; ++ } ++ ++ snd_pcm_sw_params_current (handle, sw_params); ++ ++ if ((err = snd_pcm_sw_params_set_start_threshold (handle, sw_params, ++ 0U)) < 0) { ++ jack_error ("ALSA: cannot set start mode for %s", stream_name); ++ return -1; ++ } ++ ++ stop_th = *nperiodsp * driver->frames_per_cycle; ++ if (driver->soft_mode) { ++ stop_th = (snd_pcm_uframes_t)-1; ++ } ++ ++ if ((err = snd_pcm_sw_params_set_stop_threshold ( ++ handle, sw_params, stop_th)) < 0) { ++ jack_error ("ALSA: cannot set stop mode for %s", ++ stream_name); ++ return -1; ++ } ++ ++ if ((err = snd_pcm_sw_params_set_silence_threshold ( ++ handle, sw_params, 0)) < 0) { ++ jack_error ("ALSA: cannot set silence threshold for %s", ++ stream_name); ++ return -1; ++ } ++ ++#if 0 ++ jack_info ("set silence size to %lu * %lu = %lu", ++ driver->frames_per_cycle, *nperiodsp, ++ driver->frames_per_cycle * *nperiodsp); ++ ++ if ((err = snd_pcm_sw_params_set_silence_size ( ++ handle, sw_params, ++ driver->frames_per_cycle * *nperiodsp)) < 0) { ++ jack_error ("ALSA: cannot set silence size for %s", ++ stream_name); ++ return -1; ++ } ++#endif ++ ++ if (handle == driver->playback_handle) ++ err = snd_pcm_sw_params_set_avail_min ( ++ handle, sw_params, ++ driver->frames_per_cycle ++ * (*nperiodsp - driver->user_nperiods + 1)); ++ else ++ err = snd_pcm_sw_params_set_avail_min ( ++ handle, sw_params, driver->frames_per_cycle); ++ ++ if (err < 0) { ++ jack_error ("ALSA: cannot set avail min for %s", stream_name); ++ return -1; ++ } ++ ++ if ((err = snd_pcm_sw_params (handle, sw_params)) < 0) { ++ jack_error ("ALSA: cannot set software parameters for %s\n", ++ stream_name); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_set_parameters (alsa_driver_t *driver, ++ jack_nframes_t frames_per_cycle, ++ jack_nframes_t user_nperiods, ++ jack_nframes_t rate) ++{ ++ int dir; ++ snd_pcm_uframes_t p_period_size = 0; ++ snd_pcm_uframes_t c_period_size = 0; ++ channel_t chn; ++ unsigned int pr = 0; ++ unsigned int cr = 0; ++ int err; ++ ++ driver->frame_rate = rate; ++ driver->frames_per_cycle = frames_per_cycle; ++ driver->user_nperiods = user_nperiods; ++ ++ jack_info ("configuring for %" PRIu32 "Hz, period = %" ++ PRIu32 " frames (%.1f ms), buffer = %" PRIu32 " periods", ++ rate, frames_per_cycle, (((float)frames_per_cycle / (float) rate) * 1000.0f), user_nperiods); ++ ++ if (driver->capture_handle) { ++ if (alsa_driver_configure_stream ( ++ driver, ++ driver->alsa_name_capture, ++ "capture", ++ driver->capture_handle, ++ driver->capture_hw_params, ++ driver->capture_sw_params, ++ &driver->capture_nperiods, ++ (long unsigned int*)&driver->capture_nchannels, ++ driver->capture_sample_bytes)) { ++ jack_error ("ALSA: cannot configure capture channel"); ++ return -1; ++ } ++ } ++ ++ if (driver->playback_handle) { ++ if (alsa_driver_configure_stream ( ++ driver, ++ driver->alsa_name_playback, ++ "playback", ++ driver->playback_handle, ++ driver->playback_hw_params, ++ driver->playback_sw_params, ++ &driver->playback_nperiods, ++ (long unsigned int*)&driver->playback_nchannels, ++ driver->playback_sample_bytes)) { ++ jack_error ("ALSA: cannot configure playback channel"); ++ return -1; ++ } ++ } ++ ++ /* check the rate, since thats rather important */ ++ ++ if (driver->playback_handle) { ++ snd_pcm_hw_params_get_rate (driver->playback_hw_params, ++ &pr, &dir); ++ } ++ ++ if (driver->capture_handle) { ++ snd_pcm_hw_params_get_rate (driver->capture_hw_params, ++ &cr, &dir); ++ } ++ ++ if (driver->capture_handle && driver->playback_handle) { ++ if (cr != pr) { ++ jack_error ("playback and capture sample rates do " ++ "not match (%d vs. %d)", pr, cr); ++ } ++ ++ /* only change if *both* capture and playback rates ++ * don't match requested certain hardware actually ++ * still works properly in full-duplex with slightly ++ * different rate values between adc and dac ++ */ ++ if (cr != driver->frame_rate && pr != driver->frame_rate) { ++ jack_error ("sample rate in use (%d Hz) does not " ++ "match requested rate (%d Hz)", ++ cr, driver->frame_rate); ++ driver->frame_rate = cr; ++ } ++ ++ } else if (driver->capture_handle && cr != driver->frame_rate) { ++ jack_error ("capture sample rate in use (%d Hz) does not " ++ "match requested rate (%d Hz)", ++ cr, driver->frame_rate); ++ driver->frame_rate = cr; ++ } else if (driver->playback_handle && pr != driver->frame_rate) { ++ jack_error ("playback sample rate in use (%d Hz) does not " ++ "match requested rate (%d Hz)", ++ pr, driver->frame_rate); ++ driver->frame_rate = pr; ++ } ++ ++ ++ /* check the fragment size, since thats non-negotiable */ ++ ++ if (driver->playback_handle) { ++ snd_pcm_access_t access; ++ ++ err = snd_pcm_hw_params_get_period_size ( ++ driver->playback_hw_params, &p_period_size, &dir); ++ err = snd_pcm_hw_params_get_format ( ++ driver->playback_hw_params, ++ &(driver->playback_sample_format)); ++ err = snd_pcm_hw_params_get_access (driver->playback_hw_params, ++ &access); ++ driver->playback_interleaved = ++ (access == SND_PCM_ACCESS_MMAP_INTERLEAVED) ++ || (access == SND_PCM_ACCESS_MMAP_COMPLEX); ++ ++ if (p_period_size != driver->frames_per_cycle) { ++ jack_error ("alsa_pcm: requested an interrupt every %" ++ PRIu32 ++ " frames but got %u frames for playback", ++ driver->frames_per_cycle, p_period_size); ++ return -1; ++ } ++ } ++ ++ if (driver->capture_handle) { ++ snd_pcm_access_t access; ++ ++ err = snd_pcm_hw_params_get_period_size ( ++ driver->capture_hw_params, &c_period_size, &dir); ++ err = snd_pcm_hw_params_get_format ( ++ driver->capture_hw_params, ++ &(driver->capture_sample_format)); ++ err = snd_pcm_hw_params_get_access (driver->capture_hw_params, ++ &access); ++ driver->capture_interleaved = ++ (access == SND_PCM_ACCESS_MMAP_INTERLEAVED) ++ || (access == SND_PCM_ACCESS_MMAP_COMPLEX); ++ ++ ++ if (c_period_size != driver->frames_per_cycle) { ++ jack_error ("alsa_pcm: requested an interrupt every %" ++ PRIu32 ++ " frames but got %uc frames for capture", ++ driver->frames_per_cycle, p_period_size); ++ return -1; ++ } ++ } ++ ++ driver->playback_sample_bytes = ++ snd_pcm_format_physical_width (driver->playback_sample_format) ++ / 8; ++ driver->capture_sample_bytes = ++ snd_pcm_format_physical_width (driver->capture_sample_format) ++ / 8; ++ ++ if (driver->playback_handle) { ++ switch (driver->playback_sample_format) { ++ case SND_PCM_FORMAT_FLOAT_LE: ++ case SND_PCM_FORMAT_S32_LE: ++ case SND_PCM_FORMAT_S24_3LE: ++ case SND_PCM_FORMAT_S24_3BE: ++ case SND_PCM_FORMAT_S16_LE: ++ case SND_PCM_FORMAT_S32_BE: ++ case SND_PCM_FORMAT_S16_BE: ++ break; ++ ++ default: ++ jack_error ("programming error: unhandled format " ++ "type for playback"); ++ exit (1); ++ } ++ } ++ ++ if (driver->capture_handle) { ++ switch (driver->capture_sample_format) { ++ case SND_PCM_FORMAT_FLOAT_LE: ++ case SND_PCM_FORMAT_S32_LE: ++ case SND_PCM_FORMAT_S24_3LE: ++ case SND_PCM_FORMAT_S24_3BE: ++ case SND_PCM_FORMAT_S16_LE: ++ case SND_PCM_FORMAT_S32_BE: ++ case SND_PCM_FORMAT_S16_BE: ++ break; ++ ++ default: ++ jack_error ("programming error: unhandled format " ++ "type for capture"); ++ exit (1); ++ } ++ } ++ ++ if (driver->playback_interleaved) { ++ const snd_pcm_channel_area_t *my_areas; ++ snd_pcm_uframes_t offset, frames; ++ if (snd_pcm_mmap_begin(driver->playback_handle, ++ &my_areas, &offset, &frames) < 0) { ++ jack_error ("ALSA: %s: mmap areas info error", ++ driver->alsa_name_playback); ++ return -1; ++ } ++ driver->interleave_unit = ++ snd_pcm_format_physical_width ( ++ driver->playback_sample_format) / 8; ++ } else { ++ driver->interleave_unit = 0; /* NOT USED */ ++ } ++ ++ if (driver->capture_interleaved) { ++ const snd_pcm_channel_area_t *my_areas; ++ snd_pcm_uframes_t offset, frames; ++ if (snd_pcm_mmap_begin(driver->capture_handle, ++ &my_areas, &offset, &frames) < 0) { ++ jack_error ("ALSA: %s: mmap areas info error", ++ driver->alsa_name_capture); ++ return -1; ++ } ++ } ++ ++ if (driver->playback_nchannels > driver->capture_nchannels) { ++ driver->max_nchannels = driver->playback_nchannels; ++ driver->user_nchannels = driver->capture_nchannels; ++ } else { ++ driver->max_nchannels = driver->capture_nchannels; ++ driver->user_nchannels = driver->playback_nchannels; ++ } ++ ++ alsa_driver_setup_io_function_pointers (driver); ++ ++ /* Allocate and initialize structures that rely on the ++ channels counts. ++ ++ Set up the bit pattern that is used to record which ++ channels require action on every cycle. any bits that are ++ not set after the engine's process() call indicate channels ++ that potentially need to be silenced. ++ */ ++ ++ bitset_create (&driver->channels_done, driver->max_nchannels); ++ bitset_create (&driver->channels_not_done, driver->max_nchannels); ++ ++ if (driver->playback_handle) { ++ driver->playback_addr = (char **) ++ malloc (sizeof (char *) * driver->playback_nchannels); ++ memset (driver->playback_addr, 0, ++ sizeof (char *) * driver->playback_nchannels); ++ driver->playback_interleave_skip = (unsigned long *) ++ malloc (sizeof (unsigned long *) * driver->playback_nchannels); ++ memset (driver->playback_interleave_skip, 0, ++ sizeof (unsigned long *) * driver->playback_nchannels); ++ driver->silent = (unsigned long *) ++ malloc (sizeof (unsigned long) ++ * driver->playback_nchannels); ++ ++ for (chn = 0; chn < driver->playback_nchannels; chn++) { ++ driver->silent[chn] = 0; ++ } ++ ++ for (chn = 0; chn < driver->playback_nchannels; chn++) { ++ bitset_add (driver->channels_done, chn); ++ } ++ ++ driver->dither_state = (dither_state_t *) ++ calloc ( driver->playback_nchannels, ++ sizeof (dither_state_t)); ++ } ++ ++ if (driver->capture_handle) { ++ driver->capture_addr = (char **) ++ malloc (sizeof (char *) * driver->capture_nchannels); ++ memset (driver->capture_addr, 0, ++ sizeof (char *) * driver->capture_nchannels); ++ driver->capture_interleave_skip = (unsigned long *) ++ malloc (sizeof (unsigned long *) * driver->capture_nchannels); ++ memset (driver->capture_interleave_skip, 0, ++ sizeof (unsigned long *) * driver->capture_nchannels); ++ } ++ ++ driver->clock_sync_data = (ClockSyncStatus *) ++ malloc (sizeof (ClockSyncStatus) * driver->max_nchannels); ++ ++ driver->period_usecs = ++ (jack_time_t) floor ((((float) driver->frames_per_cycle) / ++ driver->frame_rate) * 1000000.0f); ++ driver->poll_timeout = (int) floor (1.5f * driver->period_usecs); ++ ++ // steph ++ /* ++ if (driver->engine) { ++ driver->engine->set_buffer_size (driver->engine, ++ driver->frames_per_cycle); ++ } ++ */ ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_reset_parameters (alsa_driver_t *driver, ++ jack_nframes_t frames_per_cycle, ++ jack_nframes_t user_nperiods, ++ jack_nframes_t rate) ++{ ++ /* XXX unregister old ports ? */ ++ alsa_driver_release_channel_dependent_memory (driver); ++ return alsa_driver_set_parameters (driver, ++ frames_per_cycle, ++ user_nperiods, rate); ++} ++ ++int ++JackAlsaDriver::alsa_driver_get_channel_addresses (alsa_driver_t *driver, ++ snd_pcm_uframes_t *capture_avail, ++ snd_pcm_uframes_t *playback_avail, ++ snd_pcm_uframes_t *capture_offset, ++ snd_pcm_uframes_t *playback_offset) ++{ ++ unsigned long err; ++ channel_t chn; ++ ++ if (capture_avail) { ++ if ((err = snd_pcm_mmap_begin ( ++ driver->capture_handle, &driver->capture_areas, ++ (snd_pcm_uframes_t *) capture_offset, ++ (snd_pcm_uframes_t *) capture_avail)) < 0) { ++ jack_error ("ALSA: %s: mmap areas info error", ++ driver->alsa_name_capture); ++ return -1; ++ } ++ ++ for (chn = 0; chn < driver->capture_nchannels; chn++) { ++ const snd_pcm_channel_area_t *a = ++ &driver->capture_areas[chn]; ++ driver->capture_addr[chn] = (char *) a->addr ++ + ((a->first + a->step * *capture_offset) / 8); ++ driver->capture_interleave_skip[chn] = (unsigned long ) (a->step / 8); ++ } ++ } ++ ++ if (playback_avail) { ++ if ((err = snd_pcm_mmap_begin ( ++ driver->playback_handle, &driver->playback_areas, ++ (snd_pcm_uframes_t *) playback_offset, ++ (snd_pcm_uframes_t *) playback_avail)) < 0) { ++ jack_error ("ALSA: %s: mmap areas info error ", ++ driver->alsa_name_playback); ++ return -1; ++ } ++ ++ for (chn = 0; chn < driver->playback_nchannels; chn++) { ++ const snd_pcm_channel_area_t *a = ++ &driver->playback_areas[chn]; ++ driver->playback_addr[chn] = (char *) a->addr ++ + ((a->first + a->step * *playback_offset) / 8); ++ driver->playback_interleave_skip[chn] = (unsigned long ) (a->step / 8); ++ } ++ } ++ ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_start (alsa_driver_t *driver) ++{ ++ int err; ++ snd_pcm_uframes_t poffset, pavail; ++ channel_t chn; ++ ++ driver->poll_last = 0; ++ driver->poll_next = 0; ++ ++ if (driver->playback_handle) { ++ if ((err = snd_pcm_prepare (driver->playback_handle)) < 0) { ++ jack_error ("ALSA: prepare error for playback on " ++ "\"%s\" (%s)", driver->alsa_name_playback, ++ snd_strerror(err)); ++ return -1; ++ } ++ } ++ ++ if ((driver->capture_handle && driver->capture_and_playback_not_synced) ++ || !driver->playback_handle) { ++ if ((err = snd_pcm_prepare (driver->capture_handle)) < 0) { ++ jack_error ("ALSA: prepare error for capture on \"%s\"" ++ " (%s)", driver->alsa_name_capture, ++ snd_strerror(err)); ++ return -1; ++ } ++ } ++ ++ if (driver->hw_monitoring) { ++ if (driver->input_monitor_mask || driver->all_monitor_in) { ++ if (driver->all_monitor_in) { ++ driver->hw->set_input_monitor_mask (driver->hw, ~0U); ++ } else { ++ driver->hw->set_input_monitor_mask ( ++ driver->hw, driver->input_monitor_mask); ++ } ++ } else { ++ driver->hw->set_input_monitor_mask (driver->hw, ++ driver->input_monitor_mask); ++ } ++ } ++ ++ if (driver->playback_handle) { ++ driver->playback_nfds = ++ snd_pcm_poll_descriptors_count (driver->playback_handle); ++ } else { ++ driver->playback_nfds = 0; ++ } ++ ++ if (driver->capture_handle) { ++ driver->capture_nfds = ++ snd_pcm_poll_descriptors_count (driver->capture_handle); ++ } else { ++ driver->capture_nfds = 0; ++ } ++ ++ if (driver->pfd) { ++ free (driver->pfd); ++ } ++ ++ driver->pfd = (struct pollfd *) ++ malloc (sizeof (struct pollfd) * ++ (driver->playback_nfds + driver->capture_nfds + 2)); ++ ++ if (driver->midi && !driver->xrun_recovery) ++ (driver->midi->start)(driver->midi); ++ ++ if (driver->playback_handle) { ++ /* fill playback buffer with zeroes, and mark ++ all fragments as having data. ++ */ ++ ++ pavail = snd_pcm_avail_update (driver->playback_handle); ++ ++ if (pavail != ++ driver->frames_per_cycle * driver->playback_nperiods) { ++ jack_error ("ALSA: full buffer not available at start"); ++ return -1; ++ } ++ ++ if (alsa_driver_get_channel_addresses (driver, ++ 0, &pavail, 0, &poffset)) { ++ return -1; ++ } ++ ++ /* XXX this is cheating. ALSA offers no guarantee that ++ we can access the entire buffer at any one time. It ++ works on most hardware tested so far, however, buts ++ its a liability in the long run. I think that ++ alsa-lib may have a better function for doing this ++ here, where the goal is to silence the entire ++ buffer. ++ */ ++ ++ for (chn = 0; chn < driver->playback_nchannels; chn++) { ++ alsa_driver_silence_on_channel ( ++ driver, chn, ++ driver->user_nperiods ++ * driver->frames_per_cycle); ++ } ++ ++ snd_pcm_mmap_commit (driver->playback_handle, poffset, ++ driver->user_nperiods ++ * driver->frames_per_cycle); ++ ++ if ((err = snd_pcm_start (driver->playback_handle)) < 0) { ++ jack_error ("ALSA: could not start playback (%s)", ++ snd_strerror (err)); ++ return -1; ++ } ++ } ++ ++ if ((driver->capture_handle && driver->capture_and_playback_not_synced) ++ || !driver->playback_handle) { ++ if ((err = snd_pcm_start (driver->capture_handle)) < 0) { ++ jack_error ("ALSA: could not start capture (%s)", ++ snd_strerror (err)); ++ return -1; ++ } ++ } ++ ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_stop (alsa_driver_t *driver) ++{ ++ int err; ++ //JSList* node; ++ //int chn; ++ ++ /* silence all capture port buffers, because we might ++ be entering offline mode. ++ */ ++ ++ // steph ++ /* ++ for (chn = 0, node = driver->capture_ports; node; ++ node = jack_slist_next (node), chn++) { ++ ++ jack_port_t* port; ++ char* buf; ++ jack_nframes_t nframes = driver->engine->control->buffer_size; ++ ++ port = (jack_port_t *) node->data; ++ buf = jack_port_get_buffer (port, nframes); ++ memset (buf, 0, sizeof (jack_default_audio_sample_t) * nframes); ++ } ++ */ ++ ++ for (int i = 0; i < fPlaybackChannels; i++) { ++ jack_default_audio_sample_t* buf = ++ (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[i], fEngineControl->fBufferSize); ++ memset (buf, 0, sizeof (jack_default_audio_sample_t) * fEngineControl->fBufferSize); ++ } ++ ++ if (driver->playback_handle) { ++ if ((err = snd_pcm_drop (driver->playback_handle)) < 0) { ++ jack_error ("ALSA: channel flush for playback " ++ "failed (%s)", snd_strerror (err)); ++ return -1; ++ } ++ } ++ ++ if (!driver->playback_handle ++ || driver->capture_and_playback_not_synced) { ++ if (driver->capture_handle) { ++ if ((err = snd_pcm_drop (driver->capture_handle)) < 0) { ++ jack_error ("ALSA: channel flush for " ++ "capture failed (%s)", ++ snd_strerror (err)); ++ return -1; ++ } ++ } ++ } ++ ++ if (driver->hw_monitoring) { ++ driver->hw->set_input_monitor_mask (driver->hw, 0); ++ } ++ ++ if (driver->midi && !driver->xrun_recovery) ++ (driver->midi->stop)(driver->midi); ++ ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_restart (alsa_driver_t *driver) ++{ ++ int res; ++ ++ driver->xrun_recovery = 1; ++ if ((res = Stop()) == 0) ++ res = Start(); ++ driver->xrun_recovery = 0; ++ ++ if (res && driver->midi) ++ (driver->midi->stop)(driver->midi); ++ ++ return res; ++} ++ ++int ++JackAlsaDriver::alsa_driver_xrun_recovery (alsa_driver_t *driver, float *delayed_usecs) ++{ ++ snd_pcm_status_t *status; ++ int res; ++ ++ jack_error("alsa_driver_xrun_recovery"); ++ ++ snd_pcm_status_alloca(&status); ++ ++ if (driver->capture_handle) { ++ if ((res = snd_pcm_status(driver->capture_handle, status)) ++ < 0) { ++ jack_error("status error: %s", snd_strerror(res)); ++ } ++ } else { ++ if ((res = snd_pcm_status(driver->playback_handle, status)) ++ < 0) { ++ jack_error("status error: %s", snd_strerror(res)); ++ } ++ } ++ ++ if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN ++ && driver->process_count > XRUN_REPORT_DELAY) { ++ struct timeval now, diff, tstamp; ++ driver->xrun_count++; ++ snd_pcm_status_get_tstamp(status,&now); ++ snd_pcm_status_get_trigger_tstamp(status, &tstamp); ++ timersub(&now, &tstamp, &diff); ++ *delayed_usecs = diff.tv_sec * 1000000.0 + diff.tv_usec; ++ jack_error("\n\n**** alsa_pcm: xrun of at least %.3f msecs\n\n", *delayed_usecs / 1000.0); ++ } ++ ++ if (alsa_driver_restart (driver)) { ++ return -1; ++ } ++ return 0; ++} ++ ++void ++JackAlsaDriver::alsa_driver_silence_untouched_channels (alsa_driver_t *driver, ++ jack_nframes_t nframes) ++{ ++ channel_t chn; ++ jack_nframes_t buffer_frames = ++ driver->frames_per_cycle * driver->playback_nperiods; ++ ++ for (chn = 0; chn < driver->playback_nchannels; chn++) { ++ if (bitset_contains (driver->channels_not_done, chn)) { ++ if (driver->silent[chn] < buffer_frames) { ++ alsa_driver_silence_on_channel_no_mark ( ++ driver, chn, nframes); ++ driver->silent[chn] += nframes; ++ } ++ } ++ } ++} ++ ++static int under_gdb = FALSE; ++ ++jack_nframes_t ++JackAlsaDriver::alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *status, float ++ *delayed_usecs) ++{ ++ snd_pcm_sframes_t avail = 0; ++ snd_pcm_sframes_t capture_avail = 0; ++ snd_pcm_sframes_t playback_avail = 0; ++ int xrun_detected = FALSE; ++ int need_capture; ++ int need_playback; ++ unsigned int i; ++ jack_time_t poll_enter; ++ jack_time_t poll_ret = 0; ++ ++ *status = -1; ++ *delayed_usecs = 0; ++ ++ need_capture = driver->capture_handle ? 1 : 0; ++ ++ if (extra_fd >= 0) { ++ need_playback = 0; ++ } else { ++ need_playback = driver->playback_handle ? 1 : 0; ++ } ++ ++ again: ++ ++ while (need_playback || need_capture) { ++ ++ int poll_result; ++ unsigned int ci = 0; ++ unsigned int nfds; ++ unsigned short revents; ++ ++ nfds = 0; ++ ++ if (need_playback) { ++ snd_pcm_poll_descriptors (driver->playback_handle, ++ &driver->pfd[0], ++ driver->playback_nfds); ++ nfds += driver->playback_nfds; ++ } ++ ++ if (need_capture) { ++ snd_pcm_poll_descriptors (driver->capture_handle, ++ &driver->pfd[nfds], ++ driver->capture_nfds); ++ ci = nfds; ++ nfds += driver->capture_nfds; ++ } ++ ++ /* ALSA doesn't set POLLERR in some versions of 0.9.X */ ++ ++ for (i = 0; i < nfds; i++) { ++ driver->pfd[i].events |= POLLERR; ++ } ++ ++ if (extra_fd >= 0) { ++ driver->pfd[nfds].fd = extra_fd; ++ driver->pfd[nfds].events = ++ POLLIN|POLLERR|POLLHUP|POLLNVAL; ++ nfds++; ++ } ++ ++ poll_enter = jack_get_microseconds (); ++ ++ if (poll_enter > driver->poll_next) { ++ /* ++ * This processing cycle was delayed past the ++ * next due interrupt! Do not account this as ++ * a wakeup delay: ++ */ ++ driver->poll_next = 0; ++ driver->poll_late++; ++ } ++ ++ poll_result = poll (driver->pfd, nfds, driver->poll_timeout); ++ if (poll_result < 0) { ++ ++ if (errno == EINTR) { ++ jack_info ("poll interrupt"); ++ // this happens mostly when run ++ // under gdb, or when exiting due to a signal ++ if (under_gdb) { ++ goto again; ++ } ++ *status = -2; ++ return 0; ++ } ++ ++ jack_error ("ALSA: poll call failed (%s)", ++ strerror (errno)); ++ *status = -3; ++ return 0; ++ ++ } ++ ++ poll_ret = jack_get_microseconds (); ++ ++ // steph ++ fBeginDateUst = poll_ret; ++ ++ if (extra_fd < 0) { ++ if (driver->poll_next && poll_ret > driver->poll_next) { ++ *delayed_usecs = poll_ret - driver->poll_next; ++ } ++ driver->poll_last = poll_ret; ++ driver->poll_next = poll_ret + driver->period_usecs; ++ // steph ++ /* ++ driver->engine->transport_cycle_start (driver->engine, ++ poll_ret); ++ */ ++ } ++ ++#ifdef DEBUG_WAKEUP ++ jack_info ("%" PRIu64 ": checked %d fds, %" PRIu64 ++ " usecs since poll entered", poll_ret, nfds, ++ poll_ret - poll_enter); ++#endif ++ ++ /* check to see if it was the extra FD that caused us ++ * to return from poll */ ++ ++ if (extra_fd >= 0) { ++ ++ if (driver->pfd[nfds-1].revents == 0) { ++ /* we timed out on the extra fd */ ++ ++ *status = -4; ++ return -1; ++ } ++ ++ /* if POLLIN was the only bit set, we're OK */ ++ ++ *status = 0; ++ if (driver->pfd[nfds-1].revents == POLLIN) { ++ jack_error("driver->pfd[nfds-1].revents == POLLIN"); ++ } ++ return (driver->pfd[nfds-1].revents == POLLIN) ? 0 : -1; ++ } ++ ++ if (need_playback) { ++ if (snd_pcm_poll_descriptors_revents ++ (driver->playback_handle, &driver->pfd[0], ++ driver->playback_nfds, &revents) < 0) { ++ jack_error ("ALSA: playback revents failed"); ++ *status = -6; ++ return 0; ++ } ++ ++ if (revents & POLLERR) { ++ xrun_detected = TRUE; ++ } ++ ++ if (revents & POLLOUT) { ++ need_playback = 0; ++#ifdef DEBUG_WAKEUP ++ jack_info ("%" PRIu64 ++ " playback stream ready", ++ poll_ret); ++#endif ++ } ++ } ++ ++ if (need_capture) { ++ if (snd_pcm_poll_descriptors_revents ++ (driver->capture_handle, &driver->pfd[ci], ++ driver->capture_nfds, &revents) < 0) { ++ jack_error ("ALSA: capture revents failed"); ++ *status = -6; ++ return 0; ++ } ++ ++ if (revents & POLLERR) { ++ xrun_detected = TRUE; ++ } ++ ++ if (revents & POLLIN) { ++ need_capture = 0; ++#ifdef DEBUG_WAKEUP ++ jack_info ("%" PRIu64 ++ " capture stream ready", ++ poll_ret); ++#endif ++ } ++ } ++ ++ if (poll_result == 0) { ++ jack_error ("ALSA: poll time out, polled for %" PRIu64 ++ " usecs", ++ poll_ret - poll_enter); ++ *status = -5; ++ return 0; ++ } ++ ++ } ++ ++ if (driver->capture_handle) { ++ if ((capture_avail = snd_pcm_avail_update ( ++ driver->capture_handle)) < 0) { ++ if (capture_avail == -EPIPE) { ++ xrun_detected = TRUE; ++ } else { ++ jack_error ("unknown ALSA avail_update return" ++ " value (%u)", capture_avail); ++ } ++ } ++ } else { ++ /* odd, but see min() computation below */ ++ capture_avail = INT_MAX; ++ } ++ ++ if (driver->playback_handle) { ++ if ((playback_avail = snd_pcm_avail_update ( ++ driver->playback_handle)) < 0) { ++ if (playback_avail == -EPIPE) { ++ xrun_detected = TRUE; ++ } else { ++ jack_error ("unknown ALSA avail_update return" ++ " value (%u)", playback_avail); ++ } ++ } ++ } else { ++ /* odd, but see min() computation below */ ++ playback_avail = INT_MAX; ++ } ++ ++ if (xrun_detected) { ++ *status = alsa_driver_xrun_recovery (driver, delayed_usecs); ++ return 0; ++ } ++ ++ *status = 0; ++ driver->last_wait_ust = poll_ret; ++ ++ avail = capture_avail < playback_avail ? capture_avail : playback_avail; ++ ++#ifdef DEBUG_WAKEUP ++ jack_info ("wakeup complete, avail = %lu, pavail = %lu " ++ "cavail = %lu", ++ avail, playback_avail, capture_avail); ++#endif ++ ++ /* mark all channels not done for now. read/write will change this */ ++ ++ bitset_copy (driver->channels_not_done, driver->channels_done); ++ ++ /* constrain the available count to the nearest (round down) number of ++ periods. ++ */ ++ ++ return avail - (avail % driver->frames_per_cycle); ++} ++ ++ ++int JackAlsaDriver::SetBufferSize(jack_nframes_t buffer_size) ++{ ++ jack_log("JackAlsaDriver::SetBufferSize %ld", buffer_size); ++ int res = alsa_driver_reset_parameters((alsa_driver_t *)fDriver, buffer_size, ++ ((alsa_driver_t *)fDriver)->user_nperiods, ++ ((alsa_driver_t *)fDriver)->frame_rate); ++ ++ if (res == 0) { // update fEngineControl and fGraphManager ++ JackAudioDriver::SetBufferSize(buffer_size); // never fails ++ } else { ++ alsa_driver_reset_parameters((alsa_driver_t *)fDriver, fEngineControl->fBufferSize, ++ ((alsa_driver_t *)fDriver)->user_nperiods, ++ ((alsa_driver_t *)fDriver)->frame_rate); ++ } ++ ++ return res; ++} ++ ++int ++JackAlsaDriver::alsa_driver_read (alsa_driver_t *driver, jack_nframes_t nframes) ++{ ++ snd_pcm_sframes_t contiguous; ++ snd_pcm_sframes_t nread; ++ snd_pcm_sframes_t offset; ++ jack_nframes_t orig_nframes; ++ jack_default_audio_sample_t* buf; ++ //channel_t chn; ++ //JSList *node; ++ //jack_port_t* port; ++ int err; ++ ++ // steph ++ /* ++ if (!driver->capture_handle || driver->engine->freewheeling) { ++ return 0; ++ } ++ */ ++ ++ if (nframes > driver->frames_per_cycle) { ++ return -1; ++ } ++ ++ if (driver->midi) ++ (driver->midi->read)(driver->midi, nframes); ++ ++ if (!driver->capture_handle) { ++ return 0; ++ } ++ ++ nread = 0; ++ contiguous = 0; ++ orig_nframes = nframes; ++ ++ while (nframes) { ++ ++ contiguous = nframes; ++ ++ if (alsa_driver_get_channel_addresses ( ++ driver, ++ (snd_pcm_uframes_t *) &contiguous, ++ (snd_pcm_uframes_t *) 0, ++ (snd_pcm_uframes_t *)&offset, 0) < 0) { ++ return -1; ++ } ++ ++ // steph ++ for (int chn = 0; chn < fCaptureChannels; chn++) { ++ if (fGraphManager->GetConnectionsNum(fCapturePortList[chn]) > 0) { ++ buf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fCapturePortList[chn], orig_nframes); ++ alsa_driver_read_from_channel (driver, chn, buf + nread, contiguous); ++ } ++ } ++ ++ /* // steph ++ for (chn = 0, node = driver->capture_ports; node; ++ node = jack_slist_next (node), chn++) { ++ ++ port = (jack_port_t *) node->data; ++ ++ if (!jack_port_connected (port)) { ++ // no-copy optimization ++ continue; ++ } ++ buf = jack_port_get_buffer (port, orig_nframes); ++ alsa_driver_read_from_channel (driver, chn, ++ buf + nread, contiguous); ++ } ++ */ ++ ++ if ((err = snd_pcm_mmap_commit (driver->capture_handle, ++ offset, contiguous)) < 0) { ++ ++ jack_error ("ALSA: could not complete read of %" ++ PRIu32 " frames: error = %d\n", contiguous, err); ++ jack_error ("ALSA: could not complete read of %d frames: error = %d", contiguous, err); ++ return -1; ++ } ++ ++ nframes -= contiguous; ++ nread += contiguous; ++ } ++ ++ return 0; ++} ++ ++int ++JackAlsaDriver::alsa_driver_write (alsa_driver_t* driver, jack_nframes_t nframes) ++{ ++ //channel_t chn; ++ //JSList *node; ++ //JSList *mon_node; ++ jack_default_audio_sample_t* buf; ++ jack_default_audio_sample_t* monbuf; ++ jack_nframes_t orig_nframes; ++ snd_pcm_sframes_t nwritten; ++ snd_pcm_sframes_t contiguous; ++ snd_pcm_sframes_t offset; ++ JackPort* port; ++ //jack_port_t *port; ++ int err; ++ ++ driver->process_count++; ++ ++ // steph ++ /* ++ if (!driver->playback_handle || driver->engine->freewheeling) { ++ return 0; ++ } ++ */ ++ if (!driver->playback_handle) { ++ return 0; ++ } ++ ++ if (nframes > driver->frames_per_cycle) { ++ return -1; ++ } ++ ++ if (driver->midi) ++ (driver->midi->write)(driver->midi, nframes); ++ ++ nwritten = 0; ++ contiguous = 0; ++ orig_nframes = nframes; ++ ++ /* check current input monitor request status */ ++ ++ driver->input_monitor_mask = 0; ++ ++ // steph ++ /* ++ for (chn = 0, node = driver->capture_ports; node; ++ node = jack_slist_next (node), chn++) { ++ if (((jack_port_t *) node->data)->shared->monitor_requests) { ++ driver->input_monitor_mask |= (1<GetPort(fCapturePortList[chn]); ++ if (port->MonitoringInput()) { ++ driver->input_monitor_mask |= (1 << chn); ++ } ++ } ++ ++ if (driver->hw_monitoring) { ++ if ((driver->hw->input_monitor_mask ++ != driver->input_monitor_mask) ++ && !driver->all_monitor_in) { ++ driver->hw->set_input_monitor_mask ( ++ driver->hw, driver->input_monitor_mask); ++ } ++ } ++ ++ while (nframes) { ++ ++ contiguous = nframes; ++ ++ if (alsa_driver_get_channel_addresses ( ++ driver, ++ (snd_pcm_uframes_t *) 0, ++ (snd_pcm_uframes_t *) &contiguous, ++ 0, (snd_pcm_uframes_t *)&offset) < 0) { ++ return -1; ++ } ++ ++ // steph ++ for (int chn = 0; chn < fPlaybackChannels; chn++) { ++ // Ouput ports ++ if (fGraphManager->GetConnectionsNum(fPlaybackPortList[chn]) > 0) { ++ buf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[chn], orig_nframes); ++ alsa_driver_write_to_channel (driver, chn, buf + nwritten, contiguous); ++ // Monitor ports ++ if (fWithMonitorPorts && fGraphManager->GetConnectionsNum(fMonitorPortList[chn]) > 0) { ++ monbuf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fMonitorPortList[chn], orig_nframes); ++ memcpy(monbuf + nwritten, buf + nwritten, contiguous * sizeof(jack_default_audio_sample_t)); ++ } ++ } ++ } ++ ++ /* ++ for (chn = 0, node = driver->playback_ports, mon_node=driver->monitor_ports; ++ node; ++ node = jack_slist_next (node), chn++) { ++ ++ port = (jack_port_t *) node->data; ++ ++ if (!jack_port_connected (port)) { ++ continue; ++ } ++ buf = jack_port_get_buffer (port, orig_nframes); ++ alsa_driver_write_to_channel (driver, chn, ++ buf + nwritten, contiguous); ++ ++ if (mon_node) { ++ port = (jack_port_t *) mon_node->data; ++ if (!jack_port_connected (port)) { ++ continue; ++ } ++ monbuf = jack_port_get_buffer (port, orig_nframes); ++ memcpy (monbuf + nwritten, buf + nwritten, contiguous * sizeof(jack_default_audio_sample_t)); ++ mon_node = jack_slist_next (mon_node); ++ } ++ } ++ */ ++ ++ if (!bitset_empty (driver->channels_not_done)) { ++ alsa_driver_silence_untouched_channels (driver, ++ contiguous); ++ } ++ ++ if ((err = snd_pcm_mmap_commit (driver->playback_handle, ++ offset, contiguous)) < 0) { ++ jack_error ("ALSA: could not complete playback of %" ++ PRIu32 " frames: error = %d", contiguous, err); ++ jack_error ("ALSA: could not complete playback of %d frames: error = %d", contiguous, err); ++ if (err != EPIPE && err != ESTRPIPE) ++ return -1; ++ } ++ ++ nframes -= contiguous; ++ nwritten += contiguous; ++ } ++ return 0; ++} ++ ++void ++JackAlsaDriver::alsa_driver_delete (alsa_driver_t *driver) ++{ ++ JSList *node; ++ ++ if (driver->midi) ++ (driver->midi->destroy)(driver->midi); ++ ++ for (node = driver->clock_sync_listeners; node; ++ node = jack_slist_next (node)) { ++ free (node->data); ++ } ++ jack_slist_free (driver->clock_sync_listeners); ++ ++ if (driver->ctl_handle) { ++ snd_ctl_close (driver->ctl_handle); ++ driver->ctl_handle = 0; ++ } ++ ++ if (driver->ctl_handle) { ++ snd_ctl_close (driver->ctl_handle); ++ driver->ctl_handle = 0; ++ } ++ ++ if (driver->capture_handle) { ++ snd_pcm_close (driver->capture_handle); ++ driver->capture_handle = 0; ++ } ++ ++ if (driver->playback_handle) { ++ snd_pcm_close (driver->playback_handle); ++ driver->capture_handle = 0; ++ } ++ ++ if (driver->capture_hw_params) { ++ snd_pcm_hw_params_free (driver->capture_hw_params); ++ driver->capture_hw_params = 0; ++ } ++ ++ if (driver->playback_hw_params) { ++ snd_pcm_hw_params_free (driver->playback_hw_params); ++ driver->playback_hw_params = 0; ++ } ++ ++ if (driver->capture_sw_params) { ++ snd_pcm_sw_params_free (driver->capture_sw_params); ++ driver->capture_sw_params = 0; ++ } ++ ++ if (driver->playback_sw_params) { ++ snd_pcm_sw_params_free (driver->playback_sw_params); ++ driver->playback_sw_params = 0; ++ } ++ ++ if (driver->pfd) { ++ free (driver->pfd); ++ } ++ ++ if (driver->hw) { ++ driver->hw->release (driver->hw); ++ driver->hw = 0; ++ } ++ free(driver->alsa_name_playback); ++ free(driver->alsa_name_capture); ++ free(driver->alsa_driver); ++ ++ alsa_driver_release_channel_dependent_memory (driver); ++ // steph ++ //jack_driver_nt_finish ((jack_driver_nt_t *) driver); ++ free (driver); ++} ++ ++jack_driver_t * ++JackAlsaDriver::alsa_driver_new (const char *name, char *playback_alsa_device, ++ char *capture_alsa_device, ++ jack_client_t *client, ++ jack_nframes_t frames_per_cycle, ++ jack_nframes_t user_nperiods, ++ jack_nframes_t rate, ++ int hw_monitoring, ++ int hw_metering, ++ int capturing, ++ int playing, ++ DitherAlgorithm dither, ++ int soft_mode, ++ int monitor, ++ int user_capture_nchnls, ++ int user_playback_nchnls, ++ int shorts_first, ++ jack_nframes_t capture_latency, ++ jack_nframes_t playback_latency, ++ alsa_midi_t *midi) ++{ ++ int err; ++ ++ alsa_driver_t *driver; ++ ++ jack_info ("creating alsa driver ... %s|%s|%" PRIu32 "|%" PRIu32 ++ "|%" PRIu32"|%" PRIu32"|%" PRIu32 "|%s|%s|%s|%s", ++ playing ? playback_alsa_device : "-", ++ capturing ? capture_alsa_device : "-", ++ frames_per_cycle, user_nperiods, rate, ++ user_capture_nchnls,user_playback_nchnls, ++ hw_monitoring ? "hwmon": "nomon", ++ hw_metering ? "hwmeter":"swmeter", ++ soft_mode ? "soft-mode":"-", ++ shorts_first ? "16bit":"32bit"); ++ ++ driver = (alsa_driver_t *) calloc (1, sizeof (alsa_driver_t)); ++ ++ jack_driver_nt_init ((jack_driver_nt_t *) driver); ++ ++ driver->midi = midi; ++ driver->xrun_recovery = 0; ++ ++ //driver->nt_attach = (JackDriverNTAttachFunction) alsa_driver_attach; ++ //driver->nt_detach = (JackDriverNTDetachFunction) alsa_driver_detach; ++ //driver->read = (JackDriverReadFunction) alsa_driver_read; ++ //driver->write = (JackDriverReadFunction) alsa_driver_write; ++ //driver->null_cycle = (JackDriverNullCycleFunction) alsa_driver_null_cycle; ++ //driver->nt_bufsize = (JackDriverNTBufSizeFunction) alsa_driver_bufsize; ++ //driver->nt_start = (JackDriverNTStartFunction) alsa_driver_start; ++ //driver->nt_stop = (JackDriverNTStopFunction) alsa_driver_stop; ++ //driver->nt_run_cycle = (JackDriverNTRunCycleFunction) alsa_driver_run_cycle; ++ ++ driver->playback_handle = NULL; ++ driver->capture_handle = NULL; ++ driver->ctl_handle = 0; ++ driver->hw = 0; ++ driver->capture_and_playback_not_synced = FALSE; ++ driver->max_nchannels = 0; ++ driver->user_nchannels = 0; ++ driver->playback_nchannels = user_playback_nchnls; ++ driver->capture_nchannels = user_capture_nchnls; ++ driver->playback_sample_bytes = (shorts_first ? 2 : 4); ++ driver->capture_sample_bytes = (shorts_first ? 2 : 4); ++ driver->capture_frame_latency = capture_latency; ++ driver->playback_frame_latency = playback_latency; ++ ++ driver->playback_addr = 0; ++ driver->capture_addr = 0; ++ driver->playback_interleave_skip = NULL; ++ driver->capture_interleave_skip = NULL; ++ ++ driver->silent = 0; ++ driver->all_monitor_in = FALSE; ++ driver->with_monitor_ports = monitor; ++ ++ driver->clock_mode = ClockMaster; /* XXX is it? */ ++ driver->input_monitor_mask = 0; /* XXX is it? */ ++ ++ driver->capture_ports = 0; ++ driver->playback_ports = 0; ++ driver->monitor_ports = 0; ++ ++ driver->pfd = 0; ++ driver->playback_nfds = 0; ++ driver->capture_nfds = 0; ++ ++ driver->dither = dither; ++ driver->soft_mode = soft_mode; ++ ++ pthread_mutex_init (&driver->clock_sync_lock, 0); ++ driver->clock_sync_listeners = 0; ++ ++ driver->poll_late = 0; ++ driver->xrun_count = 0; ++ driver->process_count = 0; ++ ++ driver->alsa_name_playback = strdup (playback_alsa_device); ++ driver->alsa_name_capture = strdup (capture_alsa_device); ++ ++ if (alsa_driver_check_card_type (driver)) { ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ ++ alsa_driver_hw_specific (driver, hw_monitoring, hw_metering); ++ ++ if (playing) { ++ if (snd_pcm_open (&driver->playback_handle, ++ playback_alsa_device, ++ SND_PCM_STREAM_PLAYBACK, ++ SND_PCM_NONBLOCK) < 0) { ++ switch (errno) { ++ case EBUSY: ++ jack_error ("the playback device \"%s\" is " ++ "already in use. Please stop the" ++ " application using it and " ++ "run JACK again", ++ playback_alsa_device); ++ alsa_driver_delete (driver); ++ return NULL; ++ break; ++ ++ case EPERM: ++ jack_error ("you do not have permission to open " ++ "the audio device \"%s\" for playback", ++ playback_alsa_device); ++ alsa_driver_delete (driver); ++ return NULL; ++ break; ++ } ++ ++ driver->playback_handle = NULL; ++ } ++ ++ if (driver->playback_handle) { ++ snd_pcm_nonblock (driver->playback_handle, 0); ++ } ++ } ++ ++ if (capturing) { ++ if (snd_pcm_open (&driver->capture_handle, ++ capture_alsa_device, ++ SND_PCM_STREAM_CAPTURE, ++ SND_PCM_NONBLOCK) < 0) { ++ switch (errno) { ++ case EBUSY: ++ jack_error ("the capture device \"%s\" is " ++ "already in use. Please stop the" ++ " application using it and " ++ "run JACK again", ++ capture_alsa_device); ++ alsa_driver_delete (driver); ++ return NULL; ++ break; ++ ++ case EPERM: ++ jack_error ("you do not have permission to open " ++ "the audio device \"%s\" for capture", ++ capture_alsa_device); ++ alsa_driver_delete (driver); ++ return NULL; ++ break; ++ } ++ ++ driver->capture_handle = NULL; ++ } ++ ++ if (driver->capture_handle) { ++ snd_pcm_nonblock (driver->capture_handle, 0); ++ } ++ } ++ ++ if (driver->playback_handle == NULL) { ++ if (playing) { ++ ++ /* they asked for playback, but we can't do it */ ++ ++ jack_error ("ALSA: Cannot open PCM device %s for " ++ "playback. Falling back to capture-only" ++ " mode", name); ++ ++ if (driver->capture_handle == NULL) { ++ /* can't do anything */ ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ ++ playing = FALSE; ++ } ++ } ++ ++ if (driver->capture_handle == NULL) { ++ if (capturing) { ++ ++ /* they asked for capture, but we can't do it */ ++ ++ jack_error ("ALSA: Cannot open PCM device %s for " ++ "capture. Falling back to playback-only" ++ " mode", name); ++ ++ if (driver->playback_handle == NULL) { ++ /* can't do anything */ ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ ++ capturing = FALSE; ++ } ++ } ++ ++ driver->playback_hw_params = 0; ++ driver->capture_hw_params = 0; ++ driver->playback_sw_params = 0; ++ driver->capture_sw_params = 0; ++ ++ if (driver->playback_handle) { ++ if ((err = snd_pcm_hw_params_malloc ( ++ &driver->playback_hw_params)) < 0) { ++ jack_error ("ALSA: could not allocate playback hw" ++ " params structure"); ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ ++ if ((err = snd_pcm_sw_params_malloc ( ++ &driver->playback_sw_params)) < 0) { ++ jack_error ("ALSA: could not allocate playback sw" ++ " params structure"); ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ } ++ ++ if (driver->capture_handle) { ++ if ((err = snd_pcm_hw_params_malloc ( ++ &driver->capture_hw_params)) < 0) { ++ jack_error ("ALSA: could not allocate capture hw" ++ " params structure"); ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ ++ if ((err = snd_pcm_sw_params_malloc ( ++ &driver->capture_sw_params)) < 0) { ++ jack_error ("ALSA: could not allocate capture sw" ++ " params structure"); ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ } ++ ++ if (alsa_driver_set_parameters (driver, frames_per_cycle, ++ user_nperiods, rate)) { ++ alsa_driver_delete (driver); ++ return NULL; ++ } ++ ++ driver->capture_and_playback_not_synced = FALSE; ++ ++ if (driver->capture_handle && driver->playback_handle) { ++ if (snd_pcm_link (driver->capture_handle, ++ driver->playback_handle) != 0) { ++ driver->capture_and_playback_not_synced = TRUE; ++ } ++ } ++ ++ driver->client = client; ++ return (jack_driver_t *) driver; ++} ++ ++int JackAlsaDriver::Attach() ++{ ++ JackPort* port; ++ int port_index; ++ unsigned long port_flags; ++ char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE]; ++ char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE]; ++ ++ assert(fCaptureChannels < DRIVER_PORT_NUM); ++ assert(fPlaybackChannels < DRIVER_PORT_NUM); ++ ++ port_flags = (unsigned long)CaptureDriverFlags; ++ ++ alsa_driver_t* alsa_driver = (alsa_driver_t*)fDriver; ++ ++ if (alsa_driver->has_hw_monitoring) ++ port_flags |= JackPortCanMonitor; ++ ++ // ALSA driver may have changed the values ++ JackAudioDriver::SetBufferSize(alsa_driver->frames_per_cycle); ++ JackAudioDriver::SetSampleRate(alsa_driver->frame_rate); ++ ++ jack_log("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); ++ ++ for (int i = 0; i < fCaptureChannels; i++) { ++ snprintf(alias, sizeof(alias) - 1, "%s:capture_%u", fAliasName, i + 1); ++ snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1); ++ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { ++ jack_error("driver: cannot register port for %s", name); ++ return -1; ++ } ++ port = fGraphManager->GetPort(port_index); ++ port->SetAlias(alias); ++ port->SetLatency(alsa_driver->frames_per_cycle + alsa_driver->capture_frame_latency); ++ fCapturePortList[i] = port_index; ++ jack_log("JackAudioDriver::Attach fCapturePortList[i] %ld ", port_index); ++ } ++ ++ port_flags = (unsigned long)PlaybackDriverFlags; ++ ++ for (int i = 0; i < fPlaybackChannels; i++) { ++ snprintf(alias, sizeof(alias) - 1, "%s:playback_%u", fAliasName, i + 1); ++ snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1); ++ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { ++ jack_error("driver: cannot register port for %s", name); ++ return -1; ++ } ++ port = fGraphManager->GetPort(port_index); ++ port->SetAlias(alias); ++ // Add one buffer more latency if "async" mode is used... ++ port->SetLatency((alsa_driver->frames_per_cycle * (alsa_driver->user_nperiods - 1)) + ++ ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + alsa_driver->playback_frame_latency); ++ fPlaybackPortList[i] = port_index; ++ jack_log("JackAudioDriver::Attach fPlaybackPortList[i] %ld ", port_index); ++ ++ // Monitor ports ++ if (fWithMonitorPorts) { ++ jack_log("Create monitor port "); ++ snprintf(name, sizeof(name) - 1, "%s:monitor_%d", fClientControl.fName, i + 1); ++ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, MonitorDriverFlags, fEngineControl->fBufferSize)) == NO_PORT) { ++ jack_error ("ALSA: cannot register monitor port for %s", name); ++ } else { ++ port = fGraphManager->GetPort(port_index); ++ port->SetLatency(alsa_driver->frames_per_cycle); ++ fMonitorPortList[i] = port_index; ++ } ++ } ++ } ++ ++ if (alsa_driver->midi) { ++ int err = (alsa_driver->midi->attach)(alsa_driver->midi); ++ if (err) ++ jack_error ("ALSA: cannot attach MIDI: %d", err); ++ } ++ ++ return 0; ++} ++ ++int JackAlsaDriver::Detach() ++{ ++ alsa_driver_t* alsa_driver = (alsa_driver_t*)fDriver; ++ if (alsa_driver->midi) ++ (alsa_driver->midi->detach)(alsa_driver->midi); ++ ++ return JackAudioDriver::Detach(); ++} ++ ++static int card_to_num(const char* device) ++{ ++ int err; ++ char* ctl_name; ++ snd_ctl_card_info_t *card_info; ++ snd_ctl_t* ctl_handle; ++ int i = -1; ++ ++ snd_ctl_card_info_alloca (&card_info); ++ ++ ctl_name = get_control_device_name(device); ++ if (ctl_name == NULL) { ++ jack_error("get_control_device_name() failed."); ++ goto fail; ++ } ++ ++ if ((err = snd_ctl_open (&ctl_handle, ctl_name, 0)) < 0) { ++ jack_error ("control open \"%s\" (%s)", ctl_name, ++ snd_strerror(err)); ++ goto free; ++ } ++ ++ if ((err = snd_ctl_card_info(ctl_handle, card_info)) < 0) { ++ jack_error ("control hardware info \"%s\" (%s)", ++ device, snd_strerror (err)); ++ goto close; ++ } ++ ++ i = snd_ctl_card_info_get_card(card_info); ++ ++close: ++ snd_ctl_close(ctl_handle); ++ ++free: ++ free(ctl_name); ++ ++fail: ++ return i; ++} ++ ++int JackAlsaDriver::Open(jack_nframes_t nframes, ++ jack_nframes_t user_nperiods, ++ jack_nframes_t samplerate, ++ bool hw_monitoring, ++ bool hw_metering, ++ bool capturing, ++ bool playing, ++ DitherAlgorithm dither, ++ bool soft_mode, ++ bool monitor, ++ int inchannels, ++ int outchannels, ++ bool shorts_first, ++ const char* capture_driver_name, ++ const char* playback_driver_name, ++ jack_nframes_t capture_latency, ++ jack_nframes_t playback_latency, ++ const char* midi_driver_name) ++{ ++ // Generic JackAudioDriver Open ++ if (JackAudioDriver::Open(nframes, samplerate, capturing, playing, ++ inchannels, outchannels, monitor, capture_driver_name, playback_driver_name, ++ capture_latency, playback_latency) != 0) { ++ return -1; ++ } ++ ++ alsa_midi_t *midi = 0; ++ if (strcmp(midi_driver_name, "seq") == 0) ++ midi = alsa_seqmidi_new((jack_client_t*)this, 0); ++ else if (strcmp(midi_driver_name, "raw") == 0) ++ midi = alsa_rawmidi_new((jack_client_t*)this); ++ ++ if (JackServerGlobals::on_device_acquire != NULL) ++ { ++ int capture_card = card_to_num(capture_driver_name); ++ int playback_card = card_to_num(playback_driver_name); ++ char audio_name[32]; ++ ++ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", capture_card); ++ if (!JackServerGlobals::on_device_acquire(audio_name)) { ++ jack_error("Audio device %s cannot be acquired, trying to open it anyway...", capture_driver_name); ++ } ++ ++ if (playback_card != capture_card) { ++ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", playback_card); ++ if (!JackServerGlobals::on_device_acquire(audio_name)) { ++ jack_error("Audio device %s cannot be acquired, trying to open it anyway...", playback_driver_name); ++ } ++ } ++ } ++ ++ fDriver = alsa_driver_new ("alsa_pcm", (char*)playback_driver_name, (char*)capture_driver_name, ++ NULL, ++ nframes, ++ user_nperiods, ++ samplerate, ++ hw_monitoring, ++ hw_metering, ++ capturing, ++ playing, ++ dither, ++ soft_mode, ++ monitor, ++ inchannels, ++ outchannels, ++ shorts_first, ++ capture_latency, ++ playback_latency, ++ midi); ++ if (fDriver) { ++ // ALSA driver may have changed the in/out values ++ fCaptureChannels = ((alsa_driver_t *)fDriver)->capture_nchannels; ++ fPlaybackChannels = ((alsa_driver_t *)fDriver)->playback_nchannels; ++ return 0; ++ } else { ++ JackAudioDriver::Close(); ++ return -1; ++ } ++} ++ ++int JackAlsaDriver::Close() ++{ ++ JackAudioDriver::Close(); ++ alsa_driver_delete((alsa_driver_t*)fDriver); ++ ++ if (JackServerGlobals::on_device_release != NULL) ++ { ++ char audio_name[32]; ++ int capture_card = card_to_num(fCaptureDriverName); ++ if (capture_card >= 0) { ++ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", capture_card); ++ JackServerGlobals::on_device_release(audio_name); ++ } ++ ++ int playback_card = card_to_num(fPlaybackDriverName); ++ if (playback_card >= 0 && playback_card != capture_card) { ++ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", playback_card); ++ JackServerGlobals::on_device_release(audio_name); ++ } ++ } ++ ++ return 0; ++} ++ ++int JackAlsaDriver::Start() ++{ ++ JackAudioDriver::Start(); ++ return alsa_driver_start((alsa_driver_t *)fDriver); ++} ++ ++int JackAlsaDriver::Stop() ++{ ++ return alsa_driver_stop((alsa_driver_t *)fDriver); ++} ++ ++int JackAlsaDriver::Read() ++{ ++ /* Taken from alsa_driver_run_cycle */ ++ int wait_status; ++ jack_nframes_t nframes; ++ fDelayedUsecs = 0.f; ++ ++ nframes = alsa_driver_wait((alsa_driver_t *)fDriver, -1, &wait_status, &fDelayedUsecs); ++ ++ if (wait_status < 0) ++ return -1; /* driver failed */ ++ ++ if (nframes == 0) { ++ /* we detected an xrun and restarted: notify ++ * clients about the delay. ++ */ ++ jack_log("ALSA XRun wait_status = %d", wait_status); ++ NotifyXRun(fBeginDateUst, fDelayedUsecs); ++ return -1; ++ } ++ ++ if (nframes != fEngineControl->fBufferSize) ++ jack_log("JackAlsaDriver::Read error nframes = %ld", nframes); ++ ++ // Has to be done before read ++ JackDriver::CycleIncTime(); ++ ++ return alsa_driver_read((alsa_driver_t *)fDriver, fEngineControl->fBufferSize); ++} ++ ++int JackAlsaDriver::Write() ++{ ++ return alsa_driver_write((alsa_driver_t *)fDriver, fEngineControl->fBufferSize); ++} ++ ++void ++JackAlsaDriver::jack_driver_init (jack_driver_t *driver) ++{ ++ memset (driver, 0, sizeof (*driver)); ++ ++ driver->attach = 0; ++ driver->detach = 0; ++ driver->write = 0; ++ driver->read = 0; ++ driver->null_cycle = 0; ++ driver->bufsize = 0; ++ driver->start = 0; ++ driver->stop = 0; ++} ++ ++void ++JackAlsaDriver::jack_driver_nt_init (jack_driver_nt_t * driver) ++{ ++ memset (driver, 0, sizeof (*driver)); ++ ++ jack_driver_init ((jack_driver_t *) driver); ++ ++ driver->attach = 0; ++ driver->detach = 0; ++ driver->bufsize = 0; ++ driver->stop = 0; ++ driver->start = 0; ++ ++ driver->nt_bufsize = 0; ++ driver->nt_start = 0; ++ driver->nt_stop = 0; ++ driver->nt_attach = 0; ++ driver->nt_detach = 0; ++ driver->nt_run_cycle = 0; ++} ++ ++int JackAlsaDriver::is_realtime() const ++{ ++ return fEngineControl->fRealTime; ++} ++ ++int JackAlsaDriver::create_thread(pthread_t *thread, int priority, int realtime, void *(*start_routine)(void*), void *arg) ++{ ++ return JackPosixThread::StartImp(thread, priority, realtime, start_routine, arg); ++} ++ ++jack_port_id_t JackAlsaDriver::port_register(const char *port_name, const char *port_type, unsigned long flags, unsigned long buffer_size) ++{ ++ jack_port_id_t port_index; ++ int res = fEngine->PortRegister(fClientControl.fRefNum, port_name, port_type, flags, buffer_size, &port_index); ++ return (res == 0) ? port_index : 0; ++} ++ ++int JackAlsaDriver::port_unregister(jack_port_id_t port_index) ++{ ++ return fEngine->PortUnRegister(fClientControl.fRefNum, port_index); ++} ++ ++void* JackAlsaDriver::port_get_buffer(int port, jack_nframes_t nframes) ++{ ++ return fGraphManager->GetBuffer(port, nframes); ++} ++ ++int JackAlsaDriver::port_set_alias(int port, const char* name) ++{ ++ return fGraphManager->GetPort(port)->SetAlias(name); ++} ++ ++jack_nframes_t JackAlsaDriver::get_sample_rate() const ++{ ++ return fEngineControl->fSampleRate; ++} ++ ++jack_nframes_t JackAlsaDriver::frame_time() const ++{ ++ JackTimer timer; ++ fEngineControl->ReadFrameTime(&timer); ++ return timer.Time2Frames(GetMicroSeconds(), fEngineControl->fBufferSize); ++} ++ ++jack_nframes_t JackAlsaDriver::last_frame_time() const ++{ ++ JackTimer timer; ++ fEngineControl->ReadFrameTime(&timer); ++ return timer.CurFrame(); ++} ++ ++} // end of namespace ++ ++ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++ ++static ++void ++fill_device( ++ jack_driver_param_constraint_desc_t ** constraint_ptr_ptr, ++ uint32_t * array_size_ptr, ++ const char * device_id, ++ const char * device_description) ++{ ++ jack_driver_param_value_enum_t * possible_value_ptr; ++ ++ //jack_info("%6s - %s", device_id, device_description); ++ ++ if (*constraint_ptr_ptr == NULL) ++ { ++ *constraint_ptr_ptr = (jack_driver_param_constraint_desc_t *)calloc(1, sizeof(jack_driver_param_value_enum_t)); ++ *array_size_ptr = 0; ++ } ++ ++ if ((*constraint_ptr_ptr)->constraint.enumeration.count == *array_size_ptr) ++ { ++ *array_size_ptr += 10; ++ (*constraint_ptr_ptr)->constraint.enumeration.possible_values_array = ++ (jack_driver_param_value_enum_t *)realloc( ++ (*constraint_ptr_ptr)->constraint.enumeration.possible_values_array, ++ sizeof(jack_driver_param_value_enum_t) * *array_size_ptr); ++ } ++ ++ possible_value_ptr = (*constraint_ptr_ptr)->constraint.enumeration.possible_values_array + (*constraint_ptr_ptr)->constraint.enumeration.count; ++ (*constraint_ptr_ptr)->constraint.enumeration.count++; ++ strcpy(possible_value_ptr->value.str, device_id); ++ strcpy(possible_value_ptr->short_desc, device_description); ++} ++ ++static ++jack_driver_param_constraint_desc_t * ++enum_alsa_devices() ++{ ++ snd_ctl_t * handle; ++ snd_ctl_card_info_t * info; ++ snd_pcm_info_t * pcminfo_capture; ++ snd_pcm_info_t * pcminfo_playback; ++ int card_no = -1; ++ char card_id[JACK_DRIVER_PARAM_STRING_MAX + 1]; ++ char device_id[JACK_DRIVER_PARAM_STRING_MAX + 1]; ++ char description[64]; ++ int device_no; ++ bool has_capture; ++ bool has_playback; ++ jack_driver_param_constraint_desc_t * constraint_ptr; ++ uint32_t array_size = 0; ++ ++ snd_ctl_card_info_alloca(&info); ++ snd_pcm_info_alloca(&pcminfo_capture); ++ snd_pcm_info_alloca(&pcminfo_playback); ++ ++ constraint_ptr = NULL; ++ ++ while(snd_card_next(&card_no) >= 0 && card_no >= 0) ++ { ++ sprintf(card_id, "hw:%d", card_no); ++ ++ if (snd_ctl_open(&handle, card_id, 0) >= 0 && ++ snd_ctl_card_info(handle, info) >= 0) ++ { ++ fill_device(&constraint_ptr, &array_size, card_id, snd_ctl_card_info_get_name(info)); ++ ++ device_no = -1; ++ ++ while (snd_ctl_pcm_next_device(handle, &device_no) >= 0 && device_no != -1) ++ { ++ sprintf(device_id, "%s,%d", card_id, device_no); ++ ++ snd_pcm_info_set_device(pcminfo_capture, device_no); ++ snd_pcm_info_set_subdevice(pcminfo_capture, 0); ++ snd_pcm_info_set_stream(pcminfo_capture, SND_PCM_STREAM_CAPTURE); ++ has_capture = snd_ctl_pcm_info(handle, pcminfo_capture) >= 0; ++ ++ snd_pcm_info_set_device(pcminfo_playback, device_no); ++ snd_pcm_info_set_subdevice(pcminfo_playback, 0); ++ snd_pcm_info_set_stream(pcminfo_playback, SND_PCM_STREAM_PLAYBACK); ++ has_playback = snd_ctl_pcm_info(handle, pcminfo_playback) >= 0; ++ ++ if (has_capture && has_playback) ++ { ++ snprintf(description, sizeof(description),"%s (duplex)", snd_pcm_info_get_name(pcminfo_capture)); ++ } ++ else if (has_capture) ++ { ++ snprintf(description, sizeof(description),"%s (capture)", snd_pcm_info_get_name(pcminfo_capture)); ++ } ++ else if (has_playback) ++ { ++ snprintf(description, sizeof(description),"%s (playback)", snd_pcm_info_get_name(pcminfo_playback)); ++ } ++ else ++ { ++ continue; ++ } ++ ++ fill_device(&constraint_ptr, &array_size, device_id, description); ++ } ++ ++ snd_ctl_close(handle); ++ } ++ } ++ ++ return constraint_ptr; ++} ++ ++static ++jack_driver_param_constraint_desc_t * ++get_midi_driver_constraint() ++{ ++ jack_driver_param_constraint_desc_t * constraint_ptr; ++ jack_driver_param_value_enum_t * possible_value_ptr; ++ ++ //jack_info("%6s - %s", device_id, device_description); ++ ++ constraint_ptr = (jack_driver_param_constraint_desc_t *)calloc(1, sizeof(jack_driver_param_value_enum_t)); ++ constraint_ptr->flags = JACK_CONSTRAINT_FLAG_STRICT | JACK_CONSTRAINT_FLAG_FAKE_VALUE; ++ ++ constraint_ptr->constraint.enumeration.possible_values_array = (jack_driver_param_value_enum_t *)malloc(3 * sizeof(jack_driver_param_value_enum_t)); ++ constraint_ptr->constraint.enumeration.count = 3; ++ ++ possible_value_ptr = constraint_ptr->constraint.enumeration.possible_values_array; ++ ++ strcpy(possible_value_ptr->value.str, "none"); ++ strcpy(possible_value_ptr->short_desc, "no MIDI driver"); ++ ++ possible_value_ptr++; ++ ++ strcpy(possible_value_ptr->value.str, "seq"); ++ strcpy(possible_value_ptr->short_desc, "ALSA Sequencer driver"); ++ ++ possible_value_ptr++; ++ ++ strcpy(possible_value_ptr->value.str, "raw"); ++ strcpy(possible_value_ptr->short_desc, "ALSA RawMIDI driver"); ++ ++ return constraint_ptr; ++} ++ ++static ++jack_driver_param_constraint_desc_t * ++get_dither_constraint() ++{ ++ jack_driver_param_constraint_desc_t * constraint_ptr; ++ jack_driver_param_value_enum_t * possible_value_ptr; ++ ++ //jack_info("%6s - %s", device_id, device_description); ++ ++ constraint_ptr = (jack_driver_param_constraint_desc_t *)calloc(1, sizeof(jack_driver_param_value_enum_t)); ++ constraint_ptr->flags = JACK_CONSTRAINT_FLAG_STRICT | JACK_CONSTRAINT_FLAG_FAKE_VALUE; ++ ++ constraint_ptr->constraint.enumeration.possible_values_array = (jack_driver_param_value_enum_t *)malloc(4 * sizeof(jack_driver_param_value_enum_t)); ++ constraint_ptr->constraint.enumeration.count = 4; ++ ++ possible_value_ptr = constraint_ptr->constraint.enumeration.possible_values_array; ++ ++ possible_value_ptr->value.c = 'n'; ++ strcpy(possible_value_ptr->short_desc, "none"); ++ ++ possible_value_ptr++; ++ ++ possible_value_ptr->value.c = 'r'; ++ strcpy(possible_value_ptr->short_desc, "rectangular"); ++ ++ possible_value_ptr++; ++ ++ possible_value_ptr->value.c = 's'; ++ strcpy(possible_value_ptr->short_desc, "shaped"); ++ ++ possible_value_ptr++; ++ ++ possible_value_ptr->value.c = 't'; ++ strcpy(possible_value_ptr->short_desc, "triangular"); ++ ++ return constraint_ptr; ++} ++ ++ static int ++ dither_opt (char c, DitherAlgorithm* dither) ++ { ++ switch (c) { ++ case '-': ++ case 'n': ++ *dither = None; ++ break; ++ ++ case 'r': ++ *dither = Rectangular; ++ break; ++ ++ case 's': ++ *dither = Shaped; ++ break; ++ ++ case 't': ++ *dither = Triangular; ++ break; ++ ++ default: ++ fprintf (stderr, "ALSA driver: illegal dithering mode %c\n", c); ++ return -1; ++ } ++ return 0; ++ } ++ ++ SERVER_EXPORT const jack_driver_desc_t* driver_get_descriptor () ++ { ++ jack_driver_desc_t * desc; ++ jack_driver_param_desc_t * params; ++ unsigned int i; ++ ++ desc = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t)); ++ ++ strcpy(desc->name, "alsa"); // size MUST be less then JACK_DRIVER_NAME_MAX + 1 ++ strcpy(desc->desc, "Linux ALSA API based audio backend"); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1 ++ ++ desc->nparams = 18; ++ params = (jack_driver_param_desc_t*)calloc (desc->nparams, sizeof (jack_driver_param_desc_t)); ++ ++ i = 0; ++ strcpy (params[i].name, "capture"); ++ params[i].character = 'C'; ++ params[i].type = JackDriverParamString; ++ strcpy (params[i].value.str, "none"); ++ strcpy (params[i].short_desc, ++ "Provide capture ports. Optionally set device"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "playback"); ++ params[i].character = 'P'; ++ params[i].type = JackDriverParamString; ++ strcpy (params[i].value.str, "none"); ++ strcpy (params[i].short_desc, ++ "Provide playback ports. Optionally set device"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "device"); ++ params[i].character = 'd'; ++ params[i].type = JackDriverParamString; ++ strcpy (params[i].value.str, "hw:0"); ++ strcpy (params[i].short_desc, "ALSA device name"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ params[i].constraint = enum_alsa_devices(); ++ ++ i++; ++ strcpy (params[i].name, "rate"); ++ params[i].character = 'r'; ++ params[i].type = JackDriverParamUInt; ++ params[i].value.ui = 48000U; ++ strcpy (params[i].short_desc, "Sample rate"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "period"); ++ params[i].character = 'p'; ++ params[i].type = JackDriverParamUInt; ++ params[i].value.ui = 1024U; ++ strcpy (params[i].short_desc, "Frames per period"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "nperiods"); ++ params[i].character = 'n'; ++ params[i].type = JackDriverParamUInt; ++ params[i].value.ui = 2U; ++ strcpy (params[i].short_desc, "Number of periods of playback latency"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "hwmon"); ++ params[i].character = 'H'; ++ params[i].type = JackDriverParamBool; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, "Hardware monitoring, if available"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "hwmeter"); ++ params[i].character = 'M'; ++ params[i].type = JackDriverParamBool; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, "Hardware metering, if available"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "duplex"); ++ params[i].character = 'D'; ++ params[i].type = JackDriverParamBool; ++ params[i].value.i = 1; ++ strcpy (params[i].short_desc, ++ "Provide both capture and playback ports"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "softmode"); ++ params[i].character = 's'; ++ params[i].type = JackDriverParamBool; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, "Soft-mode, no xrun handling"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "monitor"); ++ params[i].character = 'm'; ++ params[i].type = JackDriverParamBool; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, "Provide monitor ports for the output"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "dither"); ++ params[i].character = 'z'; ++ params[i].type = JackDriverParamChar; ++ params[i].value.c = 'n'; ++ strcpy (params[i].short_desc, "Dithering mode"); ++ strcpy (params[i].long_desc, ++ "Dithering mode:\n" ++ " n - none\n" ++ " r - rectangular\n" ++ " s - shaped\n" ++ " t - triangular"); ++ params[i].constraint = get_dither_constraint(); ++ ++ i++; ++ strcpy (params[i].name, "inchannels"); ++ params[i].character = 'i'; ++ params[i].type = JackDriverParamUInt; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, ++ "Number of capture channels (defaults to hardware max)"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "outchannels"); ++ params[i].character = 'o'; ++ params[i].type = JackDriverParamUInt; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, ++ "Number of playback channels (defaults to hardware max)"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "shorts"); ++ params[i].character = 'S'; ++ params[i].type = JackDriverParamBool; ++ params[i].value.i = FALSE; ++ strcpy (params[i].short_desc, "Try 16-bit samples before 32-bit"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "input-latency"); ++ params[i].character = 'I'; ++ params[i].type = JackDriverParamUInt; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, "Extra input latency (frames)"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "output-latency"); ++ params[i].character = 'O'; ++ params[i].type = JackDriverParamUInt; ++ params[i].value.i = 0; ++ strcpy (params[i].short_desc, "Extra output latency (frames)"); ++ strcpy (params[i].long_desc, params[i].short_desc); ++ ++ i++; ++ strcpy (params[i].name, "midi-driver"); ++ params[i].character = 'X'; ++ params[i].type = JackDriverParamString; ++ strcpy (params[i].value.str, "none"); ++ strcpy (params[i].short_desc, "ALSA MIDI driver name (seq|raw)"); ++ strcpy (params[i].long_desc, ++ "ALSA MIDI driver:\n" ++ " none - no MIDI driver\n" ++ " seq - ALSA Sequencer driver\n" ++ " raw - ALSA RawMIDI driver\n"); ++ params[i].constraint = get_midi_driver_constraint(); ++ ++ desc->params = params; ++ return desc; ++ } ++ ++ SERVER_EXPORT Jack::JackDriverClientInterface* driver_initialize(Jack::JackLockedEngine* engine, Jack::JackSynchro* table, const JSList* params) ++ { ++ jack_nframes_t srate = 48000; ++ jack_nframes_t frames_per_interrupt = 1024; ++ unsigned long user_nperiods = 2; ++ const char *playback_pcm_name = "hw:0"; ++ const char *capture_pcm_name = "hw:0"; ++ int hw_monitoring = FALSE; ++ int hw_metering = FALSE; ++ int capture = FALSE; ++ int playback = FALSE; ++ int soft_mode = FALSE; ++ int monitor = FALSE; ++ DitherAlgorithm dither = None; ++ int user_capture_nchnls = 0; ++ int user_playback_nchnls = 0; ++ int shorts_first = FALSE; ++ jack_nframes_t systemic_input_latency = 0; ++ jack_nframes_t systemic_output_latency = 0; ++ const JSList * node; ++ const jack_driver_param_t * param; ++ const char *midi_driver = "none"; ++ ++ for (node = params; node; node = jack_slist_next (node)) { ++ param = (const jack_driver_param_t *) node->data; ++ ++ switch (param->character) { ++ ++ case 'C': ++ capture = TRUE; ++ if (strcmp (param->value.str, "none") != 0) { ++ capture_pcm_name = strdup (param->value.str); ++ jack_log("capture device %s", capture_pcm_name); ++ } ++ break; ++ ++ case 'P': ++ playback = TRUE; ++ if (strcmp (param->value.str, "none") != 0) { ++ playback_pcm_name = strdup (param->value.str); ++ jack_log("playback device %s", playback_pcm_name); ++ } ++ break; ++ ++ case 'D': ++ playback = TRUE; ++ capture = TRUE; ++ break; ++ ++ case 'd': ++ playback_pcm_name = strdup (param->value.str); ++ capture_pcm_name = strdup (param->value.str); ++ jack_log("playback device %s", playback_pcm_name); ++ jack_log("capture device %s", capture_pcm_name); ++ break; ++ ++ case 'H': ++ hw_monitoring = param->value.i; ++ break; ++ ++ case 'm': ++ monitor = param->value.i; ++ break; ++ ++ case 'M': ++ hw_metering = param->value.i; ++ break; ++ ++ case 'r': ++ srate = param->value.ui; ++ jack_log("apparent rate = %d", srate); ++ break; ++ ++ case 'p': ++ frames_per_interrupt = param->value.ui; ++ jack_log("frames per period = %d", frames_per_interrupt); ++ break; ++ ++ case 'n': ++ user_nperiods = param->value.ui; ++ if (user_nperiods < 2) /* enforce minimum value */ ++ user_nperiods = 2; ++ break; ++ ++ case 's': ++ soft_mode = param->value.i; ++ break; ++ ++ case 'z': ++ if (dither_opt (param->value.c, &dither)) { ++ return NULL; ++ } ++ break; ++ ++ case 'i': ++ user_capture_nchnls = param->value.ui; ++ break; ++ ++ case 'o': ++ user_playback_nchnls = param->value.ui; ++ break; ++ ++ case 'S': ++ shorts_first = param->value.i; ++ break; ++ ++ case 'I': ++ systemic_input_latency = param->value.ui; ++ break; ++ ++ case 'O': ++ systemic_output_latency = param->value.ui; ++ break; ++ ++ case 'X': ++ midi_driver = strdup(param->value.str); ++ break; ++ } ++ } ++ ++ /* duplex is the default */ ++ if (!capture && !playback) { ++ capture = TRUE; ++ playback = TRUE; ++ } ++ ++ Jack::JackAlsaDriver* alsa_driver = new Jack::JackAlsaDriver("system", "alsa_pcm", engine, table); ++ Jack::JackDriverClientInterface* threaded_driver = new Jack::JackThreadedDriver(alsa_driver); ++ // Special open for ALSA driver... ++ if (alsa_driver->Open(frames_per_interrupt, user_nperiods, srate, hw_monitoring, hw_metering, capture, playback, dither, soft_mode, monitor, ++ user_capture_nchnls, user_playback_nchnls, shorts_first, capture_pcm_name, playback_pcm_name, ++ systemic_input_latency, systemic_output_latency, midi_driver) == 0) { ++ return threaded_driver; ++ } else { ++ delete threaded_driver; // Delete the decorated driver ++ return NULL; ++ } ++ } ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ +diff -rupN jack-1.9.5.old/linux/alsa/port_names.c jack-1.9.5/linux/alsa/port_names.c +--- jack-1.9.5.old/linux/alsa/port_names.c 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/linux/alsa/port_names.c 2010-07-20 00:17:44.000000000 -0400 +@@ -0,0 +1,176 @@ ++/* -*- mode: c; c-file-style: "linux"; -*- */ ++/* ++ Copyright (C) 2010 Florian Faber, faber@faberman.de ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++*/ ++ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "alsa_driver.h" ++ ++ ++static int port_names_load_portfile(alsa_driver_t *driver, const char *filename, char **buf, const unsigned int offset, const unsigned int num) { ++ int fh, i, ret, lineno, id, res=0; ++ char line[256]; ++ ++ fh = open(filename, O_RDONLY); ++ if (-1!=fh) { ++ res = 1; ++ i = 0; ++ lineno = 1; ++ for (;;) { ++ ret = read(fh, &line[i], 1); ++ if (0==ret) { ++ break; ++ } else if (-1==ret) { ++ sprintf(stderr, "Error while reading \"%s\": %s", filename, strerror(errno)); ++ break; ++ } ++ if (0x0A==line[i]) { ++ /* new line, parse input */ ++ line[i] = 0; ++ ++ if ('#' != line[0]) { ++ i=0; ++ while ((i<255) && (line[i]!='=')) i++; ++ if (255==i) { ++ sprintf(stderr, "Error while reading \"%s\": Line %d has no key=value syntax!", filename, lineno); ++ } else { ++ line[i] = 0; ++ id = atoi(line); ++ if ((id>=1) && (id<=num)) { ++ if (NULL==buf[id-1+offset]) { ++ /* don't overwrite existing names */ ++ buf[id-1+offset] = strdup(&line[i+1]); ++ } ++ } else { ++ sprintf(stderr, "Error while reading \"%s\": Key %d out of range in line %d (1..%d)", filename, id, lineno, num); ++ } ++ } ++ } ++ ++ i = 0; ++ lineno++; ++ } else { ++ i++; ++ if (i==255) { ++ sprintf(stderr, "Error while reading \"%s\": Line %d is too long", filename, lineno); ++ break; ++ } ++ } ++ } ++ ++ (void) close(fh); ++ } ++ ++ return res; ++} ++ ++ ++static void port_names_default_portnames(char **buf, const unsigned int offset, const unsigned int num, const char *defaultname) { ++ unsigned int i; ++ char line[256]; ++ ++ /* Fill in default names */ ++ for (i=0; iframe_rate > 96000) { ++ speed="qs"; ++ } else if (driver->frame_rate > 48000) { ++ speed="ds"; ++ } else { ++ speed="ss"; ++ } ++ ++ snd_ctl_card_info_alloca(&card_info); ++ err = snd_ctl_card_info(driver->ctl_handle, card_info); ++ if (err >= 0) { ++ card_name = snd_ctl_card_info_get_name(card_info); ++ } ++ ++ buf = malloc(sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); ++ if (NULL==buf) { ++ sprintf(stderr, "ALSA: Not enough memory for %d port names", driver->capture_nchannels + driver->playback_nchannels); ++ return NULL; ++ } ++ bzero(buf, sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); ++ ++ /* Read port names from special to general: ++ * Begin with user and speed specific port names */ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.in", getenv("HOME"), card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* Now user general */ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.in", getenv("HOME"), card_name); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* System speed specific */ ++ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.in", card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* System general */ ++ snprintf(filename, 255, "/etc/jack/cards/%s.ports.in", card_name); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* Fill all still unnamed ports with default names */ ++ port_names_default_portnames(buf, 0, driver->capture_nchannels, "capture_%lu"); ++ ++ ++ /* Same procedure for the playback channels */ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.out", getenv("HOME"), card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.out", getenv("HOME"), card_name); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.out", card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ snprintf(filename, 255, "/etc/jack/cards/%s.ports.out", card_name); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ port_names_default_portnames(buf, driver->capture_nchannels, driver->playback_nchannels, "playback_%lu"); ++ ++ return buf; ++} +diff -rupN jack-1.9.5.old/linux/alsa/port_names.h jack-1.9.5/linux/alsa/port_names.h +--- jack-1.9.5.old/linux/alsa/port_names.h 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/linux/alsa/port_names.h 2010-07-20 00:17:44.000000000 -0400 +@@ -0,0 +1,34 @@ ++/* ++ Copyright (C) 2010 Florian Faber, faber@faberman.de ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++*/ ++ ++#ifndef __jack_port_names_h__ ++#define __jack_port_names_h__ ++ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++ ++char** port_names_get_portnames(alsa_driver_t *driver); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __jack_port_names_h__ */ +diff -rupN jack-1.9.5.old/linux/wscript jack-1.9.5/linux/wscript +--- jack-1.9.5.old/linux/wscript 2010-02-12 05:58:07.000000000 -0500 ++++ jack-1.9.5/linux/wscript 2010-07-20 00:17:44.000000000 -0400 +@@ -52,7 +52,8 @@ def build(bld): + 'alsa/generic_hw.c', + 'alsa/hdsp.c', + 'alsa/hammerfall.c', +- 'alsa/ice1712.c' ++ 'alsa/ice1712.c', ++ 'alsa/port_names.c' + ] + + ffado_driver_src = ['firewire/JackFFADODriver.cpp', +diff -rupN jack-1.9.5.old/linux/wscript.orig jack-1.9.5/linux/wscript.orig +--- jack-1.9.5.old/linux/wscript.orig 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/linux/wscript.orig 2010-02-12 05:58:07.000000000 -0500 +@@ -0,0 +1,81 @@ ++#! /usr/bin/env python ++# encoding: utf-8 ++ ++def configure(conf): ++ conf.check_cfg(package='alsa', atleast_version='1.0.18', args='--cflags --libs') ++ conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA') ++ ++ conf. check_cfg(package='libfreebob', atleast_version='1.0.0', args='--cflags --libs') ++ conf.env['BUILD_DRIVER_FREEBOB'] = conf.is_defined('HAVE_LIBFREEBOB') ++ ++ conf. check_cfg(package='libffado', atleast_version='1.999.17', args='--cflags --libs') ++ conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO') ++ ++ conf.define('HAVE_PPOLL', 1 ) ++ ++ ++def create_jack_driver_obj(bld, target, sources, uselib = None): ++ driver = bld.new_task_gen('cxx', 'shlib') ++ driver.features.append('cc') ++ driver.env['shlib_PATTERN'] = 'jack_%s.so' ++ driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE', 'HAVE_PPOLL'] ++ driver.includes = ['.', '../linux', '../posix', '../common', '../common/jack', '../dbus'] ++ driver.target = target ++ driver.source = sources ++ driver.install_path = '${ADDON_DIR}/' ++ if uselib: ++ driver.uselib = uselib ++ driver.uselib_local = 'serverlib' ++ return driver ++ ++def build(bld): ++ if bld.env['BUILD_JACKD'] == True: ++ jackd = bld.new_task_gen('cxx', 'program') ++ jackd.includes = ['../linux', '../posix', '../common/jack', '../common', '../dbus'] ++ jackd.defines = 'HAVE_CONFIG_H' ++ jackd.source = ['../common/Jackdmp.cpp'] ++ if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']: ++ jackd.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c'] ++ jackd.uselib = 'PTHREAD DL RT DBUS-1' ++ else: ++ jackd.uselib = 'PTHREAD DL RT' ++ jackd.uselib_local = 'serverlib' ++ jackd.target = 'jackd' ++ ++ create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp') ++ ++ alsa_driver_src = ['alsa/JackAlsaDriver.cpp', ++ 'alsa/alsa_rawmidi.c', ++ 'alsa/alsa_seqmidi.c', ++ 'alsa/alsa_midi_jackmp.cpp', ++ '../common/memops.c', ++ 'alsa/generic_hw.c', ++ 'alsa/hdsp.c', ++ 'alsa/hammerfall.c', ++ 'alsa/ice1712.c' ++ ] ++ ++ ffado_driver_src = ['firewire/JackFFADODriver.cpp', ++ 'firewire/JackFFADOMidiInput.cpp', ++ 'firewire/JackFFADOMidiOutput.cpp', ++ '../common/JackPhysicalMidiInput.cpp', ++ '../common/JackPhysicalMidiOutput.cpp' ++ ] ++ ++ if bld.env['BUILD_DRIVER_ALSA'] == True: ++ create_jack_driver_obj(bld, 'alsa', alsa_driver_src, "ALSA") ++ ++ if bld.env['BUILD_DRIVER_FREEBOB'] == True: ++ create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', "LIBFREEBOB") ++ ++ if bld.env['BUILD_DRIVER_FFADO'] == True: ++ create_jack_driver_obj(bld, 'firewire', ffado_driver_src, "LIBFFADO") ++ ++ create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp') ++ ++ create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp') ++ ++ create_jack_driver_obj(bld, 'netone', [ '../common/JackNetOneDriver.cpp', ++ '../common/netjack.c', ++ '../common/netjack_packet.c' ], "SAMPLERATE CELT" ) ++ diff --git a/jack-manpages.patch b/jack-manpages.patch new file mode 100644 index 0000000..ba80750 --- /dev/null +++ b/jack-manpages.patch @@ -0,0 +1,1215 @@ +diff -rupN jack-1.9.5.old/man/alsa_in.0 jack-1.9.5/man/alsa_in.0 +--- jack-1.9.5.old/man/alsa_in.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/alsa_in.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,97 @@ ++.TH ALSA_IO "1" "!DATE!" "!VERSION!" ++.SH NAME ++\fBalsa_in\fR, \fBalsa_out\fR \- Jack clients that perform I/O with an alternate audio interface ++.SH SYNOPSIS ++\fBalsa_in\fR [\fIoptions\fR] ++.br ++\fBalsa_out\fR [\fIoptions\fR] ++ ++.SH DESCRIPTION ++A JACK client that opens a specified audio interface (different to the ++one used by the JACK server, if any) and moves audio data between its ++JACK ports and the interface. alsa_in will provide data from the ++interface (potentially for capture); alsa_out will deliver data to it ++(for playback). ++ ++The audio interface used by alsa_in/alsa_out does not need to be ++synchronized with JACK backend (or the hardware it might be using). ++alsa_in/alsa_out tries to resample the output stream in an attempt to ++compensate for drift between the two clocks. ++ ++As of jack-0.116.3 this works almost perfectly. It takes some time, to reach ++absolute resample-rate stability. So give it some minutes (its intended to be ++running permanently anyways) ++ ++.SH OPTIONS ++.TP ++\fB\-j \fI jack_client_name\fR ++.br ++Set Client Name. ++.TP ++\fB\-d \fI alsa_device\fR ++.br ++Use this Soundcard. ++.TP ++\fB\-v\fR ++.br ++Verbose, prints out resample coefficient and other parameters useful for debugging, every 500ms. ++also reports soft xruns. ++.TP ++\fB\-i\fR ++.br ++Instrumentation. This logs the 4 important parameters of the samplerate control algorithm every 1ms. ++You can pipe this into a file, and plot it. Should only be necessary, if it does not work as ++expected, and we need to adjust some of the obscure parameters, to make it work. ++Find me on irc.freenode.org #jack in order to set this up correctly. ++.TP ++\fB\-c \fI channels\fR ++.br ++Set Number of channels. ++.TP ++\fB\-r \fI sample_rate\fR ++.br ++Set sample_rate. The program resamples as necessary. ++So you can connect a 44k1 jackd to a soundcard only supporting ++48k. (default is jack sample_rate) ++.TP ++\fB\-p \fI period_size\fR ++.br ++Set the period size. It is not related to the jackd period_size. ++Sometimes it affects the quality of the delay measurements. ++Setting this lower than the jackd period_size will only work, if you ++use a higher number of periods. ++.TP ++\fB\-n \fI num_period\fR ++.br ++Set number of periods. See note for period_size. ++.TP ++\fB\-q \fI quality\fR ++.br ++Set the quality of the resampler from 0 to 4. can significanly reduce cpu usage. ++.TP ++\fB\-m \fI max_diff\fR ++.br ++The value when a soft xrun occurs. Basically the window, in which ++the dma pointer may jitter. I don't think its necessary to play with this anymore. ++.TP ++\fB\-t \fI target_delay\fR ++.br ++The delay alsa_io should try to approach. Same as for max_diff. It will be setup based on \-p and \-n ++which is generally sufficient. ++.TP ++\fB\-s \fI smooth_array_size\fR ++.br ++This parameter controls the size of the array used for smoothing the delay measurement. Its default is 256. ++If you use a pretty low period size, you can lower the CPU usage a bit by decreasing this parameter. ++However most CPU time is spent in the resampling so this will not be much. ++.TP ++\fB\-C \fI P Control Clamp\fR ++.br ++If you have a PCI card, then the default value (15) of this parameter is too high for \-p64 \-n2... Setting it to 5 should fix that. ++Be aware that setting this parameter too low, lets the hf noise on the delay measurement come through onto the resamplerate, so this ++might degrade the quality of the output. (but its a threshold value, and it has been chosen, to mask the noise of a USB card, ++which has an amplitude which is 50 times higher than that of a PCI card, so 5 wont loose you any quality on a PCI card) ++ ++.SH AUTHOR ++Torben Hohn ++ +diff -rupN jack-1.9.5.old/man/alsa_out.0 jack-1.9.5/man/alsa_out.0 +--- jack-1.9.5.old/man/alsa_out.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/alsa_out.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1 @@ ++.so man1/alsa_in.1 +diff -rupN jack-1.9.5.old/man/fill_template jack-1.9.5/man/fill_template +--- jack-1.9.5.old/man/fill_template 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/fill_template 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,5 @@ ++#!/bin/sh ++ ++for i in *.0 ; do ++ sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date '+%B %Y'`/g" < ${i} > ${i%%0}1 ++done +diff -rupN jack-1.9.5.old/man/jack_bufsize.0 jack-1.9.5/man/jack_bufsize.0 +--- jack-1.9.5.old/man/jack_bufsize.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_bufsize.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,14 @@ ++.TH JACK_BUFSIZE "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_bufsize \- JACK toolkit client to change the JACK buffer size ++.SH SYNOPSIS ++.B jack_bufsize bufsize ++.SH DESCRIPTION ++.B jack_bufsize ++jack_bufsize sets the size of the buffer (frames per period) used in JACK. ++This change happens on-line (the JACK server and its clients do not need to be ++restarted). ++.br ++When invoked without arguments, it prints the current bufsize, and exits. ++ ++ +diff -rupN jack-1.9.5.old/man/jack_connect.0 jack-1.9.5/man/jack_connect.0 +--- jack-1.9.5.old/man/jack_connect.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_connect.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,11 @@ ++.TH JACK_CONNECT "1" "!DATE!" "!VERSION!" ++.SH NAME ++\fBjack_connect\fR, \fBjack_disconnect\fR \- JACK toolkit clients for connecting & disconnecting ports ++.SH SYNOPSIS ++\fB jack_connect\fR [ \fI-s\fR | \fI--server servername\fR ] [\fI-h\fR | \fI--help\fR ] port1 port2 ++\fB jack_disconnect\fR [ \fI-s\fR | \fI--server servername\fR ] [\fI-h\fR | \fI--help\fR ] port1 port2 ++.SH DESCRIPTION ++\fBjack_connect\fR connects the two named ports. \fBjack_connect\fR disconnects the two named ports. ++.SH RETURNS ++The exit status is zero if successful, 1 otherwise ++ +diff -rupN jack-1.9.5.old/man/jackd.0 jack-1.9.5/man/jackd.0 +--- jack-1.9.5.old/man/jackd.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jackd.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,547 @@ ++.TH "JACKD" "1" "!VERSION!" "!DATE!" "" ++.SH "NAME" ++jackd \- JACK Audio Connection Kit sound server ++.SH "SYNOPSIS" ++\fBjackd\fR [\fIoptions\fR] \fB\-d\fI backend \fR ++[\fIbackend\-parameters\fR] ++.br ++\fBjackd \-\-help\fR ++.SH "DESCRIPTION" ++\fBjackd\fR is the JACK audio server daemon, a low\-latency audio ++server. Originally written for the ++GNU/Linux operating system, it also supports Mac OS X and various Unix ++platforms. JACK can connect a number of different client applications ++to an audio device and also to each other. Most clients are external, ++running in their own processes as normal applications. JACK also ++supports internal clients, which run within the \fBjackd\fR process ++using a loadable "plugin" interface. ++ ++JACK differs from other audio servers in being designed from the ++ground up for professional audio work. It focuses on two key areas: ++synchronous execution of all clients, and low latency operation. ++ ++For the latest JACK information, please consult the web site, ++<\fBhttp://www.jackaudio.org\fR>. ++.SH "OPTIONS" ++.TP ++\fB\-d, \-\-driver \fIbackend\fR [\fIbackend\-parameters\fR ] ++.br ++Select the audio interface backend. The current list of supported ++backends is: \fBalsa\fR, \fBcoreaudio\fR, \fBdummy\fR, \fBfreebob\fR, ++\fBoss\fR \fBsun\fR and \fBportaudio\fR. They are not all available ++on all platforms. All \fIbackend\-parameters\fR are optional. ++ ++.TP ++\fB\-h, \-\-help\fR ++.br ++Print a brief usage message describing the main \fBjackd\fR options. ++These do not include \fIbackend\-parameters\fR, which are listed using ++the \fB\-\-help\fR option for each specific backend. Examples below ++show how to list them. ++.TP ++\fB\-m, \-\-no\-mlock\fR ++Do not attempt to lock memory, even if \fB\-\-realtime\fR. ++.TP ++\fB\-n, \-\-name\fR \fIserver\-name\fR ++Name this \fBjackd\fR instance \fIserver\-name\fR. If unspecified, ++this name comes from the \fB$JACK_DEFAULT_SERVER\fR environment ++variable. It will be "default" if that is not defined. ++.TP ++\fB\-p, \-\-port\-max \fI n\fR ++Set the maximum number of ports the JACK server can manage. ++The default value is 256. ++.TP ++\fB\-\-replace-registry\fR ++.br ++Remove the shared memory registry used by all JACK server instances ++before startup. This should rarely be used, and is intended only ++for occasions when the structure of this registry changes in ways ++that are incompatible across JACK versions (which is rare). ++.TP ++\fB\-R, \-\-realtime\fR ++.br ++Use realtime scheduling (default = true). This is needed for reliable low\-latency ++performance. On many systems, it requires \fBjackd\fR to run with ++special scheduler and memory allocation privileges, which may be ++obtained in several ways. ++.TP ++\fB\-r, \-\-no-realtime\fR ++.br ++Do not use realtime scheduling. ++.TP ++\fB\-P, \-\-realtime\-priority \fIint\fR ++When running \fB\-\-realtime\fR, set the scheduler priority to ++\fIint\fR. ++.TP ++\fB\-\-silent\fR ++Silence any output during operation. ++.TP ++\fB\-T, \-\-temporary\fR ++Exit once all clients have closed their connections. ++.TP ++\fB\-t, \-\-timeout \fIint\fR ++.br ++Set client timeout limit in milliseconds. The default is 500 msec. ++In realtime mode the client timeout must be smaller than the watchdog timeout (5000 msec). ++.TP ++\fB\-Z, \-\-nozombies\fR ++.br ++Prevent JACK from ever kicking out clients because they were too slow. ++This cancels the effect any specified timeout value, but JACK and its clients are ++still subject to the supervision of the watchdog thread or its equivalent. ++.TP ++\fB\-u, \-\-unlock\fR ++.br ++Unlock libraries GTK+, QT, FLTK, Wine. ++.TP ++\fB\-v, \-\-verbose\fR ++Give verbose output. ++.TP ++\fB\-c, \-\-clocksource\fR (\fI c(ycle)\fR | \fI h(pet) \fR | \fI s(ystem) \fR) ++Select a specific wall clock (Cycle Counter, HPET timer, System timer). ++.TP ++\fB\-V, \-\-version\fR ++Print the current JACK version number and exit. ++.SS ALSA BACKEND OPTIONS ++.TP ++\fB\-C, \-\-capture\fR [ \fIname\fR ] ++Provide only capture ports, unless combined with \-D or \-P. Parameterally set ++capture device name. ++.TP ++\fB\-d, \-\-device \fIname\fR ++.br ++The ALSA pcm device \fIname\fR to use. If none is specified, JACK will ++use "hw:0", the first hardware card defined in \fB/etc/modules.conf\fR. ++.TP ++\fB\-z, \-\-dither [rectangular,triangular,shaped,none] ++Set dithering mode. If \fBnone\fR or unspecified, dithering is off. ++Only the first letter of the mode name is required. ++.TP ++\fB\-D, \-\-duplex\fR ++Provide both capture and playback ports. Defaults to on unless only one ++of \-P or \-C is specified. ++.TP ++\fB\-h, \-\-help\fR Print a brief usage message describing only the ++\fBalsa\fR backend parameters. ++.TP ++\fB\-M, \-\-hwmeter\fR ++.br ++Enable hardware metering for devices that support it. Otherwise, use ++software metering. ++.TP ++\fB\-H, \-\-hwmon\fR ++.br ++Enable hardware monitoring of capture ports. This is a method for ++obtaining "zero latency" monitoring of audio input. It requires ++support in hardware and from the underlying ALSA device driver. ++ ++When enabled, requests to monitor capture ports will be satisfied by ++creating a direct signal path between audio interface input and output ++connectors, with no processing by the host computer at all. This ++offers the lowest possible latency for the monitored signal. ++ ++Presently (March 2003), only the RME Hammerfall series and cards based ++on the ICE1712 chipset (M\-Audio Delta series, Terratec, and others) ++support \fB\-\-hwmon\fR. In the future, some consumer cards may also ++be supported by modifying their mixer settings. ++ ++Without \fB\-\-hwmon\fR, port monitoring requires JACK to read audio ++into system memory, then copy it back out to the hardware again, ++imposing the basic JACK system latency determined by the ++\fB\-\-period\fR and \fB\-\-nperiods\fR parameters. ++.TP ++\fB\-i, \-\-inchannels \fIint\fR ++.br ++Number of capture channels. Default is maximum supported by hardware. ++.TP ++\fB\-n, \-\-nperiods \fIint\fR ++.br ++Specify the number of periods of playback latency. In seconds, this ++corresponds to \fB\-\-nperiods\fR times \fB\-\-period\fR divided by ++\fB\-\-rate\fR. The default is 2, the minimum allowable. For most ++devices, there is no need for any other value with the ++\fB\-\-realtime\fR option. Without realtime privileges or with boards ++providing unreliable interrupts (like ymfpci), a larger value may ++yield fewer xruns. This can also help if the system is not tuned for ++reliable realtime scheduling. ++ ++For most ALSA devices, the hardware buffer has exactly ++\fB\-\-period\fR times \fB\-\-nperiods\fR frames. Some devices demand ++a larger buffer. If so, JACK will use the smallest possible buffer ++containing at least \fB\-\-nperiods\fR, but the playback latency does ++not increase. ++ ++For USB audio devices it is recommended to use \fB\-n 3\fR. Firewire ++devices supported by FFADO (formerly Freebob) are configured with ++\fB\-n 3\fR by default. ++.TP ++\fB\-o, \-\-outchannels \fIint\fR ++.br ++Number of playback channels. Default is maximum supported by hardware. ++.TP ++\fB\-P, \-\-playback\fR [ \fIname\fR ] ++Provide only playback ports, unless combined with \-D or \-C. Optionally set ++playback device name. ++.TP ++\fB\-p, \-\-period \fIint\fR ++.br ++Specify the number of frames between JACK \fBprocess()\fR calls. This ++value must be a power of 2, and the default is 1024. If you need low ++latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger ++period size yields higher latency, but makes xruns less likely. The JACK ++capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. ++.TP ++\fB\-r, \-\-rate \fIint\fR ++Specify the sample rate. The default is 48000. ++.TP ++\fB\-S, \-\-shorts ++.br ++Try to configure card for 16\-bit samples first, only trying 32\-bits if ++unsuccessful. Default is to prefer 32\-bit samples. ++.TP ++\fB\-s, \-\-softmode\fR ++.br ++Ignore xruns reported by the ALSA driver. This makes JACK less likely ++to disconnect unresponsive ports when running without \fB\-\-realtime\fR. ++.TP ++\fB\-X, \-\-midi \fR[\fIseq\fR|\fIraw\fR] ++.br ++Specify which ALSA MIDI system to provide access to. Using \fBraw\fR ++will provide a set of JACK MIDI ports that correspond to each raw ALSA ++device on the machine. Using \fBseq\fR will provide a set of JACK MIDI ++ports that correspond to each ALSA "sequencer" client (which includes ++each hardware MIDI port on the machine). \fBraw\fR provides slightly ++better performance but does not permit JACK MIDI communication with ++software written to use the ALSA "sequencer" API. ++.SS COREAUDIO BACKEND PARAMETERS ++.TP ++\fB\-c \-\-channel\fR ++Maximum number of channels (default: 2) ++.TP ++\fB\-i \-\-channelin\fR ++Maximum number of input channels (default: 2) ++.TP ++\fB\-o \-\-channelout\fR ++Maximum number of output channels (default: 2) ++.TP ++\fB\-C \-\-capture\fR ++Whether or not to capture (default: true) ++.TP ++\fB\-P \-\-playback\fR ++Whether or not to playback (default: true) ++.TP ++\fB\-D \-\-duplex\fR ++Capture and playback (default: true) ++.TP ++\fB\-r \-\-rate\fR ++Sample rate (default: 44100) ++.TP ++\fB\-p \-\-period\fR ++Frames per period (default: 128). Must be a power of 2. ++.TP ++\fB\-n \-\-name\fR ++Driver name (default: none) ++.TP ++\fB\-I \-\-id\fR ++Audio Device ID (default: 0) ++.SS DUMMY BACKEND PARAMETERS ++.TP ++\fB\-C, \-\-capture \fIint\fR ++Specify number of capture ports. The default value is 2. ++.TP ++\fB\-P, \-\-playback \fIint\fR ++Specify number of playback ports. The default value is 2. ++.TP ++\fB\-r, \-\-rate \fIint\fR ++Specify sample rate. The default value is 48000. ++.TP ++\fB\-p, \-\-period \fIint\fR ++Specify the number of frames between JACK \fBprocess()\fR calls. This ++value must be a power of 2, and the default is 1024. If you need low ++latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger ++period size yields higher latency, but makes xruns less likely. The JACK ++capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. ++.TP ++\fB\-w, \-\-wait \fIint\fR ++Specify number of usecs to wait between engine processes. ++The default value is 21333. ++ ++ ++.SS NET BACKEND PARAMETERS ++ ++.TP ++ \fB\-i, \-\-audio\-ins \fIint\fR ++Number of capture channels (default: 2) ++.TP ++ \fB\-o, \-\-audio\-outs \fIint\fR ++Number of playback channels (default: 2) ++.TP ++ \fB\-I, \-\-midi\-ins \fIint\fR ++Number of midi capture channels (default: 1) ++.TP ++\fB\-O, \-\-midi\-outs \fIint\fR ++Number of midi playback channels (default: 1) ++.TP ++ \fB\-r, \-\-rate \fIint\fR ++Sample rate (default: 48000) ++.TP ++\fB\-p, \-\-period \fIint\fR ++Frames per period (default: 1024) ++.TP ++\fB\-n, \-\-num\-periods \fIint\fR ++Network latency setting in no. of periods (default: 5) ++.TP ++\fB\-l, \-\-listen\-port \fIint\fR ++The socket port we are listening on for sync packets (default: 3000) ++.TP ++\fB\-f, \-\-factor \fIint\fR ++Factor for sample rate reduction (default: 1) ++.TP ++\fB\-u, \-\-upstream\-factor \fIint\fR ++Factor for sample rate reduction on the upstream (default: 0) ++.TP ++\fB\-c, \-\-celt \fIint\fR ++sets celt encoding and number of kbits per channel (default: 0) ++.TP ++\fB\-b, \-\-bit\-depth \fIint\fR ++Sample bit\-depth (0 for float, 8 for 8bit and 16 for 16bit) (default: 0) ++.TP ++\fB\-t, \-\-transport\-sync \fIint\fR ++Whether to slave the transport to the master transport (default: true) ++.TP ++\fB\-a, \-\-autoconf \fIint\fR ++Whether to use Autoconfig, or just start. (default: true) ++.TP ++\fB\-R, \-\-redundancy \fIint\fR ++Send packets N times (default: 1) ++.TP ++\fB\-e, \-\-native\-endian \fIint\fR ++Dont convert samples to network byte order. (default: false) ++.TP ++\fB\-J, \-\-jitterval \fIint\fR ++attempted jitterbuffer microseconds on master (default: 0) ++.TP ++\fB\-D, \-\-always\-deadline \fIint\fR ++always use deadline (default: false) ++ ++ ++.SS OSS BACKEND PARAMETERS ++.TP ++\fB\-r, \-\-rate \fIint\fR ++Specify the sample rate. The default is 48000. ++.TP ++\fB\-p, \-\-period \fIint\fR ++Specify the number of frames between JACK \fBprocess()\fR calls. This ++value must be a power of 2, and the default is 1024. If you need low ++latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger ++period size yields higher latency, but makes xruns less likely. The JACK ++capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. ++.TP ++\fB\-n, \-\-nperiods \fIint\fR ++Specify the number of periods in the hardware buffer. The default is ++2. The period size (\fB\-p\fR) times \fB\-\-nperiods\fR times four is ++the JACK buffer size in bytes. The JACK output latency in seconds is ++\fB\-\-nperiods\fR times \fB\-\-period\fR divided by \fB\-\-rate\fR. ++.TP ++\fB\-w, \-\-wordlength \fIint\fR ++Specify the sample size in bits. The default is 16. ++.TP ++\fB\-i, \-\-inchannels \fIint\fR ++Specify how many channels to capture (default: 2) ++.TP ++\fB\-o, \-\-outchannels \fIint\fR ++Specify number of playback channels (default: 2) ++.TP ++\fB\-C, \-\-capture \fIdevice_file\fR ++Specify input device for capture (default: /dev/dsp) ++.TP ++\fB\-P, \-\-playback \fIdevice_file\fR ++Specify output device for playback (default: /dev/dsp) ++.TP ++\fB\-b, \-\-ignorehwbuf \fIboolean\fR ++Specify, whether to ignore hardware period size (default: false) ++.SS SUN BACKEND PARAMETERS ++.TP ++\fB\-r, \-\-rate \fIint\fR ++Specify the sample rate. The default is 48000. ++.TP ++\fB\-p, \-\-period \fIint\fR ++Specify the number of frames between JACK \fBprocess()\fR calls. This ++value must be a power of 2, and the default is 1024. If you need low ++latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger ++period size yields higher latency, but makes xruns less likely. The JACK ++capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. ++.TP ++\fB\-n, \-\-nperiods \fIint\fR ++Specify the number of periods in the hardware buffer. The default is ++2. The period size (\fB\-p\fR) times \fB\-\-nperiods\fR times four ++(assuming 2 channels 16-bit samples) is the JACK buffer size in bytes. ++The JACK output latency in seconds is \fB\-\-nperiods\fR times ++\fB\-\-period\fR divided by \fB\-\-rate\fR. ++.TP ++\fB\-w, \-\-wordlength \fIint\fR ++Specify the sample size in bits. The default is 16. ++.TP ++\fB\-i, \-\-inchannels \fIint\fR ++Specify how many channels to capture (default: 2) ++.TP ++\fB\-o, \-\-outchannels \fIint\fR ++Specify number of playback channels (default: 2) ++.TP ++\fB\-C, \-\-capture \fIdevice_file\fR ++Specify input device for capture (default: /dev/audio) ++.TP ++\fB\-P, \-\-playback \fIdevice_file\fR ++Specify output device for playback (default: /dev/audio) ++.TP ++\fB\-b, \-\-ignorehwbuf \fIboolean\fR ++Specify, whether to ignore hardware period size (default: false) ++.SS PORTAUDIO BACKEND PARAMETERS ++.TP ++\fB\-c \-\-channel\fR ++Maximum number of channels (default: all available hardware channels) ++.TP ++\fB\-i \-\-channelin\fR ++Maximum number of input channels (default: all available hardware channels) ++.TP ++\fB\-o \-\-channelout\fR ++Maximum number of output channels (default: all available hardware channels) ++.TP ++\fB\-C \-\-capture\fR ++Whether or not to capture (default: true) ++.TP ++\fB\-P \-\-playback\fR ++Whether or not to playback (default: true) ++.TP ++\fB\-D \-\-duplex\fR ++Capture and playback (default: true) ++.TP ++\fB\-r \-\-rate\fR ++Sample rate (default: 48000) ++.TP ++\fB\-p \-\-period\fR ++Frames per period (default: 1024). Must be a power of 2. ++.TP ++\fB\-n \-\-name\fR ++Driver name (default: none) ++.TP ++\fB\-z \-\-dither\fR ++Dithering mode (default: none) ++.SH "EXAMPLES" ++.PP ++Print usage message for the parameters specific to each backend. ++.IP ++\fBjackd \-d alsa \-\-help\fR ++.br ++\fBjackd \-d coreaudio \-\-help\fR ++.br ++\fBjackd \-d net \-\-help\fR ++.br ++\fBjackd \-d dummy \-\-help\fR ++.br ++\fBjackd \-d firewire \-\-help\fR ++.br ++\fBjackd \-d freebob \-\-help\fR ++.br ++\fBjackd \-d oss \-\-help\fR ++.br ++\fBjackd \-d sun \-\-help\fR ++.br ++\fBjackd \-d portaudio \-\-help\fR ++.PP ++Run the JACK daemon with realtime priority using the first ALSA ++hardware card defined in \fB/etc/modules.conf\fR. ++.IP ++\fBjackstart \-\-realtime \-\-driver=alsa\fR ++.PP ++Run the JACK daemon with low latency giving verbose output, which can ++be helpful for trouble\-shooting system latency problems. A ++reasonably well\-tuned system with a good sound card and a ++low\-latency kernel can handle these values reliably. Some can do ++better. If you get xrun messages, try a larger buffer. Tuning a ++system for low latency can be challenging. The JACK FAQ, ++.I http://jackit.sourceforge.net/docs/faq.php\fR ++has some useful suggestions. ++.IP ++\fBjackstart \-Rv \-d alsa \-p 128 \-n 2 \-r 44100\fR ++.PP ++Run \fBjackd\fR with realtime priority using the "sblive" ALSA device ++defined in ~/.asoundrc. Apply shaped dithering to playback audio. ++.IP ++\fBjackd \-R \-d alsa \-d sblive \-\-dither=shaped\fR ++.PP ++Run \fBjackd\fR with no special privileges using the second ALSA ++hardware card defined in \fB/etc/modules.conf\fR. Any xruns reported ++by the ALSA backend will be ignored. The larger buffer helps reduce ++data loss. Rectangular dithering will be used for playback. ++.IP ++\fBjackd \-d alsa \-d hw:1 \-p2048 \-n3 \-\-softmode \-zr\fR ++.PP ++Run \fBjackd\fR in full\-duplex mode using the ALSA hw:0,0 device for ++playback and the hw:0,2 device for capture. ++.IP ++\fBjackd \-d alsa \-P hw:0,0 \-C hw:0,2\fR ++.PP ++Run \fBjackd\fR in playback\-only mode using the ALSA hw:0,0 device. ++.IP ++\fBjackd \-d alsa \-P hw:0,0\fR ++.SH "ENVIRONMENT" ++.br ++JACK is evolving a mechanism for automatically starting the server ++when needed. Any client started without a running JACK server will ++attempt to start one itself using the command line found in the first ++line of \fB$HOME/.jackdrc\fR if it exists, or \fB/etc/jackdrc\fR if it ++does not. If neither file exists, a built\-in default command will be ++used, including the \fB\-T\fR flag, which causes the server to shut ++down when all clients have exited. ++ ++As a transition, this only happens when \fB$JACK_START_SERVER\fR is ++defined in the environment of the calling process. In the future this ++will become normal behavior. In either case, defining ++\fB$JACK_NO_START_SERVER\fR disables this feature. ++ ++To change where JACK looks for the backend drivers, set ++\fB$JACK_DRIVER_DIR\fR. ++ ++\fB$JACK_DEFAULT_SERVER\fR specifies the default server name. If not ++defined, the string "default" is used. If set in their respective ++environments, this affects \fBjackd\fR unless its \fB\-\-name\fR ++parameter is set, and all JACK clients unless they pass an explicit ++name to \fBjack_client_open()\fR. ++ ++.SH "SEE ALSO:" ++.PP ++.I http://www.jackaudio.org ++.br ++The official JACK website with news, docs and a list of JACK clients. ++.PP ++.I http://jackaudio.org/email ++.br ++The JACK developers' mailing list. Subscribe, to take part in ++development of JACK or JACK clients. User questions are also welcome, ++there is no user-specific mailing list. ++.PP ++.I http://www.jackosx.com/ ++.br ++Tools specific to the Mac OS X version of JACK. ++.PP ++.I http://www.alsa\-project.org ++.br ++The Advanced Linux Sound Architecture. ++.SH "BUGS" ++Please report bugs to ++.br ++.I http://trac.jackaudio.org/ ++.SH "AUTHORS" ++Architect and original implementor: Paul Davis ++.PP ++Original design Group: Paul Davis, David Olofson, Kai Vehmanen, Benno Sennoner, ++Richard Guenther, and other members of the Linux Audio Developers group. ++.PP ++Programming: Paul Davis, Jack O'Quin, Taybin Rutkin, Stephane Letz, Fernando ++Pablo Lopez-Lezcano, Steve Harris, Jeremy Hall, Andy Wingo, Kai ++Vehmanen, Melanie Thielker, Jussi Laako, Tilman Linneweh, Johnny ++Petrantoni, Torben Hohn. ++.PP ++Manpage written by Stefan Schwandter, Jack O'Quin and Alexandre ++Prokoudine. +diff -rupN jack-1.9.5.old/man/jack_disconnect.0 jack-1.9.5/man/jack_disconnect.0 +--- jack-1.9.5.old/man/jack_disconnect.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_disconnect.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1 @@ ++.so man1/jack_connect.1 +diff -rupN jack-1.9.5.old/man/jack_freewheel.0 jack-1.9.5/man/jack_freewheel.0 +--- jack-1.9.5.old/man/jack_freewheel.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_freewheel.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,16 @@ ++.TH JACK_FREEWHEEL "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_freewheel \- JACK toolkit client to control freewheeling mode ++.SH SYNOPSIS ++.B jack_freewheel [y|n] ++.SH DESCRIPTION ++.B jack_freewheel ++Turns freewheeling mode on (y) or off (n). While in freewheeling mode, ++the JACK server does not wait in between process() calls, and does not ++read or write data from/to any audio interface. That results in the JACK graph ++processing data as fast as possible. Freewheeling makes fast exports to ++files possible. ++.PP ++There is no useful reason to use this tool other than testing. JACK ++clients that use freewheeling will turn it on and off themselves. ++ +diff -rupN jack-1.9.5.old/man/jack_impulse_grabber.0 jack-1.9.5/man/jack_impulse_grabber.0 +--- jack-1.9.5.old/man/jack_impulse_grabber.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_impulse_grabber.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,11 @@ ++.TH JACK_IMPULSE_GRABBER "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_impulse_grabber \- JACK toolkit client to grab an impulse (response) ++.SH SYNOPSIS ++\fBjack_impulse_grabber\fR \fB-d\fR \fIduration\fR [\fI-f\fR (C|gnuplot)] ++.SH DESCRIPTION ++\fBjack_impulse_grabber\fR is a JACK example client for collecting ++impulses recordings from JACK ports. ++ ++ ++ +diff -rupN jack-1.9.5.old/man/jack_load.0 jack-1.9.5/man/jack_load.0 +--- jack-1.9.5.old/man/jack_load.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_load.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,28 @@ ++.TH JACK_LOAD "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_load \- JACK toolkit client for loading in-process clients ++.SH SYNOPSIS ++\fBjack_load\fR [ \fI-i\fR initstring ] [ \fI-s\fR servername ] [\fI-w\fR ] client-name so-name [ initstring ] ++.SH DESCRIPTION ++\fBjack_load\fR is a JACK toolkit client. It loads the specified plugin and creates an in-process client. ++.SH ARGUMENTS ++.PP ++The client-name must be a currently unused client name. ++.PP ++The so-name is the name of file that client code is stored in (typically, \fIclientname.so\fR) ++.SH OPTIONS ++.TP ++\fB-i\fR, \fB--init\fR init-string ++.br ++initialization string passed to the in-process client. Note that this can also be specified as the last argument on the command line. ++.TP ++\fB-s\fR, \fB--server\fR servername ++.br ++Name of JACK server to connect to ++.TP ++\fB-w\fR, \fB--wait\fR ++Wait for a signal (eg. from Ctrl-c) and then unload the client. ++.SH AUTHOR ++Jeremy Hall ++ ++ +diff -rupN jack-1.9.5.old/man/jack_lsp.0 jack-1.9.5/man/jack_lsp.0 +--- jack-1.9.5.old/man/jack_lsp.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_lsp.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,47 @@ ++.TH JACK_LSP "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_lsp \- JACK toolkit client to list informtion on ports ++.SH SYNOPSIS ++\fBjack_lsp\fR [ \fI-s\fR | \fI--server\fR servername ] [ \fI-AclLptvh\fR ] ++.SH DESCRIPTION ++\fBjack_lsp\fR lists all known ports associated with a JACK ++server. It can also optionally list various kinds of information about each port. ++.SH OPTIONS ++.TP ++\fB-s\fR, \fB--server\fR \fIservername\fR ++.br ++Connect to the jack server named \fIservername\fR ++.TP ++\fB-A\fR, \fB--aliases\fR ++.br ++List aliases for each port ++.TP ++\fB-c\fR, \fB--connections\fR ++.br ++List connections to/from each port ++.TP ++\fB-l\fR, \fB--latency\fR ++.br ++Display per-port latency in frames at each port ++.TP ++\fB-L\fR, \fI--latency\fR ++.br ++Display total latency in frames at each port ++.TP ++\fB-p\fR, \fB--properties\fR ++.br ++Display port properties. Output may include input|output, can-monitor, physical, terminal ++.TP ++\fB-t\fR, \fB--type\fR ++.br ++Display port type ++.TP ++\fB-h\fR, \fB--help\fR ++.br ++Display help/usage message ++.TP ++\fB-v\fR, \fB--version\fR ++.br ++Output version information and exit ++ ++ +diff -rupN jack-1.9.5.old/man/jack_metro.0 jack-1.9.5/man/jack_metro.0 +--- jack-1.9.5.old/man/jack_metro.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_metro.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,40 @@ ++.TH JACK_METRO "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_metro \- JACK toolkit metronome ++.SH SYNOPSIS ++\fBjack_metro\fR [ \fI-n\fR name ] [ \fI-f\fR hz ] [ \fI-D\fR msecs ] [\fI-a\fR % ] [ \fI-d\fR % ] \fI-b\fR bpm ++.SH DESCRIPTION ++\fBjack_metro\fR is a simple metronome for JACK. It generates a ++synthetic "tick" sound for every beat. Note that is does \fBnot\fR ++connect its output port by default - to hear the sound it makes you must ++connect them using some other tool. ++.SH OPTIONS ++.TP ++\fB-n\fR, \fB--name\fR ++.br ++Specify a name for this instance of the metronome. ++.TP ++\fB-f\fR, \fB--frequency\fR Hz ++.br ++Define the frequency of the "tick" in Hz. ++.TP ++\fB-D\fR, \fB--duration\fR msecs ++.br ++Define the duration of the "tick" in milliseconds. ++.TP ++\fB-a\fR, \fB--attack\fR %-age ++.br ++Define the duration of the attack phase of the "tick" as a percentage ++of the duration. ++.TP ++\fB-d\fR, \fB--decay\fR %-age ++.br ++Define the duration of the decay phase of the "tick" as a percentage ++of the duration. ++.TP ++\fB--b\fR, \fB--bpm\fR bpm ++.br ++Define the number of beats per minute. ++.SH AUTHOR ++Anthony Van Groningen ++ +diff -rupN jack-1.9.5.old/man/jack_monitor_client.0 jack-1.9.5/man/jack_monitor_client.0 +--- jack-1.9.5.old/man/jack_monitor_client.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_monitor_client.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,18 @@ ++.TH JACK_CONNECT "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_monitor_client \- The JACK Audio Connection Kit example client ++.SH SYNOPSIS ++.B jack_monitor_client ++client-name ++.PP ++The client-name must be the name of a existing client that monitoring is ++to be enabled for. ++.SH DESCRIPTION ++.B jack_monitor_client ++is an example client for the JACK Audio Connection Kit. It enables ++monitoring for the specified client. ++.SH AUTHOR ++Jeremy Hall ++.PP ++This manpage was written by Robert Jordens for Debian. ++ +diff -rupN jack-1.9.5.old/man/jack_netsource.0 jack-1.9.5/man/jack_netsource.0 +--- jack-1.9.5.old/man/jack_netsource.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_netsource.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,109 @@ ++.TH JACK_NETSOURCE "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_netsource \- Netjack Master client for one slave ++.SH SYNOPSIS ++\fBjack_netsource\fR [ \fI-H\fR hostname ] [ \fIoptions\fR ] ++ ++.SH DESCRIPTION ++\fBjack_netsource\fR The Master side of a netjack connection. Represents the slave jackd -dnet in the master jack graph. ++Most connection parameters are configured via the netsource, and the slave will set itself up according to the commandline ++option given to jack_netsource. ++.br ++Netjack allows low latency audio connections over general IP networks. When using celt for compression, it is even possible ++to establish transatlantic links, with latencies not much over the actual ping time. ++.br ++But the main usecase is of course a LAN, where it can achieve one jack period of latency. ++ ++.SH OPTIONS ++.TP ++\fB-h\fR this help text ++.TP ++\fB-H\fR \fIslave host\fR ++.br ++Host name of the slave JACK ++.TP ++\fB-o\fR \fInum channels\fR ++.br ++Number of audio playback channels ++.TP ++\fB-i\fR \fInum channels\fR ++.br ++Number of audio capture channels ++.TP ++\fB-O\fR \fInum channels\fR ++.br ++Number of midi playback channels ++.TP ++\fB-I\fR \fInum channels\fR ++.br ++Number of midi capture channels ++.TP ++\fB-n\fR \fIperiods\fR ++.br ++Network latency in JACK periods ++.TP ++\fB-p\fR \fIport\fR ++.br ++UDP port that the slave is listening on ++.TP ++\fB-r\fR \fIreply port\fR ++.br ++UDP port that we are listening on ++.TP ++\fB-B\fR \fIbind port\fR ++.br ++reply port, for use in NAT environments ++.TP ++\fB-b\fR \fIbitdepth\fR ++.br ++Set transport to use 16bit or 8bit ++.TP ++\fB-c\fR \fIbytes\fR ++.br ++Use CELT encoding with per period and channel ++.TP ++\fB-m\fR \fImtu\fR ++.br ++Assume this mtu for the link ++.TP ++\fB-R\fR \fIN\fR ++.br ++Redundancy: send out packets N times. ++.TP ++\fB-e\fR ++.br ++skip host-to-network endianness conversion ++.TP ++\fB-N\fR \fIjack name\fR ++.br ++Reports a different client name to jack ++.TP ++.TP ++\fB-s\fR, \fB--server\fR \fIservername\fR ++.br ++Connect to the jack server named \fIservername\fR ++.TP ++\fB-h\fR, \fB--help\fR ++.br ++Display help/usage message ++.TP ++\fB-v\fR, \fB--version\fR ++.br ++Output version information and exit ++ ++ ++.SH EXAMPLES ++ ++.PP ++run a 4 audio channel bidirectional link with one period of latency and no midi channels. Audio data is flowing uncompressed over the wire: ++.br ++On \fIhostA\fR: ++.IP ++\fBjackd \-d alsa \fR ++.br ++\fBjack_netsource \-H hostB -n1 -i4 -o4 -I0 -O0 \fR ++.PP ++On \fIhostB\fR: ++.IP ++\fBjackd \-d net \fR ++ +diff -rupN jack-1.9.5.old/man/jackrec.0 jack-1.9.5/man/jackrec.0 +--- jack-1.9.5.old/man/jackrec.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jackrec.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,23 @@ ++.TH JACKREC "1" "!DATE!" "!VERSION!" ++.SH NAME ++jackrec \- JACK toolkit client for recording audio ++.SH SYNOPSIS ++.B jackrec ++\-f filename \-d seconds [ \-b bitdepth ] port1 [ port2 ... ] ++.SH DESCRIPTION ++.B jackrec is a basic, but useful, audio recorder that will record ++audio from 1 or more JACK ports to a file on disk. The file format is ++always RIFF/WAV, with samples stored as signed integers. The sample ++bit depth can be selected using the \fI-b\fR option. The file will ++have as many channels as there are ports specified on the command line ++- each channel will contain the data recorded from one port. The user ++should generally specify the duration (in seconds) using the \fI-d\fR ++option. If not specified, jackrec will record until terminated by a ++signal (eg. from Ctrl-c). ++.PP ++This application is not intended to be a heavy duty audio recorder, ++and originated as an example client to show how to handle threading ++and disk I/O in a JACK client. However, it is a useful, simple ++recorder and is included in the JACK toolkit as a result. ++ ++ +diff -rupN jack-1.9.5.old/man/jack_samplerate.0 jack-1.9.5/man/jack_samplerate.0 +--- jack-1.9.5.old/man/jack_samplerate.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_samplerate.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,9 @@ ++.TH JACK_SAMPLERATE "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_samplerate \- JACK toolkit client to print current samplerate ++.SH SYNOPSIS ++.B jack_samplerate ++.SH DESCRIPTION ++.B jack_samplerate prints the current samplerate, and exits. ++ ++ +diff -rupN jack-1.9.5.old/man/jack_showtime.0 jack-1.9.5/man/jack_showtime.0 +--- jack-1.9.5.old/man/jack_showtime.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_showtime.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,13 @@ ++.TH JACK_SHOWTIME "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_showtime \- The JACK Audio Connection Kit example client ++.SH SYNOPSIS ++.B jack_showtime ++.SH DESCRIPTION ++.B jack_showtime ++prints the current timebase information to stdout ++.SH AUTHOR ++Paul Davis ++.PP ++This manpage was written by Stefan Schwandter ++ +diff -rupN jack-1.9.5.old/man/jack_simple_client.0 jack-1.9.5/man/jack_simple_client.0 +--- jack-1.9.5.old/man/jack_simple_client.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_simple_client.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,20 @@ ++.TH JACK_CONNECT "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_simple_client \- The JACK Audio Connection Kit example client ++.SH SYNOPSYS ++.B jack_simple_client ++client-name ++.PP ++The client-name must be a yet unused client name. ++.SH DESCRIPTION ++.B jack_simple_client ++is an example client for the JACK Audio Connection Kit. It creates two ++ports (client-name:input and client-name:output) that pass the data ++unmodified. ++.SH EXAMPLE ++jack_simple_client in_process_test ++.SH AUTHOR ++Jeremy Hall ++.PP ++This manpage was written by Robert Jordens for Debian. ++ +diff -rupN jack-1.9.5.old/man/jack_transport.0 jack-1.9.5/man/jack_transport.0 +--- jack-1.9.5.old/man/jack_transport.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_transport.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,13 @@ ++.TH JACK_TRANSPORT "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_transport \- JACK toolkit client for transport control ++.SH SYNOPSIS ++.B jack_transport ++.SH DESCRIPTION ++.B jack_transport ++is a toolkit client for the JACK Audio Connection Kit. It provides command-line ++control over the JACK transport system. Type help at jack_transport's ++command prompt to see the available commands. ++.SH AUTHOR ++Jeremy Hall ++ +diff -rupN jack-1.9.5.old/man/jack_unload.0 jack-1.9.5/man/jack_unload.0 +--- jack-1.9.5.old/man/jack_unload.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_unload.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,19 @@ ++.TH JACK_UNLOAD "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_unload \- The JACK Audio Connection Kit example client ++.SH SYNOPSIS ++.B jack_unload ++client-name ++.PP ++The client-name must be the name of a loaded client that can be unloaded. ++.SH DESCRIPTION ++.B jack_unload ++is the counterpart to ++.B jack_load ++and unloads the specified client. ++.SH EXAMPLE ++.B jack_unload in_process_test ++.SH AUTHOR ++Jeremy Hall ++.PP ++This manpage was written by Robert Jordens for Debian. +diff -rupN jack-1.9.5.old/man/jack_wait.0 jack-1.9.5/man/jack_wait.0 +--- jack-1.9.5.old/man/jack_wait.0 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/jack_wait.0 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,41 @@ ++.TH JACK_WAIT "1" "!DATE!" "!VERSION!" ++.SH NAME ++jack_wait \- JACK toolkit client to check and wait for existence/exit of jackd. ++.SH SYNOPSIS ++\fBjack_wait\fR [ \fI-s\fR | \fI--server\fR servername ] [ \fI-t\fR | \fI--timeout\fR timeout_seconds [ \fI-cqwhv\fR ] ++.SH DESCRIPTION ++\fBjack_wait\fR When invoked with \fI-c\fR it only checks for the existence of a jack server. When invoked with \fI-w\fR the ++program will wait for a jackd to be available. ++The \fI-q\fR makes it wait for the jackd to exit. ++ ++.SH OPTIONS ++.TP ++\fB-w\fR, \fB--wait\fR ++.br ++Wait for jackd to be available. ++.TP ++\fB-q\fR, \fB--quit\fR ++.br ++Wait for jackd quit. ++.TP ++\fB-c\fR, \fB--check\fR ++.br ++Only check for existence of jackd, and exit. ++.TP ++\fB-s\fR, \fB--server\fR \fIservername\fR ++.br ++Connect to the jack server named \fIservername\fR ++.TP ++\fB-t\fR, \fB--timeout\fR \fItimeout_seconds\fR ++.br ++Only wait \fItimeout_seconds\fR. ++.TP ++\fB-h\fR, \fB--help\fR ++.br ++Display help/usage message ++.TP ++\fB-v\fR, \fB--version\fR ++.br ++Output version information and exit ++ ++ +diff -rupN jack-1.9.5.old/man/wscript jack-1.9.5/man/wscript +--- jack-1.9.5.old/man/wscript 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.5/man/wscript 2010-05-17 05:30:11.000000000 -0400 +@@ -0,0 +1,13 @@ ++#! /usr/bin/env python ++# encoding: utf-8 ++ ++import Build ++import re ++import os ++import misc ++ ++ ++def build(bld): ++ bld.exec_command("cd man ; sh fill_template %s" % bld.env['JACK_VERSION']) ++ bld.install_files(bld.env['MANDIR'], '*.1') ++ +diff -rupN jack-1.9.5.old/wscript jack-1.9.5/wscript +--- jack-1.9.5.old/wscript 2010-02-12 05:58:08.000000000 -0500 ++++ jack-1.9.5/wscript 2010-06-04 22:00:04.000000000 -0400 +@@ -62,6 +62,7 @@ def set_options(opt): + + opt.add_option('--libdir', type='string', help="Library directory [Default: /lib]") + opt.add_option('--libdir32', type='string', help="32bit Library directory [Default: /lib32]") ++ opt.add_option('--mandir', type='string', help="Manpage directory [Default: /share/man/man1]") + opt.add_option('--dbus', action='store_true', default=False, help='Enable D-Bus JACK (jackdbus)') + opt.add_option('--classic', action='store_true', default=False, help='Force enable standard JACK (jackd) even if D-Bus JACK (jackdbus) is enabled too') + opt.add_option('--doxygen', action='store_true', default=False, help='Enable build of doxygen documentation') +@@ -150,6 +151,11 @@ def configure(conf): + conf.env['LIBDIR'] = conf.env['PREFIX'] + Options.options.libdir + else: + conf.env['LIBDIR'] = conf.env['PREFIX'] + '/lib' ++ ++ if Options.options.mandir: ++ conf.env['MANDIR'] = conf.env['PREFIX'] + Options.options.mandir ++ else: ++ conf.env['MANDIR'] = conf.env['PREFIX'] + '/share/man/man1' + + if conf.env['BUILD_DEBUG']: + conf.env.append_unique('CXXFLAGS', '-g') +@@ -255,6 +261,7 @@ def build(bld): + bld.add_subdirs('linux') + bld.add_subdirs('example-clients') + bld.add_subdirs('tests') ++ bld.add_subdirs('man') + if bld.env['BUILD_JACKDBUS'] == True: + bld.add_subdirs('dbus') + diff --git a/jack-realtime-compat.patch b/jack-realtime-compat.patch new file mode 100644 index 0000000..8ab34b4 --- /dev/null +++ b/jack-realtime-compat.patch @@ -0,0 +1,56 @@ +diff -rupN jack-1.9.5.old/common/JackControlAPI.cpp jack-1.9.5/common/JackControlAPI.cpp +--- jack-1.9.5.old/common/JackControlAPI.cpp 2010-02-12 05:57:47.000000000 -0500 ++++ jack-1.9.5/common/JackControlAPI.cpp 2010-07-20 00:42:55.000000000 -0400 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include "jslist.h" + #include "driver_interface.h" +@@ -675,7 +676,13 @@ EXPORT jackctl_server_t * jackctl_server + goto fail_free_parameters; + } + +- value.i = 10; ++ struct utsname utsname; ++ int success; ++ success = uname( &utsname ); ++ if( success == 0 && strstr( utsname.version, "ccrma" ) ) ++ value.i = 60; ++ else ++ value.i = 20; + if (jackctl_add_parameter( + &server_ptr->parameters, + "realtime-priority", +diff -rupN jack-1.9.5.old/common/JackServerGlobals.cpp jack-1.9.5/common/JackServerGlobals.cpp +--- jack-1.9.5.old/common/JackServerGlobals.cpp 2010-02-12 05:57:47.000000000 -0500 ++++ jack-1.9.5/common/JackServerGlobals.cpp 2010-07-20 00:40:43.000000000 -0400 +@@ -22,6 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg + #include "shm.h" + #include + #include ++#include + + static char* server_name = NULL; + +@@ -67,9 +68,17 @@ void JackServerGlobals::Delete() + + bool JackServerGlobals::Init() + { ++ struct utsname utsname; ++ int success; ++ success = uname( &utsname ); ++ + int realtime = 0; + int client_timeout = 0; /* msecs; if zero, use period size. */ +- int realtime_priority = 10; ++ int realtime_priority; ++ if( success == 0 && strstr( utsname.version, "ccrma" ) ) ++ realtime_priority = 60; ++ else ++ realtime_priority = 20; + int verbose_aux = 0; + int do_mlock = 1; + unsigned int port_max = 128; diff --git a/sources b/sources index e5be2fc..e545201 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d58e29a55f285d54e75134cec8e02a10 jack-audio-connection-kit-0.118.0.tar.gz +fdb86434b57255139b72c7f91e827fea jack-1.9.5.tar.bz2 From 79100349a0ed0f4659a3c5c3d18fe77ac0f04ae8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 18:34:07 +0000 Subject: [PATCH 040/107] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index aec9dbf..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: jack-audio-connection-kit -# $Id: Makefile,v 1.1 2006/05/26 17:14:15 andriy Exp $ -NAME := jack-audio-connection-kit -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From a040891a59bb20ec6796b8ae654a7778f60c5151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 1 Sep 2010 10:11:58 +0200 Subject: [PATCH 041/107] - no Firewire on s390(x) - fix building on other arches than x86 and ppc --- jack-audio-connection-kit-1.9.5-64bit.patch | 273 +++++++++++++++++++ jack-audio-connection-kit-1.9.5-atomic.patch | 61 +++++ jack-audio-connection-kit-1.9.5-cycles.patch | 55 ++++ jack-audio-connection-kit.spec | 18 +- 4 files changed, 406 insertions(+), 1 deletion(-) create mode 100644 jack-audio-connection-kit-1.9.5-64bit.patch create mode 100644 jack-audio-connection-kit-1.9.5-atomic.patch create mode 100644 jack-audio-connection-kit-1.9.5-cycles.patch diff --git a/jack-audio-connection-kit-1.9.5-64bit.patch b/jack-audio-connection-kit-1.9.5-64bit.patch new file mode 100644 index 0000000..6ba57dd --- /dev/null +++ b/jack-audio-connection-kit-1.9.5-64bit.patch @@ -0,0 +1,273 @@ +diff -up jack-1.9.5/common/JackAPI.cpp.s390x jack-1.9.5/common/JackAPI.cpp +--- jack-1.9.5/common/JackAPI.cpp.s390x 2010-08-28 15:34:33.000000000 +0200 ++++ jack-1.9.5/common/JackAPI.cpp 2010-08-28 15:35:59.000000000 +0200 +@@ -317,7 +317,7 @@ EXPORT void* jack_port_get_buffer(jack_p + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_get_buffer"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -337,7 +337,7 @@ EXPORT const char* jack_port_name(const + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_name"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -357,7 +357,7 @@ EXPORT const char* jack_port_short_name( + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_short_name"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -377,7 +377,7 @@ EXPORT int jack_port_flags(const jack_po + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_flags"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -397,7 +397,7 @@ EXPORT const char* jack_port_type(const + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_type"); + #endif +- #if defined(__x86_64__) || defined(__ppc64__) ++ #if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -417,7 +417,7 @@ EXPORT jack_port_type_id_t jack_port_typ + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_type_id"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -437,7 +437,7 @@ EXPORT int jack_port_connected(const jac + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_connected"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -458,7 +458,7 @@ EXPORT int jack_port_connected_to(const + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_connected_to"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -488,7 +488,7 @@ EXPORT int jack_port_tie(jack_port_t* sr + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_tie"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t src_aux = (uint64_t)src; + #else + uint32_t src_aux = (uint32_t)src; +@@ -498,7 +498,7 @@ EXPORT int jack_port_tie(jack_port_t* sr + jack_error("jack_port_tie called with a NULL src port"); + return -1; + } +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t dst_aux = (uint64_t)dst; + #else + uint32_t dst_aux = (uint32_t)dst; +@@ -522,7 +522,7 @@ EXPORT int jack_port_untie(jack_port_t* + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_untie"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -542,7 +542,7 @@ EXPORT jack_nframes_t jack_port_get_late + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_get_latency"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -563,7 +563,7 @@ EXPORT void jack_port_set_latency(jack_p + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_set_latency"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -585,7 +585,7 @@ EXPORT int jack_recompute_total_latency( + #endif + + JackClient* client = (JackClient*)ext_client; +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -630,7 +630,7 @@ EXPORT int jack_port_set_name(jack_port_ + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_set_name"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -660,7 +660,7 @@ EXPORT int jack_port_set_alias(jack_port + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_set_alias"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -683,7 +683,7 @@ EXPORT int jack_port_unset_alias(jack_po + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_unset_alias"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -706,7 +706,7 @@ EXPORT int jack_port_get_aliases(const j + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_get_aliases"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -726,7 +726,7 @@ EXPORT int jack_port_request_monitor(jac + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_request_monitor"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -769,7 +769,7 @@ EXPORT int jack_port_ensure_monitor(jack + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_ensure_monitor"); + #endif +- #if defined(__x86_64__) || defined(__ppc64__) ++ #if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -789,7 +789,7 @@ EXPORT int jack_port_monitoring_input(ja + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_monitoring_input"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -1128,7 +1128,7 @@ EXPORT jack_port_t* jack_port_register(j + jack_error("jack_port_register called with a NULL port name or a NULL port_type"); + return NULL; + } else { +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + return (jack_port_t *)((uint64_t)client->PortRegister(port_name, port_type, flags, buffer_size)); + #else + return (jack_port_t *)client->PortRegister(port_name, port_type, flags, buffer_size); +@@ -1146,7 +1146,7 @@ EXPORT int jack_port_unregister(jack_cli + jack_error("jack_port_unregister called with a NULL client"); + return -1; + } +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -1169,7 +1169,7 @@ EXPORT int jack_port_is_mine(const jack_ + jack_error("jack_port_is_mine called with a NULL client"); + return -1; + } +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -1187,7 +1187,7 @@ EXPORT const char** jack_port_get_connec + #ifdef __CLIENTDEBUG__ + JackGlobals::CheckContext("jack_port_get_connections"); + #endif +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -1215,7 +1215,7 @@ EXPORT const char** jack_port_get_all_co + return NULL; + } + +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -1242,7 +1242,7 @@ EXPORT jack_nframes_t jack_port_get_tota + return 0; + } + +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)port; + #else + uint32_t port_aux = (uint32_t)port; +@@ -1307,7 +1307,7 @@ EXPORT int jack_port_disconnect(jack_cli + jack_error("jack_port_disconnect called with a NULL client"); + return -1; + } +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + uint64_t port_aux = (uint64_t)src; + #else + uint32_t port_aux = (uint32_t)src; +@@ -1383,7 +1383,7 @@ EXPORT jack_port_t* jack_port_by_name(ja + if (!manager) + return NULL; + int res = manager->GetPort(portname); // returns a port index at least > 1 +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + return (res == NO_PORT) ? NULL : (jack_port_t*)((uint64_t)res); + #else + return (res == NO_PORT) ? NULL : (jack_port_t*)res; +@@ -1397,7 +1397,7 @@ EXPORT jack_port_t* jack_port_by_id(jack + JackGlobals::CheckContext("jack_port_by_id"); + #endif + /* jack_port_t* type is actually the port index */ +-#if defined(__x86_64__) || defined(__ppc64__) ++#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) + return (jack_port_t*)((uint64_t)id); + #else + return (jack_port_t*)id; diff --git a/jack-audio-connection-kit-1.9.5-atomic.patch b/jack-audio-connection-kit-1.9.5-atomic.patch new file mode 100644 index 0000000..33a00ee --- /dev/null +++ b/jack-audio-connection-kit-1.9.5-atomic.patch @@ -0,0 +1,61 @@ +diff -up jack-1.9.5/linux/JackAtomic_os.h.atomic jack-1.9.5/linux/JackAtomic_os.h +--- jack-1.9.5/linux/JackAtomic_os.h.atomic 2010-08-28 15:23:58.000000000 +0200 ++++ jack-1.9.5/linux/JackAtomic_os.h 2010-09-01 09:29:03.000000000 +0200 +@@ -22,23 +22,23 @@ Foundation, Inc., 59 Temple Place - Suit + + #include "JackTypes.h" + +-#ifdef __PPC__ ++#if defined(__PPC__) + + static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr) + { + register int result; + register UInt32 tmp; + asm volatile ( +- "# CAS \n" +- " lwarx %4, 0, %1 \n" // creates a reservation on addr +- " cmpw %4, %2 \n" // test value at addr +- " bne- 1f \n" +- " sync \n" // synchronize instructions +- " stwcx. %3, 0, %1 \n" // if the reservation is not altered ++ "# CAS \n" ++ " lwarx %4, 0, %1 \n" // creates a reservation on addr ++ " cmpw %4, %2 \n" // test value at addr ++ " bne- 1f \n" ++ " sync \n" // synchronize instructions ++ " stwcx. %3, 0, %1 \n" // if the reservation is not altered + // stores the new value at addr +- " bne- 1f \n" ++ " bne- 1f \n" + " li %0, 1 \n" +- " b 2f \n" ++ " b 2f \n" + "1: \n" + " li %0, 0 \n" + "2: \n" +@@ -48,9 +48,7 @@ static inline int CAS(register UInt32 va + return result; + } + +-#endif +- +-#if defined(__i386__) || defined(__x86_64__) ++#elif defined(__i386__) || defined(__x86_64__) + + #define LOCK "lock ; " + +@@ -67,6 +65,13 @@ static inline char CAS(volatile UInt32 v + return ret; + } + ++#else ++ ++static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr) ++{ ++ return __sync_val_compare_and_swap((UInt32 *)addr, value, newvalue); ++} ++ + #endif + + #endif diff --git a/jack-audio-connection-kit-1.9.5-cycles.patch b/jack-audio-connection-kit-1.9.5-cycles.patch new file mode 100644 index 0000000..a9d0d95 --- /dev/null +++ b/jack-audio-connection-kit-1.9.5-cycles.patch @@ -0,0 +1,55 @@ +diff -up jack-1.9.5/linux/cycles.h.cycles jack-1.9.5/linux/cycles.h +--- jack-1.9.5/linux/cycles.h.cycles 2010-08-28 16:03:40.000000000 +0200 ++++ jack-1.9.5/linux/cycles.h 2010-08-28 16:05:47.000000000 +0200 +@@ -39,7 +39,7 @@ + + #ifdef __linux__ + +-#ifdef __x86_64__ ++#if defined(__x86_64__) + + typedef unsigned long cycles_t; + extern cycles_t cacheflush_time; +@@ -51,9 +51,7 @@ static inline unsigned long get_cycles(v + return (((unsigned long)hi)<<32) | ((unsigned long)lo); + } + +-#endif +- +-#ifdef __PPC__ ++#elif defined(__PPC__) + + /* PowerPC */ + +@@ -82,9 +80,7 @@ static inline cycles_t get_cycles(void) + return ret; + } + +-#endif +- +-#ifdef __i386__ ++#elif defined(__i386__) + + typedef unsigned long long cycles_t; + +@@ -101,8 +97,19 @@ static inline cycles_t get_cycles (void) + return ret; + } + +-#endif ++#else ++ ++/* fallback solution */ ++typedef unsigned long cycles_t; ++ ++static inline cycles_t get_cycles (void) ++{ ++ return 0; ++} ++ + + #endif + ++#endif /* __linux__ */ ++ + #endif /* __jack_cycles_h__ */ diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 1ffc83b..31c633a 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.5 -Release: 1%{?dist} +Release: 2%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -26,6 +26,13 @@ Patch3: jack-manpages.patch Patch4: jack-realtime-compat.patch # Compile against celt-0.8.0 Patch5: jack-celt08.patch +# Use GCC atomic operation for other arches +Patch6: %{name}-1.9.5-atomic.patch +# Treat s390x as 64-bit arch +Patch7: %{name}-1.9.5-64bit.patch +# Add fallback get_cycles() solution +Patch8: %{name}-1.9.5-cycles.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -33,8 +40,10 @@ BuildRequires: dbus-devel BuildRequires: celt-devel BuildRequires: doxygen BuildRequires: expat-devel +%ifnarch s390 s390x BuildRequires: libffado-devel BuildRequires: libfreebob-devel +%endif BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel BuildRequires: ncurses-devel @@ -85,6 +94,9 @@ Small example clients that use the Jack Audio Connection Kit. %if 0%{?fedora} > 13 %patch5 -p1 -b .celt08 %endif +%patch6 -p1 -b .atomic +%patch7 -p1 -b .64bit +%patch8 -p1 -b .cycles # Fix encoding issues for file in ChangeLog README TODO; do @@ -214,6 +226,10 @@ exit 0 %changelog +* Thu Aug 26 2010 Dan Horák - 1.9.5-2 +- no Firewire on s390(x) +- fix building on other arches than x86 and ppc + * Mon Jul 19 2010 Orcan Ogetbil - 1.9.5-1 - Jack 2! From d566530c1c0d06d497657b983cc4fb2b0955961f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 1 Sep 2010 10:36:35 +0200 Subject: [PATCH 042/107] drop the whitespace changes --- jack-audio-connection-kit-1.9.5-atomic.patch | 26 +------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/jack-audio-connection-kit-1.9.5-atomic.patch b/jack-audio-connection-kit-1.9.5-atomic.patch index 33a00ee..cd0a02a 100644 --- a/jack-audio-connection-kit-1.9.5-atomic.patch +++ b/jack-audio-connection-kit-1.9.5-atomic.patch @@ -1,7 +1,7 @@ diff -up jack-1.9.5/linux/JackAtomic_os.h.atomic jack-1.9.5/linux/JackAtomic_os.h --- jack-1.9.5/linux/JackAtomic_os.h.atomic 2010-08-28 15:23:58.000000000 +0200 +++ jack-1.9.5/linux/JackAtomic_os.h 2010-09-01 09:29:03.000000000 +0200 -@@ -22,23 +22,23 @@ Foundation, Inc., 59 Temple Place - Suit +@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suit #include "JackTypes.h" @@ -10,30 +10,6 @@ diff -up jack-1.9.5/linux/JackAtomic_os.h.atomic jack-1.9.5/linux/JackAtomic_os. static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr) { - register int result; - register UInt32 tmp; - asm volatile ( -- "# CAS \n" -- " lwarx %4, 0, %1 \n" // creates a reservation on addr -- " cmpw %4, %2 \n" // test value at addr -- " bne- 1f \n" -- " sync \n" // synchronize instructions -- " stwcx. %3, 0, %1 \n" // if the reservation is not altered -+ "# CAS \n" -+ " lwarx %4, 0, %1 \n" // creates a reservation on addr -+ " cmpw %4, %2 \n" // test value at addr -+ " bne- 1f \n" -+ " sync \n" // synchronize instructions -+ " stwcx. %3, 0, %1 \n" // if the reservation is not altered - // stores the new value at addr -- " bne- 1f \n" -+ " bne- 1f \n" - " li %0, 1 \n" -- " b 2f \n" -+ " b 2f \n" - "1: \n" - " li %0, 0 \n" - "2: \n" @@ -48,9 +48,7 @@ static inline int CAS(register UInt32 va return result; } From 6eabaff59160c0e00be776fbd5f3f7551e7ef177 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 7 Nov 2010 01:14:46 -0400 Subject: [PATCH 043/107] - update to 1.9.6 - update README.Fedora file with more recent information --- .gitignore | 1 + jack-audio-connection-kit-README.Fedora | 41 +++++++++++++++++-------- jack-audio-connection-kit.spec | 39 ++++++++++++----------- sources | 2 +- 4 files changed, 50 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 8545362..01a6518 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ jack-1.9.5.tar.bz2 +/jack-1.9.6.tar.bz2 diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index c2fe63f..dd3f084 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -1,3 +1,20 @@ + USING ALSA DIRECTLY + +Switch to root account. + +Install the required packages: + yum install alsa-plugins-jack + +Add yourself to the jackuser group. + usermod -a -G jackuser "" + +Start the jack daemon (your parameters may be different): + jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0 +or use + qjackctl -s +if you have it installed and configured. + + INTEGRATE JACK WITH PULSEAUDIO The original text is placed at: @@ -6,7 +23,7 @@ The original text is placed at: Switch to root account. Install the required packages: - yum install pulseaudio-module-jack alsa-plugins-jack jack-audio-connection-kit + yum install pulseaudio-module-jack alsa-plugins-jack Add yourself to the pulse-rt and jackuser groups. usermod -a -G pulse-rt,jackuser "" @@ -38,17 +55,10 @@ Start the pulseaudio daemon: Now everything should work. - USING ALSA DIRECTLY - -Due to big amount of text lines and a few necessary graphics here is only link -to very useful article about jack-audio-connection-kit and ALSA. So, go by -following link: - http://www.legg.uklinux.net/rosegarden_sound_howto_fc7.html - - RUNNING JACK SERVER IN REALTIME MODE -NOTE: this chapter describes steps for older Fedora vesions. +NOTE: This chapter explains why you have done the above changes in more detail. +It is kept for informational purposes. The JACK server jackd has the capability to run in a real-time mode which greatly decreases the chance of audio glitches. The real-time mode @@ -66,6 +76,13 @@ configuration files can decrease the security of your system. Documentation specific to the resource limits PAM module can be found at http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam-6.html#ss6.12 +Alternatively, one can create a new file + /etc/security/limits.d/-.conf +that contains the resource limits for individual users and/or groups. The +jack-audio-connection-kit package that comes with Fedora contains the file + /etc/security/limits.d/99-jack.conf +that does this job for you. + The resource limits that need to be changed to allow jackd to run in realtime mode are named rtprio and memlock. To increase the limits for a specific user named fred you would add the following to @@ -108,6 +125,6 @@ virtual memory (kbytes, -v) unlimited file locks (-x) unlimited file locks (-x) unlimited -Keep in mind that you may have to re-login before changes to limits.conf -take effect. +Keep in mind that you may have to re-login before changes to limits.conf, +or additions to the limits.d/ directory to take effect. diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 31c633a..f0771ba 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -3,8 +3,8 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 1.9.5 -Release: 2%{?dist} +Version: 1.9.6 +Release: 1%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -18,21 +18,9 @@ Patch0: jack-audio-connection-kit-no_date_footer.patch # Enables renaming of the jack ports based on a configuration file # Under discussion upstream. We need it for CCRMA compatibility Patch1: jack-infrastructure.patch -# Fix DSO linking -Patch2: jack-DSO-linking.patch -# Manpages. From ustream trunk -Patch3: jack-manpages.patch -# Make jack compatible with both the Fedora kernel and the realtime kernel Patch4: jack-realtime-compat.patch # Compile against celt-0.8.0 Patch5: jack-celt08.patch -# Use GCC atomic operation for other arches -Patch6: %{name}-1.9.5-atomic.patch -# Treat s390x as 64-bit arch -Patch7: %{name}-1.9.5-64bit.patch -# Add fallback get_cycles() solution -Patch8: %{name}-1.9.5-cycles.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -88,15 +76,10 @@ Small example clients that use the Jack Audio Connection Kit. %setup -q -n jack-%{version} %patch0 -p1 -b .nodate %patch1 -p1 -b .infra -%patch2 -p1 -b .linking -%patch3 -p1 %patch4 -p1 %if 0%{?fedora} > 13 %patch5 -p1 -b .celt08 %endif -%patch6 -p1 -b .atomic -%patch7 -p1 -b .64bit -%patch8 -p1 -b .cycles # Fix encoding issues for file in ChangeLog README TODO; do @@ -108,7 +91,19 @@ done %build export CPPFLAGS="$RPM_OPT_FLAGS" -./waf configure --prefix=%{_prefix} --libdir=/%{_lib} --doxygen --dbus --classic +export PREFIX=%{_prefix} +./waf configure \ + --mandir=/share/man/man1 \ + --libdir=/%{_lib} \ + --doxygen \ + --dbus \ + --classic \ +%ifnarch s390 s390x + --firewire \ + --freebob \ +%endif + --alsa + ./waf build %{?_smp_mflags} -v %install @@ -226,6 +221,10 @@ exit 0 %changelog +* Sat Nov 06 2010 Orcan Ogetbil - 1.9.6-1 +- update to 1.9.6 +- update README.Fedora file with more recent information + * Thu Aug 26 2010 Dan Horák - 1.9.5-2 - no Firewire on s390(x) - fix building on other arches than x86 and ppc diff --git a/sources b/sources index e545201..287dbe2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fdb86434b57255139b72c7f91e827fea jack-1.9.5.tar.bz2 +fcd4bdb44f51d71c9e19bc1d0e887902 jack-1.9.6.tar.bz2 From afc72262678aa2b9be880e673ec90d24f83e30ea Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Fri, 12 Nov 2010 22:24:54 -0500 Subject: [PATCH 044/107] - Fix the realtime compat patch so it can detect the realtime kernel better --- jack-audio-connection-kit.spec | 5 ++++- jack-realtime-compat.patch | 16 ++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index f0771ba..9796e05 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.6 -Release: 1%{?dist} +Release: 2%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -221,6 +221,9 @@ exit 0 %changelog +* Fri Nov 12 2010 Orcan Ogetbil - 1.9.6-2 +- Fix the realtime compat patch so it can detect the realtime kernel better + * Sat Nov 06 2010 Orcan Ogetbil - 1.9.6-1 - update to 1.9.6 - update README.Fedora file with more recent information diff --git a/jack-realtime-compat.patch b/jack-realtime-compat.patch index 8ab34b4..9a8bdce 100644 --- a/jack-realtime-compat.patch +++ b/jack-realtime-compat.patch @@ -1,6 +1,6 @@ -diff -rupN jack-1.9.5.old/common/JackControlAPI.cpp jack-1.9.5/common/JackControlAPI.cpp ---- jack-1.9.5.old/common/JackControlAPI.cpp 2010-02-12 05:57:47.000000000 -0500 -+++ jack-1.9.5/common/JackControlAPI.cpp 2010-07-20 00:42:55.000000000 -0400 +diff -rupN jack-1.9.6.old/common/JackControlAPI.cpp jack-1.9.6/common/JackControlAPI.cpp +--- jack-1.9.6.old/common/JackControlAPI.cpp 2010-08-30 06:23:53.000000000 -0400 ++++ jack-1.9.6/common/JackControlAPI.cpp 2010-11-11 03:02:30.000000000 -0500 @@ -32,6 +32,7 @@ #include #include @@ -17,16 +17,16 @@ diff -rupN jack-1.9.5.old/common/JackControlAPI.cpp jack-1.9.5/common/JackContro + struct utsname utsname; + int success; + success = uname( &utsname ); -+ if( success == 0 && strstr( utsname.version, "ccrma" ) ) ++ if( success == 0 && strstr( utsname.version, "PREEMPT RT" ) ) + value.i = 60; + else + value.i = 20; if (jackctl_add_parameter( &server_ptr->parameters, "realtime-priority", -diff -rupN jack-1.9.5.old/common/JackServerGlobals.cpp jack-1.9.5/common/JackServerGlobals.cpp ---- jack-1.9.5.old/common/JackServerGlobals.cpp 2010-02-12 05:57:47.000000000 -0500 -+++ jack-1.9.5/common/JackServerGlobals.cpp 2010-07-20 00:40:43.000000000 -0400 +diff -rupN jack-1.9.6.old/common/JackServerGlobals.cpp jack-1.9.6/common/JackServerGlobals.cpp +--- jack-1.9.6.old/common/JackServerGlobals.cpp 2010-08-30 06:23:53.000000000 -0400 ++++ jack-1.9.6/common/JackServerGlobals.cpp 2010-11-11 03:02:50.000000000 -0500 @@ -22,6 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg #include "shm.h" #include @@ -47,7 +47,7 @@ diff -rupN jack-1.9.5.old/common/JackServerGlobals.cpp jack-1.9.5/common/JackSer int client_timeout = 0; /* msecs; if zero, use period size. */ - int realtime_priority = 10; + int realtime_priority; -+ if( success == 0 && strstr( utsname.version, "ccrma" ) ) ++ if( success == 0 && strstr( utsname.version, "PREEMPT RT" ) ) + realtime_priority = 60; + else + realtime_priority = 20; From ec32eb22bd911df3184ae9248858f4016bb930e3 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 9 Feb 2011 07:35:08 -0600 Subject: [PATCH 045/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 9796e05..a89e7f4 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.6 -Release: 2%{?dist} +Release: 3%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -221,6 +221,9 @@ exit 0 %changelog +* Wed Feb 09 2011 Fedora Release Engineering - 1.9.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Fri Nov 12 2010 Orcan Ogetbil - 1.9.6-2 - Fix the realtime compat patch so it can detect the realtime kernel better From 415f261cb933449c23d533468843316c6278c057 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 16 Feb 2011 09:35:26 +0000 Subject: [PATCH 046/107] new celt --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index a89e7f4..e82e2c7 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.6 -Release: 3%{?dist} +Release: 4%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -221,6 +221,9 @@ exit 0 %changelog +* Wed Feb 16 2011 Peter Robinson - 1.9.6-4 +- Rebuilt for new celt + * Wed Feb 09 2011 Fedora Release Engineering - 1.9.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 9bfdbacd9c97d375682538afc4920441d06f67c0 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 16 Feb 2011 10:14:49 +0000 Subject: [PATCH 047/107] Try again once repo has refreshed --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index e82e2c7..46feb2a 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.6 -Release: 4%{?dist} +Release: 5%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -221,6 +221,9 @@ exit 0 %changelog +* Wed Feb 16 2011 Peter Robinson - 1.9.6-5 +- Try again once repo has refreshed + * Wed Feb 16 2011 Peter Robinson - 1.9.6-4 - Rebuilt for new celt From 884fcfd29f65e2dae8ea17691ca03410af139ab8 Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Sun, 20 Feb 2011 00:01:53 +0100 Subject: [PATCH 048/107] Rawhide: Patch for CELT 0.11 API change because of current broken deps. --- jack-1.9.6-celt011.patch | 21 +++++++++++++++++++++ jack-audio-connection-kit.spec | 10 +++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 jack-1.9.6-celt011.patch diff --git a/jack-1.9.6-celt011.patch b/jack-1.9.6-celt011.patch new file mode 100644 index 0000000..eca938a --- /dev/null +++ b/jack-1.9.6-celt011.patch @@ -0,0 +1,21 @@ +diff -Nur jack-1.9.6-orig/common/JackNetOneDriver.cpp jack-1.9.6/common/JackNetOneDriver.cpp +--- jack-1.9.6-orig/common/JackNetOneDriver.cpp 2010-08-30 12:23:53.000000000 +0200 ++++ jack-1.9.6/common/JackNetOneDriver.cpp 2011-02-19 23:55:14.000000000 +0100 +@@ -161,7 +161,7 @@ + #if HAVE_CELT_API_0_7 + celt_int32 lookahead; + CELTMode *celt_mode = celt_mode_create( netj.sample_rate, netj.period_size, NULL ); +- netj.capture_srcs = jack_slist_append(netj.capture_srcs, celt_decoder_create( celt_mode, 1, NULL ) ); ++ netj.capture_srcs = jack_slist_append(netj.capture_srcs, celt_decoder_create_custom( celt_mode, 1, NULL ) ); + #else + celt_int32_t lookahead; + CELTMode *celt_mode = celt_mode_create( netj.sample_rate, 1, netj.period_size, NULL ); +@@ -209,7 +209,7 @@ + #if HAVE_CELT + #if HAVE_CELT_API_0_7 + CELTMode *celt_mode = celt_mode_create( netj.sample_rate, netj.period_size, NULL ); +- netj.playback_srcs = jack_slist_append(netj.playback_srcs, celt_encoder_create( celt_mode, 1, NULL ) ); ++ netj.playback_srcs = jack_slist_append(netj.playback_srcs, celt_encoder_create_custom( celt_mode, 1, NULL ) ); + #else + CELTMode *celt_mode = celt_mode_create( netj.sample_rate, 1, netj.period_size, NULL ); + netj.playback_srcs = jack_slist_append(netj.playback_srcs, celt_encoder_create( celt_mode ) ); diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 46feb2a..fc206cc 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.6 -Release: 5%{?dist} +Release: 6%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -21,6 +21,8 @@ Patch1: jack-infrastructure.patch Patch4: jack-realtime-compat.patch # Compile against celt-0.8.0 Patch5: jack-celt08.patch +# compile with CELT 0.11 API +Patch6: jack-1.9.6-celt011.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -80,6 +82,9 @@ Small example clients that use the Jack Audio Connection Kit. %if 0%{?fedora} > 13 %patch5 -p1 -b .celt08 %endif +%if 0%{?fedora} > 14 +%patch6 -p1 -b .celt11 +%endif # Fix encoding issues for file in ChangeLog README TODO; do @@ -221,6 +226,9 @@ exit 0 %changelog +* Sat Feb 19 2011 Michael Schwendt - 1.9.6-6 +- Rawhide: Patch for CELT 0.11 API change because of current broken deps. + * Wed Feb 16 2011 Peter Robinson - 1.9.6-5 - Try again once repo has refreshed From 7dfaca28f51f278a6ed266c298041251fb30728d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Fri, 11 Mar 2011 22:15:57 +0100 Subject: [PATCH 049/107] powerpc64 doesn't have uc_regs anymore --- jack-audio-connection-kit-ppc-uc_regs.patch | 15 +++++++++++++++ jack-audio-connection-kit.spec | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 jack-audio-connection-kit-ppc-uc_regs.patch diff --git a/jack-audio-connection-kit-ppc-uc_regs.patch b/jack-audio-connection-kit-ppc-uc_regs.patch new file mode 100644 index 0000000..2565820 --- /dev/null +++ b/jack-audio-connection-kit-ppc-uc_regs.patch @@ -0,0 +1,15 @@ +diff -up jack-1.9.6/dbus/sigsegv.c.uc_regs jack-1.9.6/dbus/sigsegv.c +--- jack-1.9.6/dbus/sigsegv.c.uc_regs 2010-08-30 10:24:16.000000000 +0000 ++++ jack-1.9.6/dbus/sigsegv.c 2011-03-11 20:40:46.000000000 +0000 +@@ -101,8 +101,10 @@ static void signal_segv(int signum, sigi + #if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) + for(i = 0; i < NGREG; i++) + jack_error("reg[%02d] = 0x" REGFORMAT, i, +-#if defined(__powerpc__) ++#if defined(__powerpc__) && !defined(__powerpc64__) + ucontext->uc_mcontext.uc_regs[i] ++#elif defined(__powerpc__) && defined(__powerpc64__) ++ ucontext->uc_mcontext.gp_regs[i] + #elif defined(__sparc__) && defined(__arch64__) + ucontext->uc_mcontext.mc_gregs[i] + #else diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index fc206cc..ac341a0 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -23,6 +23,8 @@ Patch4: jack-realtime-compat.patch Patch5: jack-celt08.patch # compile with CELT 0.11 API Patch6: jack-1.9.6-celt011.patch +# uc_regs no longer available on ppc64 +Patch7: jack-audio-connection-kit-ppc-uc_regs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -85,6 +87,7 @@ Small example clients that use the Jack Audio Connection Kit. %if 0%{?fedora} > 14 %patch6 -p1 -b .celt11 %endif +%patch7 -p1 -b .uc_regs # Fix encoding issues for file in ChangeLog README TODO; do @@ -226,6 +229,9 @@ exit 0 %changelog +* Fri Mar 11 2011 Karsten Hopp 1.9.6-6 +- powerpc64 doesn't have uc_regs anymore + * Sat Feb 19 2011 Michael Schwendt - 1.9.6-6 - Rawhide: Patch for CELT 0.11 API change because of current broken deps. From a64fdde9b31d5f70db753418ffe28c045410891d Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 3 Apr 2011 21:12:17 -0400 Subject: [PATCH 050/107] update to 1.9.7 --- .gitignore | 1 + jack-1.9.6-celt011.patch | 21 - jack-DSO-linking.patch | 11 - jack-audio-connection-kit-1.9.5-64bit.patch | 273 -- jack-audio-connection-kit-1.9.5-atomic.patch | 37 - jack-audio-connection-kit-1.9.5-cycles.patch | 55 - jack-audio-connection-kit-README.Fedora | 2 + ...-audio-connection-kit-no_date_footer.patch | 22 +- jack-audio-connection-kit.spec | 56 +- jack-celt08.patch | 30 - jack-doxygen-output-dir-fix.patch | 12 + jack-freebob-buildfix.patch | 12 + jack-infrastructure.patch | 3365 ----------------- jack-manpages.patch | 1215 ------ sources | 2 +- 15 files changed, 67 insertions(+), 5047 deletions(-) delete mode 100644 jack-1.9.6-celt011.patch delete mode 100644 jack-DSO-linking.patch delete mode 100644 jack-audio-connection-kit-1.9.5-64bit.patch delete mode 100644 jack-audio-connection-kit-1.9.5-atomic.patch delete mode 100644 jack-audio-connection-kit-1.9.5-cycles.patch delete mode 100644 jack-celt08.patch create mode 100644 jack-doxygen-output-dir-fix.patch create mode 100644 jack-freebob-buildfix.patch delete mode 100644 jack-infrastructure.patch delete mode 100644 jack-manpages.patch diff --git a/.gitignore b/.gitignore index 01a6518..0aa4af7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ jack-1.9.5.tar.bz2 /jack-1.9.6.tar.bz2 +/jack-1.9.7.tar.bz2 diff --git a/jack-1.9.6-celt011.patch b/jack-1.9.6-celt011.patch deleted file mode 100644 index eca938a..0000000 --- a/jack-1.9.6-celt011.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Nur jack-1.9.6-orig/common/JackNetOneDriver.cpp jack-1.9.6/common/JackNetOneDriver.cpp ---- jack-1.9.6-orig/common/JackNetOneDriver.cpp 2010-08-30 12:23:53.000000000 +0200 -+++ jack-1.9.6/common/JackNetOneDriver.cpp 2011-02-19 23:55:14.000000000 +0100 -@@ -161,7 +161,7 @@ - #if HAVE_CELT_API_0_7 - celt_int32 lookahead; - CELTMode *celt_mode = celt_mode_create( netj.sample_rate, netj.period_size, NULL ); -- netj.capture_srcs = jack_slist_append(netj.capture_srcs, celt_decoder_create( celt_mode, 1, NULL ) ); -+ netj.capture_srcs = jack_slist_append(netj.capture_srcs, celt_decoder_create_custom( celt_mode, 1, NULL ) ); - #else - celt_int32_t lookahead; - CELTMode *celt_mode = celt_mode_create( netj.sample_rate, 1, netj.period_size, NULL ); -@@ -209,7 +209,7 @@ - #if HAVE_CELT - #if HAVE_CELT_API_0_7 - CELTMode *celt_mode = celt_mode_create( netj.sample_rate, netj.period_size, NULL ); -- netj.playback_srcs = jack_slist_append(netj.playback_srcs, celt_encoder_create( celt_mode, 1, NULL ) ); -+ netj.playback_srcs = jack_slist_append(netj.playback_srcs, celt_encoder_create_custom( celt_mode, 1, NULL ) ); - #else - CELTMode *celt_mode = celt_mode_create( netj.sample_rate, 1, netj.period_size, NULL ); - netj.playback_srcs = jack_slist_append(netj.playback_srcs, celt_encoder_create( celt_mode ) ); diff --git a/jack-DSO-linking.patch b/jack-DSO-linking.patch deleted file mode 100644 index 855e82f..0000000 --- a/jack-DSO-linking.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- jack-1.9.5/wscript~ 2010-02-12 05:58:08.000000000 -0500 -+++ jack-1.9.5/wscript 2010-05-18 14:14:27.000000000 -0400 -@@ -230,6 +230,8 @@ - print Logs.colors.NORMAL, - print - -+ conf.env.append_unique('LINKFLAGS', '-lm -lstdc++') -+ - if Options.options.mixed == True: - env_variant2 = conf.env.copy() - conf.set_env_name('lib32', env_variant2) diff --git a/jack-audio-connection-kit-1.9.5-64bit.patch b/jack-audio-connection-kit-1.9.5-64bit.patch deleted file mode 100644 index 6ba57dd..0000000 --- a/jack-audio-connection-kit-1.9.5-64bit.patch +++ /dev/null @@ -1,273 +0,0 @@ -diff -up jack-1.9.5/common/JackAPI.cpp.s390x jack-1.9.5/common/JackAPI.cpp ---- jack-1.9.5/common/JackAPI.cpp.s390x 2010-08-28 15:34:33.000000000 +0200 -+++ jack-1.9.5/common/JackAPI.cpp 2010-08-28 15:35:59.000000000 +0200 -@@ -317,7 +317,7 @@ EXPORT void* jack_port_get_buffer(jack_p - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_get_buffer"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -337,7 +337,7 @@ EXPORT const char* jack_port_name(const - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_name"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -357,7 +357,7 @@ EXPORT const char* jack_port_short_name( - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_short_name"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -377,7 +377,7 @@ EXPORT int jack_port_flags(const jack_po - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_flags"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -397,7 +397,7 @@ EXPORT const char* jack_port_type(const - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_type"); - #endif -- #if defined(__x86_64__) || defined(__ppc64__) -+ #if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -417,7 +417,7 @@ EXPORT jack_port_type_id_t jack_port_typ - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_type_id"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -437,7 +437,7 @@ EXPORT int jack_port_connected(const jac - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_connected"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -458,7 +458,7 @@ EXPORT int jack_port_connected_to(const - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_connected_to"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -488,7 +488,7 @@ EXPORT int jack_port_tie(jack_port_t* sr - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_tie"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t src_aux = (uint64_t)src; - #else - uint32_t src_aux = (uint32_t)src; -@@ -498,7 +498,7 @@ EXPORT int jack_port_tie(jack_port_t* sr - jack_error("jack_port_tie called with a NULL src port"); - return -1; - } --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t dst_aux = (uint64_t)dst; - #else - uint32_t dst_aux = (uint32_t)dst; -@@ -522,7 +522,7 @@ EXPORT int jack_port_untie(jack_port_t* - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_untie"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -542,7 +542,7 @@ EXPORT jack_nframes_t jack_port_get_late - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_get_latency"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -563,7 +563,7 @@ EXPORT void jack_port_set_latency(jack_p - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_set_latency"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -585,7 +585,7 @@ EXPORT int jack_recompute_total_latency( - #endif - - JackClient* client = (JackClient*)ext_client; --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -630,7 +630,7 @@ EXPORT int jack_port_set_name(jack_port_ - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_set_name"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -660,7 +660,7 @@ EXPORT int jack_port_set_alias(jack_port - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_set_alias"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -683,7 +683,7 @@ EXPORT int jack_port_unset_alias(jack_po - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_unset_alias"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -706,7 +706,7 @@ EXPORT int jack_port_get_aliases(const j - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_get_aliases"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -726,7 +726,7 @@ EXPORT int jack_port_request_monitor(jac - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_request_monitor"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -769,7 +769,7 @@ EXPORT int jack_port_ensure_monitor(jack - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_ensure_monitor"); - #endif -- #if defined(__x86_64__) || defined(__ppc64__) -+ #if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -789,7 +789,7 @@ EXPORT int jack_port_monitoring_input(ja - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_monitoring_input"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -1128,7 +1128,7 @@ EXPORT jack_port_t* jack_port_register(j - jack_error("jack_port_register called with a NULL port name or a NULL port_type"); - return NULL; - } else { --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - return (jack_port_t *)((uint64_t)client->PortRegister(port_name, port_type, flags, buffer_size)); - #else - return (jack_port_t *)client->PortRegister(port_name, port_type, flags, buffer_size); -@@ -1146,7 +1146,7 @@ EXPORT int jack_port_unregister(jack_cli - jack_error("jack_port_unregister called with a NULL client"); - return -1; - } --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -1169,7 +1169,7 @@ EXPORT int jack_port_is_mine(const jack_ - jack_error("jack_port_is_mine called with a NULL client"); - return -1; - } --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -1187,7 +1187,7 @@ EXPORT const char** jack_port_get_connec - #ifdef __CLIENTDEBUG__ - JackGlobals::CheckContext("jack_port_get_connections"); - #endif --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -1215,7 +1215,7 @@ EXPORT const char** jack_port_get_all_co - return NULL; - } - --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -1242,7 +1242,7 @@ EXPORT jack_nframes_t jack_port_get_tota - return 0; - } - --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)port; - #else - uint32_t port_aux = (uint32_t)port; -@@ -1307,7 +1307,7 @@ EXPORT int jack_port_disconnect(jack_cli - jack_error("jack_port_disconnect called with a NULL client"); - return -1; - } --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - uint64_t port_aux = (uint64_t)src; - #else - uint32_t port_aux = (uint32_t)src; -@@ -1383,7 +1383,7 @@ EXPORT jack_port_t* jack_port_by_name(ja - if (!manager) - return NULL; - int res = manager->GetPort(portname); // returns a port index at least > 1 --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - return (res == NO_PORT) ? NULL : (jack_port_t*)((uint64_t)res); - #else - return (res == NO_PORT) ? NULL : (jack_port_t*)res; -@@ -1397,7 +1397,7 @@ EXPORT jack_port_t* jack_port_by_id(jack - JackGlobals::CheckContext("jack_port_by_id"); - #endif - /* jack_port_t* type is actually the port index */ --#if defined(__x86_64__) || defined(__ppc64__) -+#if defined(__x86_64__) || defined(__ppc64__) || defined (__s390x__) - return (jack_port_t*)((uint64_t)id); - #else - return (jack_port_t*)id; diff --git a/jack-audio-connection-kit-1.9.5-atomic.patch b/jack-audio-connection-kit-1.9.5-atomic.patch deleted file mode 100644 index cd0a02a..0000000 --- a/jack-audio-connection-kit-1.9.5-atomic.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up jack-1.9.5/linux/JackAtomic_os.h.atomic jack-1.9.5/linux/JackAtomic_os.h ---- jack-1.9.5/linux/JackAtomic_os.h.atomic 2010-08-28 15:23:58.000000000 +0200 -+++ jack-1.9.5/linux/JackAtomic_os.h 2010-09-01 09:29:03.000000000 +0200 -@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suit - - #include "JackTypes.h" - --#ifdef __PPC__ -+#if defined(__PPC__) - - static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr) - { -@@ -48,9 +48,7 @@ static inline int CAS(register UInt32 va - return result; - } - --#endif -- --#if defined(__i386__) || defined(__x86_64__) -+#elif defined(__i386__) || defined(__x86_64__) - - #define LOCK "lock ; " - -@@ -67,6 +65,13 @@ static inline char CAS(volatile UInt32 v - return ret; - } - -+#else -+ -+static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr) -+{ -+ return __sync_val_compare_and_swap((UInt32 *)addr, value, newvalue); -+} -+ - #endif - - #endif diff --git a/jack-audio-connection-kit-1.9.5-cycles.patch b/jack-audio-connection-kit-1.9.5-cycles.patch deleted file mode 100644 index a9d0d95..0000000 --- a/jack-audio-connection-kit-1.9.5-cycles.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -up jack-1.9.5/linux/cycles.h.cycles jack-1.9.5/linux/cycles.h ---- jack-1.9.5/linux/cycles.h.cycles 2010-08-28 16:03:40.000000000 +0200 -+++ jack-1.9.5/linux/cycles.h 2010-08-28 16:05:47.000000000 +0200 -@@ -39,7 +39,7 @@ - - #ifdef __linux__ - --#ifdef __x86_64__ -+#if defined(__x86_64__) - - typedef unsigned long cycles_t; - extern cycles_t cacheflush_time; -@@ -51,9 +51,7 @@ static inline unsigned long get_cycles(v - return (((unsigned long)hi)<<32) | ((unsigned long)lo); - } - --#endif -- --#ifdef __PPC__ -+#elif defined(__PPC__) - - /* PowerPC */ - -@@ -82,9 +80,7 @@ static inline cycles_t get_cycles(void) - return ret; - } - --#endif -- --#ifdef __i386__ -+#elif defined(__i386__) - - typedef unsigned long long cycles_t; - -@@ -101,8 +97,19 @@ static inline cycles_t get_cycles (void) - return ret; - } - --#endif -+#else -+ -+/* fallback solution */ -+typedef unsigned long cycles_t; -+ -+static inline cycles_t get_cycles (void) -+{ -+ return 0; -+} -+ - - #endif - -+#endif /* __linux__ */ -+ - #endif /* __jack_cycles_h__ */ diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index dd3f084..c0f22b7 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -7,6 +7,7 @@ Install the required packages: Add yourself to the jackuser group. usermod -a -G jackuser "" +Now you will need to log out and log back in, or simply restart the system. Start the jack daemon (your parameters may be different): jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0 @@ -16,6 +17,7 @@ if you have it installed and configured. INTEGRATE JACK WITH PULSEAUDIO +*** Note that this section is outdated *** The original text is placed at: http://www.harald-hoyer.de/linux/pulseaudio-and-jackd diff --git a/jack-audio-connection-kit-no_date_footer.patch b/jack-audio-connection-kit-no_date_footer.patch index 8509ee5..c931b9a 100644 --- a/jack-audio-connection-kit-no_date_footer.patch +++ b/jack-audio-connection-kit-no_date_footer.patch @@ -1,18 +1,18 @@ -diff -rupN jack-1.9.5.old/doxyfile jack-1.9.5/doxyfile ---- jack-1.9.5.old/doxyfile 2010-02-12 05:57:30.000000000 -0500 -+++ jack-1.9.5/doxyfile 2010-07-19 23:18:57.000000000 -0400 -@@ -413,7 +413,7 @@ HTML_HEADER = - # each generated HTML page. If it is left blank doxygen will generate a +diff -rupN jack-1.9.7.old/doxyfile jack-1.9.7/doxyfile +--- jack-1.9.7.old/doxyfile 2011-03-30 11:03:54.000000000 -0400 ++++ jack-1.9.7/doxyfile 2011-04-02 23:03:35.000000000 -0400 +@@ -800,7 +800,7 @@ HTML_HEADER = + # each generated HTML page. If it is left blank doxygen will generate a # standard footer. --HTML_FOOTER = +-HTML_FOOTER = +HTML_FOOTER = no_date_footer.html - # The HTML_STYLESHEET tag can be used to specify a user defined cascading - # style sheet that is used by each HTML page. It can be used to -diff -rupN jack-1.9.5.old/no_date_footer.html jack-1.9.5/no_date_footer.html ---- jack-1.9.5.old/no_date_footer.html 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/no_date_footer.html 2010-07-19 23:19:19.000000000 -0400 + # The HTML_STYLESHEET tag can be used to specify a user-defined cascading + # style sheet that is used by each HTML page. It can be used to +diff -rupN jack-1.9.7.old/no_date_footer.html jack-1.9.7/no_date_footer.html +--- jack-1.9.7.old/no_date_footer.html 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.7/no_date_footer.html 2011-04-02 22:53:49.000000000 -0400 @@ -0,0 +1,6 @@ +
+Generated for $projectname by 13 -%patch5 -p1 -b .celt08 -%endif -%if 0%{?fedora} > 14 -%patch6 -p1 -b .celt11 -%endif %patch7 -p1 -b .uc_regs # Fix encoding issues @@ -112,6 +103,7 @@ export PREFIX=%{_prefix} %endif --alsa + ./waf build %{?_smp_mflags} -v %install @@ -165,8 +157,10 @@ exit 0 %exclude %{_bindir}/jack_control %{_bindir}/jack_cpu %{_bindir}/jack_cpu_load -%{_bindir}/jack_delay +%{_bindir}/jack_iodelay +%{_bindir}/jack_midi_dump %{_bindir}/jack_server_control +%{_bindir}/jack_session_notify %{_bindir}/jack_test %{_bindir}/jack_thru %{_bindir}/jack_zombie @@ -177,6 +171,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/security/limits.d/*.conf %{_mandir}/man1/alsa_*.1* %{_mandir}/man1/jack_freewheel*.1* +%{_mandir}/man1/jack_iodelay.1* %{_mandir}/man1/jack_load*.1* %{_mandir}/man1/jack_unload*.1* %{_mandir}/man1/jackd*.1* @@ -208,8 +203,10 @@ exit 0 %{_bindir}/jack_showtime %{_bindir}/jack_transport %{_bindir}/jack_wait +%{_bindir}/jack_latent_client %{_bindir}/jack_monitor_client %{_bindir}/jack_simple_client +%{_bindir}/jack_simple_session_client %{_bindir}/jack_midiseq %{_bindir}/jack_midisine %{_bindir}/jack_multiple_metro @@ -229,6 +226,9 @@ exit 0 %changelog +* Sun Apr 03 2011 Orcan Ogetbil - 1.9.7-1 +- update to 1.9.7 + * Fri Mar 11 2011 Karsten Hopp 1.9.6-6 - powerpc64 doesn't have uc_regs anymore diff --git a/jack-celt08.patch b/jack-celt08.patch deleted file mode 100644 index e728c94..0000000 --- a/jack-celt08.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -rupN jack-1.9.5.old/common/JackNetOneDriver.cpp jack-1.9.5/common/JackNetOneDriver.cpp ---- jack-1.9.5.old/common/JackNetOneDriver.cpp 2010-02-12 05:57:48.000000000 -0500 -+++ jack-1.9.5/common/JackNetOneDriver.cpp 2010-07-20 01:26:44.000000000 -0400 -@@ -709,9 +709,9 @@ JackNetOneDriver::render_payload_to_jack - - CELTDecoder *decoder = (CELTDecoder *)src_node->data; - if( !packet_payload ) -- celt_decode_float( decoder, NULL, net_period_down, buf ); -+ celt_decode_float( decoder, NULL, net_period_down, buf, NULL ); - else -- celt_decode_float( decoder, packet_bufX, net_period_down, buf ); -+ celt_decode_float( decoder, packet_bufX, net_period_down, buf, NULL ); - - src_node = jack_slist_next (src_node); - } -diff -rupN jack-1.9.5.old/common/netjack_packet.c jack-1.9.5/common/netjack_packet.c ---- jack-1.9.5.old/common/netjack_packet.c 2010-02-12 05:57:47.000000000 -0500 -+++ jack-1.9.5/common/netjack_packet.c 2010-07-20 01:12:42.000000000 -0400 -@@ -1428,9 +1428,9 @@ render_payload_to_jack_ports_celt (void - - CELTDecoder *decoder = src_node->data; - if( !packet_payload ) -- celt_decode_float( decoder, NULL, net_period_down, buf ); -+ celt_decode_float( decoder, NULL, net_period_down, buf, NULL ); - else -- celt_decode_float( decoder, packet_bufX, net_period_down, buf ); -+ celt_decode_float( decoder, packet_bufX, net_period_down, buf, NULL ); - - src_node = jack_slist_next (src_node); - } diff --git a/jack-doxygen-output-dir-fix.patch b/jack-doxygen-output-dir-fix.patch new file mode 100644 index 0000000..8a93900 --- /dev/null +++ b/jack-doxygen-output-dir-fix.patch @@ -0,0 +1,12 @@ +diff -rupN jack-1.9.7.old/doxyfile jack-1.9.7/doxyfile +--- jack-1.9.7.old/doxyfile 2011-03-30 11:03:54.000000000 -0400 ++++ jack-1.9.7/doxyfile 2011-04-03 08:54:03.000000000 -0400 +@@ -38,7 +38,7 @@ PROJECT_NUMBER = 1.9.7 + # If a relative path is entered, it will be relative to the location + # where doxygen was started. If left blank the current directory will be used. + +-OUTPUT_DIRECTORY = ++OUTPUT_DIRECTORY = build/default/ + + # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create + # 4096 sub-directories (in 2 levels) under the output directory of each output diff --git a/jack-freebob-buildfix.patch b/jack-freebob-buildfix.patch new file mode 100644 index 0000000..0fea296 --- /dev/null +++ b/jack-freebob-buildfix.patch @@ -0,0 +1,12 @@ +diff -rupN jack-1.9.7.old/linux/freebob/JackFreebobDriver.cpp jack-1.9.7/linux/freebob/JackFreebobDriver.cpp +--- jack-1.9.7.old/linux/freebob/JackFreebobDriver.cpp 2011-03-30 11:04:28.000000000 -0400 ++++ jack-1.9.7/linux/freebob/JackFreebobDriver.cpp 2011-04-03 09:56:03.000000000 -0400 +@@ -768,7 +768,7 @@ int JackFreebobDriver::Attach() + } + port = fGraphManager->GetPort(port_index); + // Add one buffer more latency if "async" mode is used... +- range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency); ++ range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; + port->SetLatencyRange(JackPlaybackLatency, &range); + fPlaybackPortList[i] = port_index; + jack_log("JackFreebobDriver::Attach fPlaybackPortList[i] %ld ", port_index); diff --git a/jack-infrastructure.patch b/jack-infrastructure.patch deleted file mode 100644 index ed825b6..0000000 --- a/jack-infrastructure.patch +++ /dev/null @@ -1,3365 +0,0 @@ -diff -rupN jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp jack-1.9.5/linux/alsa/JackAlsaDriver.cpp ---- jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp 2010-02-12 05:58:07.000000000 -0500 -+++ jack-1.9.5/linux/alsa/JackAlsaDriver.cpp 2010-07-20 00:17:44.000000000 -0400 -@@ -49,6 +49,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg - #include "generic.h" - #include "memops.h" - #include "JackServerGlobals.h" -+#include "port_names.h" - - - //#define DEBUG_WAKEUP 1 -@@ -2091,6 +2092,8 @@ int JackAlsaDriver::Attach() - - alsa_driver_t* alsa_driver = (alsa_driver_t*)fDriver; - -+ char **portnames; -+ - if (alsa_driver->has_hw_monitoring) - port_flags |= JackPortCanMonitor; - -@@ -2100,13 +2103,15 @@ int JackAlsaDriver::Attach() - - jack_log("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); - -+ portnames = port_names_get_portnames(alsa_driver); -+ - for (int i = 0; i < fCaptureChannels; i++) { -- snprintf(alias, sizeof(alias) - 1, "%s:capture_%u", fAliasName, i + 1); -- snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1); -- if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { -+ snprintf(alias, sizeof(alias) - 1, "system:%s", portnames[i]); -+ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, alias, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { - jack_error("driver: cannot register port for %s", name); - return -1; - } -+ free(portnames[i]); - port = fGraphManager->GetPort(port_index); - port->SetAlias(alias); - port->SetLatency(alsa_driver->frames_per_cycle + alsa_driver->capture_frame_latency); -@@ -2117,12 +2122,12 @@ int JackAlsaDriver::Attach() - port_flags = (unsigned long)PlaybackDriverFlags; - - for (int i = 0; i < fPlaybackChannels; i++) { -- snprintf(alias, sizeof(alias) - 1, "%s:playback_%u", fAliasName, i + 1); -- snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1); -- if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { -+ snprintf(alias, sizeof(alias) - 1, "system:%s", portnames[i+fCaptureChannels]); -+ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, alias, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { - jack_error("driver: cannot register port for %s", name); - return -1; - } -+ free(portnames[i+fCaptureChannels]); - port = fGraphManager->GetPort(port_index); - port->SetAlias(alias); - // Add one buffer more latency if "async" mode is used... -@@ -2145,6 +2150,8 @@ int JackAlsaDriver::Attach() - } - } - -+ free(portnames); -+ - if (alsa_driver->midi) { - int err = (alsa_driver->midi->attach)(alsa_driver->midi); - if (err) -diff -rupN jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp.orig jack-1.9.5/linux/alsa/JackAlsaDriver.cpp.orig ---- jack-1.9.5.old/linux/alsa/JackAlsaDriver.cpp.orig 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/linux/alsa/JackAlsaDriver.cpp.orig 2010-02-12 05:58:07.000000000 -0500 -@@ -0,0 +1,2981 @@ -+/* -+Copyright (C) 2001 Paul Davis -+Copyright (C) 2004 Grame -+ -+This program is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2 of the License, or -+(at your option) any later version. -+ -+This program is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; if not, write to the Free Software -+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+*/ -+ -+#define __STDC_FORMAT_MACROS // For inttypes.h to work in C++ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "JackAlsaDriver.h" -+#include "JackEngineControl.h" -+#include "JackClientControl.h" -+#include "JackPort.h" -+#include "JackGraphManager.h" -+#include "JackLockedEngine.h" -+#include "JackPosixThread.h" -+#include "JackCompilerDeps.h" -+#include "hammerfall.h" -+#include "hdsp.h" -+#include "ice1712.h" -+#include "usx2y.h" -+#include "generic.h" -+#include "memops.h" -+#include "JackServerGlobals.h" -+ -+ -+//#define DEBUG_WAKEUP 1 -+ -+namespace Jack -+{ -+ -+#define jack_get_microseconds GetMicroSeconds -+ -+/* Delay (in process calls) before jackd will report an xrun */ -+#define XRUN_REPORT_DELAY 0 -+ -+void -+JackAlsaDriver::alsa_driver_release_channel_dependent_memory (alsa_driver_t *driver) -+{ -+ bitset_destroy (&driver->channels_done); -+ bitset_destroy (&driver->channels_not_done); -+ -+ if (driver->playback_addr) { -+ free (driver->playback_addr); -+ driver->playback_addr = 0; -+ } -+ -+ if (driver->capture_addr) { -+ free (driver->capture_addr); -+ driver->capture_addr = 0; -+ } -+ -+ if (driver->playback_interleave_skip) { -+ free (driver->playback_interleave_skip); -+ driver->playback_interleave_skip = NULL; -+ } -+ -+ if (driver->capture_interleave_skip) { -+ free (driver->capture_interleave_skip); -+ driver->capture_interleave_skip = NULL; -+ } -+ -+ if (driver->silent) { -+ free (driver->silent); -+ driver->silent = 0; -+ } -+ -+ if (driver->dither_state) { -+ free (driver->dither_state); -+ driver->dither_state = 0; -+ } -+} -+ -+int -+JackAlsaDriver::alsa_driver_check_capabilities (alsa_driver_t *driver) -+{ -+ return 0; -+} -+ -+static -+char * -+get_control_device_name (const char * device_name) -+{ -+ char * ctl_name; -+ regex_t expression; -+ -+ regcomp(&expression, "(plug)?hw:[0-9](,[0-9])?", REG_ICASE | REG_EXTENDED); -+ -+ if (!regexec(&expression, device_name, 0, NULL, 0)) { -+ /* the user wants a hw or plughw device, the ctl name -+ * should be hw:x where x is the card number */ -+ -+ char tmp[5]; -+ strncpy(tmp, strstr(device_name, "hw"), 4); -+ tmp[4] = '\0'; -+ //jack_log("control device %s", tmp); -+ ctl_name = strdup(tmp); -+ } else { -+ ctl_name = strdup(device_name); -+ } -+ -+ regfree(&expression); -+ -+ if (ctl_name == NULL) { -+ jack_error("strdup(\"%s\") failed.", ctl_name); -+ } -+ -+ return ctl_name; -+} -+ -+int -+JackAlsaDriver::alsa_driver_check_card_type (alsa_driver_t *driver) -+{ -+ int err; -+ snd_ctl_card_info_t *card_info; -+ char * ctl_name; -+ -+ snd_ctl_card_info_alloca (&card_info); -+ -+ ctl_name = get_control_device_name(driver->alsa_name_playback); -+ -+ // XXX: I don't know the "right" way to do this. Which to use -+ // driver->alsa_name_playback or driver->alsa_name_capture. -+ if ((err = snd_ctl_open (&driver->ctl_handle, ctl_name, 0)) < 0) { -+ jack_error ("control open \"%s\" (%s)", ctl_name, -+ snd_strerror(err)); -+ return -1; -+ } -+ -+ if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) { -+ jack_error ("control hardware info \"%s\" (%s)", -+ driver->alsa_name_playback, snd_strerror (err)); -+ snd_ctl_close (driver->ctl_handle); -+ return -1; -+ } -+ -+ driver->alsa_driver = strdup(snd_ctl_card_info_get_driver (card_info)); -+ jack_info("Using ALSA driver %s running on card %i - %s", driver->alsa_driver, snd_ctl_card_info_get_card(card_info), snd_ctl_card_info_get_longname(card_info)); -+ -+ free(ctl_name); -+ -+ return alsa_driver_check_capabilities (driver); -+} -+ -+int -+JackAlsaDriver::alsa_driver_hammerfall_hardware (alsa_driver_t *driver) -+{ -+ driver->hw = jack_alsa_hammerfall_hw_new (driver); -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_hdsp_hardware (alsa_driver_t *driver) -+{ -+ driver->hw = jack_alsa_hdsp_hw_new (driver); -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_ice1712_hardware (alsa_driver_t *driver) -+{ -+ driver->hw = jack_alsa_ice1712_hw_new (driver); -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_usx2y_hardware (alsa_driver_t *driver) -+{ -+ // TODO : will need so deeped redesign -+ // driver->hw = jack_alsa_usx2y_hw_new (driver); -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_generic_hardware (alsa_driver_t *driver) -+{ -+ driver->hw = jack_alsa_generic_hw_new (driver); -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_hw_specific (alsa_driver_t *driver, int hw_monitoring, -+ int hw_metering) -+{ -+ int err; -+ -+ if (!strcmp(driver->alsa_driver, "RME9652")) { -+ if ((err = alsa_driver_hammerfall_hardware (driver)) != 0) { -+ return err; -+ } -+ } else if (!strcmp(driver->alsa_driver, "H-DSP")) { -+ if ((err = alsa_driver_hdsp_hardware (driver)) != 0) { -+ return err; -+ } -+ } else if (!strcmp(driver->alsa_driver, "ICE1712")) { -+ if ((err = alsa_driver_ice1712_hardware (driver)) != 0) { -+ return err; -+ } -+ } /*else if (!strcmp(driver->alsa_driver, "USB US-X2Y")) { -+ if ((err = alsa_driver_usx2y_hardware (driver)) != 0) { -+ return err; -+ } -+ } */else { -+ if ((err = alsa_driver_generic_hardware (driver)) != 0) { -+ return err; -+ } -+ } -+ -+ if (driver->hw->capabilities & Cap_HardwareMonitoring) { -+ driver->has_hw_monitoring = TRUE; -+ /* XXX need to ensure that this is really FALSE or -+ * TRUE or whatever*/ -+ driver->hw_monitoring = hw_monitoring; -+ } else { -+ driver->has_hw_monitoring = FALSE; -+ driver->hw_monitoring = FALSE; -+ } -+ -+ if (driver->hw->capabilities & Cap_ClockLockReporting) { -+ driver->has_clock_sync_reporting = TRUE; -+ } else { -+ driver->has_clock_sync_reporting = FALSE; -+ } -+ -+ if (driver->hw->capabilities & Cap_HardwareMetering) { -+ driver->has_hw_metering = TRUE; -+ driver->hw_metering = hw_metering; -+ } else { -+ driver->has_hw_metering = FALSE; -+ driver->hw_metering = FALSE; -+ } -+ -+ return 0; -+} -+ -+void -+JackAlsaDriver::alsa_driver_setup_io_function_pointers (alsa_driver_t *driver) -+{ -+ if (driver->playback_handle) { -+ if (SND_PCM_FORMAT_FLOAT_LE == driver->playback_sample_format) { -+ if (driver->playback_interleaved) { -+ driver->channel_copy = memcpy_interleave_d32_s32; -+ } else { -+ driver->channel_copy = memcpy_fake; -+ } -+ driver->read_via_copy = sample_move_floatLE_sSs; -+ driver->write_via_copy = sample_move_dS_floatLE; -+ } else { -+ -+ switch (driver->playback_sample_bytes) { -+ case 2: -+ if (driver->playback_interleaved) { -+ driver->channel_copy = memcpy_interleave_d16_s16; -+ } else { -+ driver->channel_copy = memcpy_fake; -+ } -+ -+ switch (driver->dither) { -+ case Rectangular: -+ jack_info("Rectangular dithering at 16 bits"); -+ driver->write_via_copy = driver->quirk_bswap? -+ sample_move_dither_rect_d16_sSs: -+ sample_move_dither_rect_d16_sS; -+ break; -+ -+ case Triangular: -+ jack_info("Triangular dithering at 16 bits"); -+ driver->write_via_copy = driver->quirk_bswap? -+ sample_move_dither_tri_d16_sSs: -+ sample_move_dither_tri_d16_sS; -+ break; -+ -+ case Shaped: -+ jack_info("Noise-shaped dithering at 16 bits"); -+ driver->write_via_copy = driver->quirk_bswap? -+ sample_move_dither_shaped_d16_sSs: -+ sample_move_dither_shaped_d16_sS; -+ break; -+ -+ default: -+ driver->write_via_copy = driver->quirk_bswap? -+ sample_move_d16_sSs : -+ sample_move_d16_sS; -+ break; -+ } -+ break; -+ -+ case 3: /* NO DITHER */ -+ if (driver->playback_interleaved) { -+ driver->channel_copy = memcpy_interleave_d24_s24; -+ } else { -+ driver->channel_copy = memcpy_fake; -+ } -+ -+ driver->write_via_copy = driver->quirk_bswap? -+ sample_move_d24_sSs: -+ sample_move_d24_sS; -+ -+ break; -+ -+ case 4: /* NO DITHER */ -+ if (driver->playback_interleaved) { -+ driver->channel_copy = memcpy_interleave_d32_s32; -+ } else { -+ driver->channel_copy = memcpy_fake; -+ } -+ -+ driver->write_via_copy = driver->quirk_bswap? -+ sample_move_d32u24_sSs: -+ sample_move_d32u24_sS; -+ break; -+ -+ default: -+ jack_error ("impossible sample width (%d) discovered!", -+ driver->playback_sample_bytes); -+ exit (1); -+ } -+ } -+ } -+ -+ if (driver->capture_handle) { -+ switch (driver->capture_sample_bytes) { -+ case 2: -+ driver->read_via_copy = driver->quirk_bswap? -+ sample_move_dS_s16s: -+ sample_move_dS_s16; -+ break; -+ case 3: -+ driver->read_via_copy = driver->quirk_bswap? -+ sample_move_dS_s24s: -+ sample_move_dS_s24; -+ break; -+ case 4: -+ driver->read_via_copy = driver->quirk_bswap? -+ sample_move_dS_s32u24s: -+ sample_move_dS_s32u24; -+ break; -+ } -+ } -+} -+ -+int -+JackAlsaDriver::alsa_driver_configure_stream (alsa_driver_t *driver, char *device_name, -+ const char *stream_name, -+ snd_pcm_t *handle, -+ snd_pcm_hw_params_t *hw_params, -+ snd_pcm_sw_params_t *sw_params, -+ unsigned int *nperiodsp, -+ unsigned long *nchns, -+ unsigned long sample_width) -+{ -+ int err, format; -+ unsigned int frame_rate; -+ snd_pcm_uframes_t stop_th; -+ static struct { -+ char Name[32]; -+ snd_pcm_format_t format; -+ int swapped; -+ } formats[] = { -+ {"32bit float little-endian", SND_PCM_FORMAT_FLOAT_LE}, -+ {"32bit integer little-endian", SND_PCM_FORMAT_S32_LE, IS_LE}, -+ {"32bit integer big-endian", SND_PCM_FORMAT_S32_BE, IS_BE}, -+ {"24bit little-endian", SND_PCM_FORMAT_S24_3LE, IS_LE}, -+ {"24bit big-endian", SND_PCM_FORMAT_S24_3BE, IS_BE}, -+ {"16bit little-endian", SND_PCM_FORMAT_S16_LE, IS_LE}, -+ {"16bit big-endian", SND_PCM_FORMAT_S16_BE, IS_BE}, -+ }; -+#define NUMFORMATS (sizeof(formats)/sizeof(formats[0])) -+#define FIRST_16BIT_FORMAT 5 -+ -+ if ((err = snd_pcm_hw_params_any (handle, hw_params)) < 0) { -+ jack_error ("ALSA: no playback configurations available (%s)", -+ snd_strerror (err)); -+ return -1; -+ } -+ -+ if ((err = snd_pcm_hw_params_set_periods_integer (handle, hw_params)) -+ < 0) { -+ jack_error ("ALSA: cannot restrict period size to integral" -+ " value."); -+ return -1; -+ } -+ -+ if ((err = snd_pcm_hw_params_set_access (handle, hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED)) < 0) { -+ if ((err = snd_pcm_hw_params_set_access (handle, hw_params, SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0) { -+ if ((err = snd_pcm_hw_params_set_access ( -+ handle, hw_params, -+ SND_PCM_ACCESS_MMAP_COMPLEX)) < 0) { -+ jack_error ("ALSA: mmap-based access is not possible" -+ " for the %s " -+ "stream of this audio interface", -+ stream_name); -+ return -1; -+ } -+ } -+ } -+ -+ format = (sample_width == 4) ? 0 : NUMFORMATS - 1; -+ -+ while (1) { -+ if ((err = snd_pcm_hw_params_set_format ( -+ handle, hw_params, formats[format].format)) < 0) { -+ -+ if ((sample_width == 4 -+ ? format++ >= NUMFORMATS - 1 -+ : format-- <= 0)) { -+ jack_error ("Sorry. The audio interface \"%s\"" -+ " doesn't support any of the" -+ " hardware sample formats that" -+ " JACK's alsa-driver can use.", -+ device_name); -+ return -1; -+ } -+ } else { -+ if (formats[format].swapped) { -+ driver->quirk_bswap = 1; -+ } else { -+ driver->quirk_bswap = 0; -+ } -+ jack_info ("ALSA: final selected sample format for %s: %s", stream_name, formats[format].Name); -+ break; -+ } -+ } -+ -+ frame_rate = driver->frame_rate ; -+ err = snd_pcm_hw_params_set_rate_near (handle, hw_params, -+ &frame_rate, NULL) ; -+ driver->frame_rate = frame_rate ; -+ if (err < 0) { -+ jack_error ("ALSA: cannot set sample/frame rate to %" -+ PRIu32 " for %s", driver->frame_rate, -+ stream_name); -+ return -1; -+ } -+ if (!*nchns) { -+ /*if not user-specified, try to find the maximum -+ * number of channels */ -+ unsigned int channels_max ; -+ err = snd_pcm_hw_params_get_channels_max (hw_params, -+ &channels_max); -+ *nchns = channels_max ; -+ -+ if (*nchns > 1024) { -+ -+ /* the hapless user is an unwitting victim of -+ the "default" ALSA PCM device, which can -+ support up to 16 million channels. since -+ they can't be bothered to set up a proper -+ default device, limit the number of -+ channels for them to a sane default. -+ */ -+ -+ jack_error ( -+"You appear to be using the ALSA software \"plug\" layer, probably\n" -+"a result of using the \"default\" ALSA device. This is less\n" -+"efficient than it could be. Consider using a hardware device\n" -+"instead rather than using the plug layer. Usually the name of the\n" -+"hardware device that corresponds to the first sound card is hw:0\n" -+ ); -+ *nchns = 2; -+ } -+ } -+ -+ if ((err = snd_pcm_hw_params_set_channels (handle, hw_params, -+ *nchns)) < 0) { -+ jack_error ("ALSA: cannot set channel count to %u for %s", -+ *nchns, stream_name); -+ return -1; -+ } -+ -+ if ((err = snd_pcm_hw_params_set_period_size (handle, hw_params, -+ driver->frames_per_cycle, -+ 0)) -+ < 0) { -+ jack_error ("ALSA: cannot set period size to %" PRIu32 -+ " frames for %s", driver->frames_per_cycle, -+ stream_name); -+ return -1; -+ } -+ -+ *nperiodsp = driver->user_nperiods; -+ snd_pcm_hw_params_set_periods_min (handle, hw_params, nperiodsp, NULL); -+ if (*nperiodsp < driver->user_nperiods) -+ *nperiodsp = driver->user_nperiods; -+ if (snd_pcm_hw_params_set_periods_near (handle, hw_params, -+ nperiodsp, NULL) < 0) { -+ jack_error ("ALSA: cannot set number of periods to %u for %s", -+ *nperiodsp, stream_name); -+ return -1; -+ } -+ -+ if (*nperiodsp < driver->user_nperiods) { -+ jack_error ("ALSA: got smaller periods %u than %u for %s", -+ *nperiodsp, (unsigned int) driver->user_nperiods, -+ stream_name); -+ return -1; -+ } -+ jack_info ("ALSA: use %d periods for %s", *nperiodsp, stream_name); -+#if 0 -+ if (!jack_power_of_two(driver->frames_per_cycle)) { -+ jack_error("JACK: frames must be a power of two " -+ "(64, 512, 1024, ...)\n"); -+ return -1; -+ } -+#endif -+ -+ if ((err = snd_pcm_hw_params_set_buffer_size (handle, hw_params, -+ *nperiodsp * -+ driver->frames_per_cycle)) -+ < 0) { -+ jack_error ("ALSA: cannot set buffer length to %" PRIu32 -+ " for %s", -+ *nperiodsp * driver->frames_per_cycle, -+ stream_name); -+ return -1; -+ } -+ -+ if ((err = snd_pcm_hw_params (handle, hw_params)) < 0) { -+ jack_error ("ALSA: cannot set hardware parameters for %s", -+ stream_name); -+ return -1; -+ } -+ -+ snd_pcm_sw_params_current (handle, sw_params); -+ -+ if ((err = snd_pcm_sw_params_set_start_threshold (handle, sw_params, -+ 0U)) < 0) { -+ jack_error ("ALSA: cannot set start mode for %s", stream_name); -+ return -1; -+ } -+ -+ stop_th = *nperiodsp * driver->frames_per_cycle; -+ if (driver->soft_mode) { -+ stop_th = (snd_pcm_uframes_t)-1; -+ } -+ -+ if ((err = snd_pcm_sw_params_set_stop_threshold ( -+ handle, sw_params, stop_th)) < 0) { -+ jack_error ("ALSA: cannot set stop mode for %s", -+ stream_name); -+ return -1; -+ } -+ -+ if ((err = snd_pcm_sw_params_set_silence_threshold ( -+ handle, sw_params, 0)) < 0) { -+ jack_error ("ALSA: cannot set silence threshold for %s", -+ stream_name); -+ return -1; -+ } -+ -+#if 0 -+ jack_info ("set silence size to %lu * %lu = %lu", -+ driver->frames_per_cycle, *nperiodsp, -+ driver->frames_per_cycle * *nperiodsp); -+ -+ if ((err = snd_pcm_sw_params_set_silence_size ( -+ handle, sw_params, -+ driver->frames_per_cycle * *nperiodsp)) < 0) { -+ jack_error ("ALSA: cannot set silence size for %s", -+ stream_name); -+ return -1; -+ } -+#endif -+ -+ if (handle == driver->playback_handle) -+ err = snd_pcm_sw_params_set_avail_min ( -+ handle, sw_params, -+ driver->frames_per_cycle -+ * (*nperiodsp - driver->user_nperiods + 1)); -+ else -+ err = snd_pcm_sw_params_set_avail_min ( -+ handle, sw_params, driver->frames_per_cycle); -+ -+ if (err < 0) { -+ jack_error ("ALSA: cannot set avail min for %s", stream_name); -+ return -1; -+ } -+ -+ if ((err = snd_pcm_sw_params (handle, sw_params)) < 0) { -+ jack_error ("ALSA: cannot set software parameters for %s\n", -+ stream_name); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_set_parameters (alsa_driver_t *driver, -+ jack_nframes_t frames_per_cycle, -+ jack_nframes_t user_nperiods, -+ jack_nframes_t rate) -+{ -+ int dir; -+ snd_pcm_uframes_t p_period_size = 0; -+ snd_pcm_uframes_t c_period_size = 0; -+ channel_t chn; -+ unsigned int pr = 0; -+ unsigned int cr = 0; -+ int err; -+ -+ driver->frame_rate = rate; -+ driver->frames_per_cycle = frames_per_cycle; -+ driver->user_nperiods = user_nperiods; -+ -+ jack_info ("configuring for %" PRIu32 "Hz, period = %" -+ PRIu32 " frames (%.1f ms), buffer = %" PRIu32 " periods", -+ rate, frames_per_cycle, (((float)frames_per_cycle / (float) rate) * 1000.0f), user_nperiods); -+ -+ if (driver->capture_handle) { -+ if (alsa_driver_configure_stream ( -+ driver, -+ driver->alsa_name_capture, -+ "capture", -+ driver->capture_handle, -+ driver->capture_hw_params, -+ driver->capture_sw_params, -+ &driver->capture_nperiods, -+ (long unsigned int*)&driver->capture_nchannels, -+ driver->capture_sample_bytes)) { -+ jack_error ("ALSA: cannot configure capture channel"); -+ return -1; -+ } -+ } -+ -+ if (driver->playback_handle) { -+ if (alsa_driver_configure_stream ( -+ driver, -+ driver->alsa_name_playback, -+ "playback", -+ driver->playback_handle, -+ driver->playback_hw_params, -+ driver->playback_sw_params, -+ &driver->playback_nperiods, -+ (long unsigned int*)&driver->playback_nchannels, -+ driver->playback_sample_bytes)) { -+ jack_error ("ALSA: cannot configure playback channel"); -+ return -1; -+ } -+ } -+ -+ /* check the rate, since thats rather important */ -+ -+ if (driver->playback_handle) { -+ snd_pcm_hw_params_get_rate (driver->playback_hw_params, -+ &pr, &dir); -+ } -+ -+ if (driver->capture_handle) { -+ snd_pcm_hw_params_get_rate (driver->capture_hw_params, -+ &cr, &dir); -+ } -+ -+ if (driver->capture_handle && driver->playback_handle) { -+ if (cr != pr) { -+ jack_error ("playback and capture sample rates do " -+ "not match (%d vs. %d)", pr, cr); -+ } -+ -+ /* only change if *both* capture and playback rates -+ * don't match requested certain hardware actually -+ * still works properly in full-duplex with slightly -+ * different rate values between adc and dac -+ */ -+ if (cr != driver->frame_rate && pr != driver->frame_rate) { -+ jack_error ("sample rate in use (%d Hz) does not " -+ "match requested rate (%d Hz)", -+ cr, driver->frame_rate); -+ driver->frame_rate = cr; -+ } -+ -+ } else if (driver->capture_handle && cr != driver->frame_rate) { -+ jack_error ("capture sample rate in use (%d Hz) does not " -+ "match requested rate (%d Hz)", -+ cr, driver->frame_rate); -+ driver->frame_rate = cr; -+ } else if (driver->playback_handle && pr != driver->frame_rate) { -+ jack_error ("playback sample rate in use (%d Hz) does not " -+ "match requested rate (%d Hz)", -+ pr, driver->frame_rate); -+ driver->frame_rate = pr; -+ } -+ -+ -+ /* check the fragment size, since thats non-negotiable */ -+ -+ if (driver->playback_handle) { -+ snd_pcm_access_t access; -+ -+ err = snd_pcm_hw_params_get_period_size ( -+ driver->playback_hw_params, &p_period_size, &dir); -+ err = snd_pcm_hw_params_get_format ( -+ driver->playback_hw_params, -+ &(driver->playback_sample_format)); -+ err = snd_pcm_hw_params_get_access (driver->playback_hw_params, -+ &access); -+ driver->playback_interleaved = -+ (access == SND_PCM_ACCESS_MMAP_INTERLEAVED) -+ || (access == SND_PCM_ACCESS_MMAP_COMPLEX); -+ -+ if (p_period_size != driver->frames_per_cycle) { -+ jack_error ("alsa_pcm: requested an interrupt every %" -+ PRIu32 -+ " frames but got %u frames for playback", -+ driver->frames_per_cycle, p_period_size); -+ return -1; -+ } -+ } -+ -+ if (driver->capture_handle) { -+ snd_pcm_access_t access; -+ -+ err = snd_pcm_hw_params_get_period_size ( -+ driver->capture_hw_params, &c_period_size, &dir); -+ err = snd_pcm_hw_params_get_format ( -+ driver->capture_hw_params, -+ &(driver->capture_sample_format)); -+ err = snd_pcm_hw_params_get_access (driver->capture_hw_params, -+ &access); -+ driver->capture_interleaved = -+ (access == SND_PCM_ACCESS_MMAP_INTERLEAVED) -+ || (access == SND_PCM_ACCESS_MMAP_COMPLEX); -+ -+ -+ if (c_period_size != driver->frames_per_cycle) { -+ jack_error ("alsa_pcm: requested an interrupt every %" -+ PRIu32 -+ " frames but got %uc frames for capture", -+ driver->frames_per_cycle, p_period_size); -+ return -1; -+ } -+ } -+ -+ driver->playback_sample_bytes = -+ snd_pcm_format_physical_width (driver->playback_sample_format) -+ / 8; -+ driver->capture_sample_bytes = -+ snd_pcm_format_physical_width (driver->capture_sample_format) -+ / 8; -+ -+ if (driver->playback_handle) { -+ switch (driver->playback_sample_format) { -+ case SND_PCM_FORMAT_FLOAT_LE: -+ case SND_PCM_FORMAT_S32_LE: -+ case SND_PCM_FORMAT_S24_3LE: -+ case SND_PCM_FORMAT_S24_3BE: -+ case SND_PCM_FORMAT_S16_LE: -+ case SND_PCM_FORMAT_S32_BE: -+ case SND_PCM_FORMAT_S16_BE: -+ break; -+ -+ default: -+ jack_error ("programming error: unhandled format " -+ "type for playback"); -+ exit (1); -+ } -+ } -+ -+ if (driver->capture_handle) { -+ switch (driver->capture_sample_format) { -+ case SND_PCM_FORMAT_FLOAT_LE: -+ case SND_PCM_FORMAT_S32_LE: -+ case SND_PCM_FORMAT_S24_3LE: -+ case SND_PCM_FORMAT_S24_3BE: -+ case SND_PCM_FORMAT_S16_LE: -+ case SND_PCM_FORMAT_S32_BE: -+ case SND_PCM_FORMAT_S16_BE: -+ break; -+ -+ default: -+ jack_error ("programming error: unhandled format " -+ "type for capture"); -+ exit (1); -+ } -+ } -+ -+ if (driver->playback_interleaved) { -+ const snd_pcm_channel_area_t *my_areas; -+ snd_pcm_uframes_t offset, frames; -+ if (snd_pcm_mmap_begin(driver->playback_handle, -+ &my_areas, &offset, &frames) < 0) { -+ jack_error ("ALSA: %s: mmap areas info error", -+ driver->alsa_name_playback); -+ return -1; -+ } -+ driver->interleave_unit = -+ snd_pcm_format_physical_width ( -+ driver->playback_sample_format) / 8; -+ } else { -+ driver->interleave_unit = 0; /* NOT USED */ -+ } -+ -+ if (driver->capture_interleaved) { -+ const snd_pcm_channel_area_t *my_areas; -+ snd_pcm_uframes_t offset, frames; -+ if (snd_pcm_mmap_begin(driver->capture_handle, -+ &my_areas, &offset, &frames) < 0) { -+ jack_error ("ALSA: %s: mmap areas info error", -+ driver->alsa_name_capture); -+ return -1; -+ } -+ } -+ -+ if (driver->playback_nchannels > driver->capture_nchannels) { -+ driver->max_nchannels = driver->playback_nchannels; -+ driver->user_nchannels = driver->capture_nchannels; -+ } else { -+ driver->max_nchannels = driver->capture_nchannels; -+ driver->user_nchannels = driver->playback_nchannels; -+ } -+ -+ alsa_driver_setup_io_function_pointers (driver); -+ -+ /* Allocate and initialize structures that rely on the -+ channels counts. -+ -+ Set up the bit pattern that is used to record which -+ channels require action on every cycle. any bits that are -+ not set after the engine's process() call indicate channels -+ that potentially need to be silenced. -+ */ -+ -+ bitset_create (&driver->channels_done, driver->max_nchannels); -+ bitset_create (&driver->channels_not_done, driver->max_nchannels); -+ -+ if (driver->playback_handle) { -+ driver->playback_addr = (char **) -+ malloc (sizeof (char *) * driver->playback_nchannels); -+ memset (driver->playback_addr, 0, -+ sizeof (char *) * driver->playback_nchannels); -+ driver->playback_interleave_skip = (unsigned long *) -+ malloc (sizeof (unsigned long *) * driver->playback_nchannels); -+ memset (driver->playback_interleave_skip, 0, -+ sizeof (unsigned long *) * driver->playback_nchannels); -+ driver->silent = (unsigned long *) -+ malloc (sizeof (unsigned long) -+ * driver->playback_nchannels); -+ -+ for (chn = 0; chn < driver->playback_nchannels; chn++) { -+ driver->silent[chn] = 0; -+ } -+ -+ for (chn = 0; chn < driver->playback_nchannels; chn++) { -+ bitset_add (driver->channels_done, chn); -+ } -+ -+ driver->dither_state = (dither_state_t *) -+ calloc ( driver->playback_nchannels, -+ sizeof (dither_state_t)); -+ } -+ -+ if (driver->capture_handle) { -+ driver->capture_addr = (char **) -+ malloc (sizeof (char *) * driver->capture_nchannels); -+ memset (driver->capture_addr, 0, -+ sizeof (char *) * driver->capture_nchannels); -+ driver->capture_interleave_skip = (unsigned long *) -+ malloc (sizeof (unsigned long *) * driver->capture_nchannels); -+ memset (driver->capture_interleave_skip, 0, -+ sizeof (unsigned long *) * driver->capture_nchannels); -+ } -+ -+ driver->clock_sync_data = (ClockSyncStatus *) -+ malloc (sizeof (ClockSyncStatus) * driver->max_nchannels); -+ -+ driver->period_usecs = -+ (jack_time_t) floor ((((float) driver->frames_per_cycle) / -+ driver->frame_rate) * 1000000.0f); -+ driver->poll_timeout = (int) floor (1.5f * driver->period_usecs); -+ -+ // steph -+ /* -+ if (driver->engine) { -+ driver->engine->set_buffer_size (driver->engine, -+ driver->frames_per_cycle); -+ } -+ */ -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_reset_parameters (alsa_driver_t *driver, -+ jack_nframes_t frames_per_cycle, -+ jack_nframes_t user_nperiods, -+ jack_nframes_t rate) -+{ -+ /* XXX unregister old ports ? */ -+ alsa_driver_release_channel_dependent_memory (driver); -+ return alsa_driver_set_parameters (driver, -+ frames_per_cycle, -+ user_nperiods, rate); -+} -+ -+int -+JackAlsaDriver::alsa_driver_get_channel_addresses (alsa_driver_t *driver, -+ snd_pcm_uframes_t *capture_avail, -+ snd_pcm_uframes_t *playback_avail, -+ snd_pcm_uframes_t *capture_offset, -+ snd_pcm_uframes_t *playback_offset) -+{ -+ unsigned long err; -+ channel_t chn; -+ -+ if (capture_avail) { -+ if ((err = snd_pcm_mmap_begin ( -+ driver->capture_handle, &driver->capture_areas, -+ (snd_pcm_uframes_t *) capture_offset, -+ (snd_pcm_uframes_t *) capture_avail)) < 0) { -+ jack_error ("ALSA: %s: mmap areas info error", -+ driver->alsa_name_capture); -+ return -1; -+ } -+ -+ for (chn = 0; chn < driver->capture_nchannels; chn++) { -+ const snd_pcm_channel_area_t *a = -+ &driver->capture_areas[chn]; -+ driver->capture_addr[chn] = (char *) a->addr -+ + ((a->first + a->step * *capture_offset) / 8); -+ driver->capture_interleave_skip[chn] = (unsigned long ) (a->step / 8); -+ } -+ } -+ -+ if (playback_avail) { -+ if ((err = snd_pcm_mmap_begin ( -+ driver->playback_handle, &driver->playback_areas, -+ (snd_pcm_uframes_t *) playback_offset, -+ (snd_pcm_uframes_t *) playback_avail)) < 0) { -+ jack_error ("ALSA: %s: mmap areas info error ", -+ driver->alsa_name_playback); -+ return -1; -+ } -+ -+ for (chn = 0; chn < driver->playback_nchannels; chn++) { -+ const snd_pcm_channel_area_t *a = -+ &driver->playback_areas[chn]; -+ driver->playback_addr[chn] = (char *) a->addr -+ + ((a->first + a->step * *playback_offset) / 8); -+ driver->playback_interleave_skip[chn] = (unsigned long ) (a->step / 8); -+ } -+ } -+ -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_start (alsa_driver_t *driver) -+{ -+ int err; -+ snd_pcm_uframes_t poffset, pavail; -+ channel_t chn; -+ -+ driver->poll_last = 0; -+ driver->poll_next = 0; -+ -+ if (driver->playback_handle) { -+ if ((err = snd_pcm_prepare (driver->playback_handle)) < 0) { -+ jack_error ("ALSA: prepare error for playback on " -+ "\"%s\" (%s)", driver->alsa_name_playback, -+ snd_strerror(err)); -+ return -1; -+ } -+ } -+ -+ if ((driver->capture_handle && driver->capture_and_playback_not_synced) -+ || !driver->playback_handle) { -+ if ((err = snd_pcm_prepare (driver->capture_handle)) < 0) { -+ jack_error ("ALSA: prepare error for capture on \"%s\"" -+ " (%s)", driver->alsa_name_capture, -+ snd_strerror(err)); -+ return -1; -+ } -+ } -+ -+ if (driver->hw_monitoring) { -+ if (driver->input_monitor_mask || driver->all_monitor_in) { -+ if (driver->all_monitor_in) { -+ driver->hw->set_input_monitor_mask (driver->hw, ~0U); -+ } else { -+ driver->hw->set_input_monitor_mask ( -+ driver->hw, driver->input_monitor_mask); -+ } -+ } else { -+ driver->hw->set_input_monitor_mask (driver->hw, -+ driver->input_monitor_mask); -+ } -+ } -+ -+ if (driver->playback_handle) { -+ driver->playback_nfds = -+ snd_pcm_poll_descriptors_count (driver->playback_handle); -+ } else { -+ driver->playback_nfds = 0; -+ } -+ -+ if (driver->capture_handle) { -+ driver->capture_nfds = -+ snd_pcm_poll_descriptors_count (driver->capture_handle); -+ } else { -+ driver->capture_nfds = 0; -+ } -+ -+ if (driver->pfd) { -+ free (driver->pfd); -+ } -+ -+ driver->pfd = (struct pollfd *) -+ malloc (sizeof (struct pollfd) * -+ (driver->playback_nfds + driver->capture_nfds + 2)); -+ -+ if (driver->midi && !driver->xrun_recovery) -+ (driver->midi->start)(driver->midi); -+ -+ if (driver->playback_handle) { -+ /* fill playback buffer with zeroes, and mark -+ all fragments as having data. -+ */ -+ -+ pavail = snd_pcm_avail_update (driver->playback_handle); -+ -+ if (pavail != -+ driver->frames_per_cycle * driver->playback_nperiods) { -+ jack_error ("ALSA: full buffer not available at start"); -+ return -1; -+ } -+ -+ if (alsa_driver_get_channel_addresses (driver, -+ 0, &pavail, 0, &poffset)) { -+ return -1; -+ } -+ -+ /* XXX this is cheating. ALSA offers no guarantee that -+ we can access the entire buffer at any one time. It -+ works on most hardware tested so far, however, buts -+ its a liability in the long run. I think that -+ alsa-lib may have a better function for doing this -+ here, where the goal is to silence the entire -+ buffer. -+ */ -+ -+ for (chn = 0; chn < driver->playback_nchannels; chn++) { -+ alsa_driver_silence_on_channel ( -+ driver, chn, -+ driver->user_nperiods -+ * driver->frames_per_cycle); -+ } -+ -+ snd_pcm_mmap_commit (driver->playback_handle, poffset, -+ driver->user_nperiods -+ * driver->frames_per_cycle); -+ -+ if ((err = snd_pcm_start (driver->playback_handle)) < 0) { -+ jack_error ("ALSA: could not start playback (%s)", -+ snd_strerror (err)); -+ return -1; -+ } -+ } -+ -+ if ((driver->capture_handle && driver->capture_and_playback_not_synced) -+ || !driver->playback_handle) { -+ if ((err = snd_pcm_start (driver->capture_handle)) < 0) { -+ jack_error ("ALSA: could not start capture (%s)", -+ snd_strerror (err)); -+ return -1; -+ } -+ } -+ -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_stop (alsa_driver_t *driver) -+{ -+ int err; -+ //JSList* node; -+ //int chn; -+ -+ /* silence all capture port buffers, because we might -+ be entering offline mode. -+ */ -+ -+ // steph -+ /* -+ for (chn = 0, node = driver->capture_ports; node; -+ node = jack_slist_next (node), chn++) { -+ -+ jack_port_t* port; -+ char* buf; -+ jack_nframes_t nframes = driver->engine->control->buffer_size; -+ -+ port = (jack_port_t *) node->data; -+ buf = jack_port_get_buffer (port, nframes); -+ memset (buf, 0, sizeof (jack_default_audio_sample_t) * nframes); -+ } -+ */ -+ -+ for (int i = 0; i < fPlaybackChannels; i++) { -+ jack_default_audio_sample_t* buf = -+ (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[i], fEngineControl->fBufferSize); -+ memset (buf, 0, sizeof (jack_default_audio_sample_t) * fEngineControl->fBufferSize); -+ } -+ -+ if (driver->playback_handle) { -+ if ((err = snd_pcm_drop (driver->playback_handle)) < 0) { -+ jack_error ("ALSA: channel flush for playback " -+ "failed (%s)", snd_strerror (err)); -+ return -1; -+ } -+ } -+ -+ if (!driver->playback_handle -+ || driver->capture_and_playback_not_synced) { -+ if (driver->capture_handle) { -+ if ((err = snd_pcm_drop (driver->capture_handle)) < 0) { -+ jack_error ("ALSA: channel flush for " -+ "capture failed (%s)", -+ snd_strerror (err)); -+ return -1; -+ } -+ } -+ } -+ -+ if (driver->hw_monitoring) { -+ driver->hw->set_input_monitor_mask (driver->hw, 0); -+ } -+ -+ if (driver->midi && !driver->xrun_recovery) -+ (driver->midi->stop)(driver->midi); -+ -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_restart (alsa_driver_t *driver) -+{ -+ int res; -+ -+ driver->xrun_recovery = 1; -+ if ((res = Stop()) == 0) -+ res = Start(); -+ driver->xrun_recovery = 0; -+ -+ if (res && driver->midi) -+ (driver->midi->stop)(driver->midi); -+ -+ return res; -+} -+ -+int -+JackAlsaDriver::alsa_driver_xrun_recovery (alsa_driver_t *driver, float *delayed_usecs) -+{ -+ snd_pcm_status_t *status; -+ int res; -+ -+ jack_error("alsa_driver_xrun_recovery"); -+ -+ snd_pcm_status_alloca(&status); -+ -+ if (driver->capture_handle) { -+ if ((res = snd_pcm_status(driver->capture_handle, status)) -+ < 0) { -+ jack_error("status error: %s", snd_strerror(res)); -+ } -+ } else { -+ if ((res = snd_pcm_status(driver->playback_handle, status)) -+ < 0) { -+ jack_error("status error: %s", snd_strerror(res)); -+ } -+ } -+ -+ if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN -+ && driver->process_count > XRUN_REPORT_DELAY) { -+ struct timeval now, diff, tstamp; -+ driver->xrun_count++; -+ snd_pcm_status_get_tstamp(status,&now); -+ snd_pcm_status_get_trigger_tstamp(status, &tstamp); -+ timersub(&now, &tstamp, &diff); -+ *delayed_usecs = diff.tv_sec * 1000000.0 + diff.tv_usec; -+ jack_error("\n\n**** alsa_pcm: xrun of at least %.3f msecs\n\n", *delayed_usecs / 1000.0); -+ } -+ -+ if (alsa_driver_restart (driver)) { -+ return -1; -+ } -+ return 0; -+} -+ -+void -+JackAlsaDriver::alsa_driver_silence_untouched_channels (alsa_driver_t *driver, -+ jack_nframes_t nframes) -+{ -+ channel_t chn; -+ jack_nframes_t buffer_frames = -+ driver->frames_per_cycle * driver->playback_nperiods; -+ -+ for (chn = 0; chn < driver->playback_nchannels; chn++) { -+ if (bitset_contains (driver->channels_not_done, chn)) { -+ if (driver->silent[chn] < buffer_frames) { -+ alsa_driver_silence_on_channel_no_mark ( -+ driver, chn, nframes); -+ driver->silent[chn] += nframes; -+ } -+ } -+ } -+} -+ -+static int under_gdb = FALSE; -+ -+jack_nframes_t -+JackAlsaDriver::alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *status, float -+ *delayed_usecs) -+{ -+ snd_pcm_sframes_t avail = 0; -+ snd_pcm_sframes_t capture_avail = 0; -+ snd_pcm_sframes_t playback_avail = 0; -+ int xrun_detected = FALSE; -+ int need_capture; -+ int need_playback; -+ unsigned int i; -+ jack_time_t poll_enter; -+ jack_time_t poll_ret = 0; -+ -+ *status = -1; -+ *delayed_usecs = 0; -+ -+ need_capture = driver->capture_handle ? 1 : 0; -+ -+ if (extra_fd >= 0) { -+ need_playback = 0; -+ } else { -+ need_playback = driver->playback_handle ? 1 : 0; -+ } -+ -+ again: -+ -+ while (need_playback || need_capture) { -+ -+ int poll_result; -+ unsigned int ci = 0; -+ unsigned int nfds; -+ unsigned short revents; -+ -+ nfds = 0; -+ -+ if (need_playback) { -+ snd_pcm_poll_descriptors (driver->playback_handle, -+ &driver->pfd[0], -+ driver->playback_nfds); -+ nfds += driver->playback_nfds; -+ } -+ -+ if (need_capture) { -+ snd_pcm_poll_descriptors (driver->capture_handle, -+ &driver->pfd[nfds], -+ driver->capture_nfds); -+ ci = nfds; -+ nfds += driver->capture_nfds; -+ } -+ -+ /* ALSA doesn't set POLLERR in some versions of 0.9.X */ -+ -+ for (i = 0; i < nfds; i++) { -+ driver->pfd[i].events |= POLLERR; -+ } -+ -+ if (extra_fd >= 0) { -+ driver->pfd[nfds].fd = extra_fd; -+ driver->pfd[nfds].events = -+ POLLIN|POLLERR|POLLHUP|POLLNVAL; -+ nfds++; -+ } -+ -+ poll_enter = jack_get_microseconds (); -+ -+ if (poll_enter > driver->poll_next) { -+ /* -+ * This processing cycle was delayed past the -+ * next due interrupt! Do not account this as -+ * a wakeup delay: -+ */ -+ driver->poll_next = 0; -+ driver->poll_late++; -+ } -+ -+ poll_result = poll (driver->pfd, nfds, driver->poll_timeout); -+ if (poll_result < 0) { -+ -+ if (errno == EINTR) { -+ jack_info ("poll interrupt"); -+ // this happens mostly when run -+ // under gdb, or when exiting due to a signal -+ if (under_gdb) { -+ goto again; -+ } -+ *status = -2; -+ return 0; -+ } -+ -+ jack_error ("ALSA: poll call failed (%s)", -+ strerror (errno)); -+ *status = -3; -+ return 0; -+ -+ } -+ -+ poll_ret = jack_get_microseconds (); -+ -+ // steph -+ fBeginDateUst = poll_ret; -+ -+ if (extra_fd < 0) { -+ if (driver->poll_next && poll_ret > driver->poll_next) { -+ *delayed_usecs = poll_ret - driver->poll_next; -+ } -+ driver->poll_last = poll_ret; -+ driver->poll_next = poll_ret + driver->period_usecs; -+ // steph -+ /* -+ driver->engine->transport_cycle_start (driver->engine, -+ poll_ret); -+ */ -+ } -+ -+#ifdef DEBUG_WAKEUP -+ jack_info ("%" PRIu64 ": checked %d fds, %" PRIu64 -+ " usecs since poll entered", poll_ret, nfds, -+ poll_ret - poll_enter); -+#endif -+ -+ /* check to see if it was the extra FD that caused us -+ * to return from poll */ -+ -+ if (extra_fd >= 0) { -+ -+ if (driver->pfd[nfds-1].revents == 0) { -+ /* we timed out on the extra fd */ -+ -+ *status = -4; -+ return -1; -+ } -+ -+ /* if POLLIN was the only bit set, we're OK */ -+ -+ *status = 0; -+ if (driver->pfd[nfds-1].revents == POLLIN) { -+ jack_error("driver->pfd[nfds-1].revents == POLLIN"); -+ } -+ return (driver->pfd[nfds-1].revents == POLLIN) ? 0 : -1; -+ } -+ -+ if (need_playback) { -+ if (snd_pcm_poll_descriptors_revents -+ (driver->playback_handle, &driver->pfd[0], -+ driver->playback_nfds, &revents) < 0) { -+ jack_error ("ALSA: playback revents failed"); -+ *status = -6; -+ return 0; -+ } -+ -+ if (revents & POLLERR) { -+ xrun_detected = TRUE; -+ } -+ -+ if (revents & POLLOUT) { -+ need_playback = 0; -+#ifdef DEBUG_WAKEUP -+ jack_info ("%" PRIu64 -+ " playback stream ready", -+ poll_ret); -+#endif -+ } -+ } -+ -+ if (need_capture) { -+ if (snd_pcm_poll_descriptors_revents -+ (driver->capture_handle, &driver->pfd[ci], -+ driver->capture_nfds, &revents) < 0) { -+ jack_error ("ALSA: capture revents failed"); -+ *status = -6; -+ return 0; -+ } -+ -+ if (revents & POLLERR) { -+ xrun_detected = TRUE; -+ } -+ -+ if (revents & POLLIN) { -+ need_capture = 0; -+#ifdef DEBUG_WAKEUP -+ jack_info ("%" PRIu64 -+ " capture stream ready", -+ poll_ret); -+#endif -+ } -+ } -+ -+ if (poll_result == 0) { -+ jack_error ("ALSA: poll time out, polled for %" PRIu64 -+ " usecs", -+ poll_ret - poll_enter); -+ *status = -5; -+ return 0; -+ } -+ -+ } -+ -+ if (driver->capture_handle) { -+ if ((capture_avail = snd_pcm_avail_update ( -+ driver->capture_handle)) < 0) { -+ if (capture_avail == -EPIPE) { -+ xrun_detected = TRUE; -+ } else { -+ jack_error ("unknown ALSA avail_update return" -+ " value (%u)", capture_avail); -+ } -+ } -+ } else { -+ /* odd, but see min() computation below */ -+ capture_avail = INT_MAX; -+ } -+ -+ if (driver->playback_handle) { -+ if ((playback_avail = snd_pcm_avail_update ( -+ driver->playback_handle)) < 0) { -+ if (playback_avail == -EPIPE) { -+ xrun_detected = TRUE; -+ } else { -+ jack_error ("unknown ALSA avail_update return" -+ " value (%u)", playback_avail); -+ } -+ } -+ } else { -+ /* odd, but see min() computation below */ -+ playback_avail = INT_MAX; -+ } -+ -+ if (xrun_detected) { -+ *status = alsa_driver_xrun_recovery (driver, delayed_usecs); -+ return 0; -+ } -+ -+ *status = 0; -+ driver->last_wait_ust = poll_ret; -+ -+ avail = capture_avail < playback_avail ? capture_avail : playback_avail; -+ -+#ifdef DEBUG_WAKEUP -+ jack_info ("wakeup complete, avail = %lu, pavail = %lu " -+ "cavail = %lu", -+ avail, playback_avail, capture_avail); -+#endif -+ -+ /* mark all channels not done for now. read/write will change this */ -+ -+ bitset_copy (driver->channels_not_done, driver->channels_done); -+ -+ /* constrain the available count to the nearest (round down) number of -+ periods. -+ */ -+ -+ return avail - (avail % driver->frames_per_cycle); -+} -+ -+ -+int JackAlsaDriver::SetBufferSize(jack_nframes_t buffer_size) -+{ -+ jack_log("JackAlsaDriver::SetBufferSize %ld", buffer_size); -+ int res = alsa_driver_reset_parameters((alsa_driver_t *)fDriver, buffer_size, -+ ((alsa_driver_t *)fDriver)->user_nperiods, -+ ((alsa_driver_t *)fDriver)->frame_rate); -+ -+ if (res == 0) { // update fEngineControl and fGraphManager -+ JackAudioDriver::SetBufferSize(buffer_size); // never fails -+ } else { -+ alsa_driver_reset_parameters((alsa_driver_t *)fDriver, fEngineControl->fBufferSize, -+ ((alsa_driver_t *)fDriver)->user_nperiods, -+ ((alsa_driver_t *)fDriver)->frame_rate); -+ } -+ -+ return res; -+} -+ -+int -+JackAlsaDriver::alsa_driver_read (alsa_driver_t *driver, jack_nframes_t nframes) -+{ -+ snd_pcm_sframes_t contiguous; -+ snd_pcm_sframes_t nread; -+ snd_pcm_sframes_t offset; -+ jack_nframes_t orig_nframes; -+ jack_default_audio_sample_t* buf; -+ //channel_t chn; -+ //JSList *node; -+ //jack_port_t* port; -+ int err; -+ -+ // steph -+ /* -+ if (!driver->capture_handle || driver->engine->freewheeling) { -+ return 0; -+ } -+ */ -+ -+ if (nframes > driver->frames_per_cycle) { -+ return -1; -+ } -+ -+ if (driver->midi) -+ (driver->midi->read)(driver->midi, nframes); -+ -+ if (!driver->capture_handle) { -+ return 0; -+ } -+ -+ nread = 0; -+ contiguous = 0; -+ orig_nframes = nframes; -+ -+ while (nframes) { -+ -+ contiguous = nframes; -+ -+ if (alsa_driver_get_channel_addresses ( -+ driver, -+ (snd_pcm_uframes_t *) &contiguous, -+ (snd_pcm_uframes_t *) 0, -+ (snd_pcm_uframes_t *)&offset, 0) < 0) { -+ return -1; -+ } -+ -+ // steph -+ for (int chn = 0; chn < fCaptureChannels; chn++) { -+ if (fGraphManager->GetConnectionsNum(fCapturePortList[chn]) > 0) { -+ buf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fCapturePortList[chn], orig_nframes); -+ alsa_driver_read_from_channel (driver, chn, buf + nread, contiguous); -+ } -+ } -+ -+ /* // steph -+ for (chn = 0, node = driver->capture_ports; node; -+ node = jack_slist_next (node), chn++) { -+ -+ port = (jack_port_t *) node->data; -+ -+ if (!jack_port_connected (port)) { -+ // no-copy optimization -+ continue; -+ } -+ buf = jack_port_get_buffer (port, orig_nframes); -+ alsa_driver_read_from_channel (driver, chn, -+ buf + nread, contiguous); -+ } -+ */ -+ -+ if ((err = snd_pcm_mmap_commit (driver->capture_handle, -+ offset, contiguous)) < 0) { -+ -+ jack_error ("ALSA: could not complete read of %" -+ PRIu32 " frames: error = %d\n", contiguous, err); -+ jack_error ("ALSA: could not complete read of %d frames: error = %d", contiguous, err); -+ return -1; -+ } -+ -+ nframes -= contiguous; -+ nread += contiguous; -+ } -+ -+ return 0; -+} -+ -+int -+JackAlsaDriver::alsa_driver_write (alsa_driver_t* driver, jack_nframes_t nframes) -+{ -+ //channel_t chn; -+ //JSList *node; -+ //JSList *mon_node; -+ jack_default_audio_sample_t* buf; -+ jack_default_audio_sample_t* monbuf; -+ jack_nframes_t orig_nframes; -+ snd_pcm_sframes_t nwritten; -+ snd_pcm_sframes_t contiguous; -+ snd_pcm_sframes_t offset; -+ JackPort* port; -+ //jack_port_t *port; -+ int err; -+ -+ driver->process_count++; -+ -+ // steph -+ /* -+ if (!driver->playback_handle || driver->engine->freewheeling) { -+ return 0; -+ } -+ */ -+ if (!driver->playback_handle) { -+ return 0; -+ } -+ -+ if (nframes > driver->frames_per_cycle) { -+ return -1; -+ } -+ -+ if (driver->midi) -+ (driver->midi->write)(driver->midi, nframes); -+ -+ nwritten = 0; -+ contiguous = 0; -+ orig_nframes = nframes; -+ -+ /* check current input monitor request status */ -+ -+ driver->input_monitor_mask = 0; -+ -+ // steph -+ /* -+ for (chn = 0, node = driver->capture_ports; node; -+ node = jack_slist_next (node), chn++) { -+ if (((jack_port_t *) node->data)->shared->monitor_requests) { -+ driver->input_monitor_mask |= (1<GetPort(fCapturePortList[chn]); -+ if (port->MonitoringInput()) { -+ driver->input_monitor_mask |= (1 << chn); -+ } -+ } -+ -+ if (driver->hw_monitoring) { -+ if ((driver->hw->input_monitor_mask -+ != driver->input_monitor_mask) -+ && !driver->all_monitor_in) { -+ driver->hw->set_input_monitor_mask ( -+ driver->hw, driver->input_monitor_mask); -+ } -+ } -+ -+ while (nframes) { -+ -+ contiguous = nframes; -+ -+ if (alsa_driver_get_channel_addresses ( -+ driver, -+ (snd_pcm_uframes_t *) 0, -+ (snd_pcm_uframes_t *) &contiguous, -+ 0, (snd_pcm_uframes_t *)&offset) < 0) { -+ return -1; -+ } -+ -+ // steph -+ for (int chn = 0; chn < fPlaybackChannels; chn++) { -+ // Ouput ports -+ if (fGraphManager->GetConnectionsNum(fPlaybackPortList[chn]) > 0) { -+ buf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fPlaybackPortList[chn], orig_nframes); -+ alsa_driver_write_to_channel (driver, chn, buf + nwritten, contiguous); -+ // Monitor ports -+ if (fWithMonitorPorts && fGraphManager->GetConnectionsNum(fMonitorPortList[chn]) > 0) { -+ monbuf = (jack_default_audio_sample_t*)fGraphManager->GetBuffer(fMonitorPortList[chn], orig_nframes); -+ memcpy(monbuf + nwritten, buf + nwritten, contiguous * sizeof(jack_default_audio_sample_t)); -+ } -+ } -+ } -+ -+ /* -+ for (chn = 0, node = driver->playback_ports, mon_node=driver->monitor_ports; -+ node; -+ node = jack_slist_next (node), chn++) { -+ -+ port = (jack_port_t *) node->data; -+ -+ if (!jack_port_connected (port)) { -+ continue; -+ } -+ buf = jack_port_get_buffer (port, orig_nframes); -+ alsa_driver_write_to_channel (driver, chn, -+ buf + nwritten, contiguous); -+ -+ if (mon_node) { -+ port = (jack_port_t *) mon_node->data; -+ if (!jack_port_connected (port)) { -+ continue; -+ } -+ monbuf = jack_port_get_buffer (port, orig_nframes); -+ memcpy (monbuf + nwritten, buf + nwritten, contiguous * sizeof(jack_default_audio_sample_t)); -+ mon_node = jack_slist_next (mon_node); -+ } -+ } -+ */ -+ -+ if (!bitset_empty (driver->channels_not_done)) { -+ alsa_driver_silence_untouched_channels (driver, -+ contiguous); -+ } -+ -+ if ((err = snd_pcm_mmap_commit (driver->playback_handle, -+ offset, contiguous)) < 0) { -+ jack_error ("ALSA: could not complete playback of %" -+ PRIu32 " frames: error = %d", contiguous, err); -+ jack_error ("ALSA: could not complete playback of %d frames: error = %d", contiguous, err); -+ if (err != EPIPE && err != ESTRPIPE) -+ return -1; -+ } -+ -+ nframes -= contiguous; -+ nwritten += contiguous; -+ } -+ return 0; -+} -+ -+void -+JackAlsaDriver::alsa_driver_delete (alsa_driver_t *driver) -+{ -+ JSList *node; -+ -+ if (driver->midi) -+ (driver->midi->destroy)(driver->midi); -+ -+ for (node = driver->clock_sync_listeners; node; -+ node = jack_slist_next (node)) { -+ free (node->data); -+ } -+ jack_slist_free (driver->clock_sync_listeners); -+ -+ if (driver->ctl_handle) { -+ snd_ctl_close (driver->ctl_handle); -+ driver->ctl_handle = 0; -+ } -+ -+ if (driver->ctl_handle) { -+ snd_ctl_close (driver->ctl_handle); -+ driver->ctl_handle = 0; -+ } -+ -+ if (driver->capture_handle) { -+ snd_pcm_close (driver->capture_handle); -+ driver->capture_handle = 0; -+ } -+ -+ if (driver->playback_handle) { -+ snd_pcm_close (driver->playback_handle); -+ driver->capture_handle = 0; -+ } -+ -+ if (driver->capture_hw_params) { -+ snd_pcm_hw_params_free (driver->capture_hw_params); -+ driver->capture_hw_params = 0; -+ } -+ -+ if (driver->playback_hw_params) { -+ snd_pcm_hw_params_free (driver->playback_hw_params); -+ driver->playback_hw_params = 0; -+ } -+ -+ if (driver->capture_sw_params) { -+ snd_pcm_sw_params_free (driver->capture_sw_params); -+ driver->capture_sw_params = 0; -+ } -+ -+ if (driver->playback_sw_params) { -+ snd_pcm_sw_params_free (driver->playback_sw_params); -+ driver->playback_sw_params = 0; -+ } -+ -+ if (driver->pfd) { -+ free (driver->pfd); -+ } -+ -+ if (driver->hw) { -+ driver->hw->release (driver->hw); -+ driver->hw = 0; -+ } -+ free(driver->alsa_name_playback); -+ free(driver->alsa_name_capture); -+ free(driver->alsa_driver); -+ -+ alsa_driver_release_channel_dependent_memory (driver); -+ // steph -+ //jack_driver_nt_finish ((jack_driver_nt_t *) driver); -+ free (driver); -+} -+ -+jack_driver_t * -+JackAlsaDriver::alsa_driver_new (const char *name, char *playback_alsa_device, -+ char *capture_alsa_device, -+ jack_client_t *client, -+ jack_nframes_t frames_per_cycle, -+ jack_nframes_t user_nperiods, -+ jack_nframes_t rate, -+ int hw_monitoring, -+ int hw_metering, -+ int capturing, -+ int playing, -+ DitherAlgorithm dither, -+ int soft_mode, -+ int monitor, -+ int user_capture_nchnls, -+ int user_playback_nchnls, -+ int shorts_first, -+ jack_nframes_t capture_latency, -+ jack_nframes_t playback_latency, -+ alsa_midi_t *midi) -+{ -+ int err; -+ -+ alsa_driver_t *driver; -+ -+ jack_info ("creating alsa driver ... %s|%s|%" PRIu32 "|%" PRIu32 -+ "|%" PRIu32"|%" PRIu32"|%" PRIu32 "|%s|%s|%s|%s", -+ playing ? playback_alsa_device : "-", -+ capturing ? capture_alsa_device : "-", -+ frames_per_cycle, user_nperiods, rate, -+ user_capture_nchnls,user_playback_nchnls, -+ hw_monitoring ? "hwmon": "nomon", -+ hw_metering ? "hwmeter":"swmeter", -+ soft_mode ? "soft-mode":"-", -+ shorts_first ? "16bit":"32bit"); -+ -+ driver = (alsa_driver_t *) calloc (1, sizeof (alsa_driver_t)); -+ -+ jack_driver_nt_init ((jack_driver_nt_t *) driver); -+ -+ driver->midi = midi; -+ driver->xrun_recovery = 0; -+ -+ //driver->nt_attach = (JackDriverNTAttachFunction) alsa_driver_attach; -+ //driver->nt_detach = (JackDriverNTDetachFunction) alsa_driver_detach; -+ //driver->read = (JackDriverReadFunction) alsa_driver_read; -+ //driver->write = (JackDriverReadFunction) alsa_driver_write; -+ //driver->null_cycle = (JackDriverNullCycleFunction) alsa_driver_null_cycle; -+ //driver->nt_bufsize = (JackDriverNTBufSizeFunction) alsa_driver_bufsize; -+ //driver->nt_start = (JackDriverNTStartFunction) alsa_driver_start; -+ //driver->nt_stop = (JackDriverNTStopFunction) alsa_driver_stop; -+ //driver->nt_run_cycle = (JackDriverNTRunCycleFunction) alsa_driver_run_cycle; -+ -+ driver->playback_handle = NULL; -+ driver->capture_handle = NULL; -+ driver->ctl_handle = 0; -+ driver->hw = 0; -+ driver->capture_and_playback_not_synced = FALSE; -+ driver->max_nchannels = 0; -+ driver->user_nchannels = 0; -+ driver->playback_nchannels = user_playback_nchnls; -+ driver->capture_nchannels = user_capture_nchnls; -+ driver->playback_sample_bytes = (shorts_first ? 2 : 4); -+ driver->capture_sample_bytes = (shorts_first ? 2 : 4); -+ driver->capture_frame_latency = capture_latency; -+ driver->playback_frame_latency = playback_latency; -+ -+ driver->playback_addr = 0; -+ driver->capture_addr = 0; -+ driver->playback_interleave_skip = NULL; -+ driver->capture_interleave_skip = NULL; -+ -+ driver->silent = 0; -+ driver->all_monitor_in = FALSE; -+ driver->with_monitor_ports = monitor; -+ -+ driver->clock_mode = ClockMaster; /* XXX is it? */ -+ driver->input_monitor_mask = 0; /* XXX is it? */ -+ -+ driver->capture_ports = 0; -+ driver->playback_ports = 0; -+ driver->monitor_ports = 0; -+ -+ driver->pfd = 0; -+ driver->playback_nfds = 0; -+ driver->capture_nfds = 0; -+ -+ driver->dither = dither; -+ driver->soft_mode = soft_mode; -+ -+ pthread_mutex_init (&driver->clock_sync_lock, 0); -+ driver->clock_sync_listeners = 0; -+ -+ driver->poll_late = 0; -+ driver->xrun_count = 0; -+ driver->process_count = 0; -+ -+ driver->alsa_name_playback = strdup (playback_alsa_device); -+ driver->alsa_name_capture = strdup (capture_alsa_device); -+ -+ if (alsa_driver_check_card_type (driver)) { -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ -+ alsa_driver_hw_specific (driver, hw_monitoring, hw_metering); -+ -+ if (playing) { -+ if (snd_pcm_open (&driver->playback_handle, -+ playback_alsa_device, -+ SND_PCM_STREAM_PLAYBACK, -+ SND_PCM_NONBLOCK) < 0) { -+ switch (errno) { -+ case EBUSY: -+ jack_error ("the playback device \"%s\" is " -+ "already in use. Please stop the" -+ " application using it and " -+ "run JACK again", -+ playback_alsa_device); -+ alsa_driver_delete (driver); -+ return NULL; -+ break; -+ -+ case EPERM: -+ jack_error ("you do not have permission to open " -+ "the audio device \"%s\" for playback", -+ playback_alsa_device); -+ alsa_driver_delete (driver); -+ return NULL; -+ break; -+ } -+ -+ driver->playback_handle = NULL; -+ } -+ -+ if (driver->playback_handle) { -+ snd_pcm_nonblock (driver->playback_handle, 0); -+ } -+ } -+ -+ if (capturing) { -+ if (snd_pcm_open (&driver->capture_handle, -+ capture_alsa_device, -+ SND_PCM_STREAM_CAPTURE, -+ SND_PCM_NONBLOCK) < 0) { -+ switch (errno) { -+ case EBUSY: -+ jack_error ("the capture device \"%s\" is " -+ "already in use. Please stop the" -+ " application using it and " -+ "run JACK again", -+ capture_alsa_device); -+ alsa_driver_delete (driver); -+ return NULL; -+ break; -+ -+ case EPERM: -+ jack_error ("you do not have permission to open " -+ "the audio device \"%s\" for capture", -+ capture_alsa_device); -+ alsa_driver_delete (driver); -+ return NULL; -+ break; -+ } -+ -+ driver->capture_handle = NULL; -+ } -+ -+ if (driver->capture_handle) { -+ snd_pcm_nonblock (driver->capture_handle, 0); -+ } -+ } -+ -+ if (driver->playback_handle == NULL) { -+ if (playing) { -+ -+ /* they asked for playback, but we can't do it */ -+ -+ jack_error ("ALSA: Cannot open PCM device %s for " -+ "playback. Falling back to capture-only" -+ " mode", name); -+ -+ if (driver->capture_handle == NULL) { -+ /* can't do anything */ -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ -+ playing = FALSE; -+ } -+ } -+ -+ if (driver->capture_handle == NULL) { -+ if (capturing) { -+ -+ /* they asked for capture, but we can't do it */ -+ -+ jack_error ("ALSA: Cannot open PCM device %s for " -+ "capture. Falling back to playback-only" -+ " mode", name); -+ -+ if (driver->playback_handle == NULL) { -+ /* can't do anything */ -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ -+ capturing = FALSE; -+ } -+ } -+ -+ driver->playback_hw_params = 0; -+ driver->capture_hw_params = 0; -+ driver->playback_sw_params = 0; -+ driver->capture_sw_params = 0; -+ -+ if (driver->playback_handle) { -+ if ((err = snd_pcm_hw_params_malloc ( -+ &driver->playback_hw_params)) < 0) { -+ jack_error ("ALSA: could not allocate playback hw" -+ " params structure"); -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ -+ if ((err = snd_pcm_sw_params_malloc ( -+ &driver->playback_sw_params)) < 0) { -+ jack_error ("ALSA: could not allocate playback sw" -+ " params structure"); -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ } -+ -+ if (driver->capture_handle) { -+ if ((err = snd_pcm_hw_params_malloc ( -+ &driver->capture_hw_params)) < 0) { -+ jack_error ("ALSA: could not allocate capture hw" -+ " params structure"); -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ -+ if ((err = snd_pcm_sw_params_malloc ( -+ &driver->capture_sw_params)) < 0) { -+ jack_error ("ALSA: could not allocate capture sw" -+ " params structure"); -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ } -+ -+ if (alsa_driver_set_parameters (driver, frames_per_cycle, -+ user_nperiods, rate)) { -+ alsa_driver_delete (driver); -+ return NULL; -+ } -+ -+ driver->capture_and_playback_not_synced = FALSE; -+ -+ if (driver->capture_handle && driver->playback_handle) { -+ if (snd_pcm_link (driver->capture_handle, -+ driver->playback_handle) != 0) { -+ driver->capture_and_playback_not_synced = TRUE; -+ } -+ } -+ -+ driver->client = client; -+ return (jack_driver_t *) driver; -+} -+ -+int JackAlsaDriver::Attach() -+{ -+ JackPort* port; -+ int port_index; -+ unsigned long port_flags; -+ char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE]; -+ char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE]; -+ -+ assert(fCaptureChannels < DRIVER_PORT_NUM); -+ assert(fPlaybackChannels < DRIVER_PORT_NUM); -+ -+ port_flags = (unsigned long)CaptureDriverFlags; -+ -+ alsa_driver_t* alsa_driver = (alsa_driver_t*)fDriver; -+ -+ if (alsa_driver->has_hw_monitoring) -+ port_flags |= JackPortCanMonitor; -+ -+ // ALSA driver may have changed the values -+ JackAudioDriver::SetBufferSize(alsa_driver->frames_per_cycle); -+ JackAudioDriver::SetSampleRate(alsa_driver->frame_rate); -+ -+ jack_log("JackAudioDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); -+ -+ for (int i = 0; i < fCaptureChannels; i++) { -+ snprintf(alias, sizeof(alias) - 1, "%s:capture_%u", fAliasName, i + 1); -+ snprintf(name, sizeof(name) - 1, "%s:capture_%d", fClientControl.fName, i + 1); -+ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { -+ jack_error("driver: cannot register port for %s", name); -+ return -1; -+ } -+ port = fGraphManager->GetPort(port_index); -+ port->SetAlias(alias); -+ port->SetLatency(alsa_driver->frames_per_cycle + alsa_driver->capture_frame_latency); -+ fCapturePortList[i] = port_index; -+ jack_log("JackAudioDriver::Attach fCapturePortList[i] %ld ", port_index); -+ } -+ -+ port_flags = (unsigned long)PlaybackDriverFlags; -+ -+ for (int i = 0; i < fPlaybackChannels; i++) { -+ snprintf(alias, sizeof(alias) - 1, "%s:playback_%u", fAliasName, i + 1); -+ snprintf(name, sizeof(name) - 1, "%s:playback_%d", fClientControl.fName, i + 1); -+ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize)) == NO_PORT) { -+ jack_error("driver: cannot register port for %s", name); -+ return -1; -+ } -+ port = fGraphManager->GetPort(port_index); -+ port->SetAlias(alias); -+ // Add one buffer more latency if "async" mode is used... -+ port->SetLatency((alsa_driver->frames_per_cycle * (alsa_driver->user_nperiods - 1)) + -+ ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + alsa_driver->playback_frame_latency); -+ fPlaybackPortList[i] = port_index; -+ jack_log("JackAudioDriver::Attach fPlaybackPortList[i] %ld ", port_index); -+ -+ // Monitor ports -+ if (fWithMonitorPorts) { -+ jack_log("Create monitor port "); -+ snprintf(name, sizeof(name) - 1, "%s:monitor_%d", fClientControl.fName, i + 1); -+ if ((port_index = fGraphManager->AllocatePort(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, MonitorDriverFlags, fEngineControl->fBufferSize)) == NO_PORT) { -+ jack_error ("ALSA: cannot register monitor port for %s", name); -+ } else { -+ port = fGraphManager->GetPort(port_index); -+ port->SetLatency(alsa_driver->frames_per_cycle); -+ fMonitorPortList[i] = port_index; -+ } -+ } -+ } -+ -+ if (alsa_driver->midi) { -+ int err = (alsa_driver->midi->attach)(alsa_driver->midi); -+ if (err) -+ jack_error ("ALSA: cannot attach MIDI: %d", err); -+ } -+ -+ return 0; -+} -+ -+int JackAlsaDriver::Detach() -+{ -+ alsa_driver_t* alsa_driver = (alsa_driver_t*)fDriver; -+ if (alsa_driver->midi) -+ (alsa_driver->midi->detach)(alsa_driver->midi); -+ -+ return JackAudioDriver::Detach(); -+} -+ -+static int card_to_num(const char* device) -+{ -+ int err; -+ char* ctl_name; -+ snd_ctl_card_info_t *card_info; -+ snd_ctl_t* ctl_handle; -+ int i = -1; -+ -+ snd_ctl_card_info_alloca (&card_info); -+ -+ ctl_name = get_control_device_name(device); -+ if (ctl_name == NULL) { -+ jack_error("get_control_device_name() failed."); -+ goto fail; -+ } -+ -+ if ((err = snd_ctl_open (&ctl_handle, ctl_name, 0)) < 0) { -+ jack_error ("control open \"%s\" (%s)", ctl_name, -+ snd_strerror(err)); -+ goto free; -+ } -+ -+ if ((err = snd_ctl_card_info(ctl_handle, card_info)) < 0) { -+ jack_error ("control hardware info \"%s\" (%s)", -+ device, snd_strerror (err)); -+ goto close; -+ } -+ -+ i = snd_ctl_card_info_get_card(card_info); -+ -+close: -+ snd_ctl_close(ctl_handle); -+ -+free: -+ free(ctl_name); -+ -+fail: -+ return i; -+} -+ -+int JackAlsaDriver::Open(jack_nframes_t nframes, -+ jack_nframes_t user_nperiods, -+ jack_nframes_t samplerate, -+ bool hw_monitoring, -+ bool hw_metering, -+ bool capturing, -+ bool playing, -+ DitherAlgorithm dither, -+ bool soft_mode, -+ bool monitor, -+ int inchannels, -+ int outchannels, -+ bool shorts_first, -+ const char* capture_driver_name, -+ const char* playback_driver_name, -+ jack_nframes_t capture_latency, -+ jack_nframes_t playback_latency, -+ const char* midi_driver_name) -+{ -+ // Generic JackAudioDriver Open -+ if (JackAudioDriver::Open(nframes, samplerate, capturing, playing, -+ inchannels, outchannels, monitor, capture_driver_name, playback_driver_name, -+ capture_latency, playback_latency) != 0) { -+ return -1; -+ } -+ -+ alsa_midi_t *midi = 0; -+ if (strcmp(midi_driver_name, "seq") == 0) -+ midi = alsa_seqmidi_new((jack_client_t*)this, 0); -+ else if (strcmp(midi_driver_name, "raw") == 0) -+ midi = alsa_rawmidi_new((jack_client_t*)this); -+ -+ if (JackServerGlobals::on_device_acquire != NULL) -+ { -+ int capture_card = card_to_num(capture_driver_name); -+ int playback_card = card_to_num(playback_driver_name); -+ char audio_name[32]; -+ -+ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", capture_card); -+ if (!JackServerGlobals::on_device_acquire(audio_name)) { -+ jack_error("Audio device %s cannot be acquired, trying to open it anyway...", capture_driver_name); -+ } -+ -+ if (playback_card != capture_card) { -+ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", playback_card); -+ if (!JackServerGlobals::on_device_acquire(audio_name)) { -+ jack_error("Audio device %s cannot be acquired, trying to open it anyway...", playback_driver_name); -+ } -+ } -+ } -+ -+ fDriver = alsa_driver_new ("alsa_pcm", (char*)playback_driver_name, (char*)capture_driver_name, -+ NULL, -+ nframes, -+ user_nperiods, -+ samplerate, -+ hw_monitoring, -+ hw_metering, -+ capturing, -+ playing, -+ dither, -+ soft_mode, -+ monitor, -+ inchannels, -+ outchannels, -+ shorts_first, -+ capture_latency, -+ playback_latency, -+ midi); -+ if (fDriver) { -+ // ALSA driver may have changed the in/out values -+ fCaptureChannels = ((alsa_driver_t *)fDriver)->capture_nchannels; -+ fPlaybackChannels = ((alsa_driver_t *)fDriver)->playback_nchannels; -+ return 0; -+ } else { -+ JackAudioDriver::Close(); -+ return -1; -+ } -+} -+ -+int JackAlsaDriver::Close() -+{ -+ JackAudioDriver::Close(); -+ alsa_driver_delete((alsa_driver_t*)fDriver); -+ -+ if (JackServerGlobals::on_device_release != NULL) -+ { -+ char audio_name[32]; -+ int capture_card = card_to_num(fCaptureDriverName); -+ if (capture_card >= 0) { -+ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", capture_card); -+ JackServerGlobals::on_device_release(audio_name); -+ } -+ -+ int playback_card = card_to_num(fPlaybackDriverName); -+ if (playback_card >= 0 && playback_card != capture_card) { -+ snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", playback_card); -+ JackServerGlobals::on_device_release(audio_name); -+ } -+ } -+ -+ return 0; -+} -+ -+int JackAlsaDriver::Start() -+{ -+ JackAudioDriver::Start(); -+ return alsa_driver_start((alsa_driver_t *)fDriver); -+} -+ -+int JackAlsaDriver::Stop() -+{ -+ return alsa_driver_stop((alsa_driver_t *)fDriver); -+} -+ -+int JackAlsaDriver::Read() -+{ -+ /* Taken from alsa_driver_run_cycle */ -+ int wait_status; -+ jack_nframes_t nframes; -+ fDelayedUsecs = 0.f; -+ -+ nframes = alsa_driver_wait((alsa_driver_t *)fDriver, -1, &wait_status, &fDelayedUsecs); -+ -+ if (wait_status < 0) -+ return -1; /* driver failed */ -+ -+ if (nframes == 0) { -+ /* we detected an xrun and restarted: notify -+ * clients about the delay. -+ */ -+ jack_log("ALSA XRun wait_status = %d", wait_status); -+ NotifyXRun(fBeginDateUst, fDelayedUsecs); -+ return -1; -+ } -+ -+ if (nframes != fEngineControl->fBufferSize) -+ jack_log("JackAlsaDriver::Read error nframes = %ld", nframes); -+ -+ // Has to be done before read -+ JackDriver::CycleIncTime(); -+ -+ return alsa_driver_read((alsa_driver_t *)fDriver, fEngineControl->fBufferSize); -+} -+ -+int JackAlsaDriver::Write() -+{ -+ return alsa_driver_write((alsa_driver_t *)fDriver, fEngineControl->fBufferSize); -+} -+ -+void -+JackAlsaDriver::jack_driver_init (jack_driver_t *driver) -+{ -+ memset (driver, 0, sizeof (*driver)); -+ -+ driver->attach = 0; -+ driver->detach = 0; -+ driver->write = 0; -+ driver->read = 0; -+ driver->null_cycle = 0; -+ driver->bufsize = 0; -+ driver->start = 0; -+ driver->stop = 0; -+} -+ -+void -+JackAlsaDriver::jack_driver_nt_init (jack_driver_nt_t * driver) -+{ -+ memset (driver, 0, sizeof (*driver)); -+ -+ jack_driver_init ((jack_driver_t *) driver); -+ -+ driver->attach = 0; -+ driver->detach = 0; -+ driver->bufsize = 0; -+ driver->stop = 0; -+ driver->start = 0; -+ -+ driver->nt_bufsize = 0; -+ driver->nt_start = 0; -+ driver->nt_stop = 0; -+ driver->nt_attach = 0; -+ driver->nt_detach = 0; -+ driver->nt_run_cycle = 0; -+} -+ -+int JackAlsaDriver::is_realtime() const -+{ -+ return fEngineControl->fRealTime; -+} -+ -+int JackAlsaDriver::create_thread(pthread_t *thread, int priority, int realtime, void *(*start_routine)(void*), void *arg) -+{ -+ return JackPosixThread::StartImp(thread, priority, realtime, start_routine, arg); -+} -+ -+jack_port_id_t JackAlsaDriver::port_register(const char *port_name, const char *port_type, unsigned long flags, unsigned long buffer_size) -+{ -+ jack_port_id_t port_index; -+ int res = fEngine->PortRegister(fClientControl.fRefNum, port_name, port_type, flags, buffer_size, &port_index); -+ return (res == 0) ? port_index : 0; -+} -+ -+int JackAlsaDriver::port_unregister(jack_port_id_t port_index) -+{ -+ return fEngine->PortUnRegister(fClientControl.fRefNum, port_index); -+} -+ -+void* JackAlsaDriver::port_get_buffer(int port, jack_nframes_t nframes) -+{ -+ return fGraphManager->GetBuffer(port, nframes); -+} -+ -+int JackAlsaDriver::port_set_alias(int port, const char* name) -+{ -+ return fGraphManager->GetPort(port)->SetAlias(name); -+} -+ -+jack_nframes_t JackAlsaDriver::get_sample_rate() const -+{ -+ return fEngineControl->fSampleRate; -+} -+ -+jack_nframes_t JackAlsaDriver::frame_time() const -+{ -+ JackTimer timer; -+ fEngineControl->ReadFrameTime(&timer); -+ return timer.Time2Frames(GetMicroSeconds(), fEngineControl->fBufferSize); -+} -+ -+jack_nframes_t JackAlsaDriver::last_frame_time() const -+{ -+ JackTimer timer; -+ fEngineControl->ReadFrameTime(&timer); -+ return timer.CurFrame(); -+} -+ -+} // end of namespace -+ -+ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+ -+static -+void -+fill_device( -+ jack_driver_param_constraint_desc_t ** constraint_ptr_ptr, -+ uint32_t * array_size_ptr, -+ const char * device_id, -+ const char * device_description) -+{ -+ jack_driver_param_value_enum_t * possible_value_ptr; -+ -+ //jack_info("%6s - %s", device_id, device_description); -+ -+ if (*constraint_ptr_ptr == NULL) -+ { -+ *constraint_ptr_ptr = (jack_driver_param_constraint_desc_t *)calloc(1, sizeof(jack_driver_param_value_enum_t)); -+ *array_size_ptr = 0; -+ } -+ -+ if ((*constraint_ptr_ptr)->constraint.enumeration.count == *array_size_ptr) -+ { -+ *array_size_ptr += 10; -+ (*constraint_ptr_ptr)->constraint.enumeration.possible_values_array = -+ (jack_driver_param_value_enum_t *)realloc( -+ (*constraint_ptr_ptr)->constraint.enumeration.possible_values_array, -+ sizeof(jack_driver_param_value_enum_t) * *array_size_ptr); -+ } -+ -+ possible_value_ptr = (*constraint_ptr_ptr)->constraint.enumeration.possible_values_array + (*constraint_ptr_ptr)->constraint.enumeration.count; -+ (*constraint_ptr_ptr)->constraint.enumeration.count++; -+ strcpy(possible_value_ptr->value.str, device_id); -+ strcpy(possible_value_ptr->short_desc, device_description); -+} -+ -+static -+jack_driver_param_constraint_desc_t * -+enum_alsa_devices() -+{ -+ snd_ctl_t * handle; -+ snd_ctl_card_info_t * info; -+ snd_pcm_info_t * pcminfo_capture; -+ snd_pcm_info_t * pcminfo_playback; -+ int card_no = -1; -+ char card_id[JACK_DRIVER_PARAM_STRING_MAX + 1]; -+ char device_id[JACK_DRIVER_PARAM_STRING_MAX + 1]; -+ char description[64]; -+ int device_no; -+ bool has_capture; -+ bool has_playback; -+ jack_driver_param_constraint_desc_t * constraint_ptr; -+ uint32_t array_size = 0; -+ -+ snd_ctl_card_info_alloca(&info); -+ snd_pcm_info_alloca(&pcminfo_capture); -+ snd_pcm_info_alloca(&pcminfo_playback); -+ -+ constraint_ptr = NULL; -+ -+ while(snd_card_next(&card_no) >= 0 && card_no >= 0) -+ { -+ sprintf(card_id, "hw:%d", card_no); -+ -+ if (snd_ctl_open(&handle, card_id, 0) >= 0 && -+ snd_ctl_card_info(handle, info) >= 0) -+ { -+ fill_device(&constraint_ptr, &array_size, card_id, snd_ctl_card_info_get_name(info)); -+ -+ device_no = -1; -+ -+ while (snd_ctl_pcm_next_device(handle, &device_no) >= 0 && device_no != -1) -+ { -+ sprintf(device_id, "%s,%d", card_id, device_no); -+ -+ snd_pcm_info_set_device(pcminfo_capture, device_no); -+ snd_pcm_info_set_subdevice(pcminfo_capture, 0); -+ snd_pcm_info_set_stream(pcminfo_capture, SND_PCM_STREAM_CAPTURE); -+ has_capture = snd_ctl_pcm_info(handle, pcminfo_capture) >= 0; -+ -+ snd_pcm_info_set_device(pcminfo_playback, device_no); -+ snd_pcm_info_set_subdevice(pcminfo_playback, 0); -+ snd_pcm_info_set_stream(pcminfo_playback, SND_PCM_STREAM_PLAYBACK); -+ has_playback = snd_ctl_pcm_info(handle, pcminfo_playback) >= 0; -+ -+ if (has_capture && has_playback) -+ { -+ snprintf(description, sizeof(description),"%s (duplex)", snd_pcm_info_get_name(pcminfo_capture)); -+ } -+ else if (has_capture) -+ { -+ snprintf(description, sizeof(description),"%s (capture)", snd_pcm_info_get_name(pcminfo_capture)); -+ } -+ else if (has_playback) -+ { -+ snprintf(description, sizeof(description),"%s (playback)", snd_pcm_info_get_name(pcminfo_playback)); -+ } -+ else -+ { -+ continue; -+ } -+ -+ fill_device(&constraint_ptr, &array_size, device_id, description); -+ } -+ -+ snd_ctl_close(handle); -+ } -+ } -+ -+ return constraint_ptr; -+} -+ -+static -+jack_driver_param_constraint_desc_t * -+get_midi_driver_constraint() -+{ -+ jack_driver_param_constraint_desc_t * constraint_ptr; -+ jack_driver_param_value_enum_t * possible_value_ptr; -+ -+ //jack_info("%6s - %s", device_id, device_description); -+ -+ constraint_ptr = (jack_driver_param_constraint_desc_t *)calloc(1, sizeof(jack_driver_param_value_enum_t)); -+ constraint_ptr->flags = JACK_CONSTRAINT_FLAG_STRICT | JACK_CONSTRAINT_FLAG_FAKE_VALUE; -+ -+ constraint_ptr->constraint.enumeration.possible_values_array = (jack_driver_param_value_enum_t *)malloc(3 * sizeof(jack_driver_param_value_enum_t)); -+ constraint_ptr->constraint.enumeration.count = 3; -+ -+ possible_value_ptr = constraint_ptr->constraint.enumeration.possible_values_array; -+ -+ strcpy(possible_value_ptr->value.str, "none"); -+ strcpy(possible_value_ptr->short_desc, "no MIDI driver"); -+ -+ possible_value_ptr++; -+ -+ strcpy(possible_value_ptr->value.str, "seq"); -+ strcpy(possible_value_ptr->short_desc, "ALSA Sequencer driver"); -+ -+ possible_value_ptr++; -+ -+ strcpy(possible_value_ptr->value.str, "raw"); -+ strcpy(possible_value_ptr->short_desc, "ALSA RawMIDI driver"); -+ -+ return constraint_ptr; -+} -+ -+static -+jack_driver_param_constraint_desc_t * -+get_dither_constraint() -+{ -+ jack_driver_param_constraint_desc_t * constraint_ptr; -+ jack_driver_param_value_enum_t * possible_value_ptr; -+ -+ //jack_info("%6s - %s", device_id, device_description); -+ -+ constraint_ptr = (jack_driver_param_constraint_desc_t *)calloc(1, sizeof(jack_driver_param_value_enum_t)); -+ constraint_ptr->flags = JACK_CONSTRAINT_FLAG_STRICT | JACK_CONSTRAINT_FLAG_FAKE_VALUE; -+ -+ constraint_ptr->constraint.enumeration.possible_values_array = (jack_driver_param_value_enum_t *)malloc(4 * sizeof(jack_driver_param_value_enum_t)); -+ constraint_ptr->constraint.enumeration.count = 4; -+ -+ possible_value_ptr = constraint_ptr->constraint.enumeration.possible_values_array; -+ -+ possible_value_ptr->value.c = 'n'; -+ strcpy(possible_value_ptr->short_desc, "none"); -+ -+ possible_value_ptr++; -+ -+ possible_value_ptr->value.c = 'r'; -+ strcpy(possible_value_ptr->short_desc, "rectangular"); -+ -+ possible_value_ptr++; -+ -+ possible_value_ptr->value.c = 's'; -+ strcpy(possible_value_ptr->short_desc, "shaped"); -+ -+ possible_value_ptr++; -+ -+ possible_value_ptr->value.c = 't'; -+ strcpy(possible_value_ptr->short_desc, "triangular"); -+ -+ return constraint_ptr; -+} -+ -+ static int -+ dither_opt (char c, DitherAlgorithm* dither) -+ { -+ switch (c) { -+ case '-': -+ case 'n': -+ *dither = None; -+ break; -+ -+ case 'r': -+ *dither = Rectangular; -+ break; -+ -+ case 's': -+ *dither = Shaped; -+ break; -+ -+ case 't': -+ *dither = Triangular; -+ break; -+ -+ default: -+ fprintf (stderr, "ALSA driver: illegal dithering mode %c\n", c); -+ return -1; -+ } -+ return 0; -+ } -+ -+ SERVER_EXPORT const jack_driver_desc_t* driver_get_descriptor () -+ { -+ jack_driver_desc_t * desc; -+ jack_driver_param_desc_t * params; -+ unsigned int i; -+ -+ desc = (jack_driver_desc_t*)calloc (1, sizeof (jack_driver_desc_t)); -+ -+ strcpy(desc->name, "alsa"); // size MUST be less then JACK_DRIVER_NAME_MAX + 1 -+ strcpy(desc->desc, "Linux ALSA API based audio backend"); // size MUST be less then JACK_DRIVER_PARAM_DESC + 1 -+ -+ desc->nparams = 18; -+ params = (jack_driver_param_desc_t*)calloc (desc->nparams, sizeof (jack_driver_param_desc_t)); -+ -+ i = 0; -+ strcpy (params[i].name, "capture"); -+ params[i].character = 'C'; -+ params[i].type = JackDriverParamString; -+ strcpy (params[i].value.str, "none"); -+ strcpy (params[i].short_desc, -+ "Provide capture ports. Optionally set device"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "playback"); -+ params[i].character = 'P'; -+ params[i].type = JackDriverParamString; -+ strcpy (params[i].value.str, "none"); -+ strcpy (params[i].short_desc, -+ "Provide playback ports. Optionally set device"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "device"); -+ params[i].character = 'd'; -+ params[i].type = JackDriverParamString; -+ strcpy (params[i].value.str, "hw:0"); -+ strcpy (params[i].short_desc, "ALSA device name"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ params[i].constraint = enum_alsa_devices(); -+ -+ i++; -+ strcpy (params[i].name, "rate"); -+ params[i].character = 'r'; -+ params[i].type = JackDriverParamUInt; -+ params[i].value.ui = 48000U; -+ strcpy (params[i].short_desc, "Sample rate"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "period"); -+ params[i].character = 'p'; -+ params[i].type = JackDriverParamUInt; -+ params[i].value.ui = 1024U; -+ strcpy (params[i].short_desc, "Frames per period"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "nperiods"); -+ params[i].character = 'n'; -+ params[i].type = JackDriverParamUInt; -+ params[i].value.ui = 2U; -+ strcpy (params[i].short_desc, "Number of periods of playback latency"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "hwmon"); -+ params[i].character = 'H'; -+ params[i].type = JackDriverParamBool; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, "Hardware monitoring, if available"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "hwmeter"); -+ params[i].character = 'M'; -+ params[i].type = JackDriverParamBool; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, "Hardware metering, if available"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "duplex"); -+ params[i].character = 'D'; -+ params[i].type = JackDriverParamBool; -+ params[i].value.i = 1; -+ strcpy (params[i].short_desc, -+ "Provide both capture and playback ports"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "softmode"); -+ params[i].character = 's'; -+ params[i].type = JackDriverParamBool; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, "Soft-mode, no xrun handling"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "monitor"); -+ params[i].character = 'm'; -+ params[i].type = JackDriverParamBool; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, "Provide monitor ports for the output"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "dither"); -+ params[i].character = 'z'; -+ params[i].type = JackDriverParamChar; -+ params[i].value.c = 'n'; -+ strcpy (params[i].short_desc, "Dithering mode"); -+ strcpy (params[i].long_desc, -+ "Dithering mode:\n" -+ " n - none\n" -+ " r - rectangular\n" -+ " s - shaped\n" -+ " t - triangular"); -+ params[i].constraint = get_dither_constraint(); -+ -+ i++; -+ strcpy (params[i].name, "inchannels"); -+ params[i].character = 'i'; -+ params[i].type = JackDriverParamUInt; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, -+ "Number of capture channels (defaults to hardware max)"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "outchannels"); -+ params[i].character = 'o'; -+ params[i].type = JackDriverParamUInt; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, -+ "Number of playback channels (defaults to hardware max)"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "shorts"); -+ params[i].character = 'S'; -+ params[i].type = JackDriverParamBool; -+ params[i].value.i = FALSE; -+ strcpy (params[i].short_desc, "Try 16-bit samples before 32-bit"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "input-latency"); -+ params[i].character = 'I'; -+ params[i].type = JackDriverParamUInt; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, "Extra input latency (frames)"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "output-latency"); -+ params[i].character = 'O'; -+ params[i].type = JackDriverParamUInt; -+ params[i].value.i = 0; -+ strcpy (params[i].short_desc, "Extra output latency (frames)"); -+ strcpy (params[i].long_desc, params[i].short_desc); -+ -+ i++; -+ strcpy (params[i].name, "midi-driver"); -+ params[i].character = 'X'; -+ params[i].type = JackDriverParamString; -+ strcpy (params[i].value.str, "none"); -+ strcpy (params[i].short_desc, "ALSA MIDI driver name (seq|raw)"); -+ strcpy (params[i].long_desc, -+ "ALSA MIDI driver:\n" -+ " none - no MIDI driver\n" -+ " seq - ALSA Sequencer driver\n" -+ " raw - ALSA RawMIDI driver\n"); -+ params[i].constraint = get_midi_driver_constraint(); -+ -+ desc->params = params; -+ return desc; -+ } -+ -+ SERVER_EXPORT Jack::JackDriverClientInterface* driver_initialize(Jack::JackLockedEngine* engine, Jack::JackSynchro* table, const JSList* params) -+ { -+ jack_nframes_t srate = 48000; -+ jack_nframes_t frames_per_interrupt = 1024; -+ unsigned long user_nperiods = 2; -+ const char *playback_pcm_name = "hw:0"; -+ const char *capture_pcm_name = "hw:0"; -+ int hw_monitoring = FALSE; -+ int hw_metering = FALSE; -+ int capture = FALSE; -+ int playback = FALSE; -+ int soft_mode = FALSE; -+ int monitor = FALSE; -+ DitherAlgorithm dither = None; -+ int user_capture_nchnls = 0; -+ int user_playback_nchnls = 0; -+ int shorts_first = FALSE; -+ jack_nframes_t systemic_input_latency = 0; -+ jack_nframes_t systemic_output_latency = 0; -+ const JSList * node; -+ const jack_driver_param_t * param; -+ const char *midi_driver = "none"; -+ -+ for (node = params; node; node = jack_slist_next (node)) { -+ param = (const jack_driver_param_t *) node->data; -+ -+ switch (param->character) { -+ -+ case 'C': -+ capture = TRUE; -+ if (strcmp (param->value.str, "none") != 0) { -+ capture_pcm_name = strdup (param->value.str); -+ jack_log("capture device %s", capture_pcm_name); -+ } -+ break; -+ -+ case 'P': -+ playback = TRUE; -+ if (strcmp (param->value.str, "none") != 0) { -+ playback_pcm_name = strdup (param->value.str); -+ jack_log("playback device %s", playback_pcm_name); -+ } -+ break; -+ -+ case 'D': -+ playback = TRUE; -+ capture = TRUE; -+ break; -+ -+ case 'd': -+ playback_pcm_name = strdup (param->value.str); -+ capture_pcm_name = strdup (param->value.str); -+ jack_log("playback device %s", playback_pcm_name); -+ jack_log("capture device %s", capture_pcm_name); -+ break; -+ -+ case 'H': -+ hw_monitoring = param->value.i; -+ break; -+ -+ case 'm': -+ monitor = param->value.i; -+ break; -+ -+ case 'M': -+ hw_metering = param->value.i; -+ break; -+ -+ case 'r': -+ srate = param->value.ui; -+ jack_log("apparent rate = %d", srate); -+ break; -+ -+ case 'p': -+ frames_per_interrupt = param->value.ui; -+ jack_log("frames per period = %d", frames_per_interrupt); -+ break; -+ -+ case 'n': -+ user_nperiods = param->value.ui; -+ if (user_nperiods < 2) /* enforce minimum value */ -+ user_nperiods = 2; -+ break; -+ -+ case 's': -+ soft_mode = param->value.i; -+ break; -+ -+ case 'z': -+ if (dither_opt (param->value.c, &dither)) { -+ return NULL; -+ } -+ break; -+ -+ case 'i': -+ user_capture_nchnls = param->value.ui; -+ break; -+ -+ case 'o': -+ user_playback_nchnls = param->value.ui; -+ break; -+ -+ case 'S': -+ shorts_first = param->value.i; -+ break; -+ -+ case 'I': -+ systemic_input_latency = param->value.ui; -+ break; -+ -+ case 'O': -+ systemic_output_latency = param->value.ui; -+ break; -+ -+ case 'X': -+ midi_driver = strdup(param->value.str); -+ break; -+ } -+ } -+ -+ /* duplex is the default */ -+ if (!capture && !playback) { -+ capture = TRUE; -+ playback = TRUE; -+ } -+ -+ Jack::JackAlsaDriver* alsa_driver = new Jack::JackAlsaDriver("system", "alsa_pcm", engine, table); -+ Jack::JackDriverClientInterface* threaded_driver = new Jack::JackThreadedDriver(alsa_driver); -+ // Special open for ALSA driver... -+ if (alsa_driver->Open(frames_per_interrupt, user_nperiods, srate, hw_monitoring, hw_metering, capture, playback, dither, soft_mode, monitor, -+ user_capture_nchnls, user_playback_nchnls, shorts_first, capture_pcm_name, playback_pcm_name, -+ systemic_input_latency, systemic_output_latency, midi_driver) == 0) { -+ return threaded_driver; -+ } else { -+ delete threaded_driver; // Delete the decorated driver -+ return NULL; -+ } -+ } -+ -+#ifdef __cplusplus -+} -+#endif -+ -+ -diff -rupN jack-1.9.5.old/linux/alsa/port_names.c jack-1.9.5/linux/alsa/port_names.c ---- jack-1.9.5.old/linux/alsa/port_names.c 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/linux/alsa/port_names.c 2010-07-20 00:17:44.000000000 -0400 -@@ -0,0 +1,176 @@ -+/* -*- mode: c; c-file-style: "linux"; -*- */ -+/* -+ Copyright (C) 2010 Florian Faber, faber@faberman.de -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+*/ -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "alsa_driver.h" -+ -+ -+static int port_names_load_portfile(alsa_driver_t *driver, const char *filename, char **buf, const unsigned int offset, const unsigned int num) { -+ int fh, i, ret, lineno, id, res=0; -+ char line[256]; -+ -+ fh = open(filename, O_RDONLY); -+ if (-1!=fh) { -+ res = 1; -+ i = 0; -+ lineno = 1; -+ for (;;) { -+ ret = read(fh, &line[i], 1); -+ if (0==ret) { -+ break; -+ } else if (-1==ret) { -+ sprintf(stderr, "Error while reading \"%s\": %s", filename, strerror(errno)); -+ break; -+ } -+ if (0x0A==line[i]) { -+ /* new line, parse input */ -+ line[i] = 0; -+ -+ if ('#' != line[0]) { -+ i=0; -+ while ((i<255) && (line[i]!='=')) i++; -+ if (255==i) { -+ sprintf(stderr, "Error while reading \"%s\": Line %d has no key=value syntax!", filename, lineno); -+ } else { -+ line[i] = 0; -+ id = atoi(line); -+ if ((id>=1) && (id<=num)) { -+ if (NULL==buf[id-1+offset]) { -+ /* don't overwrite existing names */ -+ buf[id-1+offset] = strdup(&line[i+1]); -+ } -+ } else { -+ sprintf(stderr, "Error while reading \"%s\": Key %d out of range in line %d (1..%d)", filename, id, lineno, num); -+ } -+ } -+ } -+ -+ i = 0; -+ lineno++; -+ } else { -+ i++; -+ if (i==255) { -+ sprintf(stderr, "Error while reading \"%s\": Line %d is too long", filename, lineno); -+ break; -+ } -+ } -+ } -+ -+ (void) close(fh); -+ } -+ -+ return res; -+} -+ -+ -+static void port_names_default_portnames(char **buf, const unsigned int offset, const unsigned int num, const char *defaultname) { -+ unsigned int i; -+ char line[256]; -+ -+ /* Fill in default names */ -+ for (i=0; iframe_rate > 96000) { -+ speed="qs"; -+ } else if (driver->frame_rate > 48000) { -+ speed="ds"; -+ } else { -+ speed="ss"; -+ } -+ -+ snd_ctl_card_info_alloca(&card_info); -+ err = snd_ctl_card_info(driver->ctl_handle, card_info); -+ if (err >= 0) { -+ card_name = snd_ctl_card_info_get_name(card_info); -+ } -+ -+ buf = malloc(sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); -+ if (NULL==buf) { -+ sprintf(stderr, "ALSA: Not enough memory for %d port names", driver->capture_nchannels + driver->playback_nchannels); -+ return NULL; -+ } -+ bzero(buf, sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); -+ -+ /* Read port names from special to general: -+ * Begin with user and speed specific port names */ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.in", getenv("HOME"), card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* Now user general */ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.in", getenv("HOME"), card_name); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* System speed specific */ -+ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.in", card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* System general */ -+ snprintf(filename, 255, "/etc/jack/cards/%s.ports.in", card_name); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* Fill all still unnamed ports with default names */ -+ port_names_default_portnames(buf, 0, driver->capture_nchannels, "capture_%lu"); -+ -+ -+ /* Same procedure for the playback channels */ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.out", getenv("HOME"), card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.out", getenv("HOME"), card_name); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.out", card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ snprintf(filename, 255, "/etc/jack/cards/%s.ports.out", card_name); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ port_names_default_portnames(buf, driver->capture_nchannels, driver->playback_nchannels, "playback_%lu"); -+ -+ return buf; -+} -diff -rupN jack-1.9.5.old/linux/alsa/port_names.h jack-1.9.5/linux/alsa/port_names.h ---- jack-1.9.5.old/linux/alsa/port_names.h 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/linux/alsa/port_names.h 2010-07-20 00:17:44.000000000 -0400 -@@ -0,0 +1,34 @@ -+/* -+ Copyright (C) 2010 Florian Faber, faber@faberman.de -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+*/ -+ -+#ifndef __jack_port_names_h__ -+#define __jack_port_names_h__ -+ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+ -+char** port_names_get_portnames(alsa_driver_t *driver); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* __jack_port_names_h__ */ -diff -rupN jack-1.9.5.old/linux/wscript jack-1.9.5/linux/wscript ---- jack-1.9.5.old/linux/wscript 2010-02-12 05:58:07.000000000 -0500 -+++ jack-1.9.5/linux/wscript 2010-07-20 00:17:44.000000000 -0400 -@@ -52,7 +52,8 @@ def build(bld): - 'alsa/generic_hw.c', - 'alsa/hdsp.c', - 'alsa/hammerfall.c', -- 'alsa/ice1712.c' -+ 'alsa/ice1712.c', -+ 'alsa/port_names.c' - ] - - ffado_driver_src = ['firewire/JackFFADODriver.cpp', -diff -rupN jack-1.9.5.old/linux/wscript.orig jack-1.9.5/linux/wscript.orig ---- jack-1.9.5.old/linux/wscript.orig 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/linux/wscript.orig 2010-02-12 05:58:07.000000000 -0500 -@@ -0,0 +1,81 @@ -+#! /usr/bin/env python -+# encoding: utf-8 -+ -+def configure(conf): -+ conf.check_cfg(package='alsa', atleast_version='1.0.18', args='--cflags --libs') -+ conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA') -+ -+ conf. check_cfg(package='libfreebob', atleast_version='1.0.0', args='--cflags --libs') -+ conf.env['BUILD_DRIVER_FREEBOB'] = conf.is_defined('HAVE_LIBFREEBOB') -+ -+ conf. check_cfg(package='libffado', atleast_version='1.999.17', args='--cflags --libs') -+ conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO') -+ -+ conf.define('HAVE_PPOLL', 1 ) -+ -+ -+def create_jack_driver_obj(bld, target, sources, uselib = None): -+ driver = bld.new_task_gen('cxx', 'shlib') -+ driver.features.append('cc') -+ driver.env['shlib_PATTERN'] = 'jack_%s.so' -+ driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE', 'HAVE_PPOLL'] -+ driver.includes = ['.', '../linux', '../posix', '../common', '../common/jack', '../dbus'] -+ driver.target = target -+ driver.source = sources -+ driver.install_path = '${ADDON_DIR}/' -+ if uselib: -+ driver.uselib = uselib -+ driver.uselib_local = 'serverlib' -+ return driver -+ -+def build(bld): -+ if bld.env['BUILD_JACKD'] == True: -+ jackd = bld.new_task_gen('cxx', 'program') -+ jackd.includes = ['../linux', '../posix', '../common/jack', '../common', '../dbus'] -+ jackd.defines = 'HAVE_CONFIG_H' -+ jackd.source = ['../common/Jackdmp.cpp'] -+ if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']: -+ jackd.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c'] -+ jackd.uselib = 'PTHREAD DL RT DBUS-1' -+ else: -+ jackd.uselib = 'PTHREAD DL RT' -+ jackd.uselib_local = 'serverlib' -+ jackd.target = 'jackd' -+ -+ create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp') -+ -+ alsa_driver_src = ['alsa/JackAlsaDriver.cpp', -+ 'alsa/alsa_rawmidi.c', -+ 'alsa/alsa_seqmidi.c', -+ 'alsa/alsa_midi_jackmp.cpp', -+ '../common/memops.c', -+ 'alsa/generic_hw.c', -+ 'alsa/hdsp.c', -+ 'alsa/hammerfall.c', -+ 'alsa/ice1712.c' -+ ] -+ -+ ffado_driver_src = ['firewire/JackFFADODriver.cpp', -+ 'firewire/JackFFADOMidiInput.cpp', -+ 'firewire/JackFFADOMidiOutput.cpp', -+ '../common/JackPhysicalMidiInput.cpp', -+ '../common/JackPhysicalMidiOutput.cpp' -+ ] -+ -+ if bld.env['BUILD_DRIVER_ALSA'] == True: -+ create_jack_driver_obj(bld, 'alsa', alsa_driver_src, "ALSA") -+ -+ if bld.env['BUILD_DRIVER_FREEBOB'] == True: -+ create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', "LIBFREEBOB") -+ -+ if bld.env['BUILD_DRIVER_FFADO'] == True: -+ create_jack_driver_obj(bld, 'firewire', ffado_driver_src, "LIBFFADO") -+ -+ create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp') -+ -+ create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp') -+ -+ create_jack_driver_obj(bld, 'netone', [ '../common/JackNetOneDriver.cpp', -+ '../common/netjack.c', -+ '../common/netjack_packet.c' ], "SAMPLERATE CELT" ) -+ diff --git a/jack-manpages.patch b/jack-manpages.patch deleted file mode 100644 index ba80750..0000000 --- a/jack-manpages.patch +++ /dev/null @@ -1,1215 +0,0 @@ -diff -rupN jack-1.9.5.old/man/alsa_in.0 jack-1.9.5/man/alsa_in.0 ---- jack-1.9.5.old/man/alsa_in.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/alsa_in.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,97 @@ -+.TH ALSA_IO "1" "!DATE!" "!VERSION!" -+.SH NAME -+\fBalsa_in\fR, \fBalsa_out\fR \- Jack clients that perform I/O with an alternate audio interface -+.SH SYNOPSIS -+\fBalsa_in\fR [\fIoptions\fR] -+.br -+\fBalsa_out\fR [\fIoptions\fR] -+ -+.SH DESCRIPTION -+A JACK client that opens a specified audio interface (different to the -+one used by the JACK server, if any) and moves audio data between its -+JACK ports and the interface. alsa_in will provide data from the -+interface (potentially for capture); alsa_out will deliver data to it -+(for playback). -+ -+The audio interface used by alsa_in/alsa_out does not need to be -+synchronized with JACK backend (or the hardware it might be using). -+alsa_in/alsa_out tries to resample the output stream in an attempt to -+compensate for drift between the two clocks. -+ -+As of jack-0.116.3 this works almost perfectly. It takes some time, to reach -+absolute resample-rate stability. So give it some minutes (its intended to be -+running permanently anyways) -+ -+.SH OPTIONS -+.TP -+\fB\-j \fI jack_client_name\fR -+.br -+Set Client Name. -+.TP -+\fB\-d \fI alsa_device\fR -+.br -+Use this Soundcard. -+.TP -+\fB\-v\fR -+.br -+Verbose, prints out resample coefficient and other parameters useful for debugging, every 500ms. -+also reports soft xruns. -+.TP -+\fB\-i\fR -+.br -+Instrumentation. This logs the 4 important parameters of the samplerate control algorithm every 1ms. -+You can pipe this into a file, and plot it. Should only be necessary, if it does not work as -+expected, and we need to adjust some of the obscure parameters, to make it work. -+Find me on irc.freenode.org #jack in order to set this up correctly. -+.TP -+\fB\-c \fI channels\fR -+.br -+Set Number of channels. -+.TP -+\fB\-r \fI sample_rate\fR -+.br -+Set sample_rate. The program resamples as necessary. -+So you can connect a 44k1 jackd to a soundcard only supporting -+48k. (default is jack sample_rate) -+.TP -+\fB\-p \fI period_size\fR -+.br -+Set the period size. It is not related to the jackd period_size. -+Sometimes it affects the quality of the delay measurements. -+Setting this lower than the jackd period_size will only work, if you -+use a higher number of periods. -+.TP -+\fB\-n \fI num_period\fR -+.br -+Set number of periods. See note for period_size. -+.TP -+\fB\-q \fI quality\fR -+.br -+Set the quality of the resampler from 0 to 4. can significanly reduce cpu usage. -+.TP -+\fB\-m \fI max_diff\fR -+.br -+The value when a soft xrun occurs. Basically the window, in which -+the dma pointer may jitter. I don't think its necessary to play with this anymore. -+.TP -+\fB\-t \fI target_delay\fR -+.br -+The delay alsa_io should try to approach. Same as for max_diff. It will be setup based on \-p and \-n -+which is generally sufficient. -+.TP -+\fB\-s \fI smooth_array_size\fR -+.br -+This parameter controls the size of the array used for smoothing the delay measurement. Its default is 256. -+If you use a pretty low period size, you can lower the CPU usage a bit by decreasing this parameter. -+However most CPU time is spent in the resampling so this will not be much. -+.TP -+\fB\-C \fI P Control Clamp\fR -+.br -+If you have a PCI card, then the default value (15) of this parameter is too high for \-p64 \-n2... Setting it to 5 should fix that. -+Be aware that setting this parameter too low, lets the hf noise on the delay measurement come through onto the resamplerate, so this -+might degrade the quality of the output. (but its a threshold value, and it has been chosen, to mask the noise of a USB card, -+which has an amplitude which is 50 times higher than that of a PCI card, so 5 wont loose you any quality on a PCI card) -+ -+.SH AUTHOR -+Torben Hohn -+ -diff -rupN jack-1.9.5.old/man/alsa_out.0 jack-1.9.5/man/alsa_out.0 ---- jack-1.9.5.old/man/alsa_out.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/alsa_out.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1 @@ -+.so man1/alsa_in.1 -diff -rupN jack-1.9.5.old/man/fill_template jack-1.9.5/man/fill_template ---- jack-1.9.5.old/man/fill_template 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/fill_template 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,5 @@ -+#!/bin/sh -+ -+for i in *.0 ; do -+ sed -e "s/!VERSION!/${1}/g" -e "s/!DATE!/`date '+%B %Y'`/g" < ${i} > ${i%%0}1 -+done -diff -rupN jack-1.9.5.old/man/jack_bufsize.0 jack-1.9.5/man/jack_bufsize.0 ---- jack-1.9.5.old/man/jack_bufsize.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_bufsize.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,14 @@ -+.TH JACK_BUFSIZE "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_bufsize \- JACK toolkit client to change the JACK buffer size -+.SH SYNOPSIS -+.B jack_bufsize bufsize -+.SH DESCRIPTION -+.B jack_bufsize -+jack_bufsize sets the size of the buffer (frames per period) used in JACK. -+This change happens on-line (the JACK server and its clients do not need to be -+restarted). -+.br -+When invoked without arguments, it prints the current bufsize, and exits. -+ -+ -diff -rupN jack-1.9.5.old/man/jack_connect.0 jack-1.9.5/man/jack_connect.0 ---- jack-1.9.5.old/man/jack_connect.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_connect.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,11 @@ -+.TH JACK_CONNECT "1" "!DATE!" "!VERSION!" -+.SH NAME -+\fBjack_connect\fR, \fBjack_disconnect\fR \- JACK toolkit clients for connecting & disconnecting ports -+.SH SYNOPSIS -+\fB jack_connect\fR [ \fI-s\fR | \fI--server servername\fR ] [\fI-h\fR | \fI--help\fR ] port1 port2 -+\fB jack_disconnect\fR [ \fI-s\fR | \fI--server servername\fR ] [\fI-h\fR | \fI--help\fR ] port1 port2 -+.SH DESCRIPTION -+\fBjack_connect\fR connects the two named ports. \fBjack_connect\fR disconnects the two named ports. -+.SH RETURNS -+The exit status is zero if successful, 1 otherwise -+ -diff -rupN jack-1.9.5.old/man/jackd.0 jack-1.9.5/man/jackd.0 ---- jack-1.9.5.old/man/jackd.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jackd.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,547 @@ -+.TH "JACKD" "1" "!VERSION!" "!DATE!" "" -+.SH "NAME" -+jackd \- JACK Audio Connection Kit sound server -+.SH "SYNOPSIS" -+\fBjackd\fR [\fIoptions\fR] \fB\-d\fI backend \fR -+[\fIbackend\-parameters\fR] -+.br -+\fBjackd \-\-help\fR -+.SH "DESCRIPTION" -+\fBjackd\fR is the JACK audio server daemon, a low\-latency audio -+server. Originally written for the -+GNU/Linux operating system, it also supports Mac OS X and various Unix -+platforms. JACK can connect a number of different client applications -+to an audio device and also to each other. Most clients are external, -+running in their own processes as normal applications. JACK also -+supports internal clients, which run within the \fBjackd\fR process -+using a loadable "plugin" interface. -+ -+JACK differs from other audio servers in being designed from the -+ground up for professional audio work. It focuses on two key areas: -+synchronous execution of all clients, and low latency operation. -+ -+For the latest JACK information, please consult the web site, -+<\fBhttp://www.jackaudio.org\fR>. -+.SH "OPTIONS" -+.TP -+\fB\-d, \-\-driver \fIbackend\fR [\fIbackend\-parameters\fR ] -+.br -+Select the audio interface backend. The current list of supported -+backends is: \fBalsa\fR, \fBcoreaudio\fR, \fBdummy\fR, \fBfreebob\fR, -+\fBoss\fR \fBsun\fR and \fBportaudio\fR. They are not all available -+on all platforms. All \fIbackend\-parameters\fR are optional. -+ -+.TP -+\fB\-h, \-\-help\fR -+.br -+Print a brief usage message describing the main \fBjackd\fR options. -+These do not include \fIbackend\-parameters\fR, which are listed using -+the \fB\-\-help\fR option for each specific backend. Examples below -+show how to list them. -+.TP -+\fB\-m, \-\-no\-mlock\fR -+Do not attempt to lock memory, even if \fB\-\-realtime\fR. -+.TP -+\fB\-n, \-\-name\fR \fIserver\-name\fR -+Name this \fBjackd\fR instance \fIserver\-name\fR. If unspecified, -+this name comes from the \fB$JACK_DEFAULT_SERVER\fR environment -+variable. It will be "default" if that is not defined. -+.TP -+\fB\-p, \-\-port\-max \fI n\fR -+Set the maximum number of ports the JACK server can manage. -+The default value is 256. -+.TP -+\fB\-\-replace-registry\fR -+.br -+Remove the shared memory registry used by all JACK server instances -+before startup. This should rarely be used, and is intended only -+for occasions when the structure of this registry changes in ways -+that are incompatible across JACK versions (which is rare). -+.TP -+\fB\-R, \-\-realtime\fR -+.br -+Use realtime scheduling (default = true). This is needed for reliable low\-latency -+performance. On many systems, it requires \fBjackd\fR to run with -+special scheduler and memory allocation privileges, which may be -+obtained in several ways. -+.TP -+\fB\-r, \-\-no-realtime\fR -+.br -+Do not use realtime scheduling. -+.TP -+\fB\-P, \-\-realtime\-priority \fIint\fR -+When running \fB\-\-realtime\fR, set the scheduler priority to -+\fIint\fR. -+.TP -+\fB\-\-silent\fR -+Silence any output during operation. -+.TP -+\fB\-T, \-\-temporary\fR -+Exit once all clients have closed their connections. -+.TP -+\fB\-t, \-\-timeout \fIint\fR -+.br -+Set client timeout limit in milliseconds. The default is 500 msec. -+In realtime mode the client timeout must be smaller than the watchdog timeout (5000 msec). -+.TP -+\fB\-Z, \-\-nozombies\fR -+.br -+Prevent JACK from ever kicking out clients because they were too slow. -+This cancels the effect any specified timeout value, but JACK and its clients are -+still subject to the supervision of the watchdog thread or its equivalent. -+.TP -+\fB\-u, \-\-unlock\fR -+.br -+Unlock libraries GTK+, QT, FLTK, Wine. -+.TP -+\fB\-v, \-\-verbose\fR -+Give verbose output. -+.TP -+\fB\-c, \-\-clocksource\fR (\fI c(ycle)\fR | \fI h(pet) \fR | \fI s(ystem) \fR) -+Select a specific wall clock (Cycle Counter, HPET timer, System timer). -+.TP -+\fB\-V, \-\-version\fR -+Print the current JACK version number and exit. -+.SS ALSA BACKEND OPTIONS -+.TP -+\fB\-C, \-\-capture\fR [ \fIname\fR ] -+Provide only capture ports, unless combined with \-D or \-P. Parameterally set -+capture device name. -+.TP -+\fB\-d, \-\-device \fIname\fR -+.br -+The ALSA pcm device \fIname\fR to use. If none is specified, JACK will -+use "hw:0", the first hardware card defined in \fB/etc/modules.conf\fR. -+.TP -+\fB\-z, \-\-dither [rectangular,triangular,shaped,none] -+Set dithering mode. If \fBnone\fR or unspecified, dithering is off. -+Only the first letter of the mode name is required. -+.TP -+\fB\-D, \-\-duplex\fR -+Provide both capture and playback ports. Defaults to on unless only one -+of \-P or \-C is specified. -+.TP -+\fB\-h, \-\-help\fR Print a brief usage message describing only the -+\fBalsa\fR backend parameters. -+.TP -+\fB\-M, \-\-hwmeter\fR -+.br -+Enable hardware metering for devices that support it. Otherwise, use -+software metering. -+.TP -+\fB\-H, \-\-hwmon\fR -+.br -+Enable hardware monitoring of capture ports. This is a method for -+obtaining "zero latency" monitoring of audio input. It requires -+support in hardware and from the underlying ALSA device driver. -+ -+When enabled, requests to monitor capture ports will be satisfied by -+creating a direct signal path between audio interface input and output -+connectors, with no processing by the host computer at all. This -+offers the lowest possible latency for the monitored signal. -+ -+Presently (March 2003), only the RME Hammerfall series and cards based -+on the ICE1712 chipset (M\-Audio Delta series, Terratec, and others) -+support \fB\-\-hwmon\fR. In the future, some consumer cards may also -+be supported by modifying their mixer settings. -+ -+Without \fB\-\-hwmon\fR, port monitoring requires JACK to read audio -+into system memory, then copy it back out to the hardware again, -+imposing the basic JACK system latency determined by the -+\fB\-\-period\fR and \fB\-\-nperiods\fR parameters. -+.TP -+\fB\-i, \-\-inchannels \fIint\fR -+.br -+Number of capture channels. Default is maximum supported by hardware. -+.TP -+\fB\-n, \-\-nperiods \fIint\fR -+.br -+Specify the number of periods of playback latency. In seconds, this -+corresponds to \fB\-\-nperiods\fR times \fB\-\-period\fR divided by -+\fB\-\-rate\fR. The default is 2, the minimum allowable. For most -+devices, there is no need for any other value with the -+\fB\-\-realtime\fR option. Without realtime privileges or with boards -+providing unreliable interrupts (like ymfpci), a larger value may -+yield fewer xruns. This can also help if the system is not tuned for -+reliable realtime scheduling. -+ -+For most ALSA devices, the hardware buffer has exactly -+\fB\-\-period\fR times \fB\-\-nperiods\fR frames. Some devices demand -+a larger buffer. If so, JACK will use the smallest possible buffer -+containing at least \fB\-\-nperiods\fR, but the playback latency does -+not increase. -+ -+For USB audio devices it is recommended to use \fB\-n 3\fR. Firewire -+devices supported by FFADO (formerly Freebob) are configured with -+\fB\-n 3\fR by default. -+.TP -+\fB\-o, \-\-outchannels \fIint\fR -+.br -+Number of playback channels. Default is maximum supported by hardware. -+.TP -+\fB\-P, \-\-playback\fR [ \fIname\fR ] -+Provide only playback ports, unless combined with \-D or \-C. Optionally set -+playback device name. -+.TP -+\fB\-p, \-\-period \fIint\fR -+.br -+Specify the number of frames between JACK \fBprocess()\fR calls. This -+value must be a power of 2, and the default is 1024. If you need low -+latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger -+period size yields higher latency, but makes xruns less likely. The JACK -+capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. -+.TP -+\fB\-r, \-\-rate \fIint\fR -+Specify the sample rate. The default is 48000. -+.TP -+\fB\-S, \-\-shorts -+.br -+Try to configure card for 16\-bit samples first, only trying 32\-bits if -+unsuccessful. Default is to prefer 32\-bit samples. -+.TP -+\fB\-s, \-\-softmode\fR -+.br -+Ignore xruns reported by the ALSA driver. This makes JACK less likely -+to disconnect unresponsive ports when running without \fB\-\-realtime\fR. -+.TP -+\fB\-X, \-\-midi \fR[\fIseq\fR|\fIraw\fR] -+.br -+Specify which ALSA MIDI system to provide access to. Using \fBraw\fR -+will provide a set of JACK MIDI ports that correspond to each raw ALSA -+device on the machine. Using \fBseq\fR will provide a set of JACK MIDI -+ports that correspond to each ALSA "sequencer" client (which includes -+each hardware MIDI port on the machine). \fBraw\fR provides slightly -+better performance but does not permit JACK MIDI communication with -+software written to use the ALSA "sequencer" API. -+.SS COREAUDIO BACKEND PARAMETERS -+.TP -+\fB\-c \-\-channel\fR -+Maximum number of channels (default: 2) -+.TP -+\fB\-i \-\-channelin\fR -+Maximum number of input channels (default: 2) -+.TP -+\fB\-o \-\-channelout\fR -+Maximum number of output channels (default: 2) -+.TP -+\fB\-C \-\-capture\fR -+Whether or not to capture (default: true) -+.TP -+\fB\-P \-\-playback\fR -+Whether or not to playback (default: true) -+.TP -+\fB\-D \-\-duplex\fR -+Capture and playback (default: true) -+.TP -+\fB\-r \-\-rate\fR -+Sample rate (default: 44100) -+.TP -+\fB\-p \-\-period\fR -+Frames per period (default: 128). Must be a power of 2. -+.TP -+\fB\-n \-\-name\fR -+Driver name (default: none) -+.TP -+\fB\-I \-\-id\fR -+Audio Device ID (default: 0) -+.SS DUMMY BACKEND PARAMETERS -+.TP -+\fB\-C, \-\-capture \fIint\fR -+Specify number of capture ports. The default value is 2. -+.TP -+\fB\-P, \-\-playback \fIint\fR -+Specify number of playback ports. The default value is 2. -+.TP -+\fB\-r, \-\-rate \fIint\fR -+Specify sample rate. The default value is 48000. -+.TP -+\fB\-p, \-\-period \fIint\fR -+Specify the number of frames between JACK \fBprocess()\fR calls. This -+value must be a power of 2, and the default is 1024. If you need low -+latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger -+period size yields higher latency, but makes xruns less likely. The JACK -+capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. -+.TP -+\fB\-w, \-\-wait \fIint\fR -+Specify number of usecs to wait between engine processes. -+The default value is 21333. -+ -+ -+.SS NET BACKEND PARAMETERS -+ -+.TP -+ \fB\-i, \-\-audio\-ins \fIint\fR -+Number of capture channels (default: 2) -+.TP -+ \fB\-o, \-\-audio\-outs \fIint\fR -+Number of playback channels (default: 2) -+.TP -+ \fB\-I, \-\-midi\-ins \fIint\fR -+Number of midi capture channels (default: 1) -+.TP -+\fB\-O, \-\-midi\-outs \fIint\fR -+Number of midi playback channels (default: 1) -+.TP -+ \fB\-r, \-\-rate \fIint\fR -+Sample rate (default: 48000) -+.TP -+\fB\-p, \-\-period \fIint\fR -+Frames per period (default: 1024) -+.TP -+\fB\-n, \-\-num\-periods \fIint\fR -+Network latency setting in no. of periods (default: 5) -+.TP -+\fB\-l, \-\-listen\-port \fIint\fR -+The socket port we are listening on for sync packets (default: 3000) -+.TP -+\fB\-f, \-\-factor \fIint\fR -+Factor for sample rate reduction (default: 1) -+.TP -+\fB\-u, \-\-upstream\-factor \fIint\fR -+Factor for sample rate reduction on the upstream (default: 0) -+.TP -+\fB\-c, \-\-celt \fIint\fR -+sets celt encoding and number of kbits per channel (default: 0) -+.TP -+\fB\-b, \-\-bit\-depth \fIint\fR -+Sample bit\-depth (0 for float, 8 for 8bit and 16 for 16bit) (default: 0) -+.TP -+\fB\-t, \-\-transport\-sync \fIint\fR -+Whether to slave the transport to the master transport (default: true) -+.TP -+\fB\-a, \-\-autoconf \fIint\fR -+Whether to use Autoconfig, or just start. (default: true) -+.TP -+\fB\-R, \-\-redundancy \fIint\fR -+Send packets N times (default: 1) -+.TP -+\fB\-e, \-\-native\-endian \fIint\fR -+Dont convert samples to network byte order. (default: false) -+.TP -+\fB\-J, \-\-jitterval \fIint\fR -+attempted jitterbuffer microseconds on master (default: 0) -+.TP -+\fB\-D, \-\-always\-deadline \fIint\fR -+always use deadline (default: false) -+ -+ -+.SS OSS BACKEND PARAMETERS -+.TP -+\fB\-r, \-\-rate \fIint\fR -+Specify the sample rate. The default is 48000. -+.TP -+\fB\-p, \-\-period \fIint\fR -+Specify the number of frames between JACK \fBprocess()\fR calls. This -+value must be a power of 2, and the default is 1024. If you need low -+latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger -+period size yields higher latency, but makes xruns less likely. The JACK -+capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. -+.TP -+\fB\-n, \-\-nperiods \fIint\fR -+Specify the number of periods in the hardware buffer. The default is -+2. The period size (\fB\-p\fR) times \fB\-\-nperiods\fR times four is -+the JACK buffer size in bytes. The JACK output latency in seconds is -+\fB\-\-nperiods\fR times \fB\-\-period\fR divided by \fB\-\-rate\fR. -+.TP -+\fB\-w, \-\-wordlength \fIint\fR -+Specify the sample size in bits. The default is 16. -+.TP -+\fB\-i, \-\-inchannels \fIint\fR -+Specify how many channels to capture (default: 2) -+.TP -+\fB\-o, \-\-outchannels \fIint\fR -+Specify number of playback channels (default: 2) -+.TP -+\fB\-C, \-\-capture \fIdevice_file\fR -+Specify input device for capture (default: /dev/dsp) -+.TP -+\fB\-P, \-\-playback \fIdevice_file\fR -+Specify output device for playback (default: /dev/dsp) -+.TP -+\fB\-b, \-\-ignorehwbuf \fIboolean\fR -+Specify, whether to ignore hardware period size (default: false) -+.SS SUN BACKEND PARAMETERS -+.TP -+\fB\-r, \-\-rate \fIint\fR -+Specify the sample rate. The default is 48000. -+.TP -+\fB\-p, \-\-period \fIint\fR -+Specify the number of frames between JACK \fBprocess()\fR calls. This -+value must be a power of 2, and the default is 1024. If you need low -+latency, set \fB\-p\fR as low as you can go without seeing xruns. A larger -+period size yields higher latency, but makes xruns less likely. The JACK -+capture latency in seconds is \fB\-\-period\fR divided by \fB\-\-rate\fR. -+.TP -+\fB\-n, \-\-nperiods \fIint\fR -+Specify the number of periods in the hardware buffer. The default is -+2. The period size (\fB\-p\fR) times \fB\-\-nperiods\fR times four -+(assuming 2 channels 16-bit samples) is the JACK buffer size in bytes. -+The JACK output latency in seconds is \fB\-\-nperiods\fR times -+\fB\-\-period\fR divided by \fB\-\-rate\fR. -+.TP -+\fB\-w, \-\-wordlength \fIint\fR -+Specify the sample size in bits. The default is 16. -+.TP -+\fB\-i, \-\-inchannels \fIint\fR -+Specify how many channels to capture (default: 2) -+.TP -+\fB\-o, \-\-outchannels \fIint\fR -+Specify number of playback channels (default: 2) -+.TP -+\fB\-C, \-\-capture \fIdevice_file\fR -+Specify input device for capture (default: /dev/audio) -+.TP -+\fB\-P, \-\-playback \fIdevice_file\fR -+Specify output device for playback (default: /dev/audio) -+.TP -+\fB\-b, \-\-ignorehwbuf \fIboolean\fR -+Specify, whether to ignore hardware period size (default: false) -+.SS PORTAUDIO BACKEND PARAMETERS -+.TP -+\fB\-c \-\-channel\fR -+Maximum number of channels (default: all available hardware channels) -+.TP -+\fB\-i \-\-channelin\fR -+Maximum number of input channels (default: all available hardware channels) -+.TP -+\fB\-o \-\-channelout\fR -+Maximum number of output channels (default: all available hardware channels) -+.TP -+\fB\-C \-\-capture\fR -+Whether or not to capture (default: true) -+.TP -+\fB\-P \-\-playback\fR -+Whether or not to playback (default: true) -+.TP -+\fB\-D \-\-duplex\fR -+Capture and playback (default: true) -+.TP -+\fB\-r \-\-rate\fR -+Sample rate (default: 48000) -+.TP -+\fB\-p \-\-period\fR -+Frames per period (default: 1024). Must be a power of 2. -+.TP -+\fB\-n \-\-name\fR -+Driver name (default: none) -+.TP -+\fB\-z \-\-dither\fR -+Dithering mode (default: none) -+.SH "EXAMPLES" -+.PP -+Print usage message for the parameters specific to each backend. -+.IP -+\fBjackd \-d alsa \-\-help\fR -+.br -+\fBjackd \-d coreaudio \-\-help\fR -+.br -+\fBjackd \-d net \-\-help\fR -+.br -+\fBjackd \-d dummy \-\-help\fR -+.br -+\fBjackd \-d firewire \-\-help\fR -+.br -+\fBjackd \-d freebob \-\-help\fR -+.br -+\fBjackd \-d oss \-\-help\fR -+.br -+\fBjackd \-d sun \-\-help\fR -+.br -+\fBjackd \-d portaudio \-\-help\fR -+.PP -+Run the JACK daemon with realtime priority using the first ALSA -+hardware card defined in \fB/etc/modules.conf\fR. -+.IP -+\fBjackstart \-\-realtime \-\-driver=alsa\fR -+.PP -+Run the JACK daemon with low latency giving verbose output, which can -+be helpful for trouble\-shooting system latency problems. A -+reasonably well\-tuned system with a good sound card and a -+low\-latency kernel can handle these values reliably. Some can do -+better. If you get xrun messages, try a larger buffer. Tuning a -+system for low latency can be challenging. The JACK FAQ, -+.I http://jackit.sourceforge.net/docs/faq.php\fR -+has some useful suggestions. -+.IP -+\fBjackstart \-Rv \-d alsa \-p 128 \-n 2 \-r 44100\fR -+.PP -+Run \fBjackd\fR with realtime priority using the "sblive" ALSA device -+defined in ~/.asoundrc. Apply shaped dithering to playback audio. -+.IP -+\fBjackd \-R \-d alsa \-d sblive \-\-dither=shaped\fR -+.PP -+Run \fBjackd\fR with no special privileges using the second ALSA -+hardware card defined in \fB/etc/modules.conf\fR. Any xruns reported -+by the ALSA backend will be ignored. The larger buffer helps reduce -+data loss. Rectangular dithering will be used for playback. -+.IP -+\fBjackd \-d alsa \-d hw:1 \-p2048 \-n3 \-\-softmode \-zr\fR -+.PP -+Run \fBjackd\fR in full\-duplex mode using the ALSA hw:0,0 device for -+playback and the hw:0,2 device for capture. -+.IP -+\fBjackd \-d alsa \-P hw:0,0 \-C hw:0,2\fR -+.PP -+Run \fBjackd\fR in playback\-only mode using the ALSA hw:0,0 device. -+.IP -+\fBjackd \-d alsa \-P hw:0,0\fR -+.SH "ENVIRONMENT" -+.br -+JACK is evolving a mechanism for automatically starting the server -+when needed. Any client started without a running JACK server will -+attempt to start one itself using the command line found in the first -+line of \fB$HOME/.jackdrc\fR if it exists, or \fB/etc/jackdrc\fR if it -+does not. If neither file exists, a built\-in default command will be -+used, including the \fB\-T\fR flag, which causes the server to shut -+down when all clients have exited. -+ -+As a transition, this only happens when \fB$JACK_START_SERVER\fR is -+defined in the environment of the calling process. In the future this -+will become normal behavior. In either case, defining -+\fB$JACK_NO_START_SERVER\fR disables this feature. -+ -+To change where JACK looks for the backend drivers, set -+\fB$JACK_DRIVER_DIR\fR. -+ -+\fB$JACK_DEFAULT_SERVER\fR specifies the default server name. If not -+defined, the string "default" is used. If set in their respective -+environments, this affects \fBjackd\fR unless its \fB\-\-name\fR -+parameter is set, and all JACK clients unless they pass an explicit -+name to \fBjack_client_open()\fR. -+ -+.SH "SEE ALSO:" -+.PP -+.I http://www.jackaudio.org -+.br -+The official JACK website with news, docs and a list of JACK clients. -+.PP -+.I http://jackaudio.org/email -+.br -+The JACK developers' mailing list. Subscribe, to take part in -+development of JACK or JACK clients. User questions are also welcome, -+there is no user-specific mailing list. -+.PP -+.I http://www.jackosx.com/ -+.br -+Tools specific to the Mac OS X version of JACK. -+.PP -+.I http://www.alsa\-project.org -+.br -+The Advanced Linux Sound Architecture. -+.SH "BUGS" -+Please report bugs to -+.br -+.I http://trac.jackaudio.org/ -+.SH "AUTHORS" -+Architect and original implementor: Paul Davis -+.PP -+Original design Group: Paul Davis, David Olofson, Kai Vehmanen, Benno Sennoner, -+Richard Guenther, and other members of the Linux Audio Developers group. -+.PP -+Programming: Paul Davis, Jack O'Quin, Taybin Rutkin, Stephane Letz, Fernando -+Pablo Lopez-Lezcano, Steve Harris, Jeremy Hall, Andy Wingo, Kai -+Vehmanen, Melanie Thielker, Jussi Laako, Tilman Linneweh, Johnny -+Petrantoni, Torben Hohn. -+.PP -+Manpage written by Stefan Schwandter, Jack O'Quin and Alexandre -+Prokoudine. -diff -rupN jack-1.9.5.old/man/jack_disconnect.0 jack-1.9.5/man/jack_disconnect.0 ---- jack-1.9.5.old/man/jack_disconnect.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_disconnect.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1 @@ -+.so man1/jack_connect.1 -diff -rupN jack-1.9.5.old/man/jack_freewheel.0 jack-1.9.5/man/jack_freewheel.0 ---- jack-1.9.5.old/man/jack_freewheel.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_freewheel.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,16 @@ -+.TH JACK_FREEWHEEL "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_freewheel \- JACK toolkit client to control freewheeling mode -+.SH SYNOPSIS -+.B jack_freewheel [y|n] -+.SH DESCRIPTION -+.B jack_freewheel -+Turns freewheeling mode on (y) or off (n). While in freewheeling mode, -+the JACK server does not wait in between process() calls, and does not -+read or write data from/to any audio interface. That results in the JACK graph -+processing data as fast as possible. Freewheeling makes fast exports to -+files possible. -+.PP -+There is no useful reason to use this tool other than testing. JACK -+clients that use freewheeling will turn it on and off themselves. -+ -diff -rupN jack-1.9.5.old/man/jack_impulse_grabber.0 jack-1.9.5/man/jack_impulse_grabber.0 ---- jack-1.9.5.old/man/jack_impulse_grabber.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_impulse_grabber.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,11 @@ -+.TH JACK_IMPULSE_GRABBER "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_impulse_grabber \- JACK toolkit client to grab an impulse (response) -+.SH SYNOPSIS -+\fBjack_impulse_grabber\fR \fB-d\fR \fIduration\fR [\fI-f\fR (C|gnuplot)] -+.SH DESCRIPTION -+\fBjack_impulse_grabber\fR is a JACK example client for collecting -+impulses recordings from JACK ports. -+ -+ -+ -diff -rupN jack-1.9.5.old/man/jack_load.0 jack-1.9.5/man/jack_load.0 ---- jack-1.9.5.old/man/jack_load.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_load.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,28 @@ -+.TH JACK_LOAD "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_load \- JACK toolkit client for loading in-process clients -+.SH SYNOPSIS -+\fBjack_load\fR [ \fI-i\fR initstring ] [ \fI-s\fR servername ] [\fI-w\fR ] client-name so-name [ initstring ] -+.SH DESCRIPTION -+\fBjack_load\fR is a JACK toolkit client. It loads the specified plugin and creates an in-process client. -+.SH ARGUMENTS -+.PP -+The client-name must be a currently unused client name. -+.PP -+The so-name is the name of file that client code is stored in (typically, \fIclientname.so\fR) -+.SH OPTIONS -+.TP -+\fB-i\fR, \fB--init\fR init-string -+.br -+initialization string passed to the in-process client. Note that this can also be specified as the last argument on the command line. -+.TP -+\fB-s\fR, \fB--server\fR servername -+.br -+Name of JACK server to connect to -+.TP -+\fB-w\fR, \fB--wait\fR -+Wait for a signal (eg. from Ctrl-c) and then unload the client. -+.SH AUTHOR -+Jeremy Hall -+ -+ -diff -rupN jack-1.9.5.old/man/jack_lsp.0 jack-1.9.5/man/jack_lsp.0 ---- jack-1.9.5.old/man/jack_lsp.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_lsp.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,47 @@ -+.TH JACK_LSP "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_lsp \- JACK toolkit client to list informtion on ports -+.SH SYNOPSIS -+\fBjack_lsp\fR [ \fI-s\fR | \fI--server\fR servername ] [ \fI-AclLptvh\fR ] -+.SH DESCRIPTION -+\fBjack_lsp\fR lists all known ports associated with a JACK -+server. It can also optionally list various kinds of information about each port. -+.SH OPTIONS -+.TP -+\fB-s\fR, \fB--server\fR \fIservername\fR -+.br -+Connect to the jack server named \fIservername\fR -+.TP -+\fB-A\fR, \fB--aliases\fR -+.br -+List aliases for each port -+.TP -+\fB-c\fR, \fB--connections\fR -+.br -+List connections to/from each port -+.TP -+\fB-l\fR, \fB--latency\fR -+.br -+Display per-port latency in frames at each port -+.TP -+\fB-L\fR, \fI--latency\fR -+.br -+Display total latency in frames at each port -+.TP -+\fB-p\fR, \fB--properties\fR -+.br -+Display port properties. Output may include input|output, can-monitor, physical, terminal -+.TP -+\fB-t\fR, \fB--type\fR -+.br -+Display port type -+.TP -+\fB-h\fR, \fB--help\fR -+.br -+Display help/usage message -+.TP -+\fB-v\fR, \fB--version\fR -+.br -+Output version information and exit -+ -+ -diff -rupN jack-1.9.5.old/man/jack_metro.0 jack-1.9.5/man/jack_metro.0 ---- jack-1.9.5.old/man/jack_metro.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_metro.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,40 @@ -+.TH JACK_METRO "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_metro \- JACK toolkit metronome -+.SH SYNOPSIS -+\fBjack_metro\fR [ \fI-n\fR name ] [ \fI-f\fR hz ] [ \fI-D\fR msecs ] [\fI-a\fR % ] [ \fI-d\fR % ] \fI-b\fR bpm -+.SH DESCRIPTION -+\fBjack_metro\fR is a simple metronome for JACK. It generates a -+synthetic "tick" sound for every beat. Note that is does \fBnot\fR -+connect its output port by default - to hear the sound it makes you must -+connect them using some other tool. -+.SH OPTIONS -+.TP -+\fB-n\fR, \fB--name\fR -+.br -+Specify a name for this instance of the metronome. -+.TP -+\fB-f\fR, \fB--frequency\fR Hz -+.br -+Define the frequency of the "tick" in Hz. -+.TP -+\fB-D\fR, \fB--duration\fR msecs -+.br -+Define the duration of the "tick" in milliseconds. -+.TP -+\fB-a\fR, \fB--attack\fR %-age -+.br -+Define the duration of the attack phase of the "tick" as a percentage -+of the duration. -+.TP -+\fB-d\fR, \fB--decay\fR %-age -+.br -+Define the duration of the decay phase of the "tick" as a percentage -+of the duration. -+.TP -+\fB--b\fR, \fB--bpm\fR bpm -+.br -+Define the number of beats per minute. -+.SH AUTHOR -+Anthony Van Groningen -+ -diff -rupN jack-1.9.5.old/man/jack_monitor_client.0 jack-1.9.5/man/jack_monitor_client.0 ---- jack-1.9.5.old/man/jack_monitor_client.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_monitor_client.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,18 @@ -+.TH JACK_CONNECT "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_monitor_client \- The JACK Audio Connection Kit example client -+.SH SYNOPSIS -+.B jack_monitor_client -+client-name -+.PP -+The client-name must be the name of a existing client that monitoring is -+to be enabled for. -+.SH DESCRIPTION -+.B jack_monitor_client -+is an example client for the JACK Audio Connection Kit. It enables -+monitoring for the specified client. -+.SH AUTHOR -+Jeremy Hall -+.PP -+This manpage was written by Robert Jordens for Debian. -+ -diff -rupN jack-1.9.5.old/man/jack_netsource.0 jack-1.9.5/man/jack_netsource.0 ---- jack-1.9.5.old/man/jack_netsource.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_netsource.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,109 @@ -+.TH JACK_NETSOURCE "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_netsource \- Netjack Master client for one slave -+.SH SYNOPSIS -+\fBjack_netsource\fR [ \fI-H\fR hostname ] [ \fIoptions\fR ] -+ -+.SH DESCRIPTION -+\fBjack_netsource\fR The Master side of a netjack connection. Represents the slave jackd -dnet in the master jack graph. -+Most connection parameters are configured via the netsource, and the slave will set itself up according to the commandline -+option given to jack_netsource. -+.br -+Netjack allows low latency audio connections over general IP networks. When using celt for compression, it is even possible -+to establish transatlantic links, with latencies not much over the actual ping time. -+.br -+But the main usecase is of course a LAN, where it can achieve one jack period of latency. -+ -+.SH OPTIONS -+.TP -+\fB-h\fR this help text -+.TP -+\fB-H\fR \fIslave host\fR -+.br -+Host name of the slave JACK -+.TP -+\fB-o\fR \fInum channels\fR -+.br -+Number of audio playback channels -+.TP -+\fB-i\fR \fInum channels\fR -+.br -+Number of audio capture channels -+.TP -+\fB-O\fR \fInum channels\fR -+.br -+Number of midi playback channels -+.TP -+\fB-I\fR \fInum channels\fR -+.br -+Number of midi capture channels -+.TP -+\fB-n\fR \fIperiods\fR -+.br -+Network latency in JACK periods -+.TP -+\fB-p\fR \fIport\fR -+.br -+UDP port that the slave is listening on -+.TP -+\fB-r\fR \fIreply port\fR -+.br -+UDP port that we are listening on -+.TP -+\fB-B\fR \fIbind port\fR -+.br -+reply port, for use in NAT environments -+.TP -+\fB-b\fR \fIbitdepth\fR -+.br -+Set transport to use 16bit or 8bit -+.TP -+\fB-c\fR \fIbytes\fR -+.br -+Use CELT encoding with per period and channel -+.TP -+\fB-m\fR \fImtu\fR -+.br -+Assume this mtu for the link -+.TP -+\fB-R\fR \fIN\fR -+.br -+Redundancy: send out packets N times. -+.TP -+\fB-e\fR -+.br -+skip host-to-network endianness conversion -+.TP -+\fB-N\fR \fIjack name\fR -+.br -+Reports a different client name to jack -+.TP -+.TP -+\fB-s\fR, \fB--server\fR \fIservername\fR -+.br -+Connect to the jack server named \fIservername\fR -+.TP -+\fB-h\fR, \fB--help\fR -+.br -+Display help/usage message -+.TP -+\fB-v\fR, \fB--version\fR -+.br -+Output version information and exit -+ -+ -+.SH EXAMPLES -+ -+.PP -+run a 4 audio channel bidirectional link with one period of latency and no midi channels. Audio data is flowing uncompressed over the wire: -+.br -+On \fIhostA\fR: -+.IP -+\fBjackd \-d alsa \fR -+.br -+\fBjack_netsource \-H hostB -n1 -i4 -o4 -I0 -O0 \fR -+.PP -+On \fIhostB\fR: -+.IP -+\fBjackd \-d net \fR -+ -diff -rupN jack-1.9.5.old/man/jackrec.0 jack-1.9.5/man/jackrec.0 ---- jack-1.9.5.old/man/jackrec.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jackrec.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,23 @@ -+.TH JACKREC "1" "!DATE!" "!VERSION!" -+.SH NAME -+jackrec \- JACK toolkit client for recording audio -+.SH SYNOPSIS -+.B jackrec -+\-f filename \-d seconds [ \-b bitdepth ] port1 [ port2 ... ] -+.SH DESCRIPTION -+.B jackrec is a basic, but useful, audio recorder that will record -+audio from 1 or more JACK ports to a file on disk. The file format is -+always RIFF/WAV, with samples stored as signed integers. The sample -+bit depth can be selected using the \fI-b\fR option. The file will -+have as many channels as there are ports specified on the command line -+- each channel will contain the data recorded from one port. The user -+should generally specify the duration (in seconds) using the \fI-d\fR -+option. If not specified, jackrec will record until terminated by a -+signal (eg. from Ctrl-c). -+.PP -+This application is not intended to be a heavy duty audio recorder, -+and originated as an example client to show how to handle threading -+and disk I/O in a JACK client. However, it is a useful, simple -+recorder and is included in the JACK toolkit as a result. -+ -+ -diff -rupN jack-1.9.5.old/man/jack_samplerate.0 jack-1.9.5/man/jack_samplerate.0 ---- jack-1.9.5.old/man/jack_samplerate.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_samplerate.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,9 @@ -+.TH JACK_SAMPLERATE "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_samplerate \- JACK toolkit client to print current samplerate -+.SH SYNOPSIS -+.B jack_samplerate -+.SH DESCRIPTION -+.B jack_samplerate prints the current samplerate, and exits. -+ -+ -diff -rupN jack-1.9.5.old/man/jack_showtime.0 jack-1.9.5/man/jack_showtime.0 ---- jack-1.9.5.old/man/jack_showtime.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_showtime.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,13 @@ -+.TH JACK_SHOWTIME "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_showtime \- The JACK Audio Connection Kit example client -+.SH SYNOPSIS -+.B jack_showtime -+.SH DESCRIPTION -+.B jack_showtime -+prints the current timebase information to stdout -+.SH AUTHOR -+Paul Davis -+.PP -+This manpage was written by Stefan Schwandter -+ -diff -rupN jack-1.9.5.old/man/jack_simple_client.0 jack-1.9.5/man/jack_simple_client.0 ---- jack-1.9.5.old/man/jack_simple_client.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_simple_client.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,20 @@ -+.TH JACK_CONNECT "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_simple_client \- The JACK Audio Connection Kit example client -+.SH SYNOPSYS -+.B jack_simple_client -+client-name -+.PP -+The client-name must be a yet unused client name. -+.SH DESCRIPTION -+.B jack_simple_client -+is an example client for the JACK Audio Connection Kit. It creates two -+ports (client-name:input and client-name:output) that pass the data -+unmodified. -+.SH EXAMPLE -+jack_simple_client in_process_test -+.SH AUTHOR -+Jeremy Hall -+.PP -+This manpage was written by Robert Jordens for Debian. -+ -diff -rupN jack-1.9.5.old/man/jack_transport.0 jack-1.9.5/man/jack_transport.0 ---- jack-1.9.5.old/man/jack_transport.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_transport.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,13 @@ -+.TH JACK_TRANSPORT "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_transport \- JACK toolkit client for transport control -+.SH SYNOPSIS -+.B jack_transport -+.SH DESCRIPTION -+.B jack_transport -+is a toolkit client for the JACK Audio Connection Kit. It provides command-line -+control over the JACK transport system. Type help at jack_transport's -+command prompt to see the available commands. -+.SH AUTHOR -+Jeremy Hall -+ -diff -rupN jack-1.9.5.old/man/jack_unload.0 jack-1.9.5/man/jack_unload.0 ---- jack-1.9.5.old/man/jack_unload.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_unload.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,19 @@ -+.TH JACK_UNLOAD "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_unload \- The JACK Audio Connection Kit example client -+.SH SYNOPSIS -+.B jack_unload -+client-name -+.PP -+The client-name must be the name of a loaded client that can be unloaded. -+.SH DESCRIPTION -+.B jack_unload -+is the counterpart to -+.B jack_load -+and unloads the specified client. -+.SH EXAMPLE -+.B jack_unload in_process_test -+.SH AUTHOR -+Jeremy Hall -+.PP -+This manpage was written by Robert Jordens for Debian. -diff -rupN jack-1.9.5.old/man/jack_wait.0 jack-1.9.5/man/jack_wait.0 ---- jack-1.9.5.old/man/jack_wait.0 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/jack_wait.0 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,41 @@ -+.TH JACK_WAIT "1" "!DATE!" "!VERSION!" -+.SH NAME -+jack_wait \- JACK toolkit client to check and wait for existence/exit of jackd. -+.SH SYNOPSIS -+\fBjack_wait\fR [ \fI-s\fR | \fI--server\fR servername ] [ \fI-t\fR | \fI--timeout\fR timeout_seconds [ \fI-cqwhv\fR ] -+.SH DESCRIPTION -+\fBjack_wait\fR When invoked with \fI-c\fR it only checks for the existence of a jack server. When invoked with \fI-w\fR the -+program will wait for a jackd to be available. -+The \fI-q\fR makes it wait for the jackd to exit. -+ -+.SH OPTIONS -+.TP -+\fB-w\fR, \fB--wait\fR -+.br -+Wait for jackd to be available. -+.TP -+\fB-q\fR, \fB--quit\fR -+.br -+Wait for jackd quit. -+.TP -+\fB-c\fR, \fB--check\fR -+.br -+Only check for existence of jackd, and exit. -+.TP -+\fB-s\fR, \fB--server\fR \fIservername\fR -+.br -+Connect to the jack server named \fIservername\fR -+.TP -+\fB-t\fR, \fB--timeout\fR \fItimeout_seconds\fR -+.br -+Only wait \fItimeout_seconds\fR. -+.TP -+\fB-h\fR, \fB--help\fR -+.br -+Display help/usage message -+.TP -+\fB-v\fR, \fB--version\fR -+.br -+Output version information and exit -+ -+ -diff -rupN jack-1.9.5.old/man/wscript jack-1.9.5/man/wscript ---- jack-1.9.5.old/man/wscript 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.5/man/wscript 2010-05-17 05:30:11.000000000 -0400 -@@ -0,0 +1,13 @@ -+#! /usr/bin/env python -+# encoding: utf-8 -+ -+import Build -+import re -+import os -+import misc -+ -+ -+def build(bld): -+ bld.exec_command("cd man ; sh fill_template %s" % bld.env['JACK_VERSION']) -+ bld.install_files(bld.env['MANDIR'], '*.1') -+ -diff -rupN jack-1.9.5.old/wscript jack-1.9.5/wscript ---- jack-1.9.5.old/wscript 2010-02-12 05:58:08.000000000 -0500 -+++ jack-1.9.5/wscript 2010-06-04 22:00:04.000000000 -0400 -@@ -62,6 +62,7 @@ def set_options(opt): - - opt.add_option('--libdir', type='string', help="Library directory [Default: /lib]") - opt.add_option('--libdir32', type='string', help="32bit Library directory [Default: /lib32]") -+ opt.add_option('--mandir', type='string', help="Manpage directory [Default: /share/man/man1]") - opt.add_option('--dbus', action='store_true', default=False, help='Enable D-Bus JACK (jackdbus)') - opt.add_option('--classic', action='store_true', default=False, help='Force enable standard JACK (jackd) even if D-Bus JACK (jackdbus) is enabled too') - opt.add_option('--doxygen', action='store_true', default=False, help='Enable build of doxygen documentation') -@@ -150,6 +151,11 @@ def configure(conf): - conf.env['LIBDIR'] = conf.env['PREFIX'] + Options.options.libdir - else: - conf.env['LIBDIR'] = conf.env['PREFIX'] + '/lib' -+ -+ if Options.options.mandir: -+ conf.env['MANDIR'] = conf.env['PREFIX'] + Options.options.mandir -+ else: -+ conf.env['MANDIR'] = conf.env['PREFIX'] + '/share/man/man1' - - if conf.env['BUILD_DEBUG']: - conf.env.append_unique('CXXFLAGS', '-g') -@@ -255,6 +261,7 @@ def build(bld): - bld.add_subdirs('linux') - bld.add_subdirs('example-clients') - bld.add_subdirs('tests') -+ bld.add_subdirs('man') - if bld.env['BUILD_JACKDBUS'] == True: - bld.add_subdirs('dbus') - diff --git a/sources b/sources index 287dbe2..9c8bb97 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fcd4bdb44f51d71c9e19bc1d0e887902 jack-1.9.6.tar.bz2 +9759670feecbd43eeccf1c0f743ec199 jack-1.9.7.tar.bz2 From 1a544e73cf3c4e20dfb86261b093f433105ddc98 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Fri, 6 May 2011 22:25:58 -0400 Subject: [PATCH 051/107] Update the README.Fedora file with most recent configuration information. --- jack-audio-connection-kit-README.Fedora | 73 ++++++++++++------------- jack-audio-connection-kit.spec | 5 +- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index c0f22b7..3e35645 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -9,58 +9,55 @@ Add yourself to the jackuser group. usermod -a -G jackuser "" Now you will need to log out and log back in, or simply restart the system. -Start the jack daemon (your parameters may be different): - jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0 -or use - qjackctl -s -if you have it installed and configured. - - - INTEGRATE JACK WITH PULSEAUDIO -*** Note that this section is outdated *** +Start the jack daemon (the best parameters for your sound card may be different): + jackd -R -d alsa -d hw:0 +This will start jack on the first sound card, at 48KHz sampling rate (can be +changed with the "-r" command line parameter), with a period of 1024 frames +(change with "-p", determines the latency) and with 2 interrupts per period +(change with -n). USB sound cards can benefit from running with "-n 3" or +"-n 4". All of these optional parameters should be specified after "-d alsa". -The original text is placed at: - http://www.harald-hoyer.de/linux/pulseaudio-and-jackd +It is best to replace the card number with the card name as the numbering can +change from boot to boot if there is more than one sound card. The name of a +particular card can be found in the output of "cat /proc/asound/cards", for each +card it is the string between square brackets without the trailing blanks. -Switch to root account. - -Install the required packages: - yum install pulseaudio-module-jack alsa-plugins-jack +Note: Jack is a sound server and not a daemon - while it does work "in the +background" it is not something similar to unix daemons which are started at +boot time. -Add yourself to the pulse-rt and jackuser groups. - usermod -a -G pulse-rt,jackuser "" -Switch to your normal user account. + QJACKCTL -Create ~/bin subdirectory if absent: - mkdir -p ~/bin - -Copy the pulseaudio start file: - cp /usr/share/doc/jack-audio-connection-kit-*/jack.pa ~/bin/jack.pa - chmod 755 ~/bin/jack.pa - -Close all your sessions and relogin to get the new group permissions and -limits. +This application can be used to control the jack sound server with a graphical +interface. It can be started via + qjackctl -s +"-s" parameter makes the jack sound server start immediately. -Kill the current pulseaudio daemon: - pulseaudio -k +When starting jack through qjackctl it is important to note that you should (at +least) change the "Interface" field in the "Setup" dialog to _not_ be "(default)" +which would point Jack to use Pulse Audio. The proper "Interface" is the direct +hw ALSA device (hw:0 for the first card, etc). Even best to use the name of the +card as stated above. -Start the jack daemon (your parameters may be different): - jackd -R -P4 -dalsa -r44100 -p512 -n4 -D -Chw:0 -Phw:0 -or use - qjackctl -s -if you have it installed and configured. -Start the pulseaudio daemon: - ~/bin/jack.pa + INTEGRATE JACK WITH PULSEAUDIO -Now everything should work. +Jack will ask Pulse Audio through dbus for ownership of the sound card. Pulse +Audio will grant it and Jack will have complete control of it. No conflicts and +no configuration necessary. In this case Pulse Audio will stop using the card +and if it is the only one, you will not have sound for system sounds, browser +media playback, etc (which is usually what you want). Otherwise it is possible +to load a Pulse Audio module that redirects PA to use Jack. RUNNING JACK SERVER IN REALTIME MODE NOTE: This chapter explains why you have done the above changes in more detail. -It is kept for informational purposes. +It is kept for informational purposes. The changes suggested below is done +automatically by your Jack installation and no manual modification of the +pam configuration should be necessary. + The JACK server jackd has the capability to run in a real-time mode which greatly decreases the chance of audio glitches. The real-time mode diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index ce35453..7b81525 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.7 -Release: 1%{?dist} +Release: 2%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -226,6 +226,9 @@ exit 0 %changelog +* Fri May 06 2011 Orcan Ogetbil - 1.9.7-2 +- Update the README.Fedora file with most recent configuration information. + * Sun Apr 03 2011 Orcan Ogetbil - 1.9.7-1 - update to 1.9.7 From 2c8aa1f4f5d65c3b640dd91205b65e0a2388cfe1 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 15 Aug 2011 21:16:24 +0100 Subject: [PATCH 052/107] Add ARM to firewire audio excludes --- jack-audio-connection-kit.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 7b81525..564b194 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -29,7 +29,7 @@ BuildRequires: dbus-devel BuildRequires: celt-devel BuildRequires: doxygen BuildRequires: expat-devel -%ifnarch s390 s390x +%ifnarch s390 s390x %{arm} BuildRequires: libffado-devel BuildRequires: libfreebob-devel %endif @@ -97,7 +97,7 @@ export PREFIX=%{_prefix} --doxygen \ --dbus \ --classic \ -%ifnarch s390 s390x +%ifnarch s390 s390x %{arm} --firewire \ --freebob \ %endif @@ -226,6 +226,9 @@ exit 0 %changelog +* Mon Aug 15 2011 Peter Robinson - 1.9.7-3 +- Add ARM to firewire audio excludes + * Fri May 06 2011 Orcan Ogetbil - 1.9.7-2 - Update the README.Fedora file with most recent configuration information. @@ -238,10 +241,10 @@ exit 0 * Sat Feb 19 2011 Michael Schwendt - 1.9.6-6 - Rawhide: Patch for CELT 0.11 API change because of current broken deps. -* Wed Feb 16 2011 Peter Robinson - 1.9.6-5 +* Wed Feb 16 2011 Peter Robinson - 1.9.6-5 - Try again once repo has refreshed -* Wed Feb 16 2011 Peter Robinson - 1.9.6-4 +* Wed Feb 16 2011 Peter Robinson - 1.9.6-4 - Rebuilt for new celt * Wed Feb 09 2011 Fedora Release Engineering - 1.9.6-3 From a3fdd56b79ce4db4e197782c7fc2879a707951cc Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sat, 24 Dec 2011 14:14:17 -0500 Subject: [PATCH 053/107] update to 1.9.8 --- .gitignore | 1 + jack-apidoc-only.patch | 27 +++++++++ jack-audio-connection-kit.spec | 106 +++++++++++++++++++-------------- jack-freebob-buildfix.patch | 12 ---- sources | 2 +- 5 files changed, 89 insertions(+), 59 deletions(-) create mode 100644 jack-apidoc-only.patch delete mode 100644 jack-freebob-buildfix.patch diff --git a/.gitignore b/.gitignore index 0aa4af7..8540ee9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ jack-1.9.5.tar.bz2 /jack-1.9.6.tar.bz2 /jack-1.9.7.tar.bz2 +/jack-1.9.8.tgz diff --git a/jack-apidoc-only.patch b/jack-apidoc-only.patch new file mode 100644 index 0000000..e0eb2ac --- /dev/null +++ b/jack-apidoc-only.patch @@ -0,0 +1,27 @@ +diff -rupN jack-1.9.8.old/doxyfile jack-1.9.8/doxyfile +--- jack-1.9.8.old/doxyfile 2011-12-19 06:53:48.000000000 -0500 ++++ jack-1.9.8/doxyfile 2011-12-24 14:04:23.569998760 -0500 +@@ -574,22 +574,7 @@ WARN_LOGFILE = + # directories like "/usr/src/myproject". Separate the files or directories + # with spaces. + +-INPUT = common \ +- posix \ +- macosx \ +- macosx/coreaudio/ \ +- macosx/coremidi/ \ +- linux \ +- linux/alsa \ +- linux/alsarawmidi \ +- linux/firewire \ +- linux/freebob \ +- windows \ +- windows/portaudio \ +- windows/winmme \ +- solaris \ +- solaris/oss \ +- common/jack/ ++INPUT = common/jack/ + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 564b194..738ca7a 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -3,13 +3,13 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 1.9.7 -Release: 2%{?dist} +Version: 1.9.8 +Release: 1%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons URL: http://www.jackaudio.org -Source0: http://www.grame.fr/~letz/jack-%{version}.tar.bz2 +Source0: http://www.grame.fr/~letz/jack-%{version}.tgz Source1: %{name}-README.Fedora Source2: %{name}-script.pa Source3: %{name}-limits.conf @@ -17,8 +17,8 @@ Source3: %{name}-limits.conf Patch0: jack-audio-connection-kit-no_date_footer.patch # Build fix Patch1: jack-doxygen-output-dir-fix.patch -# Compilation fix -Patch3: jack-freebob-buildfix.patch +# We don't want the internal API documentation +Patch2: jack-apidoc-only.patch Patch4: jack-realtime-compat.patch # uc_regs no longer available on ppc64 Patch7: jack-audio-connection-kit-ppc-uc_regs.patch @@ -74,9 +74,11 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q -n jack-%{version} + +pushd jack-%{version} %patch0 -p1 -b .nodate %patch1 -p1 -b .outdir -%patch3 -p1 -b .compilationfix +%patch2 -p1 -b .nointernalapi %patch4 -p1 %patch7 -p1 -b .uc_regs @@ -87,8 +89,11 @@ for file in ChangeLog README TODO; do touch -r $file $file.tmp2 mv -f $file.tmp2 $file done +popd + %build +pushd jack-%{version} export CPPFLAGS="$RPM_OPT_FLAGS" export PREFIX=%{_prefix} ./waf configure \ @@ -105,9 +110,10 @@ export PREFIX=%{_prefix} ./waf build %{?_smp_mflags} -v +popd %install -rm -rf $RPM_BUILD_ROOT +pushd jack-%{version} ./waf --destdir=$RPM_BUILD_ROOT install # move doxygen documentation to the right place @@ -130,9 +136,7 @@ mv $RPM_BUILD_ROOT%{_bindir}/jack_rec $RPM_BUILD_ROOT%{_bindir}/jackrec # Fix permissions of the modules chmod 755 $RPM_BUILD_ROOT%{_libdir}/jack/*.so $RPM_BUILD_ROOT%{_libdir}/libjack*.so.*.*.* - -%clean -rm -rf $RPM_BUILD_ROOT +popd %pre getent group %groupname > /dev/null || groupadd -r %groupname @@ -143,76 +147,76 @@ exit 0 %postun -p /sbin/ldconfig %files -%defattr(-,root,root,-) -%doc ChangeLog README README_NETJACK2 TODO -%doc README.Fedora -%doc jack.pa -%{_bindir}/alsa_in -%{_bindir}/alsa_out +%doc jack-%{version}/ChangeLog jack-%{version}/README jack-%{version}/README_NETJACK2 jack-%{version}/TODO +%doc jack-%{version}/README.Fedora +%doc jack-%{version}/jack.pa %{_bindir}/jackd -%{_bindir}/jack_load -%{_bindir}/jack_unload -%{_bindir}/jack_freewheel +%{_bindir}/jackrec %exclude %{_bindir}/jackdbus -%exclude %{_bindir}/jack_control -%{_bindir}/jack_cpu -%{_bindir}/jack_cpu_load -%{_bindir}/jack_iodelay -%{_bindir}/jack_midi_dump -%{_bindir}/jack_server_control -%{_bindir}/jack_session_notify -%{_bindir}/jack_test -%{_bindir}/jack_thru -%{_bindir}/jack_zombie %{_datadir}/dbus-1/services/org.jackaudio.service %{_libdir}/jack/ %{_libdir}/libjack.so.* +%{_libdir}/libjacknet.so.* %{_libdir}/libjackserver.so.* %config(noreplace) %{_sysconfdir}/security/limits.d/*.conf -%{_mandir}/man1/alsa_*.1* -%{_mandir}/man1/jack_freewheel*.1* -%{_mandir}/man1/jack_iodelay.1* -%{_mandir}/man1/jack_load*.1* -%{_mandir}/man1/jack_unload*.1* + +%{_mandir}/man1/jackrec.1* %{_mandir}/man1/jackd*.1* %files devel -%defattr(-,root,root,-) -%doc reference/* +%doc jack-%{version}/reference/* %{_includedir}/jack/ %{_libdir}/libjack.so +%{_libdir}/libjacknet.so %{_libdir}/libjackserver.so %{_libdir}/pkgconfig/jack.pc %files example-clients -%defattr(-,root,root,-) -%{_bindir}/jackrec +%{_bindir}/alsa_in +%{_bindir}/alsa_out %{_bindir}/jack_alias %{_bindir}/jack_bufsize %{_bindir}/jack_connect +%exclude %{_bindir}/jack_control %{_bindir}/jack_disconnect +%{_bindir}/jack_cpu_load %{_bindir}/jack_evmon +%{_bindir}/jack_freewheel # These are not ready yet #{_bindir}/jack_impulse_grabber %exclude %{_mandir}/man1/jack_impulse_grabber.1* +%{_bindir}/jack_latent_client +%{_bindir}/jack_load +%{_bindir}/jack_unload %{_bindir}/jack_lsp %{_bindir}/jack_metro +%{_bindir}/jack_midi_dump +%{_bindir}/jack_midi_latency_test +%{_bindir}/jack_midiseq +%{_bindir}/jack_midisine +%{_bindir}/jack_monitor_client +%{_bindir}/jack_net_master +%{_bindir}/jack_net_slave %{_bindir}/jack_netsource %{_bindir}/jack_samplerate +%{_bindir}/jack_server_control +%{_bindir}/jack_session_notify %{_bindir}/jack_showtime -%{_bindir}/jack_transport -%{_bindir}/jack_wait -%{_bindir}/jack_latent_client -%{_bindir}/jack_monitor_client %{_bindir}/jack_simple_client %{_bindir}/jack_simple_session_client -%{_bindir}/jack_midiseq -%{_bindir}/jack_midisine -%{_bindir}/jack_multiple_metro +%{_bindir}/jack_thru +%{_bindir}/jack_transport +%{_bindir}/jack_wait +%{_bindir}/jack_zombie + +%{_mandir}/man1/alsa_*.1* %{_mandir}/man1/jack_bufsize.1* %{_mandir}/man1/jack_connect.1* %{_mandir}/man1/jack_disconnect.1* +%{_mandir}/man1/jack_freewheel*.1* +%{_mandir}/man1/jack_load*.1* +%{_mandir}/man1/jack_unload*.1* %{_mandir}/man1/jack_lsp.1* %{_mandir}/man1/jack_metro.1* %{_mandir}/man1/jack_monitor_client.1* @@ -222,10 +226,20 @@ exit 0 %{_mandir}/man1/jack_simple_client.1* %{_mandir}/man1/jack_transport.1* %{_mandir}/man1/jack_wait.1* -%{_mandir}/man1/jackrec.1* + +# tests +%{_bindir}/jack_cpu +%{_bindir}/jack_iodelay +%{_bindir}/jack_multiple_metro +%{_bindir}/jack_test + +%{_mandir}/man1/jack_iodelay.1* %changelog +* Sat Dec 24 2011 Orcan Ogetbil - 1.9.8-1 +- update to 1.9.8 + * Mon Aug 15 2011 Peter Robinson - 1.9.7-3 - Add ARM to firewire audio excludes diff --git a/jack-freebob-buildfix.patch b/jack-freebob-buildfix.patch deleted file mode 100644 index 0fea296..0000000 --- a/jack-freebob-buildfix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN jack-1.9.7.old/linux/freebob/JackFreebobDriver.cpp jack-1.9.7/linux/freebob/JackFreebobDriver.cpp ---- jack-1.9.7.old/linux/freebob/JackFreebobDriver.cpp 2011-03-30 11:04:28.000000000 -0400 -+++ jack-1.9.7/linux/freebob/JackFreebobDriver.cpp 2011-04-03 09:56:03.000000000 -0400 -@@ -768,7 +768,7 @@ int JackFreebobDriver::Attach() - } - port = fGraphManager->GetPort(port_index); - // Add one buffer more latency if "async" mode is used... -- range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency); -+ range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; - port->SetLatencyRange(JackPlaybackLatency, &range); - fPlaybackPortList[i] = port_index; - jack_log("JackFreebobDriver::Attach fPlaybackPortList[i] %ld ", port_index); diff --git a/sources b/sources index 9c8bb97..edccc32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9759670feecbd43eeccf1c0f743ec199 jack-1.9.7.tar.bz2 +1dd2ff054cab79dfc11d134756f27165 jack-1.9.8.tgz From fd0620c878555d8f1916a0f058ab33a2e3a33601 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 25 Dec 2011 15:42:52 -0500 Subject: [PATCH 054/107] Disable parallel build (on configure stage) as it stalls half of the time Don't exclude jack_control and jackdbus RHBZ#714748 --- jack-audio-connection-kit.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 738ca7a..fb08368 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 1%{?dist} +Release: 2%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -96,7 +96,9 @@ popd pushd jack-%{version} export CPPFLAGS="$RPM_OPT_FLAGS" export PREFIX=%{_prefix} +# Parallel build disabled as it fails sometimes ./waf configure \ + -j1 \ --mandir=/share/man/man1 \ --libdir=/%{_lib} \ --doxygen \ @@ -151,8 +153,8 @@ exit 0 %doc jack-%{version}/README.Fedora %doc jack-%{version}/jack.pa %{_bindir}/jackd +%{_bindir}/jackdbus %{_bindir}/jackrec -%exclude %{_bindir}/jackdbus %{_datadir}/dbus-1/services/org.jackaudio.service %{_libdir}/jack/ %{_libdir}/libjack.so.* @@ -178,7 +180,7 @@ exit 0 %{_bindir}/jack_alias %{_bindir}/jack_bufsize %{_bindir}/jack_connect -%exclude %{_bindir}/jack_control +%{_bindir}/jack_control %{_bindir}/jack_disconnect %{_bindir}/jack_cpu_load %{_bindir}/jack_evmon @@ -237,6 +239,10 @@ exit 0 %changelog +* Sun Dec 25 2011 Orcan Ogetbil - 1.9.8-2 +- Disable parallel build (on configure stage) as it stalls half of the time +- Don't exclude jack_control and jackdbus RHBZ#714748 + * Sat Dec 24 2011 Orcan Ogetbil - 1.9.8-1 - update to 1.9.8 From d4469ce15ff3f66077c3a6fcde6a84024ce99c25 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sat, 7 Jan 2012 20:45:34 -0500 Subject: [PATCH 055/107] Separate package for jackdbus RHBZ#714748 --- jack-audio-connection-kit.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index fb08368..ffcaaf7 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 2%{?dist} +Release: 3%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -55,6 +55,15 @@ from the ground up to be suitable for professional audio work. This means that it focuses on two key areas: synchronous execution of all clients, and low latency operation. +%package dbus +Summary: Jack D-Bus launcher +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} + +%description dbus +Launcher to start Jack through D-Bus. + + %package devel Summary: Header files for Jack Group: Development/Libraries @@ -153,7 +162,6 @@ exit 0 %doc jack-%{version}/README.Fedora %doc jack-%{version}/jack.pa %{_bindir}/jackd -%{_bindir}/jackdbus %{_bindir}/jackrec %{_datadir}/dbus-1/services/org.jackaudio.service %{_libdir}/jack/ @@ -165,6 +173,8 @@ exit 0 %{_mandir}/man1/jackrec.1* %{_mandir}/man1/jackd*.1* +%files dbus +%{_bindir}/jackdbus %files devel %doc jack-%{version}/reference/* @@ -239,6 +249,9 @@ exit 0 %changelog +* Sat Jan 07 2012 Orcan Ogetbil - 1.9.8-3 +- Separate package for jackdbus RHBZ#714748 + * Sun Dec 25 2011 Orcan Ogetbil - 1.9.8-2 - Disable parallel build (on configure stage) as it stalls half of the time - Don't exclude jack_control and jackdbus RHBZ#714748 From 12d85c2ad53fc4d5fa6f3c50e2ec907a7b190ff0 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sat, 7 Jan 2012 20:48:54 -0500 Subject: [PATCH 056/107] moved the dbus service file into the dbus subpackage --- jack-audio-connection-kit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index ffcaaf7..f82c5bd 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -163,7 +163,6 @@ exit 0 %doc jack-%{version}/jack.pa %{_bindir}/jackd %{_bindir}/jackrec -%{_datadir}/dbus-1/services/org.jackaudio.service %{_libdir}/jack/ %{_libdir}/libjack.so.* %{_libdir}/libjacknet.so.* @@ -175,6 +174,7 @@ exit 0 %files dbus %{_bindir}/jackdbus +%{_datadir}/dbus-1/services/org.jackaudio.service %files devel %doc jack-%{version}/reference/* From 4f18760c85500837b765c3a671a414cc35fb9e18 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 28 Feb 2012 12:42:31 -0600 Subject: [PATCH 057/107] - Rebuilt for c++ ABI breakage --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index f82c5bd..666ad0c 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 3%{?dist} +Release: 4%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -249,6 +249,9 @@ exit 0 %changelog +* Tue Feb 28 2012 Fedora Release Engineering - 1.9.8-4 +- Rebuilt for c++ ABI breakage + * Sat Jan 07 2012 Orcan Ogetbil - 1.9.8-3 - Separate package for jackdbus RHBZ#714748 From 7e2e4a4e5616e8ca8ab008824d8b41f5eef8bfe1 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Fri, 2 Mar 2012 23:33:35 -0500 Subject: [PATCH 058/107] Fix ppc64 mpd issue RHBZ#799552 --- jack-audio-connection-kit.spec | 8 +++++++- jack-ppc64-long.patch | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 jack-ppc64-long.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 666ad0c..32dfb23 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 4%{?dist} +Release: 5%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -20,6 +20,8 @@ Patch1: jack-doxygen-output-dir-fix.patch # We don't want the internal API documentation Patch2: jack-apidoc-only.patch Patch4: jack-realtime-compat.patch +# Fix ppc64 mpd startup issue RHBZ#799552 +Patch6: jack-ppc64-long.patch # uc_regs no longer available on ppc64 Patch7: jack-audio-connection-kit-ppc-uc_regs.patch @@ -89,6 +91,7 @@ pushd jack-%{version} %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi %patch4 -p1 +%patch6 -p1 -b .mpd %patch7 -p1 -b .uc_regs # Fix encoding issues @@ -249,6 +252,9 @@ exit 0 %changelog +* Fri Mar 02 2012 Orcan Ogetbil - 1.9.8-5 +- Fix ppc64 mpd issue RHBZ#799552 + * Tue Feb 28 2012 Fedora Release Engineering - 1.9.8-4 - Rebuilt for c++ ABI breakage diff --git a/jack-ppc64-long.patch b/jack-ppc64-long.patch new file mode 100644 index 0000000..cc7248b --- /dev/null +++ b/jack-ppc64-long.patch @@ -0,0 +1,32 @@ +diff -up jack-1.9.8/linux/cycles.h\~ jack-1.9.8/linux/cycles.h +--- jack-1.9.8/linux/cycles.h~ 2011-12-19 12:54:27.000000000 +0100 ++++ jack-1.9.8/linux/cycles.h 2012-03-02 23:57:29.200812059 +0100 +@@ -77,16 +77,24 @@ static inline cycles_t get_cycles(void) + { + cycles_t ret = 0; + ++#ifdef __powerpc64__ ++# define LONGT ".llong" ++#else ++# define LONGT ".long" ++#endif ++ + __asm__ __volatile__( + "98: mftb %0\n" + "99:\n" + ".section __ftr_fixup,\"a\"\n" + " .long %1\n" + " .long 0\n" +- " .long 98b\n" +- " .long 99b\n" ++ " " LONGT " 98b\n" ++ " " LONGT " 99b\n" + ".previous" + : "=r" (ret) : "i" (CPU_FTR_601)); ++ ++#undef LONGT + return ret; + } + + +Diff finished. Fri Mar 2 23:57:31 2012 From 6f32490dcc561d4cec08db16b57ba6f0ee9a57e6 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 25 Mar 2012 14:45:06 -0400 Subject: [PATCH 059/107] Rename limits file from 99-jack.conf to 95-jack.conf RHBZ#795094 - Increase maximum number of ports and clients RHBZ#803871 - Backport ffado runtime buffersize change feature from upstream trunk - Backport jack-connect executable segfault fix from upstream trunk --- jack-audio-connection-kit.spec | 23 +++- jack-ffado-buffersize.patch | 230 ++++++++++++++++++++++++++++++++ jack-fix-connect-segfault.patch | 35 +++++ 3 files changed, 284 insertions(+), 4 deletions(-) create mode 100644 jack-ffado-buffersize.patch create mode 100644 jack-fix-connect-segfault.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 32dfb23..c3c8140 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 5%{?dist} +Release: 6%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -19,13 +19,18 @@ Patch0: jack-audio-connection-kit-no_date_footer.patch Patch1: jack-doxygen-output-dir-fix.patch # We don't want the internal API documentation Patch2: jack-apidoc-only.patch +# Enable ffado buffersize change at runtime. From upstream trunk +# https://github.com/jackaudio/jack2/commit/96e025123 +Patch3: jack-ffado-buffersize.patch Patch4: jack-realtime-compat.patch +# Fix jack-connect segfault when invoked with no arguments. From upstream trunk +# https://github.com/jackaudio/jack2/commit/00280570a +Patch5: jack-fix-connect-segfault.patch # Fix ppc64 mpd startup issue RHBZ#799552 Patch6: jack-ppc64-long.patch # uc_regs no longer available on ppc64 Patch7: jack-audio-connection-kit-ppc-uc_regs.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel BuildRequires: dbus-devel BuildRequires: celt-devel @@ -90,7 +95,9 @@ pushd jack-%{version} %patch0 -p1 -b .nodate %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi +%patch3 -p1 -b .ffadobuffer %patch4 -p1 +%patch5 -p1 -b .connectcrash %patch6 -p1 -b .mpd %patch7 -p1 -b .uc_regs @@ -120,7 +127,9 @@ export PREFIX=%{_prefix} --firewire \ --freebob \ %endif - --alsa + --alsa \ + --clients 256 \ + --ports-per-application=2048 ./waf build %{?_smp_mflags} -v @@ -137,7 +146,7 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/jack-audio-connection-kit # install our limits to the /etc/security/limits.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d sed -e 's,@groupname@,%groupname,g; s,@pagroup@,%pagroup,g;' \ - %{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/99-jack.conf + %{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/95-jack.conf # prepare README.Fedora for documentation including install -p -m644 %{SOURCE1} README.Fedora @@ -252,6 +261,12 @@ exit 0 %changelog +* Sun Mar 25 2012 Orcan Ogetbil - 1.9.8-6 +- Rename limits file from 99-jack.conf to 95-jack.conf RHBZ#795094 +- Increase maximum number of ports and clients RHBZ#803871 +- Backport ffado runtime buffersize change feature from upstream trunk +- Backport jack-connect executable segfault fix from upstream trunk + * Fri Mar 02 2012 Orcan Ogetbil - 1.9.8-5 - Fix ppc64 mpd issue RHBZ#799552 diff --git a/jack-ffado-buffersize.patch b/jack-ffado-buffersize.patch new file mode 100644 index 0000000..0dbc2ea --- /dev/null +++ b/jack-ffado-buffersize.patch @@ -0,0 +1,230 @@ +diff -rupN jack-1.9.8.old/linux/firewire/JackFFADODriver.cpp jack-1.9.8/linux/firewire/JackFFADODriver.cpp +--- jack-1.9.8.old/linux/firewire/JackFFADODriver.cpp 2011-12-19 06:54:27.000000000 -0500 ++++ jack-1.9.8/linux/firewire/JackFFADODriver.cpp 2012-03-25 01:38:58.246513167 -0400 +@@ -3,6 +3,7 @@ Copyright (C) 2001 Paul Davis + Copyright (C) 2004 Grame + Copyright (C) 2007 Pieter Palmers + Copyright (C) 2009 Devin Anderson ++Copyright (C) 2012 Jonathan Woithe, Adrian Knoth + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -45,10 +46,20 @@ Foundation, Inc., 675 Mass Ave, Cambridg + #include "JackCompilerDeps.h" + #include "JackLockedEngine.h" + ++// FFADO_API_VERSION was first defined with API_VERSION 9, so all previous ++// headers do not provide this define. ++#ifndef FFADO_API_VERSION ++extern "C" int ffado_streaming_set_period_size(ffado_device_t *dev, ++ unsigned int period) __attribute__((__weak__)); ++#endif ++ + namespace Jack + { + ++// Basic functionality requires API version 8. If version 9 or later ++// is present the buffers can be resized at runtime. + #define FIREWIRE_REQUIRED_FFADO_API_VERSION 8 ++#define FIREWIRE_REQUIRED_FFADO_API_VERSION_FOR_SETBUFSIZE 9 + + #define jack_get_microseconds GetMicroSeconds + +@@ -253,22 +264,96 @@ JackFFADODriver::ffado_driver_restart (f + return Start(); + } + ++void ++JackFFADODriver::UpdateLatencies(void) ++{ ++ jack_latency_range_t range; ++ ffado_driver_t* driver = (ffado_driver_t*)fDriver; ++ ++ for (int i = 0; i < fCaptureChannels; i++) { ++ range.min = range.max = driver->period_size + driver->capture_frame_latency; ++ fGraphManager->GetPort(fCapturePortList[i])->SetLatencyRange(JackCaptureLatency, &range); ++ } ++ ++ for (int i = 0; i < fPlaybackChannels; i++) { ++ // Add one buffer more latency if "async" mode is used... ++ range.min = range.max = (driver->period_size * ++ (driver->device_options.nb_buffers - 1)) + ++ ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; ++ fGraphManager->GetPort(fPlaybackPortList[i])->SetLatencyRange(JackPlaybackLatency, &range); ++ // Monitor port ++ if (fWithMonitorPorts) { ++ range.min = range.max =driver->period_size; ++ fGraphManager->GetPort(fMonitorPortList[i])->SetLatencyRange(JackCaptureLatency, &range); ++ } ++ } ++} ++ + int + JackFFADODriver::SetBufferSize (jack_nframes_t nframes) + { +- printError("Buffer size change requested but not supported!!!"); ++ ffado_driver_t* driver = (ffado_driver_t*)fDriver; ++ signed int chn; ++ ++ // The speed of this function isn't critical; we can afford the ++ // time to check the FFADO API version. ++ if (ffado_get_api_version() < FIREWIRE_REQUIRED_FFADO_API_VERSION_FOR_SETBUFSIZE || ++ ffado_streaming_set_period_size == NULL) { ++ printError("unsupported on current version of FFADO; please upgrade FFADO"); ++ return -1; ++ } + +- /* + driver->period_size = nframes; + driver->period_usecs = + (jack_time_t) floor ((((float) nframes) / driver->sample_rate) + * 1000000.0f); +- */ ++ ++ ++ // Reallocate the null and scratch buffers. ++ driver->nullbuffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(ffado_sample_t)); ++ if(driver->nullbuffer == NULL) { ++ printError("could not allocate memory for null buffer"); ++ return -1; ++ } ++ driver->scratchbuffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(ffado_sample_t)); ++ if(driver->scratchbuffer == NULL) { ++ printError("could not allocate memory for scratch buffer"); ++ return -1; ++ } ++ ++ // MIDI buffers need reallocating ++ for (chn = 0; chn < driver->capture_nchannels; chn++) { ++ if(driver->capture_channels[chn].stream_type == ffado_stream_type_midi) { ++ // setup the midi buffer ++ if (driver->capture_channels[chn].midi_buffer != NULL) ++ free(driver->capture_channels[chn].midi_buffer); ++ driver->capture_channels[chn].midi_buffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(uint32_t)); ++ } ++ } ++ for (chn = 0; chn < driver->playback_nchannels; chn++) { ++ if(driver->playback_channels[chn].stream_type == ffado_stream_type_midi) { ++ if (driver->playback_channels[chn].midi_buffer != NULL) ++ free(driver->playback_channels[chn].midi_buffer); ++ driver->playback_channels[chn].midi_buffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(uint32_t)); ++ } ++ } ++ ++ // Notify FFADO of the period size change ++ if (ffado_streaming_set_period_size(driver->dev, nframes) != 0) { ++ printError("could not alter FFADO device period size"); ++ return -1; ++ } ++ ++ // This is needed to give the shadow variables a chance to ++ // properly update to the changes. ++ sleep(1); + + /* tell the engine to change its buffer size */ +- //driver->engine->set_buffer_size (driver->engine, nframes); ++ JackAudioDriver::SetBufferSize(nframes); // Generic change, never fails ++ ++ UpdateLatencies(); + +- return -1; // unsupported ++ return 0; + } + + typedef void (*JackDriverFinishFunction) (jack_driver_t *); +@@ -281,7 +366,7 @@ JackFFADODriver::ffado_driver_new (const + + assert(params); + +- if (ffado_get_api_version() != FIREWIRE_REQUIRED_FFADO_API_VERSION) { ++ if (ffado_get_api_version() < FIREWIRE_REQUIRED_FFADO_API_VERSION) { + printError("Incompatible libffado version! (%s)", ffado_get_version()); + return NULL; + } +@@ -349,7 +434,6 @@ int JackFFADODriver::Attach() + jack_port_id_t port_index; + char buf[REAL_JACK_PORT_NAME_SIZE]; + char portname[REAL_JACK_PORT_NAME_SIZE]; +- jack_latency_range_t range; + + ffado_driver_t* driver = (ffado_driver_t*)fDriver; + +@@ -435,8 +519,6 @@ int JackFFADODriver::Attach() + ffado_streaming_capture_stream_onoff(driver->dev, chn, 0); + + port = fGraphManager->GetPort(port_index); +- range.min = range.max = driver->period_size + driver->capture_frame_latency; +- port->SetLatencyRange(JackCaptureLatency, &range); + // capture port aliases (jackd1 style port names) + snprintf(buf, sizeof(buf), "%s:capture_%i", fClientControl.fName, (int) chn + 1); + port->SetAlias(buf); +@@ -466,9 +548,6 @@ int JackFFADODriver::Attach() + // setup the midi buffer + driver->capture_channels[chn].midi_buffer = (uint32_t *)calloc(driver->period_size, sizeof(uint32_t)); + +- port = fGraphManager->GetPort(port_index); +- range.min = range.max = driver->period_size + driver->capture_frame_latency; +- port->SetLatencyRange(JackCaptureLatency, &range); + fCapturePortList[chn] = port_index; + jack_log("JackFFADODriver::Attach fCapturePortList[i] %ld ", port_index); + fCaptureChannels++; +@@ -512,8 +591,6 @@ int JackFFADODriver::Attach() + + port = fGraphManager->GetPort(port_index); + // Add one buffer more latency if "async" mode is used... +- range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; +- port->SetLatencyRange(JackPlaybackLatency, &range); + // playback port aliases (jackd1 style port names) + snprintf(buf, sizeof(buf), "%s:playback_%i", fClientControl.fName, (int) chn + 1); + port->SetAlias(buf); +@@ -548,9 +625,6 @@ int JackFFADODriver::Attach() + + driver->playback_channels[chn].midi_buffer = (uint32_t *)calloc(driver->period_size, sizeof(uint32_t)); + +- port = fGraphManager->GetPort(port_index); +- range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; +- port->SetLatencyRange(JackPlaybackLatency, &range); + fPlaybackPortList[chn] = port_index; + jack_log("JackFFADODriver::Attach fPlaybackPortList[i] %ld ", port_index); + fPlaybackChannels++; +@@ -559,6 +633,8 @@ int JackFFADODriver::Attach() + } + } + ++ UpdateLatencies(); ++ + assert(fCaptureChannels < DRIVER_PORT_NUM); + assert(fPlaybackChannels < DRIVER_PORT_NUM); + +diff -rupN jack-1.9.8.old/linux/firewire/JackFFADODriver.h jack-1.9.8/linux/firewire/JackFFADODriver.h +--- jack-1.9.8.old/linux/firewire/JackFFADODriver.h 2011-12-19 06:54:27.000000000 -0500 ++++ jack-1.9.8/linux/firewire/JackFFADODriver.h 2012-03-25 01:38:05.708754669 -0400 +@@ -2,6 +2,7 @@ + Copyright (C) 2001 Paul Davis + Copyright (C) 2004 Grame + Copyright (C) 2007 Pieter Palmers ++Copyright (C) 2012 Adrian Knoth + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -59,6 +60,7 @@ class JackFFADODriver : public JackAudio + + void jack_driver_init (jack_driver_t *driver); + void jack_driver_nt_init (jack_driver_nt_t * driver); ++ void UpdateLatencies(); + + public: + +@@ -80,6 +82,12 @@ class JackFFADODriver : public JackAudio + int Read(); + int Write(); + ++ // BufferSize can be changed ++ bool IsFixedBufferSize() ++ { ++ return false; ++ } ++ + int SetBufferSize(jack_nframes_t nframes); + }; + diff --git a/jack-fix-connect-segfault.patch b/jack-fix-connect-segfault.patch new file mode 100644 index 0000000..4bb8b32 --- /dev/null +++ b/jack-fix-connect-segfault.patch @@ -0,0 +1,35 @@ +From 00280570af529e4a54009bd5c6aeeab05286efcf Mon Sep 17 00:00:00 2001 +From: Adrian Knoth +Date: Thu, 8 Mar 2012 21:54:22 +0100 +Subject: [PATCH] Fix segfault in jack_connect + +When jack_connect is called without any argument, it causes a segfault +in + + snprintf( portA, sizeof(portA), "%s", argv[argc-1] ); + snprintf( portB, sizeof(portB), "%s", argv[argc-2] ); + +Reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662199 +--- + example-clients/connect.c | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/example-clients/connect.c b/example-clients/connect.c +index 5ed112b..0f4f8be 100644 +--- a/example-clients/connect.c ++++ b/example-clients/connect.c +@@ -128,7 +128,10 @@ void port_connect_callback(jack_port_id_t a, jack_port_id_t b, int connect, void + return 1; + } + +- if (argc < 3) show_usage(my_name); ++ if (argc < 3) { ++ show_usage(my_name); ++ return 1; ++ } + + /* try to become a client of the JACK server */ + +-- +1.7.5.4 + From 3ccc2fda51346f669c4085d0f76c36b573ce246b Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 8 Apr 2012 12:33:09 -0400 Subject: [PATCH 060/107] Compile via -DJACK_32_64 RHBZ#803865 - Adjust rtprio limit to 70. Adjust jack default priority to 60. RHBZ#795094 --- jack-audio-connection-kit-limits.conf | 2 +- jack-audio-connection-kit.spec | 11 ++++-- jack-realtime-compat.patch | 52 ++++++--------------------- 3 files changed, 19 insertions(+), 46 deletions(-) diff --git a/jack-audio-connection-kit-limits.conf b/jack-audio-connection-kit-limits.conf index 8208083..7775824 100644 --- a/jack-audio-connection-kit-limits.conf +++ b/jack-audio-connection-kit-limits.conf @@ -1,6 +1,6 @@ # Default limits for users of jack-audio-connection-kit -@@groupname@ - rtprio 20 +@@groupname@ - rtprio 70 @@groupname@ - memlock 4194304 @@pagroup@ - rtprio 20 diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index c3c8140..379f607 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 6%{?dist} +Release: 7%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -22,6 +22,7 @@ Patch2: jack-apidoc-only.patch # Enable ffado buffersize change at runtime. From upstream trunk # https://github.com/jackaudio/jack2/commit/96e025123 Patch3: jack-ffado-buffersize.patch +# Adjust default priority. RHBZ#795094 Patch4: jack-realtime-compat.patch # Fix jack-connect segfault when invoked with no arguments. From upstream trunk # https://github.com/jackaudio/jack2/commit/00280570a @@ -96,7 +97,7 @@ pushd jack-%{version} %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi %patch3 -p1 -b .ffadobuffer -%patch4 -p1 +%patch4 -p1 -b .priority %patch5 -p1 -b .connectcrash %patch6 -p1 -b .mpd %patch7 -p1 -b .uc_regs @@ -113,7 +114,7 @@ popd %build pushd jack-%{version} -export CPPFLAGS="$RPM_OPT_FLAGS" +export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64" export PREFIX=%{_prefix} # Parallel build disabled as it fails sometimes ./waf configure \ @@ -261,6 +262,10 @@ exit 0 %changelog +* Sat Apr 07 2012 Orcan Ogetbil - 1.9.8-7 +- Compile via -DJACK_32_64 RHBZ#803865 +- Adjust rtprio limit to 70. Adjust jack default priority to 60. RHBZ#795094 + * Sun Mar 25 2012 Orcan Ogetbil - 1.9.8-6 - Rename limits file from 99-jack.conf to 95-jack.conf RHBZ#795094 - Increase maximum number of ports and clients RHBZ#803871 diff --git a/jack-realtime-compat.patch b/jack-realtime-compat.patch index 9a8bdce..9be6924 100644 --- a/jack-realtime-compat.patch +++ b/jack-realtime-compat.patch @@ -1,56 +1,24 @@ -diff -rupN jack-1.9.6.old/common/JackControlAPI.cpp jack-1.9.6/common/JackControlAPI.cpp ---- jack-1.9.6.old/common/JackControlAPI.cpp 2010-08-30 06:23:53.000000000 -0400 -+++ jack-1.9.6/common/JackControlAPI.cpp 2010-11-11 03:02:30.000000000 -0500 -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - - #include "jslist.h" - #include "driver_interface.h" -@@ -675,7 +676,13 @@ EXPORT jackctl_server_t * jackctl_server +diff -rupN jack-1.9.8.old/common/JackControlAPI.cpp jack-1.9.8/common/JackControlAPI.cpp +--- jack-1.9.8.old/common/JackControlAPI.cpp 2011-12-19 06:54:02.000000000 -0500 ++++ jack-1.9.8/common/JackControlAPI.cpp 2012-04-07 15:04:06.882823048 -0400 +@@ -678,7 +678,7 @@ SERVER_EXPORT jackctl_server_t * jackctl goto fail_free_parameters; } - value.i = 10; -+ struct utsname utsname; -+ int success; -+ success = uname( &utsname ); -+ if( success == 0 && strstr( utsname.version, "PREEMPT RT" ) ) -+ value.i = 60; -+ else -+ value.i = 20; ++ value.i = 60; if (jackctl_add_parameter( &server_ptr->parameters, "realtime-priority", -diff -rupN jack-1.9.6.old/common/JackServerGlobals.cpp jack-1.9.6/common/JackServerGlobals.cpp ---- jack-1.9.6.old/common/JackServerGlobals.cpp 2010-08-30 06:23:53.000000000 -0400 -+++ jack-1.9.6/common/JackServerGlobals.cpp 2010-11-11 03:02:50.000000000 -0500 -@@ -22,6 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg - #include "shm.h" - #include - #include -+#include - - static char* server_name = NULL; - -@@ -67,9 +68,17 @@ void JackServerGlobals::Delete() - - bool JackServerGlobals::Init() +diff -rupN jack-1.9.8.old/common/JackServerGlobals.cpp jack-1.9.8/common/JackServerGlobals.cpp +--- jack-1.9.8.old/common/JackServerGlobals.cpp 2011-12-19 06:54:02.000000000 -0500 ++++ jack-1.9.8/common/JackServerGlobals.cpp 2012-04-07 15:05:11.841498738 -0400 +@@ -98,7 +98,7 @@ bool JackServerGlobals::Init() { -+ struct utsname utsname; -+ int success; -+ success = uname( &utsname ); -+ int realtime = 0; int client_timeout = 0; /* msecs; if zero, use period size. */ - int realtime_priority = 10; -+ int realtime_priority; -+ if( success == 0 && strstr( utsname.version, "PREEMPT RT" ) ) -+ realtime_priority = 60; -+ else -+ realtime_priority = 20; ++ int realtime_priority = 60; int verbose_aux = 0; int do_mlock = 1; unsigned int port_max = 128; From 2e3eee60f10ac039dabb6ac75a54793d97168fc1 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 8 Apr 2012 13:40:34 -0400 Subject: [PATCH 061/107] Oops. Last build was against the wrong ffado on F-17. Rebuilding against override. --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 379f607..e7b7c54 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 7%{?dist} +Release: 8%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -262,6 +262,9 @@ exit 0 %changelog +* Sut Apr 08 2012 Orcan Ogetbil - 1.9.8-8 +- Oops. Last build was against the wrong ffado on F-17. Rebuilding against override. + * Sat Apr 07 2012 Orcan Ogetbil - 1.9.8-7 - Compile via -DJACK_32_64 RHBZ#803865 - Adjust rtprio limit to 70. Adjust jack default priority to 60. RHBZ#795094 From 65fb83a7f29cf2e572ec297f79e3cc772c366c2b Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 8 Apr 2012 13:41:17 -0400 Subject: [PATCH 062/107] fix typo in date --- jack-audio-connection-kit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index e7b7c54..1cb1cdb 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -262,7 +262,7 @@ exit 0 %changelog -* Sut Apr 08 2012 Orcan Ogetbil - 1.9.8-8 +* Sun Apr 08 2012 Orcan Ogetbil - 1.9.8-8 - Oops. Last build was against the wrong ffado on F-17. Rebuilding against override. * Sat Apr 07 2012 Orcan Ogetbil - 1.9.8-7 From f836ebff33261400f5510f07149b7ef10b452868 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Thu, 21 Jun 2012 22:23:13 -0400 Subject: [PATCH 063/107] Build with -O0 until RHBZ#827748 is resolved --- jack-audio-connection-kit.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 1cb1cdb..8f934ec 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 8%{?dist} +Release: 9%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -114,7 +114,7 @@ popd %build pushd jack-%{version} -export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64" +export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64 -O0" export PREFIX=%{_prefix} # Parallel build disabled as it fails sometimes ./waf configure \ @@ -262,6 +262,9 @@ exit 0 %changelog +* Thu Jun 21 2012 Orcan Ogetbil - 1.9.8-9 +- Build with -O0 until RHBZ#827748 is resolved + * Sun Apr 08 2012 Orcan Ogetbil - 1.9.8-8 - Oops. Last build was against the wrong ffado on F-17. Rebuilding against override. From f8b39af943b853f4c310b490c44cb6a28b6fd5fc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 10:21:09 -0500 Subject: [PATCH 064/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 8f934ec..5487611 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 9%{?dist} +Release: 10%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -262,6 +262,9 @@ exit 0 %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 1.9.8-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Thu Jun 21 2012 Orcan Ogetbil - 1.9.8-9 - Build with -O0 until RHBZ#827748 is resolved From 59a96cdfc3993d89d6ee08a5787c9db0dea44fd0 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Tue, 4 Sep 2012 01:40:18 -0400 Subject: [PATCH 065/107] Removed libfreebob dependency as this package is retired --- jack-audio-connection-kit.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 5487611..f087cc9 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 10%{?dist} +Release: 11%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -39,7 +39,6 @@ BuildRequires: doxygen BuildRequires: expat-devel %ifnarch s390 s390x %{arm} BuildRequires: libffado-devel -BuildRequires: libfreebob-devel %endif BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel @@ -126,7 +125,6 @@ export PREFIX=%{_prefix} --classic \ %ifnarch s390 s390x %{arm} --firewire \ - --freebob \ %endif --alsa \ --clients 256 \ @@ -262,6 +260,9 @@ exit 0 %changelog +* Tue Sep 04 2012 Orcan Ogetbil - 1.9.8-11 +- Removed libfreebob dependency as this package is retired + * Thu Jul 19 2012 Fedora Release Engineering - 1.9.8-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From dda8eac8a506b08a405bacb108dc8cb20dec381e Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sun, 28 Oct 2012 00:50:20 -0400 Subject: [PATCH 066/107] Seem like RHBZ#827748 is resolved. Rebuild optimized --- jack-audio-connection-kit-README.Fedora | 4 ++-- jack-audio-connection-kit.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index 3e35645..2171273 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -5,8 +5,8 @@ Switch to root account. Install the required packages: yum install alsa-plugins-jack -Add yourself to the jackuser group. - usermod -a -G jackuser "" +Add yourself to the audio and jackuser groups. + usermod -a -G audio,jackuser "" Now you will need to log out and log back in, or simply restart the system. Start the jack daemon (the best parameters for your sound card may be different): diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index f087cc9..af6214a 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 11%{?dist} +Release: 12%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -113,7 +113,7 @@ popd %build pushd jack-%{version} -export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64 -O0" +export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64" export PREFIX=%{_prefix} # Parallel build disabled as it fails sometimes ./waf configure \ @@ -260,6 +260,9 @@ exit 0 %changelog +* Sun Oct 28 2012 Orcan Ogetbil - 1.9.8-12 +- Seem like RHBZ#827748 is resolved. Rebuild optimized + * Tue Sep 04 2012 Orcan Ogetbil - 1.9.8-11 - Removed libfreebob dependency as this package is retired From 7c93f396873ec9b46e50b8a374ddd2ee35f10a32 Mon Sep 17 00:00:00 2001 From: Brendan Jones Date: Sat, 17 Nov 2012 15:11:15 +0100 Subject: [PATCH 067/107] Add D-Bus notes to README --- jack-audio-connection-kit-README.Fedora | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index 2171273..9702d14 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -5,8 +5,8 @@ Switch to root account. Install the required packages: yum install alsa-plugins-jack -Add yourself to the audio and jackuser groups. - usermod -a -G audio,jackuser "" +Add yourself to the jackuser group. + usermod -a -G jackuser "" Now you will need to log out and log back in, or simply restart the system. Start the jack daemon (the best parameters for your sound card may be different): @@ -41,9 +41,22 @@ hw ALSA device (hw:0 for the first card, etc). Even best to use the name of the card as stated above. + USING THE JACK DBUS INTERFACE + +Control applications such as qjackctl can be configured to interact with the jack +sound server using D-Bus. This has the advantage of allowing jack to request the +release of the sound device from Pulseaudio (see below). + +jackdbus is shipped in a separate package. To install this (as root) do: + + yum install jack-audio-connection-kit-dus + +and check "Enable D-Bus interface" in Setup -> Misc within Qjackctl + + INTEGRATE JACK WITH PULSEAUDIO -Jack will ask Pulse Audio through dbus for ownership of the sound card. Pulse +Jack will ask Pulse Audio through D-Bus for ownership of the sound card. Pulse Audio will grant it and Jack will have complete control of it. No conflicts and no configuration necessary. In this case Pulse Audio will stop using the card and if it is the only one, you will not have sound for system sounds, browser @@ -51,6 +64,8 @@ media playback, etc (which is usually what you want). Otherwise it is possible to load a Pulse Audio module that redirects PA to use Jack. + + RUNNING JACK SERVER IN REALTIME MODE NOTE: This chapter explains why you have done the above changes in more detail. From b81b6f46a94c9603c5f1b199f22ec7d2589bfe07 Mon Sep 17 00:00:00 2001 From: Brendan Jones Date: Sun, 18 Nov 2012 09:30:07 +0100 Subject: [PATCH 068/107] Add audio group in README dropped in merging. --- jack-audio-connection-kit-README.Fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jack-audio-connection-kit-README.Fedora b/jack-audio-connection-kit-README.Fedora index 9702d14..07ff13d 100644 --- a/jack-audio-connection-kit-README.Fedora +++ b/jack-audio-connection-kit-README.Fedora @@ -6,7 +6,7 @@ Install the required packages: yum install alsa-plugins-jack Add yourself to the jackuser group. - usermod -a -G jackuser "" + usermod -a -G audio,jackuser "" Now you will need to log out and log back in, or simply restart the system. Start the jack daemon (the best parameters for your sound card may be different): From 488676586a3316ceaf688a427a0e34638c4c8d78 Mon Sep 17 00:00:00 2001 From: Brendan Jones Date: Mon, 19 Nov 2012 21:50:26 +0100 Subject: [PATCH 069/107] Reenable -O0 optflag, move jack_control to dbus package and patch sigsegv fault handling. --- jack-audio-connection-kit.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index af6214a..0fac8a6 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 12%{?dist} +Release: 13%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -113,7 +113,7 @@ popd %build pushd jack-%{version} -export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64" +export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64i -O0" export PREFIX=%{_prefix} # Parallel build disabled as it fails sometimes ./waf configure \ @@ -186,6 +186,7 @@ exit 0 %files dbus %{_bindir}/jackdbus %{_datadir}/dbus-1/services/org.jackaudio.service +%{_bindir}/jack_control %files devel %doc jack-%{version}/reference/* @@ -201,7 +202,6 @@ exit 0 %{_bindir}/jack_alias %{_bindir}/jack_bufsize %{_bindir}/jack_connect -%{_bindir}/jack_control %{_bindir}/jack_disconnect %{_bindir}/jack_cpu_load %{_bindir}/jack_evmon @@ -260,6 +260,11 @@ exit 0 %changelog +* Mon Nov 19 2012 Brendan Jones 1.9.8-13 +- Build with -O0. RHBZ#827748 still not resolved with gcc-4.7.2 +- Update README, add jack_control to dbus package +- Add upstream sigsegv fault handling patch + * Sun Oct 28 2012 Orcan Ogetbil - 1.9.8-12 - Seem like RHBZ#827748 is resolved. Rebuild optimized From 83c933be0fe191d4fec84306678143165df88063 Mon Sep 17 00:00:00 2001 From: Brendan Jones Date: Mon, 19 Nov 2012 21:57:09 +0100 Subject: [PATCH 070/107] Add sigsegv handling patch. --- ...onnection-kit-1.9.8-sigsegv-handling.patch | 28 +++++++++++++++++++ jack-audio-connection-kit.spec | 3 ++ 2 files changed, 31 insertions(+) create mode 100644 jack-audio-connection-kit-1.9.8-sigsegv-handling.patch diff --git a/jack-audio-connection-kit-1.9.8-sigsegv-handling.patch b/jack-audio-connection-kit-1.9.8-sigsegv-handling.patch new file mode 100644 index 0000000..2045caf --- /dev/null +++ b/jack-audio-connection-kit-1.9.8-sigsegv-handling.patch @@ -0,0 +1,28 @@ +diff -Nurp jack-1.9.8.orig/dbus/sigsegv.c jack-1.9.8/dbus/sigsegv.c +--- jack-1.9.8.orig/dbus/sigsegv.c 2011-12-19 12:54:24.000000000 +0100 ++++ jack-1.9.8/dbus/sigsegv.c 2012-06-03 15:56:31.306697873 +0200 +@@ -60,6 +60,7 @@ static void signal_segv(int signum, sigi + static const char *si_codes[3] = {"", "SEGV_MAPERR", "SEGV_ACCERR"}; + + size_t i; ++ const char *si_code_str; + ucontext_t *ucontext = (ucontext_t*)ptr; + + #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64) +@@ -94,10 +95,14 @@ static void signal_segv(int signum, sigi + jack_error("Unknown bad signal catched!"); + } + +- jack_error("info.si_signo = %d", signum); ++ if (info->si_code >= 0 && info->si_code < 3) ++ si_code_str = si_codes[info->si_code]; ++ else ++ si_code_str = "unknown"; jack_error("info.si_signo = %d", signum); ++ + jack_error("info.si_errno = %d", info->si_errno); + jack_error("info.si_code = %d (%s)", info->si_code, si_codes[info->si_code]); +- jack_error("info.si_addr = %p", info->si_addr); ++ jack_error("info.si_code = %d (%s)", info->si_code, si_code_str); + #if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) + for(i = 0; i < NGREG; i++) + jack_error("reg[%02d] = 0x" REGFORMAT, i, diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 0fac8a6..fc12b4f 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -31,6 +31,8 @@ Patch5: jack-fix-connect-segfault.patch Patch6: jack-ppc64-long.patch # uc_regs no longer available on ppc64 Patch7: jack-audio-connection-kit-ppc-uc_regs.patch +# correct sigsegv handling +Patch8: jack-audio-connection-kit-1.9.8-sigsegv-handling.patch BuildRequires: alsa-lib-devel BuildRequires: dbus-devel @@ -100,6 +102,7 @@ pushd jack-%{version} %patch5 -p1 -b .connectcrash %patch6 -p1 -b .mpd %patch7 -p1 -b .uc_regs +%patch8 -p1 -b .sigsegvfault # Fix encoding issues for file in ChangeLog README TODO; do From 021228c4115bf5678966068bf52274e86cd45111 Mon Sep 17 00:00:00 2001 From: Brendan Jones Date: Tue, 20 Nov 2012 22:39:38 +0100 Subject: [PATCH 071/107] Correct build flags --- jack-audio-connection-kit.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index fc12b4f..7a10aca 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.8 -Release: 13%{?dist} +Release: 14%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -116,7 +116,7 @@ popd %build pushd jack-%{version} -export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64i -O0" +export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64 -O0" export PREFIX=%{_prefix} # Parallel build disabled as it fails sometimes ./waf configure \ @@ -263,6 +263,9 @@ exit 0 %changelog +* Tue Nov 20 2012 Brendan Jones 1.9.8-14 +- Correct build flags + * Mon Nov 19 2012 Brendan Jones 1.9.8-13 - Build with -O0. RHBZ#827748 still not resolved with gcc-4.7.2 - Update README, add jack_control to dbus package From b10034aa2638f6e2bbda8512a1befd57140d04d9 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Thu, 27 Dec 2012 23:00:45 -0500 Subject: [PATCH 072/107] update to 1.9.9.5 --- .gitignore | 1 + ...onnection-kit-1.9.8-sigsegv-handling.patch | 28 -- jack-audio-connection-kit-ppc-uc_regs.patch | 15 - jack-audio-connection-kit.spec | 55 +-- jack-doxygen-buildfix.patch | 39 ++ jack-ffado-buffersize.patch | 230 --------- jack-fix-connect-segfault.patch | 35 -- jack-portnames.patch | 447 ++++++++++++++++++ jack-realtime-compat.patch | 56 ++- sources | 2 +- 10 files changed, 555 insertions(+), 353 deletions(-) delete mode 100644 jack-audio-connection-kit-1.9.8-sigsegv-handling.patch delete mode 100644 jack-audio-connection-kit-ppc-uc_regs.patch create mode 100644 jack-doxygen-buildfix.patch delete mode 100644 jack-ffado-buffersize.patch delete mode 100644 jack-fix-connect-segfault.patch create mode 100644 jack-portnames.patch diff --git a/.gitignore b/.gitignore index 8540ee9..b0a228b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ jack-1.9.5.tar.bz2 /jack-1.9.6.tar.bz2 /jack-1.9.7.tar.bz2 /jack-1.9.8.tgz +/jack-1.9.9.5.tar.bz2 diff --git a/jack-audio-connection-kit-1.9.8-sigsegv-handling.patch b/jack-audio-connection-kit-1.9.8-sigsegv-handling.patch deleted file mode 100644 index 2045caf..0000000 --- a/jack-audio-connection-kit-1.9.8-sigsegv-handling.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -Nurp jack-1.9.8.orig/dbus/sigsegv.c jack-1.9.8/dbus/sigsegv.c ---- jack-1.9.8.orig/dbus/sigsegv.c 2011-12-19 12:54:24.000000000 +0100 -+++ jack-1.9.8/dbus/sigsegv.c 2012-06-03 15:56:31.306697873 +0200 -@@ -60,6 +60,7 @@ static void signal_segv(int signum, sigi - static const char *si_codes[3] = {"", "SEGV_MAPERR", "SEGV_ACCERR"}; - - size_t i; -+ const char *si_code_str; - ucontext_t *ucontext = (ucontext_t*)ptr; - - #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64) -@@ -94,10 +95,14 @@ static void signal_segv(int signum, sigi - jack_error("Unknown bad signal catched!"); - } - -- jack_error("info.si_signo = %d", signum); -+ if (info->si_code >= 0 && info->si_code < 3) -+ si_code_str = si_codes[info->si_code]; -+ else -+ si_code_str = "unknown"; jack_error("info.si_signo = %d", signum); -+ - jack_error("info.si_errno = %d", info->si_errno); - jack_error("info.si_code = %d (%s)", info->si_code, si_codes[info->si_code]); -- jack_error("info.si_addr = %p", info->si_addr); -+ jack_error("info.si_code = %d (%s)", info->si_code, si_code_str); - #if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) - for(i = 0; i < NGREG; i++) - jack_error("reg[%02d] = 0x" REGFORMAT, i, diff --git a/jack-audio-connection-kit-ppc-uc_regs.patch b/jack-audio-connection-kit-ppc-uc_regs.patch deleted file mode 100644 index 2565820..0000000 --- a/jack-audio-connection-kit-ppc-uc_regs.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up jack-1.9.6/dbus/sigsegv.c.uc_regs jack-1.9.6/dbus/sigsegv.c ---- jack-1.9.6/dbus/sigsegv.c.uc_regs 2010-08-30 10:24:16.000000000 +0000 -+++ jack-1.9.6/dbus/sigsegv.c 2011-03-11 20:40:46.000000000 +0000 -@@ -101,8 +101,10 @@ static void signal_segv(int signum, sigi - #if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) - for(i = 0; i < NGREG; i++) - jack_error("reg[%02d] = 0x" REGFORMAT, i, --#if defined(__powerpc__) -+#if defined(__powerpc__) && !defined(__powerpc64__) - ucontext->uc_mcontext.uc_regs[i] -+#elif defined(__powerpc__) && defined(__powerpc64__) -+ ucontext->uc_mcontext.gp_regs[i] - #elif defined(__sparc__) && defined(__arch64__) - ucontext->uc_mcontext.mc_gregs[i] - #else diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 7a10aca..05050d4 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -3,13 +3,13 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 1.9.8 -Release: 14%{?dist} +Version: 1.9.9.5 +Release: 1%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons URL: http://www.jackaudio.org -Source0: http://www.grame.fr/~letz/jack-%{version}.tgz +Source0: https://dl.dropbox.com/u/28869550/jack-%{version}.tar.bz2 Source1: %{name}-README.Fedora Source2: %{name}-script.pa Source3: %{name}-limits.conf @@ -19,20 +19,14 @@ Patch0: jack-audio-connection-kit-no_date_footer.patch Patch1: jack-doxygen-output-dir-fix.patch # We don't want the internal API documentation Patch2: jack-apidoc-only.patch -# Enable ffado buffersize change at runtime. From upstream trunk -# https://github.com/jackaudio/jack2/commit/96e025123 -Patch3: jack-ffado-buffersize.patch +# Fix doxygen doc build regression. From upstream trunk 95a1162d6aecc91 +Patch3: jack-doxygen-buildfix.patch # Adjust default priority. RHBZ#795094 Patch4: jack-realtime-compat.patch -# Fix jack-connect segfault when invoked with no arguments. From upstream trunk -# https://github.com/jackaudio/jack2/commit/00280570a -Patch5: jack-fix-connect-segfault.patch +# Enable renaming and reordering the jack ports RHBZ#887408 +Patch5: jack-portnames.patch # Fix ppc64 mpd startup issue RHBZ#799552 Patch6: jack-ppc64-long.patch -# uc_regs no longer available on ppc64 -Patch7: jack-audio-connection-kit-ppc-uc_regs.patch -# correct sigsegv handling -Patch8: jack-audio-connection-kit-1.9.8-sigsegv-handling.patch BuildRequires: alsa-lib-devel BuildRequires: dbus-devel @@ -45,6 +39,8 @@ BuildRequires: libffado-devel BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel BuildRequires: ncurses-devel +# We are waiting for RHBZ#887530 to enable opus support +#BuildRequires: opus-devel BuildRequires: pkgconfig BuildRequires: python2 BuildRequires: readline-devel @@ -77,7 +73,6 @@ Launcher to start Jack through D-Bus. Summary: Header files for Jack Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: pkgconfig %description devel Header files for the Jack Audio Connection Kit. @@ -93,16 +88,13 @@ Small example clients that use the Jack Audio Connection Kit. %prep %setup -q -n jack-%{version} -pushd jack-%{version} %patch0 -p1 -b .nodate %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi -%patch3 -p1 -b .ffadobuffer +%patch3 -p1 -b .doxyfix %patch4 -p1 -b .priority -%patch5 -p1 -b .connectcrash +%patch5 -p1 -b .portnames %patch6 -p1 -b .mpd -%patch7 -p1 -b .uc_regs -%patch8 -p1 -b .sigsegvfault # Fix encoding issues for file in ChangeLog README TODO; do @@ -111,18 +103,15 @@ for file in ChangeLog README TODO; do touch -r $file $file.tmp2 mv -f $file.tmp2 $file done -popd - %build -pushd jack-%{version} -export CPPFLAGS="$RPM_OPT_FLAGS -DJACK_32_64 -O0" +export CPPFLAGS="$RPM_OPT_FLAGS -O0" export PREFIX=%{_prefix} # Parallel build disabled as it fails sometimes ./waf configure \ - -j1 \ - --mandir=/share/man/man1 \ - --libdir=/%{_lib} \ + %{?_smp_mflags} \ + --mandir=%{_mandir}/man1 \ + --libdir=%{_libdir} \ --doxygen \ --dbus \ --classic \ @@ -135,10 +124,8 @@ export PREFIX=%{_prefix} ./waf build %{?_smp_mflags} -v -popd %install -pushd jack-%{version} ./waf --destdir=$RPM_BUILD_ROOT install # move doxygen documentation to the right place @@ -161,7 +148,6 @@ mv $RPM_BUILD_ROOT%{_bindir}/jack_rec $RPM_BUILD_ROOT%{_bindir}/jackrec # Fix permissions of the modules chmod 755 $RPM_BUILD_ROOT%{_libdir}/jack/*.so $RPM_BUILD_ROOT%{_libdir}/libjack*.so.*.*.* -popd %pre getent group %groupname > /dev/null || groupadd -r %groupname @@ -172,9 +158,9 @@ exit 0 %postun -p /sbin/ldconfig %files -%doc jack-%{version}/ChangeLog jack-%{version}/README jack-%{version}/README_NETJACK2 jack-%{version}/TODO -%doc jack-%{version}/README.Fedora -%doc jack-%{version}/jack.pa +%doc ChangeLog README README_NETJACK2 TODO +%doc README.Fedora +%doc jack.pa %{_bindir}/jackd %{_bindir}/jackrec %{_libdir}/jack/ @@ -192,7 +178,7 @@ exit 0 %{_bindir}/jack_control %files devel -%doc jack-%{version}/reference/* +%doc reference/html/ %{_includedir}/jack/ %{_libdir}/libjack.so %{_libdir}/libjacknet.so @@ -263,6 +249,9 @@ exit 0 %changelog +* Tue Dec 25 2012 Orcan Ogetbil - 1.9.9.5-1 +- update to 1.9.9.5 + * Tue Nov 20 2012 Brendan Jones 1.9.8-14 - Correct build flags diff --git a/jack-doxygen-buildfix.patch b/jack-doxygen-buildfix.patch new file mode 100644 index 0000000..bfb5098 --- /dev/null +++ b/jack-doxygen-buildfix.patch @@ -0,0 +1,39 @@ +diff -rupN jack-1.9.9.5.old/wscript jack-1.9.9.5/wscript +--- jack-1.9.9.5.old/wscript 2012-12-10 04:26:57.000000000 -0500 ++++ jack-1.9.9.5/wscript 2012-12-16 23:29:44.629292671 -0500 +@@ -356,10 +356,11 @@ def build(bld): + bld.add_subdirs('dbus') + + if bld.env['BUILD_DOXYGEN_DOCS'] == True: +- share_dir = bld.env.get_destdir() + bld.env['PREFIX'] + '/share/jack-audio-connection-kit' + html_docs_source_dir = "build/default/html" +- html_docs_install_dir = share_dir + '/reference/html/' +- if Options.commands['install']: ++ if bld.cmd == 'install': ++ share_dir = bld.options.destdir + bld.env['PREFIX'] + '/share/jack-audio-connection-kit' ++ html_docs_install_dir = share_dir + '/reference/html/' ++ + if os.path.isdir(html_docs_install_dir): + Logs.pprint('CYAN', "Removing old doxygen documentation installation...") + shutil.rmtree(html_docs_install_dir) +@@ -367,17 +368,17 @@ def build(bld): + Logs.pprint('CYAN', "Installing doxygen documentation...") + shutil.copytree(html_docs_source_dir, html_docs_install_dir) + Logs.pprint('CYAN', "Installing doxygen documentation done.") +- elif Options.commands['uninstall']: ++ elif bld.cmd =='uninstall': + Logs.pprint('CYAN', "Uninstalling doxygen documentation...") + if os.path.isdir(share_dir): + shutil.rmtree(share_dir) + Logs.pprint('CYAN', "Uninstalling doxygen documentation done.") +- elif Options.commands['clean']: ++ elif bld.cmd =='clean': + if os.access(html_docs_source_dir, os.R_OK): + Logs.pprint('CYAN', "Removing doxygen generated documentation...") + shutil.rmtree(html_docs_source_dir) + Logs.pprint('CYAN', "Removing doxygen generated documentation done.") +- elif Options.commands['build']: ++ elif bld.cmd =='build': + if not os.access(html_docs_source_dir, os.R_OK): + os.popen("doxygen").read() + else: diff --git a/jack-ffado-buffersize.patch b/jack-ffado-buffersize.patch deleted file mode 100644 index 0dbc2ea..0000000 --- a/jack-ffado-buffersize.patch +++ /dev/null @@ -1,230 +0,0 @@ -diff -rupN jack-1.9.8.old/linux/firewire/JackFFADODriver.cpp jack-1.9.8/linux/firewire/JackFFADODriver.cpp ---- jack-1.9.8.old/linux/firewire/JackFFADODriver.cpp 2011-12-19 06:54:27.000000000 -0500 -+++ jack-1.9.8/linux/firewire/JackFFADODriver.cpp 2012-03-25 01:38:58.246513167 -0400 -@@ -3,6 +3,7 @@ Copyright (C) 2001 Paul Davis - Copyright (C) 2004 Grame - Copyright (C) 2007 Pieter Palmers - Copyright (C) 2009 Devin Anderson -+Copyright (C) 2012 Jonathan Woithe, Adrian Knoth - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -45,10 +46,20 @@ Foundation, Inc., 675 Mass Ave, Cambridg - #include "JackCompilerDeps.h" - #include "JackLockedEngine.h" - -+// FFADO_API_VERSION was first defined with API_VERSION 9, so all previous -+// headers do not provide this define. -+#ifndef FFADO_API_VERSION -+extern "C" int ffado_streaming_set_period_size(ffado_device_t *dev, -+ unsigned int period) __attribute__((__weak__)); -+#endif -+ - namespace Jack - { - -+// Basic functionality requires API version 8. If version 9 or later -+// is present the buffers can be resized at runtime. - #define FIREWIRE_REQUIRED_FFADO_API_VERSION 8 -+#define FIREWIRE_REQUIRED_FFADO_API_VERSION_FOR_SETBUFSIZE 9 - - #define jack_get_microseconds GetMicroSeconds - -@@ -253,22 +264,96 @@ JackFFADODriver::ffado_driver_restart (f - return Start(); - } - -+void -+JackFFADODriver::UpdateLatencies(void) -+{ -+ jack_latency_range_t range; -+ ffado_driver_t* driver = (ffado_driver_t*)fDriver; -+ -+ for (int i = 0; i < fCaptureChannels; i++) { -+ range.min = range.max = driver->period_size + driver->capture_frame_latency; -+ fGraphManager->GetPort(fCapturePortList[i])->SetLatencyRange(JackCaptureLatency, &range); -+ } -+ -+ for (int i = 0; i < fPlaybackChannels; i++) { -+ // Add one buffer more latency if "async" mode is used... -+ range.min = range.max = (driver->period_size * -+ (driver->device_options.nb_buffers - 1)) + -+ ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; -+ fGraphManager->GetPort(fPlaybackPortList[i])->SetLatencyRange(JackPlaybackLatency, &range); -+ // Monitor port -+ if (fWithMonitorPorts) { -+ range.min = range.max =driver->period_size; -+ fGraphManager->GetPort(fMonitorPortList[i])->SetLatencyRange(JackCaptureLatency, &range); -+ } -+ } -+} -+ - int - JackFFADODriver::SetBufferSize (jack_nframes_t nframes) - { -- printError("Buffer size change requested but not supported!!!"); -+ ffado_driver_t* driver = (ffado_driver_t*)fDriver; -+ signed int chn; -+ -+ // The speed of this function isn't critical; we can afford the -+ // time to check the FFADO API version. -+ if (ffado_get_api_version() < FIREWIRE_REQUIRED_FFADO_API_VERSION_FOR_SETBUFSIZE || -+ ffado_streaming_set_period_size == NULL) { -+ printError("unsupported on current version of FFADO; please upgrade FFADO"); -+ return -1; -+ } - -- /* - driver->period_size = nframes; - driver->period_usecs = - (jack_time_t) floor ((((float) nframes) / driver->sample_rate) - * 1000000.0f); -- */ -+ -+ -+ // Reallocate the null and scratch buffers. -+ driver->nullbuffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(ffado_sample_t)); -+ if(driver->nullbuffer == NULL) { -+ printError("could not allocate memory for null buffer"); -+ return -1; -+ } -+ driver->scratchbuffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(ffado_sample_t)); -+ if(driver->scratchbuffer == NULL) { -+ printError("could not allocate memory for scratch buffer"); -+ return -1; -+ } -+ -+ // MIDI buffers need reallocating -+ for (chn = 0; chn < driver->capture_nchannels; chn++) { -+ if(driver->capture_channels[chn].stream_type == ffado_stream_type_midi) { -+ // setup the midi buffer -+ if (driver->capture_channels[chn].midi_buffer != NULL) -+ free(driver->capture_channels[chn].midi_buffer); -+ driver->capture_channels[chn].midi_buffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(uint32_t)); -+ } -+ } -+ for (chn = 0; chn < driver->playback_nchannels; chn++) { -+ if(driver->playback_channels[chn].stream_type == ffado_stream_type_midi) { -+ if (driver->playback_channels[chn].midi_buffer != NULL) -+ free(driver->playback_channels[chn].midi_buffer); -+ driver->playback_channels[chn].midi_buffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(uint32_t)); -+ } -+ } -+ -+ // Notify FFADO of the period size change -+ if (ffado_streaming_set_period_size(driver->dev, nframes) != 0) { -+ printError("could not alter FFADO device period size"); -+ return -1; -+ } -+ -+ // This is needed to give the shadow variables a chance to -+ // properly update to the changes. -+ sleep(1); - - /* tell the engine to change its buffer size */ -- //driver->engine->set_buffer_size (driver->engine, nframes); -+ JackAudioDriver::SetBufferSize(nframes); // Generic change, never fails -+ -+ UpdateLatencies(); - -- return -1; // unsupported -+ return 0; - } - - typedef void (*JackDriverFinishFunction) (jack_driver_t *); -@@ -281,7 +366,7 @@ JackFFADODriver::ffado_driver_new (const - - assert(params); - -- if (ffado_get_api_version() != FIREWIRE_REQUIRED_FFADO_API_VERSION) { -+ if (ffado_get_api_version() < FIREWIRE_REQUIRED_FFADO_API_VERSION) { - printError("Incompatible libffado version! (%s)", ffado_get_version()); - return NULL; - } -@@ -349,7 +434,6 @@ int JackFFADODriver::Attach() - jack_port_id_t port_index; - char buf[REAL_JACK_PORT_NAME_SIZE]; - char portname[REAL_JACK_PORT_NAME_SIZE]; -- jack_latency_range_t range; - - ffado_driver_t* driver = (ffado_driver_t*)fDriver; - -@@ -435,8 +519,6 @@ int JackFFADODriver::Attach() - ffado_streaming_capture_stream_onoff(driver->dev, chn, 0); - - port = fGraphManager->GetPort(port_index); -- range.min = range.max = driver->period_size + driver->capture_frame_latency; -- port->SetLatencyRange(JackCaptureLatency, &range); - // capture port aliases (jackd1 style port names) - snprintf(buf, sizeof(buf), "%s:capture_%i", fClientControl.fName, (int) chn + 1); - port->SetAlias(buf); -@@ -466,9 +548,6 @@ int JackFFADODriver::Attach() - // setup the midi buffer - driver->capture_channels[chn].midi_buffer = (uint32_t *)calloc(driver->period_size, sizeof(uint32_t)); - -- port = fGraphManager->GetPort(port_index); -- range.min = range.max = driver->period_size + driver->capture_frame_latency; -- port->SetLatencyRange(JackCaptureLatency, &range); - fCapturePortList[chn] = port_index; - jack_log("JackFFADODriver::Attach fCapturePortList[i] %ld ", port_index); - fCaptureChannels++; -@@ -512,8 +591,6 @@ int JackFFADODriver::Attach() - - port = fGraphManager->GetPort(port_index); - // Add one buffer more latency if "async" mode is used... -- range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; -- port->SetLatencyRange(JackPlaybackLatency, &range); - // playback port aliases (jackd1 style port names) - snprintf(buf, sizeof(buf), "%s:playback_%i", fClientControl.fName, (int) chn + 1); - port->SetAlias(buf); -@@ -548,9 +625,6 @@ int JackFFADODriver::Attach() - - driver->playback_channels[chn].midi_buffer = (uint32_t *)calloc(driver->period_size, sizeof(uint32_t)); - -- port = fGraphManager->GetPort(port_index); -- range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency; -- port->SetLatencyRange(JackPlaybackLatency, &range); - fPlaybackPortList[chn] = port_index; - jack_log("JackFFADODriver::Attach fPlaybackPortList[i] %ld ", port_index); - fPlaybackChannels++; -@@ -559,6 +633,8 @@ int JackFFADODriver::Attach() - } - } - -+ UpdateLatencies(); -+ - assert(fCaptureChannels < DRIVER_PORT_NUM); - assert(fPlaybackChannels < DRIVER_PORT_NUM); - -diff -rupN jack-1.9.8.old/linux/firewire/JackFFADODriver.h jack-1.9.8/linux/firewire/JackFFADODriver.h ---- jack-1.9.8.old/linux/firewire/JackFFADODriver.h 2011-12-19 06:54:27.000000000 -0500 -+++ jack-1.9.8/linux/firewire/JackFFADODriver.h 2012-03-25 01:38:05.708754669 -0400 -@@ -2,6 +2,7 @@ - Copyright (C) 2001 Paul Davis - Copyright (C) 2004 Grame - Copyright (C) 2007 Pieter Palmers -+Copyright (C) 2012 Adrian Knoth - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -59,6 +60,7 @@ class JackFFADODriver : public JackAudio - - void jack_driver_init (jack_driver_t *driver); - void jack_driver_nt_init (jack_driver_nt_t * driver); -+ void UpdateLatencies(); - - public: - -@@ -80,6 +82,12 @@ class JackFFADODriver : public JackAudio - int Read(); - int Write(); - -+ // BufferSize can be changed -+ bool IsFixedBufferSize() -+ { -+ return false; -+ } -+ - int SetBufferSize(jack_nframes_t nframes); - }; - diff --git a/jack-fix-connect-segfault.patch b/jack-fix-connect-segfault.patch deleted file mode 100644 index 4bb8b32..0000000 --- a/jack-fix-connect-segfault.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 00280570af529e4a54009bd5c6aeeab05286efcf Mon Sep 17 00:00:00 2001 -From: Adrian Knoth -Date: Thu, 8 Mar 2012 21:54:22 +0100 -Subject: [PATCH] Fix segfault in jack_connect - -When jack_connect is called without any argument, it causes a segfault -in - - snprintf( portA, sizeof(portA), "%s", argv[argc-1] ); - snprintf( portB, sizeof(portB), "%s", argv[argc-2] ); - -Reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662199 ---- - example-clients/connect.c | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) - -diff --git a/example-clients/connect.c b/example-clients/connect.c -index 5ed112b..0f4f8be 100644 ---- a/example-clients/connect.c -+++ b/example-clients/connect.c -@@ -128,7 +128,10 @@ void port_connect_callback(jack_port_id_t a, jack_port_id_t b, int connect, void - return 1; - } - -- if (argc < 3) show_usage(my_name); -+ if (argc < 3) { -+ show_usage(my_name); -+ return 1; -+ } - - /* try to become a client of the JACK server */ - --- -1.7.5.4 - diff --git a/jack-portnames.patch b/jack-portnames.patch new file mode 100644 index 0000000..0534045 --- /dev/null +++ b/jack-portnames.patch @@ -0,0 +1,447 @@ + 1.) Human-readable portnames on larger cards where "playback_56" is + simply to cumbersome to figure out what's actually connected + 2.) People who travel with ADAT-ADCs/DACs, but connect them via + different interfaces in different locations, e.g. a Multiface + when on the road and a RayDat when in the studio. Despite the + different cards, the port names and hence any ardour session + would remain intact. + http://adi.loris.tv/jackd2-portnames.png + alsa_pcm:hw:1,0:out1 + system:capture_1 + alsa_pcm:hw:1,0:out2 + system:capture_2 +--- /dev/null ++++ b/linux/alsa/port_names.c +@@ -0,0 +1,179 @@ ++/* -*- mode: c; c-file-style: "linux"; -*- */ ++/* ++ Copyright (C) 2010 Florian Faber, faber@faberman.de ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++*/ ++ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "alsa_driver.h" ++ ++ ++static int port_names_load_portfile(alsa_driver_t *driver, const char *filename, char **buf, const unsigned int offset, const unsigned int num) { ++ int fh, i, ret, lineno, id, res=0; ++ char line[256]; ++ ++ printf("Trying to load portnames from %s\n", filename); ++ fh = open(filename, O_RDONLY); ++ if (-1!=fh) { ++ res = 1; ++ i = 0; ++ lineno = 1; ++ for (;;) { ++ ret = read(fh, &line[i], 1); ++ if (0==ret) { ++ break; ++ } else if (-1==ret) { ++ sprintf(stderr, "Error while reading \"%s\": %s", filename, strerror(errno)); ++ break; ++ } ++ if (0x0A==line[i]) { ++ /* new line, parse input */ ++ line[i] = 0; ++ ++ if ('#' != line[0]) { ++ i=0; ++ while ((i<255) && (line[i]!='=')) i++; ++ if (255==i) { ++ sprintf(stderr, "Error while reading \"%s\": Line %d has no key=value syntax!", filename, lineno); ++ } else { ++ line[i] = 0; ++ id = atoi(line); ++ if ((id>=1) && (id<=num)) { ++ if (NULL==buf[id-1+offset]) { ++ /* don't overwrite existing names */ ++ buf[id-1+offset] = strdup(&line[i+1]); ++ } ++ } else { ++ sprintf(stderr, "Error while reading \"%s\": Key %d out of range in line %d (1..%d)", filename, id, lineno, num); ++ } ++ } ++ } ++ ++ i = 0; ++ lineno++; ++ } else { ++ i++; ++ if (i==255) { ++ sprintf(stderr, "Error while reading \"%s\": Line %d is too long", filename, lineno); ++ break; ++ } ++ } ++ } ++ ++ (void) close(fh); ++ } ++ ++ return res; ++} ++ ++ ++static void port_names_default_portnames(char **buf, const unsigned int offset, const unsigned int num, const char *defaultname) { ++ unsigned int i; ++ char line[256]; ++ ++ /* Fill in default names */ ++ for (i=0; iframe_rate > 96000) { ++ speed="qs"; ++ } else if (driver->frame_rate > 48000) { ++ speed="ds"; ++ } else { ++ speed="ss"; ++ } ++ ++ snd_ctl_card_info_alloca(&card_info); ++ err = snd_ctl_card_info(driver->ctl_handle, card_info); ++ if (err >= 0) { ++ card_name = snd_ctl_card_info_get_name(card_info); ++ } else { ++ card_name = "noname"; ++ } ++ ++ buf = malloc(sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); ++ if (NULL==buf) { ++ sprintf(stderr, "ALSA: Not enough memory for %d port names", driver->capture_nchannels + driver->playback_nchannels); ++ return NULL; ++ } ++ bzero(buf, sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); ++ ++ /* Read port names from special to general: ++ * Begin with user and speed specific port names */ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.in", getenv("HOME"), card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* Now user general */ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.in", getenv("HOME"), card_name); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* System speed specific */ ++ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.in", card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* System general */ ++ snprintf(filename, 255, "/etc/jack/cards/%s.ports.in", card_name); ++ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); ++ ++ /* Fill all still unnamed ports with default names */ ++ port_names_default_portnames(buf, 0, driver->capture_nchannels, "capture_%lu"); ++ ++ ++ /* Same procedure for the playback channels */ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.out", getenv("HOME"), card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.out", getenv("HOME"), card_name); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.out", card_name, speed); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ snprintf(filename, 255, "/etc/jack/cards/%s.ports.out", card_name); ++ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); ++ ++ port_names_default_portnames(buf, driver->capture_nchannels, driver->playback_nchannels, "playback_%lu"); ++ ++ return buf; ++} +--- /dev/null ++++ b/linux/alsa/port_names.h +@@ -0,0 +1,34 @@ ++/* ++ Copyright (C) 2010 Florian Faber, faber@faberman.de ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++*/ ++ ++#ifndef __jack_port_names_h__ ++#define __jack_port_names_h__ ++ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++ ++char** port_names_get_portnames(alsa_driver_t *driver); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __jack_port_names_h__ */ +--- a/linux/alsa/JackAlsaDriver.cpp ++++ b/linux/alsa/JackAlsaDriver.cpp +@@ -42,6 +42,7 @@ + #include "JackPosixThread.h" + #include "JackCompilerDeps.h" + #include "JackServerGlobals.h" ++#include "port_names.h" + + namespace Jack + { +@@ -97,6 +98,8 @@ + unsigned long port_flags = (unsigned long)CaptureDriverFlags; + char name[REAL_JACK_PORT_NAME_SIZE]; + char alias[REAL_JACK_PORT_NAME_SIZE]; ++ char old_name[REAL_JACK_PORT_NAME_SIZE]; ++ char **portnames; + + assert(fCaptureChannels < DRIVER_PORT_NUM); + assert(fPlaybackChannels < DRIVER_PORT_NUM); +@@ -112,13 +115,17 @@ + + jack_log("JackAlsaDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); + ++ portnames = port_names_get_portnames(alsa_driver); ++ + for (int i = 0; i < fCaptureChannels; i++) { + snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1); +- snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1); ++ snprintf(old_name, sizeof(old_name), "%s:capture_%d", fClientControl.fName, i + 1); ++ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i]); + if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { + jack_error("driver: cannot register port for %s", name); + return -1; + } ++ free(portnames[i]); + port = fGraphManager->GetPort(port_index); + port->SetAlias(alias); + fCapturePortList[i] = port_index; +@@ -129,11 +136,13 @@ + + for (int i = 0; i < fPlaybackChannels; i++) { + snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1); +- snprintf(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1); ++ snprintf(old_name, sizeof(old_name), "%s:playback_%d", fClientControl.fName, i + 1); ++ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i+fCaptureChannels]); + if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { + jack_error("driver: cannot register port for %s", name); + return -1; + } ++ free(portnames[i+fCaptureChannels]); + port = fGraphManager->GetPort(port_index); + port->SetAlias(alias); + fPlaybackPortList[i] = port_index; +@@ -151,6 +160,8 @@ + } + } + ++ free(portnames); ++ + UpdateLatencies(); + + if (alsa_driver->midi) { +--- a/linux/wscript ++++ b/linux/wscript +@@ -55,6 +55,7 @@ + 'alsa/hdsp.c', + 'alsa/alsa_driver.c', + 'alsa/hammerfall.c', ++ 'alsa/port_names.c', + 'alsa/ice1712.c' + ] + + alsa_pcm:hw:1,0:out1 + system:capture_1 + alsa_pcm:hw:1,0:out2 + system:capture_2 + alsa_pcm:hw:1,0:out3 + system:capture_3 + alsa_pcm:hw:1,0:out4 + system:capture_4 + alsa_pcm:hw:1,0:out5 + system:capture_5 + alsa_pcm:hw:1,0:out6 + system:capture_6 + alsa_pcm:hw:1,0:out7 + system:capture_7 + alsa_pcm:hw:1,0:out8 + system:capture_8 + alsa_pcm:hw:1,0:out9 + system:capture_9 + alsa_pcm:hw:1,0:out10 + system:capture_10 + alsa_pcm:hw:1,0:out11 + system:capture_11 + alsa_pcm:hw:1,0:out12 + system:capture_12 + alsa_pcm:hw:1,0:out13 + system:capture_13 + alsa_pcm:hw:1,0:out14 + system:capture_14 + alsa_pcm:hw:1,0:out15 + system:capture_15 + alsa_pcm:hw:1,0:out16 + system:capture_16 + alsa_pcm:hw:1,0:out17 + system:capture_17 + alsa_pcm:hw:1,0:out18 + system:capture_18 + alsa_pcm:hw:1,0:out19 + system:capture_19 + alsa_pcm:hw:1,0:out20 + system:capture_20 + alsa_pcm:hw:1,0:out21 + system:capture_21 + alsa_pcm:hw:1,0:out22 + system:capture_22 + alsa_pcm:hw:1,0:out23 + system:capture_23 + alsa_pcm:hw:1,0:out24 + system:capture_24 + alsa_pcm:hw:1,0:out25 + system:capture_25 + alsa_pcm:hw:1,0:out26 + system:capture_26 + alsa_pcm:hw:1,0:out27 + system:capture_27 + alsa_pcm:hw:1,0:out28 + system:capture_28 + alsa_pcm:hw:1,0:out29 + system:capture_29 + alsa_pcm:hw:1,0:out30 + system:capture_30 + alsa_pcm:hw:1,0:out31 + system:capture_31 + alsa_pcm:hw:1,0:out32 + system:capture_32 + alsa_pcm:hw:1,0:out33 + system:capture_33 + alsa_pcm:hw:1,0:out34 + system:capture_34 + alsa_pcm:hw:1,0:out35 + system:capture_35 + alsa_pcm:hw:1,0:out36 + system:capture_36 + alsa_pcm:hw:1,0:in1 + system:playback_1 + alsa_pcm:hw:1,0:in2 + system:playback_2 + alsa_pcm:hw:1,0:in3 + system:playback_3 + alsa_pcm:hw:1,0:in4 + system:playback_4 + alsa_pcm:hw:1,0:in5 + system:playback_5 + alsa_pcm:hw:1,0:in6 + system:playback_6 + alsa_pcm:hw:1,0:in7 + system:playback_7 + alsa_pcm:hw:1,0:in8 + system:playback_8 + alsa_pcm:hw:1,0:in9 + system:playback_9 + alsa_pcm:hw:1,0:in10 + system:playback_10 + alsa_pcm:hw:1,0:in11 + system:playback_11 + alsa_pcm:hw:1,0:in12 + system:playback_12 + alsa_pcm:hw:1,0:in13 + system:playback_13 + alsa_pcm:hw:1,0:in14 + system:playback_14 + alsa_pcm:hw:1,0:in15 + system:playback_15 + alsa_pcm:hw:1,0:in16 + system:playback_16 + alsa_pcm:hw:1,0:in17 + system:playback_17 + alsa_pcm:hw:1,0:in18 + system:playback_18 + alsa_pcm:hw:1,0:in19 + system:playback_19 + alsa_pcm:hw:1,0:in20 + system:playback_20 + alsa_pcm:hw:1,0:in21 + system:playback_21 + alsa_pcm:hw:1,0:in22 + system:playback_22 + alsa_pcm:hw:1,0:in23 + system:playback_23 + alsa_pcm:hw:1,0:in24 + system:playback_24 + alsa_pcm:hw:1,0:in25 + system:playback_25 + alsa_pcm:hw:1,0:in26 + system:playback_26 + alsa_pcm:hw:1,0:in27 + system:playback_27 + alsa_pcm:hw:1,0:in28 + system:playback_28 + alsa_pcm:hw:1,0:in29 + system:playback_29 + alsa_pcm:hw:1,0:in30 + system:playback_30 + alsa_pcm:hw:1,0:in31 + system:playback_31 + alsa_pcm:hw:1,0:in32 + system:playback_32 + alsa_pcm:hw:1,0:in33 + system:playback_33 + alsa_pcm:hw:1,0:in34 + system:playback_34 + alsa_pcm:hw:1,0:in35 + system:playback_35 + alsa_pcm:hw:1,0:in36 + system:playback_36 diff --git a/jack-realtime-compat.patch b/jack-realtime-compat.patch index 9be6924..05cc0fe 100644 --- a/jack-realtime-compat.patch +++ b/jack-realtime-compat.patch @@ -1,24 +1,58 @@ -diff -rupN jack-1.9.8.old/common/JackControlAPI.cpp jack-1.9.8/common/JackControlAPI.cpp ---- jack-1.9.8.old/common/JackControlAPI.cpp 2011-12-19 06:54:02.000000000 -0500 -+++ jack-1.9.8/common/JackControlAPI.cpp 2012-04-07 15:04:06.882823048 -0400 -@@ -678,7 +678,7 @@ SERVER_EXPORT jackctl_server_t * jackctl +diff -rupN jack-1.9.9.5.old/common/JackControlAPI.cpp jack-1.9.9.5/common/JackControlAPI.cpp +--- jack-1.9.9.5.old/common/JackControlAPI.cpp 2012-12-10 04:26:56.000000000 -0500 ++++ jack-1.9.9.5/common/JackControlAPI.cpp 2012-12-15 21:40:01.639927082 -0500 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include "jslist.h" + #include "driver_interface.h" +@@ -756,7 +757,14 @@ SERVER_EXPORT jackctl_server_t * jackctl goto fail_free_parameters; } - value.i = 10; -+ value.i = 60; ++ struct utsname utsname; ++ int success; ++ success = uname( &utsname ); ++ if( success == 0 && strstr( utsname.version, "PREEMPT RT" ) ) ++ value.i = 60; ++ else ++ value.i = 20; ++ if (jackctl_add_parameter( &server_ptr->parameters, "realtime-priority", -diff -rupN jack-1.9.8.old/common/JackServerGlobals.cpp jack-1.9.8/common/JackServerGlobals.cpp ---- jack-1.9.8.old/common/JackServerGlobals.cpp 2011-12-19 06:54:02.000000000 -0500 -+++ jack-1.9.8/common/JackServerGlobals.cpp 2012-04-07 15:05:11.841498738 -0400 -@@ -98,7 +98,7 @@ bool JackServerGlobals::Init() +diff -rupN jack-1.9.9.5.old/common/JackServerGlobals.cpp jack-1.9.9.5/common/JackServerGlobals.cpp +--- jack-1.9.9.5.old/common/JackServerGlobals.cpp 2012-12-10 04:26:56.000000000 -0500 ++++ jack-1.9.9.5/common/JackServerGlobals.cpp 2012-12-15 21:45:43.793194190 -0500 +@@ -23,6 +23,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg + #include "shm.h" + #include + #include ++#include + + static char* server_name = NULL; + +@@ -96,9 +97,18 @@ void JackServerGlobals::Delete() + + bool JackServerGlobals::Init() { ++ struct utsname utsname; ++ int success; ++ success = uname( &utsname ); ++ int realtime = 0; int client_timeout = 0; /* msecs; if zero, use period size. */ - int realtime_priority = 10; -+ int realtime_priority = 60; ++ int realtime_priority; ++ if( success == 0 && strstr( utsname.version, "PREEMPT RT" ) ) ++ realtime_priority = 60; ++ else ++ realtime_priority = 20; ++ int verbose_aux = 0; - int do_mlock = 1; unsigned int port_max = 128; + int temporary = 0; diff --git a/sources b/sources index edccc32..3d602e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1dd2ff054cab79dfc11d134756f27165 jack-1.9.8.tgz +6c9de6b89db9d7076fa2ce222816cf4c jack-1.9.9.5.tar.bz2 From cb2ad0611262e391055f3f5590513d32257e5d4e Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Fri, 8 Feb 2013 23:32:54 -0500 Subject: [PATCH 073/107] rebuilt with opus support on Fedora > 18 --- jack-audio-connection-kit.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 05050d4..0266bbc 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.9.5 -Release: 1%{?dist} +Release: 2%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -39,8 +39,9 @@ BuildRequires: libffado-devel BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel BuildRequires: ncurses-devel -# We are waiting for RHBZ#887530 to enable opus support -#BuildRequires: opus-devel +%if 0%{fedora} > 18 +BuildRequires: opus-devel +%endif BuildRequires: pkgconfig BuildRequires: python2 BuildRequires: readline-devel @@ -249,6 +250,9 @@ exit 0 %changelog +* Fri Feb 08 2013 Orcan Ogetbil - 1.9.9.5-2 +- rebuilt with opus support on Fedora > 18 + * Tue Dec 25 2012 Orcan Ogetbil - 1.9.9.5-1 - update to 1.9.9.5 From dd36d4d30ba3464865067bc9997f3f3c30323966 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 15:11:15 -0500 Subject: [PATCH 074/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 0266bbc..18b3ff3 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.9.5 -Release: 2%{?dist} +Release: 3%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -250,6 +250,9 @@ exit 0 %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 1.9.9.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri Feb 08 2013 Orcan Ogetbil - 1.9.9.5-2 - rebuilt with opus support on Fedora > 18 From 7d5ac932f9fad67a5cf657e351bb0b89e08c17cf Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 24 Feb 2014 15:53:23 +0000 Subject: [PATCH 075/107] - Drop celt support, should use opus by default as it's long replaced it and it has better quality. The upstream celt library has been long replaced by opus. Opus is under active development under asigned RFC 6716 which means since the RFC has been promoted to final it's now a stable bit stream. Opus has been enabled since Fedora 18 which is now obsolete and opus is avaialble in EPEL - Re-enable firewire (libffado) support on ARMv7 --- jack-audio-connection-kit.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 18b3ff3..3e139d3 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -4,7 +4,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.9.5 -Release: 3%{?dist} +Release: 4%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -30,18 +30,15 @@ Patch6: jack-ppc64-long.patch BuildRequires: alsa-lib-devel BuildRequires: dbus-devel -BuildRequires: celt-devel BuildRequires: doxygen BuildRequires: expat-devel -%ifnarch s390 s390x %{arm} +%ifnarch s390 s390x BuildRequires: libffado-devel %endif BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel BuildRequires: ncurses-devel -%if 0%{fedora} > 18 BuildRequires: opus-devel -%endif BuildRequires: pkgconfig BuildRequires: python2 BuildRequires: readline-devel @@ -116,7 +113,7 @@ export PREFIX=%{_prefix} --doxygen \ --dbus \ --classic \ -%ifnarch s390 s390x %{arm} +%ifnarch s390 s390x --firewire \ %endif --alsa \ @@ -250,6 +247,10 @@ exit 0 %changelog +* Mon Feb 24 2014 Peter Robinson 1.9.9.5-4 +- Drop celt support, should use opus by default as it's long replaced it and it has better quality +- Re-enable firewire (libffado) support on ARMv7 + * Sat Aug 03 2013 Fedora Release Engineering - 1.9.9.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From c3c7ad330783c78462e80c83f4be73cef9289c5f Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Wed, 26 Mar 2014 18:08:49 +0100 Subject: [PATCH 076/107] Adding bootstrap support to break libffado dependency loops --- jack-audio-connection-kit.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 3e139d3..993ac79 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -1,10 +1,17 @@ +# set bootstrap to 1 in order to break the initial libffado loop +# +# libffado -> PyQt4 -> phonon -> phonon-backend-gstreamer -> +# -> gstreamer-plugins-good -> jack-audio-connection-kit -> libffado +# +%global bootstrap 0 + %global groupname jackuser %global pagroup pulse-rt Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.9.5 -Release: 4%{?dist} +Release: 5%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -33,8 +40,10 @@ BuildRequires: dbus-devel BuildRequires: doxygen BuildRequires: expat-devel %ifnarch s390 s390x +%if !0%{?bootstrap} BuildRequires: libffado-devel %endif +%endif BuildRequires: libsamplerate-devel BuildRequires: libsndfile-devel BuildRequires: ncurses-devel @@ -114,7 +123,9 @@ export PREFIX=%{_prefix} --dbus \ --classic \ %ifnarch s390 s390x +%if !0%{?bootstrap} --firewire \ +%endif %endif --alsa \ --clients 256 \ @@ -247,6 +258,9 @@ exit 0 %changelog +* Wed Mar 26 2014 Jaromir Capik - 1.9.9.5-5 +- Adding bootstrap support to break libffado dependency loops + * Mon Feb 24 2014 Peter Robinson 1.9.9.5-4 - Drop celt support, should use opus by default as it's long replaced it and it has better quality - Re-enable firewire (libffado) support on ARMv7 From 49cde4319e5dcc2598918a0c61b4230e4a92eef0 Mon Sep 17 00:00:00 2001 From: Brendan Jones Date: Sun, 4 May 2014 12:30:01 +0200 Subject: [PATCH 077/107] Fix aarch64 build error --- ...io-connection-kit-alpha_ia64-sigsegv.patch | 30 +++++++++++++++++++ jack-audio-connection-kit.spec | 8 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 jack-audio-connection-kit-alpha_ia64-sigsegv.patch diff --git a/jack-audio-connection-kit-alpha_ia64-sigsegv.patch b/jack-audio-connection-kit-alpha_ia64-sigsegv.patch new file mode 100644 index 0000000..24ea844 --- /dev/null +++ b/jack-audio-connection-kit-alpha_ia64-sigsegv.patch @@ -0,0 +1,30 @@ +From d11bb095291d8880508c87adfe625bf2bcab1456 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Tue, 5 Mar 2013 01:38:10 +0100 +Subject: [PATCH] Add support for aarch64 + +When compiling jack on aarch64, compilation fails because NGREGS is not +defined. Since this is only for debug output on segmentation faults, stub +the debug print out like it's been done for other platforms before. + +Signed-off-by: Alexander Graf +--- + dbus/sigsegv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c +index d41091c..64c3986 100644 +--- a/dbus/sigsegv.c ++++ b/dbus/sigsegv.c +@@ -104,7 +104,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) { + jack_error("info.si_errno = %d", info->si_errno); + jack_error("info.si_code = %d (%s)", info->si_code, si_code_str); + jack_error("info.si_addr = %p", info->si_addr); +-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) ++#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) + for(i = 0; i < NGREG; i++) + jack_error("reg[%02d] = 0x" REGFORMAT, i, + #if defined(__powerpc64__) +-- +1.9.1 + diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 993ac79..29089de 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.9.5 -Release: 5%{?dist} +Release: 6%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -34,6 +34,8 @@ Patch4: jack-realtime-compat.patch Patch5: jack-portnames.patch # Fix ppc64 mpd startup issue RHBZ#799552 Patch6: jack-ppc64-long.patch +# Fix aarch64 arm - see https://github.com/jackaudio/jack2/commit/d11bb09 +Patch7: jack-audio-connection-kit-alpha_ia64-sigsegv.patch BuildRequires: alsa-lib-devel BuildRequires: dbus-devel @@ -102,6 +104,7 @@ Small example clients that use the Jack Audio Connection Kit. %patch4 -p1 -b .priority %patch5 -p1 -b .portnames %patch6 -p1 -b .mpd +%patch7 -p1 -b .armsigsegv # Fix encoding issues for file in ChangeLog README TODO; do @@ -258,6 +261,9 @@ exit 0 %changelog +* Sun May 04 2014 Brendan Jones 1.9.9.5-6 +- Fix build on aarch64 - commit #d11bb09 + * Wed Mar 26 2014 Jaromir Capik - 1.9.9.5-5 - Adding bootstrap support to break libffado dependency loops From 9a6c782b9923af383ed4ebca2f6e0fdba822fda6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 18:01:17 -0500 Subject: [PATCH 078/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 29089de..83faddf 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.9.5 -Release: 6%{?dist} +Release: 7%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -261,6 +261,9 @@ exit 0 %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.9.9.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun May 04 2014 Brendan Jones 1.9.9.5-6 - Fix build on aarch64 - commit #d11bb09 From 51ba5e4593174f6e5d1e401157f66de9323280cb Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 22:06:16 +0000 Subject: [PATCH 079/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 83faddf..409eaf4 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.9.5 -Release: 7%{?dist} +Release: 8%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -261,6 +261,9 @@ exit 0 %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 1.9.9.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 1.9.9.5-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 6202400b470ae1fa6794b1ed621c075a21c42112 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sat, 29 Nov 2014 00:06:56 -0500 Subject: [PATCH 080/107] update to 1.9.10 --- .gitignore | 1 + ...io-connection-kit-alpha_ia64-sigsegv.patch | 30 -- jack-audio-connection-kit.spec | 25 +- jack-doxygen-buildfix.patch | 39 --- jack-portnames.patch | 302 +++++------------- sources | 2 +- 6 files changed, 88 insertions(+), 311 deletions(-) delete mode 100644 jack-audio-connection-kit-alpha_ia64-sigsegv.patch delete mode 100644 jack-doxygen-buildfix.patch diff --git a/.gitignore b/.gitignore index b0a228b..aa0298d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ jack-1.9.5.tar.bz2 /jack-1.9.7.tar.bz2 /jack-1.9.8.tgz /jack-1.9.9.5.tar.bz2 +/jack-1.9.10.tar.bz2 diff --git a/jack-audio-connection-kit-alpha_ia64-sigsegv.patch b/jack-audio-connection-kit-alpha_ia64-sigsegv.patch deleted file mode 100644 index 24ea844..0000000 --- a/jack-audio-connection-kit-alpha_ia64-sigsegv.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d11bb095291d8880508c87adfe625bf2bcab1456 Mon Sep 17 00:00:00 2001 -From: Alexander Graf -Date: Tue, 5 Mar 2013 01:38:10 +0100 -Subject: [PATCH] Add support for aarch64 - -When compiling jack on aarch64, compilation fails because NGREGS is not -defined. Since this is only for debug output on segmentation faults, stub -the debug print out like it's been done for other platforms before. - -Signed-off-by: Alexander Graf ---- - dbus/sigsegv.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c -index d41091c..64c3986 100644 ---- a/dbus/sigsegv.c -+++ b/dbus/sigsegv.c -@@ -104,7 +104,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) { - jack_error("info.si_errno = %d", info->si_errno); - jack_error("info.si_code = %d (%s)", info->si_code, si_code_str); - jack_error("info.si_addr = %p", info->si_addr); --#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) -+#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) - for(i = 0; i < NGREG; i++) - jack_error("reg[%02d] = 0x" REGFORMAT, i, - #if defined(__powerpc64__) --- -1.9.1 - diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 409eaf4..afdd7bd 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -10,8 +10,8 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 1.9.9.5 -Release: 8%{?dist} +Version: 1.9.10 +Release: 1%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -26,16 +26,12 @@ Patch0: jack-audio-connection-kit-no_date_footer.patch Patch1: jack-doxygen-output-dir-fix.patch # We don't want the internal API documentation Patch2: jack-apidoc-only.patch -# Fix doxygen doc build regression. From upstream trunk 95a1162d6aecc91 -Patch3: jack-doxygen-buildfix.patch # Adjust default priority. RHBZ#795094 -Patch4: jack-realtime-compat.patch +Patch3: jack-realtime-compat.patch # Enable renaming and reordering the jack ports RHBZ#887408 -Patch5: jack-portnames.patch +Patch4: jack-portnames.patch # Fix ppc64 mpd startup issue RHBZ#799552 -Patch6: jack-ppc64-long.patch -# Fix aarch64 arm - see https://github.com/jackaudio/jack2/commit/d11bb09 -Patch7: jack-audio-connection-kit-alpha_ia64-sigsegv.patch +Patch5: jack-ppc64-long.patch BuildRequires: alsa-lib-devel BuildRequires: dbus-devel @@ -100,11 +96,9 @@ Small example clients that use the Jack Audio Connection Kit. %patch0 -p1 -b .nodate %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi -%patch3 -p1 -b .doxyfix -%patch4 -p1 -b .priority -%patch5 -p1 -b .portnames -%patch6 -p1 -b .mpd -%patch7 -p1 -b .armsigsegv +%patch3 -p1 -b .priority +%patch4 -p1 -b .portnames +%patch5 -p1 -b .mpd # Fix encoding issues for file in ChangeLog README TODO; do @@ -261,6 +255,9 @@ exit 0 %changelog +* Fri Nov 28 2014 Orcan Ogetbil - 1.9.10-1 +- update to 1.9.10 + * Sat Aug 16 2014 Fedora Release Engineering - 1.9.9.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/jack-doxygen-buildfix.patch b/jack-doxygen-buildfix.patch deleted file mode 100644 index bfb5098..0000000 --- a/jack-doxygen-buildfix.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -rupN jack-1.9.9.5.old/wscript jack-1.9.9.5/wscript ---- jack-1.9.9.5.old/wscript 2012-12-10 04:26:57.000000000 -0500 -+++ jack-1.9.9.5/wscript 2012-12-16 23:29:44.629292671 -0500 -@@ -356,10 +356,11 @@ def build(bld): - bld.add_subdirs('dbus') - - if bld.env['BUILD_DOXYGEN_DOCS'] == True: -- share_dir = bld.env.get_destdir() + bld.env['PREFIX'] + '/share/jack-audio-connection-kit' - html_docs_source_dir = "build/default/html" -- html_docs_install_dir = share_dir + '/reference/html/' -- if Options.commands['install']: -+ if bld.cmd == 'install': -+ share_dir = bld.options.destdir + bld.env['PREFIX'] + '/share/jack-audio-connection-kit' -+ html_docs_install_dir = share_dir + '/reference/html/' -+ - if os.path.isdir(html_docs_install_dir): - Logs.pprint('CYAN', "Removing old doxygen documentation installation...") - shutil.rmtree(html_docs_install_dir) -@@ -367,17 +368,17 @@ def build(bld): - Logs.pprint('CYAN', "Installing doxygen documentation...") - shutil.copytree(html_docs_source_dir, html_docs_install_dir) - Logs.pprint('CYAN', "Installing doxygen documentation done.") -- elif Options.commands['uninstall']: -+ elif bld.cmd =='uninstall': - Logs.pprint('CYAN', "Uninstalling doxygen documentation...") - if os.path.isdir(share_dir): - shutil.rmtree(share_dir) - Logs.pprint('CYAN', "Uninstalling doxygen documentation done.") -- elif Options.commands['clean']: -+ elif bld.cmd =='clean': - if os.access(html_docs_source_dir, os.R_OK): - Logs.pprint('CYAN', "Removing doxygen generated documentation...") - shutil.rmtree(html_docs_source_dir) - Logs.pprint('CYAN', "Removing doxygen generated documentation done.") -- elif Options.commands['build']: -+ elif bld.cmd =='build': - if not os.access(html_docs_source_dir, os.R_OK): - os.popen("doxygen").read() - else: diff --git a/jack-portnames.patch b/jack-portnames.patch index 0534045..b9b70bb 100644 --- a/jack-portnames.patch +++ b/jack-portnames.patch @@ -1,18 +1,70 @@ - 1.) Human-readable portnames on larger cards where "playback_56" is - simply to cumbersome to figure out what's actually connected - 2.) People who travel with ADAT-ADCs/DACs, but connect them via - different interfaces in different locations, e.g. a Multiface - when on the road and a RayDat when in the studio. Despite the - different cards, the port names and hence any ardour session - would remain intact. - http://adi.loris.tv/jackd2-portnames.png - alsa_pcm:hw:1,0:out1 - system:capture_1 - alsa_pcm:hw:1,0:out2 - system:capture_2 ---- /dev/null -+++ b/linux/alsa/port_names.c -@@ -0,0 +1,179 @@ +diff -rupN jack-1.9.10.org/linux/alsa/JackAlsaDriver.cpp jack-1.9.10/linux/alsa/JackAlsaDriver.cpp +--- jack-1.9.10.org/linux/alsa/JackAlsaDriver.cpp 2014-07-18 08:28:12.000000000 -0400 ++++ jack-1.9.10/linux/alsa/JackAlsaDriver.cpp 2014-11-28 23:32:47.637032593 -0500 +@@ -46,6 +46,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg + #endif + #include "JackCompilerDeps.h" + #include "JackServerGlobals.h" ++#include "port_names.h" + + static struct jack_constraint_enum_str_descriptor midi_constraint_descr_array[] = + { +@@ -118,6 +119,8 @@ int JackAlsaDriver::Attach() + unsigned long port_flags = (unsigned long)CaptureDriverFlags; + char name[REAL_JACK_PORT_NAME_SIZE]; + char alias[REAL_JACK_PORT_NAME_SIZE]; ++ char old_name[REAL_JACK_PORT_NAME_SIZE]; ++ char **portnames; + + assert(fCaptureChannels < DRIVER_PORT_NUM); + assert(fPlaybackChannels < DRIVER_PORT_NUM); +@@ -133,13 +136,17 @@ int JackAlsaDriver::Attach() + + jack_log("JackAlsaDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); + ++ portnames = port_names_get_portnames(alsa_driver); ++ + for (int i = 0; i < fCaptureChannels; i++) { + snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1); +- snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1); ++ snprintf(old_name, sizeof(old_name), "%s:capture_%d", fClientControl.fName, i + 1); ++ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i]); + if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { + jack_error("driver: cannot register port for %s", name); + return -1; + } ++ free(portnames[i]); + port = fGraphManager->GetPort(port_index); + port->SetAlias(alias); + fCapturePortList[i] = port_index; +@@ -150,11 +157,13 @@ int JackAlsaDriver::Attach() + + for (int i = 0; i < fPlaybackChannels; i++) { + snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1); +- snprintf(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1); ++ snprintf(old_name, sizeof(old_name), "%s:playback_%d", fClientControl.fName, i + 1); ++ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i+fCaptureChannels]); + if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { + jack_error("driver: cannot register port for %s", name); + return -1; + } ++ free(portnames[i+fCaptureChannels]); + port = fGraphManager->GetPort(port_index); + port->SetAlias(alias); + fPlaybackPortList[i] = port_index; +@@ -172,6 +181,8 @@ int JackAlsaDriver::Attach() + } + } + ++ free(portnames); ++ + UpdateLatencies(); + + if (alsa_driver->midi) { +diff -rupN jack-1.9.10.org/linux/alsa/port_names.c jack-1.9.10/linux/alsa/port_names.c +--- jack-1.9.10.org/linux/alsa/port_names.c 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.10/linux/alsa/port_names.c 2014-11-28 23:32:47.636032597 -0500 +@@ -0,0 +1,179 @@ +/* -*- mode: c; c-file-style: "linux"; -*- */ +/* + Copyright (C) 2010 Florian Faber, faber@faberman.de @@ -192,9 +244,10 @@ + + return buf; +} ---- /dev/null -+++ b/linux/alsa/port_names.h -@@ -0,0 +1,34 @@ +diff -rupN jack-1.9.10.org/linux/alsa/port_names.h jack-1.9.10/linux/alsa/port_names.h +--- jack-1.9.10.org/linux/alsa/port_names.h 1969-12-31 19:00:00.000000000 -0500 ++++ jack-1.9.10/linux/alsa/port_names.h 2014-11-28 23:32:47.637032593 -0500 +@@ -0,0 +1,34 @@ +/* + Copyright (C) 2010 Florian Faber, faber@faberman.de + @@ -229,71 +282,10 @@ +#endif + +#endif /* __jack_port_names_h__ */ ---- a/linux/alsa/JackAlsaDriver.cpp -+++ b/linux/alsa/JackAlsaDriver.cpp -@@ -42,6 +42,7 @@ - #include "JackPosixThread.h" - #include "JackCompilerDeps.h" - #include "JackServerGlobals.h" -+#include "port_names.h" - - namespace Jack - { -@@ -97,6 +98,8 @@ - unsigned long port_flags = (unsigned long)CaptureDriverFlags; - char name[REAL_JACK_PORT_NAME_SIZE]; - char alias[REAL_JACK_PORT_NAME_SIZE]; -+ char old_name[REAL_JACK_PORT_NAME_SIZE]; -+ char **portnames; - - assert(fCaptureChannels < DRIVER_PORT_NUM); - assert(fPlaybackChannels < DRIVER_PORT_NUM); -@@ -112,13 +115,17 @@ - - jack_log("JackAlsaDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); - -+ portnames = port_names_get_portnames(alsa_driver); -+ - for (int i = 0; i < fCaptureChannels; i++) { - snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1); -- snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1); -+ snprintf(old_name, sizeof(old_name), "%s:capture_%d", fClientControl.fName, i + 1); -+ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i]); - if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { - jack_error("driver: cannot register port for %s", name); - return -1; - } -+ free(portnames[i]); - port = fGraphManager->GetPort(port_index); - port->SetAlias(alias); - fCapturePortList[i] = port_index; -@@ -129,11 +136,13 @@ - - for (int i = 0; i < fPlaybackChannels; i++) { - snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1); -- snprintf(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1); -+ snprintf(old_name, sizeof(old_name), "%s:playback_%d", fClientControl.fName, i + 1); -+ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i+fCaptureChannels]); - if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { - jack_error("driver: cannot register port for %s", name); - return -1; - } -+ free(portnames[i+fCaptureChannels]); - port = fGraphManager->GetPort(port_index); - port->SetAlias(alias); - fPlaybackPortList[i] = port_index; -@@ -151,6 +160,8 @@ - } - } - -+ free(portnames); -+ - UpdateLatencies(); - - if (alsa_driver->midi) { ---- a/linux/wscript -+++ b/linux/wscript -@@ -55,6 +55,7 @@ +diff -rupN jack-1.9.10.org/linux/wscript jack-1.9.10/linux/wscript +--- jack-1.9.10.org/linux/wscript 2014-07-18 08:28:13.000000000 -0400 ++++ jack-1.9.10/linux/wscript 2014-11-28 23:32:47.637032593 -0500 +@@ -62,6 +62,7 @@ def build(bld): 'alsa/hdsp.c', 'alsa/alsa_driver.c', 'alsa/hammerfall.c', @@ -301,147 +293,3 @@ 'alsa/ice1712.c' ] - alsa_pcm:hw:1,0:out1 - system:capture_1 - alsa_pcm:hw:1,0:out2 - system:capture_2 - alsa_pcm:hw:1,0:out3 - system:capture_3 - alsa_pcm:hw:1,0:out4 - system:capture_4 - alsa_pcm:hw:1,0:out5 - system:capture_5 - alsa_pcm:hw:1,0:out6 - system:capture_6 - alsa_pcm:hw:1,0:out7 - system:capture_7 - alsa_pcm:hw:1,0:out8 - system:capture_8 - alsa_pcm:hw:1,0:out9 - system:capture_9 - alsa_pcm:hw:1,0:out10 - system:capture_10 - alsa_pcm:hw:1,0:out11 - system:capture_11 - alsa_pcm:hw:1,0:out12 - system:capture_12 - alsa_pcm:hw:1,0:out13 - system:capture_13 - alsa_pcm:hw:1,0:out14 - system:capture_14 - alsa_pcm:hw:1,0:out15 - system:capture_15 - alsa_pcm:hw:1,0:out16 - system:capture_16 - alsa_pcm:hw:1,0:out17 - system:capture_17 - alsa_pcm:hw:1,0:out18 - system:capture_18 - alsa_pcm:hw:1,0:out19 - system:capture_19 - alsa_pcm:hw:1,0:out20 - system:capture_20 - alsa_pcm:hw:1,0:out21 - system:capture_21 - alsa_pcm:hw:1,0:out22 - system:capture_22 - alsa_pcm:hw:1,0:out23 - system:capture_23 - alsa_pcm:hw:1,0:out24 - system:capture_24 - alsa_pcm:hw:1,0:out25 - system:capture_25 - alsa_pcm:hw:1,0:out26 - system:capture_26 - alsa_pcm:hw:1,0:out27 - system:capture_27 - alsa_pcm:hw:1,0:out28 - system:capture_28 - alsa_pcm:hw:1,0:out29 - system:capture_29 - alsa_pcm:hw:1,0:out30 - system:capture_30 - alsa_pcm:hw:1,0:out31 - system:capture_31 - alsa_pcm:hw:1,0:out32 - system:capture_32 - alsa_pcm:hw:1,0:out33 - system:capture_33 - alsa_pcm:hw:1,0:out34 - system:capture_34 - alsa_pcm:hw:1,0:out35 - system:capture_35 - alsa_pcm:hw:1,0:out36 - system:capture_36 - alsa_pcm:hw:1,0:in1 - system:playback_1 - alsa_pcm:hw:1,0:in2 - system:playback_2 - alsa_pcm:hw:1,0:in3 - system:playback_3 - alsa_pcm:hw:1,0:in4 - system:playback_4 - alsa_pcm:hw:1,0:in5 - system:playback_5 - alsa_pcm:hw:1,0:in6 - system:playback_6 - alsa_pcm:hw:1,0:in7 - system:playback_7 - alsa_pcm:hw:1,0:in8 - system:playback_8 - alsa_pcm:hw:1,0:in9 - system:playback_9 - alsa_pcm:hw:1,0:in10 - system:playback_10 - alsa_pcm:hw:1,0:in11 - system:playback_11 - alsa_pcm:hw:1,0:in12 - system:playback_12 - alsa_pcm:hw:1,0:in13 - system:playback_13 - alsa_pcm:hw:1,0:in14 - system:playback_14 - alsa_pcm:hw:1,0:in15 - system:playback_15 - alsa_pcm:hw:1,0:in16 - system:playback_16 - alsa_pcm:hw:1,0:in17 - system:playback_17 - alsa_pcm:hw:1,0:in18 - system:playback_18 - alsa_pcm:hw:1,0:in19 - system:playback_19 - alsa_pcm:hw:1,0:in20 - system:playback_20 - alsa_pcm:hw:1,0:in21 - system:playback_21 - alsa_pcm:hw:1,0:in22 - system:playback_22 - alsa_pcm:hw:1,0:in23 - system:playback_23 - alsa_pcm:hw:1,0:in24 - system:playback_24 - alsa_pcm:hw:1,0:in25 - system:playback_25 - alsa_pcm:hw:1,0:in26 - system:playback_26 - alsa_pcm:hw:1,0:in27 - system:playback_27 - alsa_pcm:hw:1,0:in28 - system:playback_28 - alsa_pcm:hw:1,0:in29 - system:playback_29 - alsa_pcm:hw:1,0:in30 - system:playback_30 - alsa_pcm:hw:1,0:in31 - system:playback_31 - alsa_pcm:hw:1,0:in32 - system:playback_32 - alsa_pcm:hw:1,0:in33 - system:playback_33 - alsa_pcm:hw:1,0:in34 - system:playback_34 - alsa_pcm:hw:1,0:in35 - system:playback_35 - alsa_pcm:hw:1,0:in36 - system:playback_36 diff --git a/sources b/sources index 3d602e9..9e300b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6c9de6b89db9d7076fa2ce222816cf4c jack-1.9.9.5.tar.bz2 +4aeb91d7ae0cabce98355436ed4f217a jack-1.9.10.tar.bz2 From a52dc8c5a5747f5e8d4c9c7f8f59f58d84080470 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 12 May 2015 17:11:36 +0200 Subject: [PATCH 081/107] fix building with gcc5 --- jack-audio-connection-kit.spec | 8 +++++++- jack-gcc5.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 jack-gcc5.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index afdd7bd..b29fa0e 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 1%{?dist} +Release: 2%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -32,6 +32,8 @@ Patch3: jack-realtime-compat.patch Patch4: jack-portnames.patch # Fix ppc64 mpd startup issue RHBZ#799552 Patch5: jack-ppc64-long.patch +# Fix building with gcc5 +Patch6: jack-gcc5.patch BuildRequires: alsa-lib-devel BuildRequires: dbus-devel @@ -99,6 +101,7 @@ Small example clients that use the Jack Audio Connection Kit. %patch3 -p1 -b .priority %patch4 -p1 -b .portnames %patch5 -p1 -b .mpd +%patch6 -p1 -b .gcc5 # Fix encoding issues for file in ChangeLog README TODO; do @@ -255,6 +258,9 @@ exit 0 %changelog +* Tue May 12 2015 Nils Philippsen - 1.9.10-2 +- fix building with gcc5 + * Fri Nov 28 2014 Orcan Ogetbil - 1.9.10-1 - update to 1.9.10 diff --git a/jack-gcc5.patch b/jack-gcc5.patch new file mode 100644 index 0000000..f18042c --- /dev/null +++ b/jack-gcc5.patch @@ -0,0 +1,26 @@ +From d3c8e2d8d78899fba40a3e677ed4dbe388d82269 Mon Sep 17 00:00:00 2001 +From: Adrian Knoth +Date: Thu, 18 Sep 2014 18:29:23 +0200 +Subject: [PATCH] Fix FTBFS with clang++ + +Forwarded from http://bugs.debian.org/757820 +--- + common/memops.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/common/memops.c b/common/memops.c +index 27f6194..2d416b6 100644 +--- a/common/memops.c ++++ b/common/memops.c +@@ -198,7 +198,7 @@ static inline __m128i float_24_sse(__m128 s) + */ + static unsigned int seed = 22222; + +-inline unsigned int fast_rand() { ++static inline unsigned int fast_rand() { + seed = (seed * 96314165) + 907633515; + return seed; + } +-- +2.4.0 + From f98081e10d83f976f513161114c62555ebfe0b1d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 11:41:50 +0000 Subject: [PATCH 082/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index b29fa0e..8b40dbd 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 2%{?dist} +Release: 3%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -258,6 +258,9 @@ exit 0 %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.9.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Tue May 12 2015 Nils Philippsen - 1.9.10-2 - fix building with gcc5 From 78ae033b3a9de726b1b4e4984f8e1e0b6dfa3d82 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 00:45:08 +0000 Subject: [PATCH 083/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 8b40dbd..8d8636d 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 3%{?dist} +Release: 4%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -258,6 +258,9 @@ exit 0 %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1.9.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Fedora Release Engineering - 1.9.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 6f0d7a32334dc8c9fe03f91219c05b1ee69b6fa5 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sat, 13 Feb 2016 18:50:02 -0500 Subject: [PATCH 084/107] fix building with gcc6 --- jack-audio-connection-kit.spec | 9 ++++++++- jack-gcc6.patch | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 jack-gcc6.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 8d8636d..1c578eb 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 4%{?dist} +Release: 5%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -34,6 +34,9 @@ Patch4: jack-portnames.patch Patch5: jack-ppc64-long.patch # Fix building with gcc5 Patch6: jack-gcc5.patch +# Fix building with gcc6 +Patch7: jack-gcc6.patch + BuildRequires: alsa-lib-devel BuildRequires: dbus-devel @@ -102,6 +105,7 @@ Small example clients that use the Jack Audio Connection Kit. %patch4 -p1 -b .portnames %patch5 -p1 -b .mpd %patch6 -p1 -b .gcc5 +%patch7 -p1 -b .gcc6 # Fix encoding issues for file in ChangeLog README TODO; do @@ -258,6 +262,9 @@ exit 0 %changelog +* Sat Feb 13 2016 Orcan Ogetbil - 1.9.10-5 +- fix building with gcc6 + * Thu Feb 04 2016 Fedora Release Engineering - 1.9.10-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/jack-gcc6.patch b/jack-gcc6.patch new file mode 100644 index 0000000..098e08c --- /dev/null +++ b/jack-gcc6.patch @@ -0,0 +1,21 @@ +diff -rupN jack-1.9.10.org/tests/iodelay.cpp jack-1.9.10/tests/iodelay.cpp +--- jack-1.9.10.org/tests/iodelay.cpp 2014-07-18 08:28:13.000000000 -0400 ++++ jack-1.9.10/tests/iodelay.cpp 2016-02-13 18:38:33.280737975 -0500 +@@ -167,8 +167,8 @@ static jack_client_t *jack_handle; + static jack_port_t *jack_capt; + static jack_port_t *jack_play; + +-jack_latency_range_t capture_latency = {-1, -1}; +-jack_latency_range_t playback_latency = {-1, -1}; ++jack_latency_range_t capture_latency = {(jack_nframes_t)-1, (jack_nframes_t)-1}; ++jack_latency_range_t playback_latency = {(jack_nframes_t)-1, (jack_nframes_t)-1}; + + void + latency_cb (jack_latency_callback_mode_t mode, void *arg) +@@ -266,4 +266,4 @@ int main (int ac, char *av []) + return 0; + } + +-// -------------------------------------------------------------------------------- +\ No newline at end of file ++// -------------------------------------------------------------------------------- From fea62af7531a2a2b0b09bf5566cc314319d61340 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 12 Jan 2017 17:30:31 +0100 Subject: [PATCH 085/107] Rebuild for readline 7.x Signed-off-by: Igor Gnatenko --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 1c578eb..1003ec0 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 5%{?dist} +Release: 6%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -262,6 +262,9 @@ exit 0 %changelog +* Thu Jan 12 2017 Igor Gnatenko - 1.9.10-6 +- Rebuild for readline 7.x + * Sat Feb 13 2016 Orcan Ogetbil - 1.9.10-5 - fix building with gcc6 From fb710da2efdc817c2e43a2a8f9bf9bed04c98860 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 16:39:47 +0000 Subject: [PATCH 086/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 1003ec0..9e4f47f 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 6%{?dist} +Release: 7%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -262,6 +262,9 @@ exit 0 %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.9.10-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Jan 12 2017 Igor Gnatenko - 1.9.10-6 - Rebuild for readline 7.x From afcdf0f3b6b2da679c6f769e91489c855a7b0ffb Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Mon, 13 Feb 2017 20:42:24 -0500 Subject: [PATCH 087/107] fix building with gcc7 --- jack-audio-connection-kit.spec | 8 +++++++- jack-gcc7.patch | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 jack-gcc7.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 9e4f47f..fab1527 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 7%{?dist} +Release: 8%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -36,6 +36,8 @@ Patch5: jack-ppc64-long.patch Patch6: jack-gcc5.patch # Fix building with gcc6 Patch7: jack-gcc6.patch +# Fix building with gcc7 +Patch8: jack-gcc7.patch BuildRequires: alsa-lib-devel @@ -106,6 +108,7 @@ Small example clients that use the Jack Audio Connection Kit. %patch5 -p1 -b .mpd %patch6 -p1 -b .gcc5 %patch7 -p1 -b .gcc6 +%patch8 -p1 -b .gcc7 # Fix encoding issues for file in ChangeLog README TODO; do @@ -262,6 +265,9 @@ exit 0 %changelog +* Mon Feb 13 2017 Orcan Ogetbil - 1.9.10-8 +- fix building with gcc7 + * Fri Feb 10 2017 Fedora Release Engineering - 1.9.10-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/jack-gcc7.patch b/jack-gcc7.patch new file mode 100644 index 0000000..4dc43bd --- /dev/null +++ b/jack-gcc7.patch @@ -0,0 +1,12 @@ +diff -rupN jack-1.9.10.org/tests/test.cpp jack-1.9.10/tests/test.cpp +--- jack-1.9.10.org/tests/test.cpp 2014-07-18 08:28:13.000000000 -0400 ++++ jack-1.9.10/tests/test.cpp 2017-02-13 20:24:13.691773753 -0500 +@@ -480,7 +480,7 @@ int process4(jack_nframes_t nframes, voi + jack_nframes_t delta_time = cur_time - last_time; + + Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time); +- if (delta_time > 0 && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) { ++ if (delta_time > 0 && (jack_nframes_t)abs((int64_t)delta_time - cur_buffer_size) > tolerance) { + printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance); + } + From 433932989e2ace31bdb6045749c1eebcfd35bd95 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 13:50:39 +0000 Subject: [PATCH 088/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index fab1527..3e49933 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 8%{?dist} +Release: 9%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -265,6 +265,9 @@ exit 0 %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.9.10-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Mon Feb 13 2017 Orcan Ogetbil - 1.9.10-8 - fix building with gcc7 From c70c4ea91815dc164c04765841e8b7727370c8cc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 23:56:00 +0000 Subject: [PATCH 089/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 3e49933..f764630 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.10 -Release: 9%{?dist} +Release: 10%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -265,6 +265,9 @@ exit 0 %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.9.10-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From b41c83017e9d78e0dfa6ad2b2f55ac7b0d489e8a Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 21:39:30 +0100 Subject: [PATCH 090/107] version 1.9.12, update source URL --- .gitignore | 1 + jack-audio-connection-kit.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index aa0298d..d2ecb69 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ jack-1.9.5.tar.bz2 /jack-1.9.8.tgz /jack-1.9.9.5.tar.bz2 /jack-1.9.10.tar.bz2 +/jack2-1.9.12.tar.gz diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index f764630..0f138c8 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -10,13 +10,13 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit -Version: 1.9.10 -Release: 10%{?dist} +Version: 1.9.12 +Release: 1%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons URL: http://www.jackaudio.org -Source0: https://dl.dropbox.com/u/28869550/jack-%{version}.tar.bz2 +Source0: https://github.com/jackaudio/jack2/releases/download/v%{version}/jack2-%{version}.tar.gz Source1: %{name}-README.Fedora Source2: %{name}-script.pa Source3: %{name}-limits.conf @@ -98,7 +98,7 @@ Requires: %{name} = %{version}-%{release} Small example clients that use the Jack Audio Connection Kit. %prep -%setup -q -n jack-%{version} +%setup -q -n jack2-%{version} %patch0 -p1 -b .nodate %patch1 -p1 -b .outdir @@ -265,6 +265,10 @@ exit 0 %changelog +* Tue Dec 26 2017 Nils Philippsen - 1.9.12-1 +- version 1.9.12 +- update source URL + * Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index 9e300b9..32c137d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4aeb91d7ae0cabce98355436ed4f217a jack-1.9.10.tar.bz2 +SHA512 (jack2-1.9.12.tar.gz) = f0271dfc8f8e2f2489ca52f431ad4fa420665816d6c67a01a76da1d4b5ae91f6dad8c4e3309ec5e0c159c9d312ed56021ab323d74bce828ace26f1b8d477ddfa From 48aebe207bed4d1b27060e27e9ebaae9c0caa8ca Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 21:44:32 +0100 Subject: [PATCH 091/107] update nodate, outdir, nointernalapi patches --- jack-apidoc-only.patch | 27 ------------------- ...-audio-connection-kit-no_date_footer.patch | 22 --------------- jack-audio-connection-kit.spec | 7 ++--- jack2-1.9.12-nodate.patch | 22 +++++++++++++++ jack2-1.9.12-nointernalapi.patch | 27 +++++++++++++++++++ ...dir-fix.patch => jack2-1.9.12-outdir.patch | 10 +++---- 6 files changed, 58 insertions(+), 57 deletions(-) delete mode 100644 jack-apidoc-only.patch delete mode 100644 jack-audio-connection-kit-no_date_footer.patch create mode 100644 jack2-1.9.12-nodate.patch create mode 100644 jack2-1.9.12-nointernalapi.patch rename jack-doxygen-output-dir-fix.patch => jack2-1.9.12-outdir.patch (53%) diff --git a/jack-apidoc-only.patch b/jack-apidoc-only.patch deleted file mode 100644 index e0eb2ac..0000000 --- a/jack-apidoc-only.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -rupN jack-1.9.8.old/doxyfile jack-1.9.8/doxyfile ---- jack-1.9.8.old/doxyfile 2011-12-19 06:53:48.000000000 -0500 -+++ jack-1.9.8/doxyfile 2011-12-24 14:04:23.569998760 -0500 -@@ -574,22 +574,7 @@ WARN_LOGFILE = - # directories like "/usr/src/myproject". Separate the files or directories - # with spaces. - --INPUT = common \ -- posix \ -- macosx \ -- macosx/coreaudio/ \ -- macosx/coremidi/ \ -- linux \ -- linux/alsa \ -- linux/alsarawmidi \ -- linux/firewire \ -- linux/freebob \ -- windows \ -- windows/portaudio \ -- windows/winmme \ -- solaris \ -- solaris/oss \ -- common/jack/ -+INPUT = common/jack/ - - # This tag can be used to specify the character encoding of the source files - # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/jack-audio-connection-kit-no_date_footer.patch b/jack-audio-connection-kit-no_date_footer.patch deleted file mode 100644 index c931b9a..0000000 --- a/jack-audio-connection-kit-no_date_footer.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rupN jack-1.9.7.old/doxyfile jack-1.9.7/doxyfile ---- jack-1.9.7.old/doxyfile 2011-03-30 11:03:54.000000000 -0400 -+++ jack-1.9.7/doxyfile 2011-04-02 23:03:35.000000000 -0400 -@@ -800,7 +800,7 @@ HTML_HEADER = - # each generated HTML page. If it is left blank doxygen will generate a - # standard footer. - --HTML_FOOTER = -+HTML_FOOTER = no_date_footer.html - - # The HTML_STYLESHEET tag can be used to specify a user-defined cascading - # style sheet that is used by each HTML page. It can be used to -diff -rupN jack-1.9.7.old/no_date_footer.html jack-1.9.7/no_date_footer.html ---- jack-1.9.7.old/no_date_footer.html 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.7/no_date_footer.html 2011-04-02 22:53:49.000000000 -0400 -@@ -0,0 +1,6 @@ -+
-+Generated for $projectname by doxygen -+$doxygenversion
-+ -+ diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 0f138c8..fd144f0 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -21,11 +21,11 @@ Source1: %{name}-README.Fedora Source2: %{name}-script.pa Source3: %{name}-limits.conf # No-date-footer hack to remove dates from doxygen documentation -Patch0: jack-audio-connection-kit-no_date_footer.patch +Patch0: jack2-1.9.12-nodate.patch # Build fix -Patch1: jack-doxygen-output-dir-fix.patch +Patch1: jack2-1.9.12-outdir.patch # We don't want the internal API documentation -Patch2: jack-apidoc-only.patch +Patch2: jack2-1.9.12-nointernalapi.patch # Adjust default priority. RHBZ#795094 Patch3: jack-realtime-compat.patch # Enable renaming and reordering the jack ports RHBZ#887408 @@ -268,6 +268,7 @@ exit 0 * Tue Dec 26 2017 Nils Philippsen - 1.9.12-1 - version 1.9.12 - update source URL +- update nodate, outdir, nointernalapi patches * Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/jack2-1.9.12-nodate.patch b/jack2-1.9.12-nodate.patch new file mode 100644 index 0000000..1fe0e91 --- /dev/null +++ b/jack2-1.9.12-nodate.patch @@ -0,0 +1,22 @@ +diff -up jack2-1.9.12/doxyfile.in.nodate jack2-1.9.12/doxyfile.in +--- jack2-1.9.12/doxyfile.in.nodate 2017-12-13 22:19:04.000000000 +0100 ++++ jack2-1.9.12/doxyfile.in 2017-12-26 18:15:27.130315688 +0100 +@@ -807,7 +807,7 @@ HTML_HEADER = + # each generated HTML page. If it is left blank doxygen will generate a + # standard footer. + +-HTML_FOOTER = ++HTML_FOOTER = @SRCDIR@/no_date_footer.html + + # The HTML_STYLESHEET tag can be used to specify a user-defined cascading + # style sheet that is used by each HTML page. It can be used to +diff -up jack2-1.9.12/no_date_footer.html.nodate jack2-1.9.12/no_date_footer.html +--- jack2-1.9.12/no_date_footer.html.nodate 2017-12-26 18:12:48.975963873 +0100 ++++ jack2-1.9.12/no_date_footer.html 2017-12-26 18:12:48.975963873 +0100 +@@ -0,0 +1,6 @@ ++
++Generated for $projectname by doxygen ++$doxygenversion
++ ++ diff --git a/jack2-1.9.12-nointernalapi.patch b/jack2-1.9.12-nointernalapi.patch new file mode 100644 index 0000000..ee73b94 --- /dev/null +++ b/jack2-1.9.12-nointernalapi.patch @@ -0,0 +1,27 @@ +diff -up jack2-1.9.12/doxyfile.in.nointernalapi jack2-1.9.12/doxyfile.in +--- jack2-1.9.12/doxyfile.in.nointernalapi 2017-12-26 17:43:14.387643693 +0100 ++++ jack2-1.9.12/doxyfile.in 2017-12-26 17:44:34.743795861 +0100 +@@ -574,22 +574,7 @@ WARN_LOGFILE = + # directories like "/usr/src/myproject". Separate the files or directories + # with spaces. + +-INPUT = @SRCDIR@/common \ +- @SRCDIR@/posix \ +- @SRCDIR@/macosx \ +- @SRCDIR@/macosx/coreaudio/ \ +- @SRCDIR@/macosx/coremidi/ \ +- @SRCDIR@/linux \ +- @SRCDIR@/linux/alsa \ +- @SRCDIR@/linux/alsarawmidi \ +- @SRCDIR@/linux/firewire \ +- @SRCDIR@/linux/freebob \ +- @SRCDIR@/windows \ +- @SRCDIR@/windows/portaudio \ +- @SRCDIR@/windows/winmme \ +- @SRCDIR@/solaris \ +- @SRCDIR@/solaris/oss \ +- @SRCDIR@/common/jack/ ++INPUT = @SRCDIR@/common/jack/ + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/jack-doxygen-output-dir-fix.patch b/jack2-1.9.12-outdir.patch similarity index 53% rename from jack-doxygen-output-dir-fix.patch rename to jack2-1.9.12-outdir.patch index 8a93900..b6bd8da 100644 --- a/jack-doxygen-output-dir-fix.patch +++ b/jack2-1.9.12-outdir.patch @@ -1,12 +1,12 @@ -diff -rupN jack-1.9.7.old/doxyfile jack-1.9.7/doxyfile ---- jack-1.9.7.old/doxyfile 2011-03-30 11:03:54.000000000 -0400 -+++ jack-1.9.7/doxyfile 2011-04-03 08:54:03.000000000 -0400 -@@ -38,7 +38,7 @@ PROJECT_NUMBER = 1.9.7 +diff -up jack2-1.9.12/doxyfile.in.outdir jack2-1.9.12/doxyfile.in +--- jack2-1.9.12/doxyfile.in.outdir 2017-12-26 17:41:13.121923158 +0100 ++++ jack2-1.9.12/doxyfile.in 2017-12-26 17:41:29.048755116 +0100 +@@ -38,7 +38,7 @@ PROJECT_NUMBER = @VERSION@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = -+OUTPUT_DIRECTORY = build/default/ ++OUTPUT_DIRECTORY = default/ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output From 40a605cb6ac871e6cacb12a4ca4a1d5431d17d6f Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 21:53:25 +0100 Subject: [PATCH 092/107] remove portnames patch It doesn't compile, is not documented and upstream doesn't seem to know about it. --- jack-audio-connection-kit.spec | 4 +- jack-portnames.patch | 295 --------------------------------- 2 files changed, 1 insertion(+), 298 deletions(-) delete mode 100644 jack-portnames.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index fd144f0..ea194fc 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -28,8 +28,6 @@ Patch1: jack2-1.9.12-outdir.patch Patch2: jack2-1.9.12-nointernalapi.patch # Adjust default priority. RHBZ#795094 Patch3: jack-realtime-compat.patch -# Enable renaming and reordering the jack ports RHBZ#887408 -Patch4: jack-portnames.patch # Fix ppc64 mpd startup issue RHBZ#799552 Patch5: jack-ppc64-long.patch # Fix building with gcc5 @@ -104,7 +102,6 @@ Small example clients that use the Jack Audio Connection Kit. %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi %patch3 -p1 -b .priority -%patch4 -p1 -b .portnames %patch5 -p1 -b .mpd %patch6 -p1 -b .gcc5 %patch7 -p1 -b .gcc6 @@ -269,6 +266,7 @@ exit 0 - version 1.9.12 - update source URL - update nodate, outdir, nointernalapi patches +- remove broken (undocumented, non-upstreamed) portnames patch * Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/jack-portnames.patch b/jack-portnames.patch deleted file mode 100644 index b9b70bb..0000000 --- a/jack-portnames.patch +++ /dev/null @@ -1,295 +0,0 @@ -diff -rupN jack-1.9.10.org/linux/alsa/JackAlsaDriver.cpp jack-1.9.10/linux/alsa/JackAlsaDriver.cpp ---- jack-1.9.10.org/linux/alsa/JackAlsaDriver.cpp 2014-07-18 08:28:12.000000000 -0400 -+++ jack-1.9.10/linux/alsa/JackAlsaDriver.cpp 2014-11-28 23:32:47.637032593 -0500 -@@ -46,6 +46,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg - #endif - #include "JackCompilerDeps.h" - #include "JackServerGlobals.h" -+#include "port_names.h" - - static struct jack_constraint_enum_str_descriptor midi_constraint_descr_array[] = - { -@@ -118,6 +119,8 @@ int JackAlsaDriver::Attach() - unsigned long port_flags = (unsigned long)CaptureDriverFlags; - char name[REAL_JACK_PORT_NAME_SIZE]; - char alias[REAL_JACK_PORT_NAME_SIZE]; -+ char old_name[REAL_JACK_PORT_NAME_SIZE]; -+ char **portnames; - - assert(fCaptureChannels < DRIVER_PORT_NUM); - assert(fPlaybackChannels < DRIVER_PORT_NUM); -@@ -133,13 +136,17 @@ int JackAlsaDriver::Attach() - - jack_log("JackAlsaDriver::Attach fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate); - -+ portnames = port_names_get_portnames(alsa_driver); -+ - for (int i = 0; i < fCaptureChannels; i++) { - snprintf(alias, sizeof(alias), "%s:%s:out%d", fAliasName, fCaptureDriverName, i + 1); -- snprintf(name, sizeof(name), "%s:capture_%d", fClientControl.fName, i + 1); -+ snprintf(old_name, sizeof(old_name), "%s:capture_%d", fClientControl.fName, i + 1); -+ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i]); - if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { - jack_error("driver: cannot register port for %s", name); - return -1; - } -+ free(portnames[i]); - port = fGraphManager->GetPort(port_index); - port->SetAlias(alias); - fCapturePortList[i] = port_index; -@@ -150,11 +157,13 @@ int JackAlsaDriver::Attach() - - for (int i = 0; i < fPlaybackChannels; i++) { - snprintf(alias, sizeof(alias), "%s:%s:in%d", fAliasName, fPlaybackDriverName, i + 1); -- snprintf(name, sizeof(name), "%s:playback_%d", fClientControl.fName, i + 1); -+ snprintf(old_name, sizeof(old_name), "%s:playback_%d", fClientControl.fName, i + 1); -+ snprintf(name, sizeof(name), "%s:%s", fClientControl.fName, portnames[i+fCaptureChannels]); - if (fEngine->PortRegister(fClientControl.fRefNum, name, JACK_DEFAULT_AUDIO_TYPE, (JackPortFlags)port_flags, fEngineControl->fBufferSize, &port_index) < 0) { - jack_error("driver: cannot register port for %s", name); - return -1; - } -+ free(portnames[i+fCaptureChannels]); - port = fGraphManager->GetPort(port_index); - port->SetAlias(alias); - fPlaybackPortList[i] = port_index; -@@ -172,6 +181,8 @@ int JackAlsaDriver::Attach() - } - } - -+ free(portnames); -+ - UpdateLatencies(); - - if (alsa_driver->midi) { -diff -rupN jack-1.9.10.org/linux/alsa/port_names.c jack-1.9.10/linux/alsa/port_names.c ---- jack-1.9.10.org/linux/alsa/port_names.c 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.10/linux/alsa/port_names.c 2014-11-28 23:32:47.636032597 -0500 -@@ -0,0 +1,179 @@ -+/* -*- mode: c; c-file-style: "linux"; -*- */ -+/* -+ Copyright (C) 2010 Florian Faber, faber@faberman.de -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+*/ -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "alsa_driver.h" -+ -+ -+static int port_names_load_portfile(alsa_driver_t *driver, const char *filename, char **buf, const unsigned int offset, const unsigned int num) { -+ int fh, i, ret, lineno, id, res=0; -+ char line[256]; -+ -+ printf("Trying to load portnames from %s\n", filename); -+ fh = open(filename, O_RDONLY); -+ if (-1!=fh) { -+ res = 1; -+ i = 0; -+ lineno = 1; -+ for (;;) { -+ ret = read(fh, &line[i], 1); -+ if (0==ret) { -+ break; -+ } else if (-1==ret) { -+ sprintf(stderr, "Error while reading \"%s\": %s", filename, strerror(errno)); -+ break; -+ } -+ if (0x0A==line[i]) { -+ /* new line, parse input */ -+ line[i] = 0; -+ -+ if ('#' != line[0]) { -+ i=0; -+ while ((i<255) && (line[i]!='=')) i++; -+ if (255==i) { -+ sprintf(stderr, "Error while reading \"%s\": Line %d has no key=value syntax!", filename, lineno); -+ } else { -+ line[i] = 0; -+ id = atoi(line); -+ if ((id>=1) && (id<=num)) { -+ if (NULL==buf[id-1+offset]) { -+ /* don't overwrite existing names */ -+ buf[id-1+offset] = strdup(&line[i+1]); -+ } -+ } else { -+ sprintf(stderr, "Error while reading \"%s\": Key %d out of range in line %d (1..%d)", filename, id, lineno, num); -+ } -+ } -+ } -+ -+ i = 0; -+ lineno++; -+ } else { -+ i++; -+ if (i==255) { -+ sprintf(stderr, "Error while reading \"%s\": Line %d is too long", filename, lineno); -+ break; -+ } -+ } -+ } -+ -+ (void) close(fh); -+ } -+ -+ return res; -+} -+ -+ -+static void port_names_default_portnames(char **buf, const unsigned int offset, const unsigned int num, const char *defaultname) { -+ unsigned int i; -+ char line[256]; -+ -+ /* Fill in default names */ -+ for (i=0; iframe_rate > 96000) { -+ speed="qs"; -+ } else if (driver->frame_rate > 48000) { -+ speed="ds"; -+ } else { -+ speed="ss"; -+ } -+ -+ snd_ctl_card_info_alloca(&card_info); -+ err = snd_ctl_card_info(driver->ctl_handle, card_info); -+ if (err >= 0) { -+ card_name = snd_ctl_card_info_get_name(card_info); -+ } else { -+ card_name = "noname"; -+ } -+ -+ buf = malloc(sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); -+ if (NULL==buf) { -+ sprintf(stderr, "ALSA: Not enough memory for %d port names", driver->capture_nchannels + driver->playback_nchannels); -+ return NULL; -+ } -+ bzero(buf, sizeof(char *)*(driver->capture_nchannels + driver->playback_nchannels)); -+ -+ /* Read port names from special to general: -+ * Begin with user and speed specific port names */ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.in", getenv("HOME"), card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* Now user general */ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.in", getenv("HOME"), card_name); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* System speed specific */ -+ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.in", card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* System general */ -+ snprintf(filename, 255, "/etc/jack/cards/%s.ports.in", card_name); -+ (void) port_names_load_portfile(driver, filename, buf, 0, driver->capture_nchannels); -+ -+ /* Fill all still unnamed ports with default names */ -+ port_names_default_portnames(buf, 0, driver->capture_nchannels, "capture_%lu"); -+ -+ -+ /* Same procedure for the playback channels */ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.%s.ports.out", getenv("HOME"), card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ snprintf(filename, 255, "%s/.config/jack/cards/%s.ports.out", getenv("HOME"), card_name); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ snprintf(filename, 255, "/etc/jack/cards/%s.%s.ports.out", card_name, speed); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ snprintf(filename, 255, "/etc/jack/cards/%s.ports.out", card_name); -+ (void) port_names_load_portfile(driver, filename, buf, driver->capture_nchannels, driver->playback_nchannels); -+ -+ port_names_default_portnames(buf, driver->capture_nchannels, driver->playback_nchannels, "playback_%lu"); -+ -+ return buf; -+} -diff -rupN jack-1.9.10.org/linux/alsa/port_names.h jack-1.9.10/linux/alsa/port_names.h ---- jack-1.9.10.org/linux/alsa/port_names.h 1969-12-31 19:00:00.000000000 -0500 -+++ jack-1.9.10/linux/alsa/port_names.h 2014-11-28 23:32:47.637032593 -0500 -@@ -0,0 +1,34 @@ -+/* -+ Copyright (C) 2010 Florian Faber, faber@faberman.de -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+*/ -+ -+#ifndef __jack_port_names_h__ -+#define __jack_port_names_h__ -+ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+ -+char** port_names_get_portnames(alsa_driver_t *driver); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* __jack_port_names_h__ */ -diff -rupN jack-1.9.10.org/linux/wscript jack-1.9.10/linux/wscript ---- jack-1.9.10.org/linux/wscript 2014-07-18 08:28:13.000000000 -0400 -+++ jack-1.9.10/linux/wscript 2014-11-28 23:32:47.637032593 -0500 -@@ -62,6 +62,7 @@ def build(bld): - 'alsa/hdsp.c', - 'alsa/alsa_driver.c', - 'alsa/hammerfall.c', -+ 'alsa/port_names.c', - 'alsa/ice1712.c' - ] - From 77959806c03fe664081632908c273b4e09497161 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 21:58:13 +0100 Subject: [PATCH 093/107] remove obsolete ppc64-long/mpd, gcc* patches --- jack-audio-connection-kit.spec | 13 +------------ jack-gcc5.patch | 26 -------------------------- jack-gcc6.patch | 21 --------------------- jack-gcc7.patch | 12 ------------ jack-ppc64-long.patch | 32 -------------------------------- 5 files changed, 1 insertion(+), 103 deletions(-) delete mode 100644 jack-gcc5.patch delete mode 100644 jack-gcc6.patch delete mode 100644 jack-gcc7.patch delete mode 100644 jack-ppc64-long.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index ea194fc..7038a29 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -28,14 +28,6 @@ Patch1: jack2-1.9.12-outdir.patch Patch2: jack2-1.9.12-nointernalapi.patch # Adjust default priority. RHBZ#795094 Patch3: jack-realtime-compat.patch -# Fix ppc64 mpd startup issue RHBZ#799552 -Patch5: jack-ppc64-long.patch -# Fix building with gcc5 -Patch6: jack-gcc5.patch -# Fix building with gcc6 -Patch7: jack-gcc6.patch -# Fix building with gcc7 -Patch8: jack-gcc7.patch BuildRequires: alsa-lib-devel @@ -102,10 +94,6 @@ Small example clients that use the Jack Audio Connection Kit. %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi %patch3 -p1 -b .priority -%patch5 -p1 -b .mpd -%patch6 -p1 -b .gcc5 -%patch7 -p1 -b .gcc6 -%patch8 -p1 -b .gcc7 # Fix encoding issues for file in ChangeLog README TODO; do @@ -267,6 +255,7 @@ exit 0 - update source URL - update nodate, outdir, nointernalapi patches - remove broken (undocumented, non-upstreamed) portnames patch +- remove obsolete ppc64-long/mpd, gcc* patches * Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/jack-gcc5.patch b/jack-gcc5.patch deleted file mode 100644 index f18042c..0000000 --- a/jack-gcc5.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d3c8e2d8d78899fba40a3e677ed4dbe388d82269 Mon Sep 17 00:00:00 2001 -From: Adrian Knoth -Date: Thu, 18 Sep 2014 18:29:23 +0200 -Subject: [PATCH] Fix FTBFS with clang++ - -Forwarded from http://bugs.debian.org/757820 ---- - common/memops.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/common/memops.c b/common/memops.c -index 27f6194..2d416b6 100644 ---- a/common/memops.c -+++ b/common/memops.c -@@ -198,7 +198,7 @@ static inline __m128i float_24_sse(__m128 s) - */ - static unsigned int seed = 22222; - --inline unsigned int fast_rand() { -+static inline unsigned int fast_rand() { - seed = (seed * 96314165) + 907633515; - return seed; - } --- -2.4.0 - diff --git a/jack-gcc6.patch b/jack-gcc6.patch deleted file mode 100644 index 098e08c..0000000 --- a/jack-gcc6.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -rupN jack-1.9.10.org/tests/iodelay.cpp jack-1.9.10/tests/iodelay.cpp ---- jack-1.9.10.org/tests/iodelay.cpp 2014-07-18 08:28:13.000000000 -0400 -+++ jack-1.9.10/tests/iodelay.cpp 2016-02-13 18:38:33.280737975 -0500 -@@ -167,8 +167,8 @@ static jack_client_t *jack_handle; - static jack_port_t *jack_capt; - static jack_port_t *jack_play; - --jack_latency_range_t capture_latency = {-1, -1}; --jack_latency_range_t playback_latency = {-1, -1}; -+jack_latency_range_t capture_latency = {(jack_nframes_t)-1, (jack_nframes_t)-1}; -+jack_latency_range_t playback_latency = {(jack_nframes_t)-1, (jack_nframes_t)-1}; - - void - latency_cb (jack_latency_callback_mode_t mode, void *arg) -@@ -266,4 +266,4 @@ int main (int ac, char *av []) - return 0; - } - --// -------------------------------------------------------------------------------- -\ No newline at end of file -+// -------------------------------------------------------------------------------- diff --git a/jack-gcc7.patch b/jack-gcc7.patch deleted file mode 100644 index 4dc43bd..0000000 --- a/jack-gcc7.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN jack-1.9.10.org/tests/test.cpp jack-1.9.10/tests/test.cpp ---- jack-1.9.10.org/tests/test.cpp 2014-07-18 08:28:13.000000000 -0400 -+++ jack-1.9.10/tests/test.cpp 2017-02-13 20:24:13.691773753 -0500 -@@ -480,7 +480,7 @@ int process4(jack_nframes_t nframes, voi - jack_nframes_t delta_time = cur_time - last_time; - - Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time); -- if (delta_time > 0 && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) { -+ if (delta_time > 0 && (jack_nframes_t)abs((int64_t)delta_time - cur_buffer_size) > tolerance) { - printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance); - } - diff --git a/jack-ppc64-long.patch b/jack-ppc64-long.patch deleted file mode 100644 index cc7248b..0000000 --- a/jack-ppc64-long.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up jack-1.9.8/linux/cycles.h\~ jack-1.9.8/linux/cycles.h ---- jack-1.9.8/linux/cycles.h~ 2011-12-19 12:54:27.000000000 +0100 -+++ jack-1.9.8/linux/cycles.h 2012-03-02 23:57:29.200812059 +0100 -@@ -77,16 +77,24 @@ static inline cycles_t get_cycles(void) - { - cycles_t ret = 0; - -+#ifdef __powerpc64__ -+# define LONGT ".llong" -+#else -+# define LONGT ".long" -+#endif -+ - __asm__ __volatile__( - "98: mftb %0\n" - "99:\n" - ".section __ftr_fixup,\"a\"\n" - " .long %1\n" - " .long 0\n" -- " .long 98b\n" -- " .long 99b\n" -+ " " LONGT " 98b\n" -+ " " LONGT " 99b\n" - ".previous" - : "=r" (ret) : "i" (CPU_FTR_601)); -+ -+#undef LONGT - return ret; - } - - -Diff finished. Fri Mar 2 23:57:31 2012 From 2386800f88390e71cc1f3f78506484de37883b13 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 22:05:37 +0100 Subject: [PATCH 094/107] remove binary junk from README --- jack-audio-connection-kit.spec | 12 ++++-------- jack2-1.9.12-nojunk.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 jack2-1.9.12-nojunk.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 7038a29..5e185ad 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -28,6 +28,8 @@ Patch1: jack2-1.9.12-outdir.patch Patch2: jack2-1.9.12-nointernalapi.patch # Adjust default priority. RHBZ#795094 Patch3: jack-realtime-compat.patch +# Remove binary junk from README +Patch4: jack2-1.9.12-nojunk.patch BuildRequires: alsa-lib-devel @@ -94,14 +96,7 @@ Small example clients that use the Jack Audio Connection Kit. %patch1 -p1 -b .outdir %patch2 -p1 -b .nointernalapi %patch3 -p1 -b .priority - -# Fix encoding issues -for file in ChangeLog README TODO; do - sed 's|\r||' $file > $file.tmp - iconv -f ISO-8859-1 -t UTF8 $file.tmp > $file.tmp2 - touch -r $file $file.tmp2 - mv -f $file.tmp2 $file -done +%patch4 -p1 -b .nojunk %build export CPPFLAGS="$RPM_OPT_FLAGS -O0" @@ -256,6 +251,7 @@ exit 0 - update nodate, outdir, nointernalapi patches - remove broken (undocumented, non-upstreamed) portnames patch - remove obsolete ppc64-long/mpd, gcc* patches +- remove binary junk from README * Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/jack2-1.9.12-nojunk.patch b/jack2-1.9.12-nojunk.patch new file mode 100644 index 0000000..200cd28 --- /dev/null +++ b/jack2-1.9.12-nojunk.patch @@ -0,0 +1,12 @@ +diff -up jack2-1.9.12/README.nojunk jack2-1.9.12/README +--- jack2-1.9.12/README.nojunk 2017-12-13 22:19:04.000000000 +0100 ++++ jack2-1.9.12/README 2017-12-26 18:01:57.297797940 +0100 +@@ -220,7 +220,7 @@ Note : To experiment with the -S option, + 1.9.1 : Fix jackctl_server_unload_internal. Filter SIGPIPE to avoid having client get a SIGPIPE when trying to access a died server. Libjack shutdown handler does not "deactivate" (fActive = false) the client anymore, so that jack_deactivate correctly does the job later on. Better isolation of server and clients system resources to allow starting the server in several user account at the same time. Report ringbuffer.c fixes from JACK1. Client and library global context cleanup in case of incorrect shutdown handling (that is applications not correctly closing client after server has shutdown). Use JACK_DRIVER_DIR variable in internal clients loader. For ALSA driver, synchronize with latest JACK1 memops functions. Synchronize JACK2 public headers with JACK1 ones. Implement jack_client_real_time_priority and jack_client_max_real_time_priority API. Use up to BUFFER_SIZE_MAX frames in midi ports, fix for ticket #117. Cleanup server starting code for clients directly linked with libjackserver.so. JackMessageBuffer was using thread "Stop" scheme in destructor, now use the safer thread "Kill" way. Synchronize ALSA backend code with JACK1 one. Set default mode to 'slow' in JackNetDriver and JackNetAdapter. Simplify audio packet order verification. Fix JackNetInterface::SetNetBufferSize for socket buffer size computation and JackNetMasterInterface::DataRecv if synch packet is received, various cleanup. Better recovery of network overload situations, now "resynchronize" by skipping cycles.". Support for BIG_ENDIAN machines in NetJack2. Support for BIG_ENDIAN machines in NetJack2 for MIDI ports. Support for "-h" option in internal clients to print the parameters. In NetJack2, fix a bug when capture or playback only channels are used. Add a JACK_INTERNAL_DIR environment variable to be used for internal clients. Add a resample quality parameter in audioadapter. Now correctly return an error if JackServer::SetBufferSize could not change the buffer size (and was just restoring the current one). Use PRIu32 kind of macro in JackAlsaDriver again. Add a resample quality parameter in netadapter. + 1.9.2 : Solaris version. New "profiling" tools. Rework the mutex/signal classes. Support for BIG_ENDIAN machines in NetJack2. D-BUS based device reservation to better coexist with PulseAudio on Linux. Add auto_connect parameter in netmanager and netadapter. Use Torben Hohn PI controler code for adapters. Client incorrect re-naming fixed : now done at socket and fifo level. Virtualize and allow overriding of thread creation function, to allow Wine support (from JACK1). + 1.9.3 : New JackBoomerDriver class for Boomer driver on Solaris. Add mixed 32/64 bits mode (off by default). Native MIDI backend (JackCoreMidiDriver, JackWinMMEDriver). In ALSA audio card reservation code, tries to open the card even if reservation fails. Clock source setting on Linux. Add jackctl_server_switch_master API. Fix transport callback (timebase master, sync) issue when used after jack_activate (RT thread was not running). D-Bus access for jackctl_server_add_slave/jackctl_server_remove_slave API. Cleanup "loopback" stuff in server. Torben Hohn fix for InitTime and GetMicroSeconds in JackWinTime.c. New jack_free function added in jack.h. Reworked Torben Hohn fix for server restart issue on Windows. Correct jack_set_error_function, jack_set_info_function and jack_set_thread_creator functions. Correct JackFifo::TimedWait for EINTR handling. Move DBus based audio device reservation code in ALSA backend compilation. Correct JackTransportEngine::MakeAllLocating, sync callback has to be called in this case also. NetJack2 code : better error checkout, method renaming. Tim Bechmann patch : hammerfall, only release monitor thread, if it has been created. Tim Bechmann memops.c optimization patches. In combined --dbus and --classic compilation code, use PulseAudio acquire/release code. Big rewrite of Solaris boomer driver, seems to work in duplex mode at least. Loopback backend reborn as a dynamically loadable separated backend. +-1.9.4 : Solaris boomer backend now working in capture or playback only mode. Add a -G parameter in CoreAudio backend (the computation value in RT thread expressed as percent of period). Use SNDCTL_DSP_SYNCGROUP/SNDCTL_DSP_SYNCSTART API to synchronize input and output in Solaris boomer backend. Big endian bug fix in memops.c. Fix issues in JackNetDriver::DecodeTransportData and JackNetDriver::Initialize. Correct CPU timing in JackNetDriver, now take cycle begin time after Read. Simplify transport in NetJack2: master only can control transport. Change CoreAudio notification thread setup for OSX Snow Leopard. Correct server temporary mode : now set a global and quit after server/client message handling is finished. Add a string parameter to server ==> client notification, add a new JackInfoShutdownCallback type. CoreAudio backend now issue a JackInfoShutdownCallback when an unrecoverable error is detected (sampling rate change, stream configuration changeÉ). Correct jackdmp.cpp (failures case were not correct..). Improve JackCoreAudioDriver code. Raise default port number to 2048. Correct JackProcessSync::LockedTimedWait. Correct JACK_MESSAGE_SIZE value, particularly in OSX RPC code. Now start server channel thread only when backend has been started (so in JackServer::Start). Should solve race conditions at start time. jack_verbose moved to JackGlobals class. Improve aggregate device management in JackCoreAudioDriver : now a "private" device only and cleanup properly. Aggregate device code added to JackCoreAudioAdapter. Implement "hog mode" (exclusive access of the audio device) in JackCoreAudioDriver. Fix jack_set_sample_rate_callback to have he same behavior as in JACK1. Dynamic system version detection in JackCoreAudioDriver to either create public or private aggregate device. In JackCoreAudioDriver, force the SR value to the wanted one *before* creating aggregate device (otherwise creation will fail). In JackCoreAudioDriver, better cleanup of AD when intermediate open failure. In JackCoreAudioDriver::Start, wait for the audio driver to effectively start (use the MeasureCallback). In JackCoreAudioDriver, improve management of input/output channels: -1 is now used internally to indicate a wanted max value. In JackCoreAudioDriver::OpenAUHAL, correct stream format setup and cleanup. Correct crash bug in JackAudioAdapterInterface when not input is used in adapter (temporary fixÉ). Sync JackCoreAudioAdapter code on JackCoreAudioDriver one. JACK_SCHED_POLICY switched to SCHED_FIFO. Now can aggregate device that are themselves AD. No reason to make jack_on_shutdown deprecated, so revert the incorrect change. Thread AcquireRealTime and DropRealTime were (incorrectly) using fThread field. Use pthread_self()) (or GetCurrentThread() on Windows) to get the calling thread. Correctly save and restore RT mode state in freewheel mode. Correct freewheel code on client side. Fix AcquireRealTime and DropRealTime: now distinguish when called from another thread (AcquireRealTime/DropRealTime) and from the thread itself (AcquireSelfRealTime/DropSelfRealTime). Correct JackPosixThread::StartImp : thread priority setting now done in the RT case only. Correct JackGraphManager::GetBuffer for the "client loop with one connection" case : buffer must be copied. Correct JackInfoShutdownCallback prototype, two new JackClientProcessFailure and JackClientZombie JackStatus code. Correct JackCoreAudio driver when empty strings are given as -C, -P or -d parameter. Better memory allocation error checking on client (library) side. Better memory allocation error checking in ringbuffer.c, weak import improvements. Memory allocation error checking for jack_client_new and jack_client_open (server and client side). Memory allocation error checking in server for RPC. Simplify server temporary mode : now use a JackTemporaryException. Lock/Unlock shared memory segments (to test...). Sync with JACK1 : -r parameter now used for no-realtime, realtime (-R) is now default, usable backend given vie platform. In JackCoreAudio driver, (possibly) clock drift compensation when needed in aggregated devices. In JackCoreAudio driver, clock drift compensation in aggregated devices working. In JackCoreAudio driver, clock drift compensation semantic changed a bit : when on, does not activate if not needed (same clock domain). Sync JackCoreAudioAdapter code with JackCoreAudioDriver. ++1.9.4 : Solaris boomer backend now working in capture or playback only mode. Add a -G parameter in CoreAudio backend (the computation value in RT thread expressed as percent of period). Use SNDCTL_DSP_SYNCGROUP/SNDCTL_DSP_SYNCSTART API to synchronize input and output in Solaris boomer backend. Big endian bug fix in memops.c. Fix issues in JackNetDriver::DecodeTransportData and JackNetDriver::Initialize. Correct CPU timing in JackNetDriver, now take cycle begin time after Read. Simplify transport in NetJack2: master only can control transport. Change CoreAudio notification thread setup for OSX Snow Leopard. Correct server temporary mode : now set a global and quit after server/client message handling is finished. Add a string parameter to server ==> client notification, add a new JackInfoShutdownCallback type. CoreAudio backend now issue a JackInfoShutdownCallback when an unrecoverable error is detected (sampling rate change, stream configuration change). Correct jackdmp.cpp (failures case were not correct..). Improve JackCoreAudioDriver code. Raise default port number to 2048. Correct JackProcessSync::LockedTimedWait. Correct JACK_MESSAGE_SIZE value, particularly in OSX RPC code. Now start server channel thread only when backend has been started (so in JackServer::Start). Should solve race conditions at start time. jack_verbose moved to JackGlobals class. Improve aggregate device management in JackCoreAudioDriver : now a "private" device only and cleanup properly. Aggregate device code added to JackCoreAudioAdapter. Implement "hog mode" (exclusive access of the audio device) in JackCoreAudioDriver. Fix jack_set_sample_rate_callback to have he same behavior as in JACK1. Dynamic system version detection in JackCoreAudioDriver to either create public or private aggregate device. In JackCoreAudioDriver, force the SR value to the wanted one *before* creating aggregate device (otherwise creation will fail). In JackCoreAudioDriver, better cleanup of AD when intermediate open failure. In JackCoreAudioDriver::Start, wait for the audio driver to effectively start (use the MeasureCallback). In JackCoreAudioDriver, improve management of input/output channels: -1 is now used internally to indicate a wanted max value. In JackCoreAudioDriver::OpenAUHAL, correct stream format setup and cleanup. Correct crash bug in JackAudioAdapterInterface when not input is used in adapter (temporary fix). Sync JackCoreAudioAdapter code on JackCoreAudioDriver one. JACK_SCHED_POLICY switched to SCHED_FIFO. Now can aggregate device that are themselves AD. No reason to make jack_on_shutdown deprecated, so revert the incorrect change. Thread AcquireRealTime and DropRealTime were (incorrectly) using fThread field. Use pthread_self()) (or GetCurrentThread() on Windows) to get the calling thread. Correctly save and restore RT mode state in freewheel mode. Correct freewheel code on client side. Fix AcquireRealTime and DropRealTime: now distinguish when called from another thread (AcquireRealTime/DropRealTime) and from the thread itself (AcquireSelfRealTime/DropSelfRealTime). Correct JackPosixThread::StartImp : thread priority setting now done in the RT case only. Correct JackGraphManager::GetBuffer for the "client loop with one connection" case : buffer must be copied. Correct JackInfoShutdownCallback prototype, two new JackClientProcessFailure and JackClientZombie JackStatus code. Correct JackCoreAudio driver when empty strings are given as -C, -P or -d parameter. Better memory allocation error checking on client (library) side. Better memory allocation error checking in ringbuffer.c, weak import improvements. Memory allocation error checking for jack_client_new and jack_client_open (server and client side). Memory allocation error checking in server for RPC. Simplify server temporary mode : now use a JackTemporaryException. Lock/Unlock shared memory segments (to test...). Sync with JACK1 : -r parameter now used for no-realtime, realtime (-R) is now default, usable backend given vie platform. In JackCoreAudio driver, (possibly) clock drift compensation when needed in aggregated devices. In JackCoreAudio driver, clock drift compensation in aggregated devices working. In JackCoreAudio driver, clock drift compensation semantic changed a bit : when on, does not activate if not needed (same clock domain). Sync JackCoreAudioAdapter code with JackCoreAudioDriver. + 1.9.5 : Dynamic choice of maximum port number. More robust sample rate change handling code in JackCoreAudioDriver. Devin Anderson patch for Jack FFADO driver issues with lost MIDI bytes between periods (and more). Fix port_rename callback : now both old name and new name are given as parameters. Special code in JackCoreAudio driver to handle completely buggy Digidesign CoreAudio user-land driver. Ensure that client-side message buffer thread calls thread_init callback if/when it is set by the client (backport of JACK1 rev 3838). Check dynamic port-max value. Fix JackCoreMidiDriver::ReadProcAux when ring buffer is full (thanks Devin Anderson). Josh Green ALSA driver capture only patch. When threads are cancelled, the exception has to be rethrown. Use a QUIT notification to properly quit the server channel, the server channel thread can then be 'stopped' instead of 'canceled'. Mario Lang alsa_io time calculation overflow patch. Shared memory manager was calling abort in case of fatal error, now return an error in caller. Change JackEngineProfiling and JackAudioAdapterInterface gnuplot scripts to output SVG instead of PDF. + 1.9.6 : Improve JackCoreAudioDriver and JackCoreAudioAdapter : when no devices are described, takes default input and output and aggregate them.Correct JackGraphManager::DeactivatePort. Correct JackMachServerChannel::Execute : keep running even in error cases. Raise JACK_PROTOCOL_VERSION number. Arnold Krille firewire patch. Raise JACK_DRIVER_PARAM_STRING_MAX and JACK_PARAM_STRING_MAX to 127 otherwise some audio drivers cannot be loaded on OSX. Fix some file header to have library side code use LGPL. On Windows, now use TRE library for regexp (BSD license instead of GPL license). ffado-portname-sync.patch from ticket #163 applied. Remove call to exit in library code. Make jack_connect/jack_disconnect wait for effective port connection/disconnection. Add tests to validate intclient.h API. On Linux, inter-process synchronization primitive switched to POSIX semaphore. In JackCoreAudioDriver, move code called in MeasureCallback to be called once in IO thread. David Garcia Garzon netone patch. Fix from Fernando Lopez-Lezcano for compilation on fc13. Fix JackPosixSemaphore::TimedWait : same behavior as JackPosixSemaphore::Wait regarding EINTR. David Garcia Garzon unused_pkt_buf_field_jack2 netone patch. Arnold Krille firewire snooping patch. Jan Engelhardt patch for get_cycles on SPARC. Adrian Knoth hurd.patch, kfreebsd-fix.patch and alpha_ia64-sigsegv.patch from ticket 177. Adrian Knoth fix for linux cycle.h (ticket 188). In JackCoreAudioDriver, fix an issue when no value is given for input. + 1.9.7 : Sync JackAlsaDriver::alsa_driver_check_card_type with JACK1 backend. Correct JackServer::Open to avoid a race when control API is used on OSX. Improve backend error handling: fatal error returned by Read/Write now cause a Process failure (so a thread exit for blocking backends). Recoverable ones (XRuns..) are now treated internally in ALSA, FreeBob and FFADO backends. In jackdmp.cpp, jackctl_setup_signals moved before jackctl_server_start. Correct symbols export in backends on OSX. ALSA backend : suspend/resume handling. Correct dummy driver. Adrian Knoth jack_lsp patch. Remove JackPortIsActive flag. New latency API implementation. ComputeTotalLatencies now a client/server call. Add latent test client for latency API. Also print playback and capture latency in jack_lsp. jack_client_has_session_callback implementation. Check requested buffer size and limit to 1..8192 - avoids weird behaviour caused by jack_bufsize foobar. jack_port_type_get_buffer_size implementation. Stop using alloca and allocate buffer on the heap for alsa_io. Rename jdelay to jack_iodelay as per Fons' request. Call buffer size callback in activate (actually this is done on client side in the RT thread Init method). Add jack_midi_dump client. Synchronize net JACK1 with JACK1 version. Synchronize jack_connect/jack_disconnect with JACK1 version. Correct JackNetMaster::SetBufferSize. Use jack_default_audio_sample_t instead of float consistently, fix ticket #201. -X now allows to add several slave backends, add -I to load several internal clients. Rework internal slave driver management, JackServerGlobals now handle same parameters as jackdmp. Correct JackEngine::NotifyGraphReorder, update JackDebugClient with latest API. Devin Anderson server-ctl-proposal branch merged on trunk: improved control API, slave backend reworked. Implement renaming in JackDriver::Open to avoid name collision (thanks Devin Anderson). Correct alsa_driver_restart (thanks Devin Anderson). Correction of jack_connect/jack_disconnect: use of jack_activate and volatile keyword for thread shared variable. Correction of JackNetOneDriver for latest CELT API. Synchronize JackWeakAPI.cpp with new APIs. From dc17c7fea8fb74d31f43f0816e3a3d4abe2557e7 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 22:08:05 +0100 Subject: [PATCH 095/107] remove additional optimization options --- jack-audio-connection-kit.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 5e185ad..432153b 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -99,7 +99,7 @@ Small example clients that use the Jack Audio Connection Kit. %patch4 -p1 -b .nojunk %build -export CPPFLAGS="$RPM_OPT_FLAGS -O0" +export CPPFLAGS="$RPM_OPT_FLAGS" export PREFIX=%{_prefix} # Parallel build disabled as it fails sometimes ./waf configure \ @@ -252,6 +252,7 @@ exit 0 - remove broken (undocumented, non-upstreamed) portnames patch - remove obsolete ppc64-long/mpd, gcc* patches - remove binary junk from README +- remove additional optimization options * Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 9d766bc90ee3d8572c54931f6d37bfda14099ebb Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 22:08:50 +0100 Subject: [PATCH 096/107] remove obsolete comment --- jack-audio-connection-kit.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 432153b..69f88cc 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -101,7 +101,6 @@ Small example clients that use the Jack Audio Connection Kit. %build export CPPFLAGS="$RPM_OPT_FLAGS" export PREFIX=%{_prefix} -# Parallel build disabled as it fails sometimes ./waf configure \ %{?_smp_mflags} \ --mandir=%{_mandir}/man1 \ From d07d02e20bf3d508d2c8d58298f23aab67df298c Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 26 Dec 2017 22:17:14 +0100 Subject: [PATCH 097/107] add jack_simdtests executable --- jack-audio-connection-kit.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 69f88cc..017c284 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -238,6 +238,7 @@ exit 0 %{_bindir}/jack_cpu %{_bindir}/jack_iodelay %{_bindir}/jack_multiple_metro +%{_bindir}/jack_simdtests %{_bindir}/jack_test %{_mandir}/man1/jack_iodelay.1* @@ -252,6 +253,7 @@ exit 0 - remove obsolete ppc64-long/mpd, gcc* patches - remove binary junk from README - remove additional optimization options +- add jack_simdtests executable * Wed Aug 02 2017 Fedora Release Engineering - 1.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 2ab9f98b264f14eee6bdf8c5e72b81787e01203b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 17:49:17 +0000 Subject: [PATCH 098/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 017c284..aff06aa 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 1%{?dist} +Release: 2%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -245,6 +245,9 @@ exit 0 %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1.9.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Tue Dec 26 2017 Nils Philippsen - 1.9.12-1 - version 1.9.12 - update source URL From c91a2df803e71aabbd21e09a734caf84a13b2bb4 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Fri, 9 Feb 2018 21:40:52 -0500 Subject: [PATCH 099/107] Build with RPM_LD_FLAGS exported --- jack-audio-connection-kit.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index aff06aa..4c34bdc 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 2%{?dist} +Release: 3%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -100,6 +100,7 @@ Small example clients that use the Jack Audio Connection Kit. %build export CPPFLAGS="$RPM_OPT_FLAGS" +export LDFLAGS="$RPM_LD_FLAGS" export PREFIX=%{_prefix} ./waf configure \ %{?_smp_mflags} \ @@ -245,6 +246,9 @@ exit 0 %changelog +* Fri Feb 09 2018 Orcan Ogetbil - 1.9.12-3 +- Build with RPM_LD_FLAGS exported + * Wed Feb 07 2018 Fedora Release Engineering - 1.9.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 66d55c3d144545a7c325fd1ab3beb73619a5dc6a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 10 Feb 2018 10:40:02 +0100 Subject: [PATCH 100/107] Switch to %ldconfig_scriptlets Reference: https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets Signed-off-by: Igor Gnatenko --- jack-audio-connection-kit.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 4c34bdc..3b6310d 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 3%{?dist} +Release: 4%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -149,9 +149,7 @@ chmod 755 $RPM_BUILD_ROOT%{_libdir}/jack/*.so $RPM_BUILD_ROOT%{_libdir}/libjack* getent group %groupname > /dev/null || groupadd -r %groupname exit 0 -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %doc ChangeLog README README_NETJACK2 TODO @@ -246,6 +244,9 @@ exit 0 %changelog +* Sat Feb 10 2018 Igor Gnatenko - 1.9.12-4 +- Switch to %%ldconfig_scriptlets + * Fri Feb 09 2018 Orcan Ogetbil - 1.9.12-3 - Build with RPM_LD_FLAGS exported From 2db35a4ec7cc29e167b8fd847d2048e83d952cd1 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Wed, 28 Feb 2018 21:01:18 -0500 Subject: [PATCH 101/107] added BR: gcc-c++ --- jack-audio-connection-kit.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 3b6310d..39dd79c 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -36,6 +36,7 @@ BuildRequires: alsa-lib-devel BuildRequires: dbus-devel BuildRequires: doxygen BuildRequires: expat-devel +BuildRequires: gcc-c++ %ifnarch s390 s390x %if !0%{?bootstrap} BuildRequires: libffado-devel From 94df60b34aaaf049d9cefe973550f5ce39cf4577 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Thu, 5 Jul 2018 22:34:49 -0400 Subject: [PATCH 102/107] Fix unversioned Python shebangs --- jack-audio-connection-kit.spec | 8 +++- jack2-1.9.12-python-shebang.patch | 72 +++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 jack2-1.9.12-python-shebang.patch diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 39dd79c..b25f266 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 4%{?dist} +Release: 5%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -30,6 +30,8 @@ Patch2: jack2-1.9.12-nointernalapi.patch Patch3: jack-realtime-compat.patch # Remove binary junk from README Patch4: jack2-1.9.12-nojunk.patch +# Proper Python2 shebangs +Patch5: jack2-1.9.12-python-shebang.patch BuildRequires: alsa-lib-devel @@ -98,6 +100,7 @@ Small example clients that use the Jack Audio Connection Kit. %patch2 -p1 -b .nointernalapi %patch3 -p1 -b .priority %patch4 -p1 -b .nojunk +%patch5 -p1 -b .shebang %build export CPPFLAGS="$RPM_OPT_FLAGS" @@ -245,6 +248,9 @@ exit 0 %changelog +* Thu Jul 05 2018 Orcan Ogetbil - 1.9.12-5 +- Fix unversioned Python shebangs + * Sat Feb 10 2018 Igor Gnatenko - 1.9.12-4 - Switch to %%ldconfig_scriptlets diff --git a/jack2-1.9.12-python-shebang.patch b/jack2-1.9.12-python-shebang.patch new file mode 100644 index 0000000..c44c57c --- /dev/null +++ b/jack2-1.9.12-python-shebang.patch @@ -0,0 +1,72 @@ +diff -rupN jack2-1.9.12.org/common/wscript jack2-1.9.12/common/wscript +--- jack2-1.9.12.org/common/wscript 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/common/wscript 2018-07-05 22:32:26.811067221 -0400 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python2 + # encoding: utf-8 + + import re +diff -rupN jack2-1.9.12.org/dbus/wscript jack2-1.9.12/dbus/wscript +--- jack2-1.9.12.org/dbus/wscript 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/dbus/wscript 2018-07-05 22:32:26.812067218 -0400 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python2 + # encoding: utf-8 + + import os.path +diff -rupN jack2-1.9.12.org/example-clients/jack_control jack2-1.9.12/example-clients/jack_control +--- jack2-1.9.12.org/example-clients/jack_control 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/example-clients/jack_control 2018-07-05 22:32:26.814067212 -0400 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + name_base = 'org.jackaudio' + control_interface_name = name_base + '.JackControl' +diff -rupN jack2-1.9.12.org/example-clients/wscript jack2-1.9.12/example-clients/wscript +--- jack2-1.9.12.org/example-clients/wscript 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/example-clients/wscript 2018-07-05 22:32:26.813067215 -0400 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python2 + # encoding: utf-8 + + example_programs = { +diff -rupN jack2-1.9.12.org/man/wscript jack2-1.9.12/man/wscript +--- jack2-1.9.12.org/man/wscript 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/man/wscript 2018-07-05 22:32:26.813067215 -0400 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python2 + # encoding: utf-8 + + import re +diff -rupN jack2-1.9.12.org/tests/wscript jack2-1.9.12/tests/wscript +--- jack2-1.9.12.org/tests/wscript 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/tests/wscript 2018-07-05 22:32:26.813067215 -0400 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python2 + # encoding: utf-8 + + test_programs = { +diff -rupN jack2-1.9.12.org/waf jack2-1.9.12/waf +--- jack2-1.9.12.org/waf 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/waf 2018-07-05 22:32:26.806067234 -0400 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # encoding: ISO8859-1 + # Thomas Nagy, 2005-2015 + +diff -rupN jack2-1.9.12.org/wscript jack2-1.9.12/wscript +--- jack2-1.9.12.org/wscript 2017-12-13 16:19:04.000000000 -0500 ++++ jack2-1.9.12/wscript 2018-07-05 22:32:26.810067223 -0400 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python2 + # encoding: utf-8 + from __future__ import print_function + From e7773caf4cdc0d654834004aa165d5136db911ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 05:56:38 +0000 Subject: [PATCH 103/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index b25f266..8546ca7 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 5%{?dist} +Release: 6%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -248,6 +248,9 @@ exit 0 %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.9.12-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Jul 05 2018 Orcan Ogetbil - 1.9.12-5 - Fix unversioned Python shebangs From 0c4c35c70207e072b95a5880b086d5cdbf90c91d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:49 +0100 Subject: [PATCH 104/107] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- jack-audio-connection-kit.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 8546ca7..25e61eb 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -14,7 +14,6 @@ Version: 1.9.12 Release: 6%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ -Group: System Environment/Daemons URL: http://www.jackaudio.org Source0: https://github.com/jackaudio/jack2/releases/download/v%{version}/jack2-%{version}.tar.gz Source1: %{name}-README.Fedora @@ -69,7 +68,6 @@ latency operation. %package dbus Summary: Jack D-Bus launcher -Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} %description dbus @@ -78,7 +76,6 @@ Launcher to start Jack through D-Bus. %package devel Summary: Header files for Jack -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel @@ -86,7 +83,6 @@ Header files for the Jack Audio Connection Kit. %package example-clients Summary: Example clients that use Jack -Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} %description example-clients From 779373cb9af773ae43e503c02b498faa08dbe7ad Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 03:42:01 +0000 Subject: [PATCH 105/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index 25e61eb..f0fe67f 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 6%{?dist} +Release: 7%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ URL: http://www.jackaudio.org @@ -244,6 +244,9 @@ exit 0 %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.9.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 1.9.12-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From cfa86d22605538da66f6642dba8891593127e45f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 17 Feb 2019 09:30:51 +0100 Subject: [PATCH 106/107] Rebuild for readline 8.0 --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index f0fe67f..c514118 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 7%{?dist} +Release: 8%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ URL: http://www.jackaudio.org @@ -244,6 +244,9 @@ exit 0 %changelog +* Sun Feb 17 2019 Igor Gnatenko - 1.9.12-8 +- Rebuild for readline 8.0 + * Fri Feb 01 2019 Fedora Release Engineering - 1.9.12-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From bd2b556e9ce1f1589bb62de5d611b021da79f4b5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 09:51:33 +0000 Subject: [PATCH 107/107] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jack-audio-connection-kit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jack-audio-connection-kit.spec b/jack-audio-connection-kit.spec index c514118..68d077e 100644 --- a/jack-audio-connection-kit.spec +++ b/jack-audio-connection-kit.spec @@ -11,7 +11,7 @@ Summary: The Jack Audio Connection Kit Name: jack-audio-connection-kit Version: 1.9.12 -Release: 8%{?dist} +Release: 9%{?dist} # The entire source (~500 files) is a mixture of these three licenses License: GPLv2 and GPLv2+ and LGPLv2+ URL: http://www.jackaudio.org @@ -244,6 +244,9 @@ exit 0 %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.9.12-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 17 2019 Igor Gnatenko - 1.9.12-8 - Rebuild for readline 8.0