git-svn-id: svn+ssh://jackaudio.org/trunk/jack@1122 0c269be4-1314-0410-8aa9-9f06e86f4224tags/0.115.6
| @@ -72,13 +72,16 @@ Frank van der Pol | |||
| on multi-device PCM configurations. | |||
| Dmitry Baikov | |||
| wrote the jackmidi ALSA hardware support | |||
| wrote the jackmidi ALSA hardware support. | |||
| Pieter Palmers | |||
| wrote the freebob and firewire backends and some bugfixes | |||
| wrote the freebob and firewire backends and some bugfixes. | |||
| Nedko Arnaudov | |||
| contributed several fixes | |||
| Jacob Meuser | |||
| contributed the sun backend. | |||
| Many others have contributed patches and/or test results, and we thank | |||
| them all. | |||
| @@ -17,7 +17,7 @@ dnl changes are made | |||
| dnl --- | |||
| JACK_MAJOR_VERSION=0 | |||
| JACK_MINOR_VERSION=109 | |||
| JACK_MICRO_VERSION=8 | |||
| JACK_MICRO_VERSION=9 | |||
| dnl --- | |||
| dnl HOWTO: updating the jack protocol version | |||
| @@ -88,6 +88,12 @@ case "${host_os}" in | |||
| # barrier code, this may be fixed in 5.3, stay tuned. | |||
| USE_BARRIER="no" | |||
| ;; | |||
| opebsd*) | |||
| # pthread_barrier* not implemented | |||
| USE_BARRIER="no" | |||
| # need small realtime stack | |||
| JACK_THREAD_STACK_TOUCH=10000 | |||
| ;; | |||
| darwin*) | |||
| JACK_THREAD_STACK_TOUCH=10000 # need small realtime stack | |||
| JACK_CPP_VARARGS_BROKEN=1 | |||
| @@ -558,7 +564,7 @@ fi | |||
| # Check which backend drivers can be built. The last one successfully | |||
| # configured becomes the default JACK driver; so the order of | |||
| # precedence is: alsa, oss, coreaudio, portaudio, dummy. | |||
| # precedence is: alsa, sun, oss, coreaudio, portaudio, dummy. | |||
| JACK_DEFAULT_DRIVER=\"dummy\" | |||
| @@ -604,6 +610,18 @@ then | |||
| fi | |||
| AM_CONDITIONAL(HAVE_OSS, $HAVE_OSS) | |||
| AC_ARG_ENABLE(sun, [ --disable-sun ignore Sun driver ], | |||
| TRY_SUN=$enableval , TRY_SUN=yes ) | |||
| HAVE_SUN="false" | |||
| if test "x$TRY_SUN" = "xyes" | |||
| then | |||
| # check for Sun audio API | |||
| AC_CHECK_HEADER([sys/audioio.h], | |||
| [HAVE_SUN="true" | |||
| JACK_DEFAULT_DRIVER=\"sun\"]) | |||
| fi | |||
| AM_CONDITIONAL(HAVE_SUN, $HAVE_SUN) | |||
| AC_ARG_ENABLE(freebob, [ --disable-freebob ignore FreeBob driver ], | |||
| TRY_FREEBOB=$enableval , TRY_FREEBOB=yes ) | |||
| HAVE_FREEBOB="false" | |||
| @@ -726,6 +744,7 @@ drivers/alsa/Makefile | |||
| drivers/alsa-midi/Makefile | |||
| drivers/dummy/Makefile | |||
| drivers/oss/Makefile | |||
| drivers/sun/Makefile | |||
| drivers/portaudio/Makefile | |||
| drivers/coreaudio/Makefile | |||
| drivers/freebob/Makefile | |||
| @@ -752,6 +771,7 @@ echo \| Build with ALSA support............................... : $HAVE_ALSA | |||
| echo \| Build with old FireWire \(FreeBob\) support............. : $HAVE_FREEBOB | |||
| echo \| Build with new FireWire \(FFADO\) support............... : $HAVE_FIREWIRE | |||
| echo \| Build with OSS support................................ : $HAVE_OSS | |||
| echo \| Build with Sun audio support.......................... : $HAVE_SUN | |||
| echo \| Build with CoreAudio support.......................... : $HAVE_COREAUDIO | |||
| echo \| Build with PortAudio support.......................... : $HAVE_PA | |||
| echo \| Compiler optimization flags........................... : $JACK_OPT_CFLAGS | |||
| @@ -18,6 +18,12 @@ else | |||
| OSS_DIR = | |||
| endif | |||
| if HAVE_SUN | |||
| SUN_DIR = sun | |||
| else | |||
| SUN_DIR = | |||
| endif | |||
| if HAVE_PA | |||
| PA_DIR = portaudio | |||
| else | |||
| @@ -42,5 +48,5 @@ else | |||
| FIREWIRE_DIR = | |||
| endif | |||
| SUBDIRS = $(ALSA_MIDI_DIR) $(ALSA_DIR) dummy $(OSS_DIR) $(PA_DIR) $(CA_DIR) $(FREEBOB_DIR) $(FIREWIRE_DIR) netjack | |||
| DIST_SUBDIRS = alsa alsa-midi dummy oss portaudio coreaudio freebob firewire netjack | |||
| SUBDIRS = $(ALSA_MIDI_DIR) $(ALSA_DIR) dummy $(OSS_DIR) $(SUN_DIR) $(PA_DIR) $(CA_DIR) $(FREEBOB_DIR) $(FIREWIRE_DIR) | |||
| DIST_SUBDIRS = alsa alsa-midi dummy oss sun portaudio coreaudio freebob firewire | |||
| @@ -0,0 +1,12 @@ | |||
| MAINTAINCLEANFILES = Makefile.in | |||
| AM_CFLAGS = $(JACK_CFLAGS) | |||
| plugindir = $(ADDON_DIR) | |||
| plugin_LTLIBRARIES = jack_sun.la | |||
| jack_sun_la_LDFLAGS = -module -avoid-version | |||
| jack_sun_la_SOURCES = sun_driver.c sun_driver.h | |||
| noinst_HEADERS = sun_driver.h | |||
| @@ -0,0 +1,103 @@ | |||
| /* | |||
| Sun Audio API driver for Jack | |||
| Copyright (C) 2008 Jacob Meuser <jakemsr@sdf.lonestar.org> | |||
| Based heavily on oss_driver.h which came with the following | |||
| copyright notice. | |||
| Copyright (C) 2003-2007 Jussi Laako <jussi@sonarnerd.net> | |||
| 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., 59 Temple Place, Suite 330, Boston, | |||
| MA 02111-1307 USA | |||
| */ | |||
| #ifndef __JACK_SUN_DRIVER_H__ | |||
| #define __JACK_SUN_DRIVER_H__ | |||
| #include <sys/types.h> | |||
| #include <pthread.h> | |||
| #include <semaphore.h> | |||
| #include <jack/types.h> | |||
| #include <jack/jslist.h> | |||
| #include <jack/driver.h> | |||
| #include <jack/jack.h> | |||
| #define SUN_DRIVER_DEF_DEV "/dev/audio" | |||
| #define SUN_DRIVER_DEF_FS 48000 | |||
| #define SUN_DRIVER_DEF_BLKSIZE 1024 | |||
| #define SUN_DRIVER_DEF_NPERIODS 2 | |||
| #define SUN_DRIVER_DEF_BITS 16 | |||
| #define SUN_DRIVER_DEF_INS 2 | |||
| #define SUN_DRIVER_DEF_OUTS 2 | |||
| typedef jack_default_audio_sample_t jack_sample_t; | |||
| typedef struct _sun_driver | |||
| { | |||
| JACK_DRIVER_DECL | |||
| jack_nframes_t sample_rate; | |||
| jack_nframes_t period_size; | |||
| unsigned int nperiods; | |||
| int bits; | |||
| unsigned int capture_channels; | |||
| unsigned int playback_channels; | |||
| char *indev; | |||
| char *outdev; | |||
| int infd; | |||
| int outfd; | |||
| int format; | |||
| int ignorehwbuf; | |||
| int trigger; | |||
| size_t indevbufsize; | |||
| size_t outdevbufsize; | |||
| size_t portbufsize; | |||
| void *indevbuf; | |||
| void *outdevbuf; | |||
| float iodelay; | |||
| jack_time_t last_periodtime; | |||
| jack_time_t next_periodtime; | |||
| jack_nframes_t sys_in_latency; | |||
| jack_nframes_t sys_out_latency; | |||
| JSList *capture_ports; | |||
| JSList *playback_ports; | |||
| jack_engine_t *engine; | |||
| jack_client_t *client; | |||
| volatile int run; | |||
| volatile int threads; | |||
| pthread_t thread_in; | |||
| pthread_t thread_out; | |||
| pthread_mutex_t mutex_in; | |||
| pthread_mutex_t mutex_out; | |||
| # ifdef USE_BARRIER | |||
| pthread_barrier_t barrier; | |||
| # endif | |||
| sem_t sem_start; | |||
| } sun_driver_t; | |||
| #endif | |||
| @@ -35,8 +35,8 @@ For the latest JACK information, please consult the web site, | |||
| .br | |||
| Select the audio interface backend. The current list of supported | |||
| backends is: \fBalsa\fR, \fBcoreaudio\fR, \fBdummy\fR, \fBfreebob\fR, | |||
| \fBoss\fR and \fBportaudio\fR. They are not all available on all | |||
| platforms. All \fIbackend\-parameters\fR are optional. | |||
| \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 | |||
| @@ -295,6 +295,42 @@ 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 | |||
| @@ -340,6 +376,8 @@ Print usage message for the parameters specific to each backend. | |||
| .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 | |||
| @@ -376,7 +376,7 @@ static void usage (FILE *file) | |||
| " [ --nozombies OR -Z ]\n" | |||
| " -d backend [ ... backend args ... ]\n" | |||
| " The backend can be `alsa', `coreaudio', `dummy',\n" | |||
| " `freebob', `oss' or `portaudio'.\n\n" | |||
| " `freebob', `oss', `sun', or `portaudio'.\n\n" | |||
| " jackd -d backend --help\n" | |||
| " to display options for each backend\n\n"); | |||
| } | |||
| @@ -167,7 +167,7 @@ jack_internal_client_load (jack_client_t *client, | |||
| { | |||
| va_list ap; | |||
| va_start(ap, status); | |||
| jack_client_t* res = jack_internal_client_load_aux(client, client_name, options, status, ap); | |||
| jack_intclient_t* res = jack_internal_client_load_aux(client, client_name, options, status, ap); | |||
| va_end(ap); | |||
| return res; | |||
| } | |||