Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
On Mon, 2003-11-17 at 04:06, Jack O'Quin wrote: > One helpful thing you could do would be testing it on a system with a > real OSS driver. I'll test it in near future. > Sample Rates = 48000.00, 44100.00, 32000.00, 24000.00, 22050.00, 16000.00, > 11025.00, 8000.00, > Native Sample Formats = paUInt8, paInt16, Maybe this is a feature of alsa oss emulation? -- Jussi Laako <[EMAIL PROTECTED]>
Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
Jussi Laako <[EMAIL PROTECTED]> writes: > Does PortAudio support 24/32 bit formats and more than 2 channels or > samplerates over 48 kHz? All my experience is with my home system, which runs ALSA drivers using the OSS emulation interfaces. I suspect things would probably work differently using one of the "real" OSS driver implementations. One helpful thing you could do would be testing it on a system with a real OSS driver. Running this version on my M-Audio Delta-66 card, I see... Name = /dev/dsp Max Inputs = 16 Max Outputs = 16 Sample Rates = 48000.00, 44100.00, 32000.00, 24000.00, 22050.00, 16000.00, 11025.00, 8000.00, Native Sample Formats = paUInt8, paInt16, If I try to set the sample rate to 88200, it fails... Pa_SetupDeviceFormat: HW does not support 88200 Hz sample rate Using the ALSA interface, the same card supports 24-bit in 32-bit and 96 kHz. I don't know whether these differences are due to the driver, to PA, or to OSS. As I said, running this driver on Linux is very immature, yet. > Does it do additional buffering? I don't think so. Should it? > > Would you mind terribly redirecting some of this fine work in the > > direction of testing and fixing problems with the PortAudio driver, > > instead? > > No, depending on how PortAudio is implemented... Do you mean the JACK driver or the library? The JACK driver was originally written for MacOSX. The current JACK driver is a straightforward backport from MacOSX to Linux. That was easy to do, so I am impressed with the "portable" aspect of PortAudio. It uses PortAudio version 18, which is the current release level. A newer version 19 is currently in development but still not supported on MacOSX (IIUC). On Linux, PA V18 uses only the OSS drivers. V19 will also support ALSA and JACK client interfaces. This is helpful for writing portable applications, but not especially important for the JACK server. We already have an ALSA driver, and the idea of the JACK server running as a client of another JACK server is probably only interesting to mathematicians and computer scientists. ;-) We would like to use PA V19 too, of course. That would be a useful patch that someone could contribute. It will continue to be necessary for some time to support V18 as well. Probably, this should be conditionally compiled based on checking library function names in `configure.in'. -- joq
Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
On Sat, 2003-11-15 at 05:00, Jack O'Quin wrote: > Not only is its function mostly duplicated in the PortAudio driver, > but the entire JACK driver interface has also undergone *major* > changes since 0.80.0. We are about to release JACK 0.90.0 with these > new interfaces. No one realized that anyone outside jackit-devel was > working on drivers, or we would have warned you. (There *is* a > warning in the README.developers.) Does PortAudio support 24/32 bit formats and more than 2 channels or samplerates over 48 kHz? Does it do additional buffering? OK, I'll update/rewrite this stuff when JACK 0.90.0 comes out. I wanted to have native support for OSS in _released_ version of JACK. And no need to be sorry, the driver is worth of about 8 hours of work, so it's not that bad... :) > Would you mind terribly redirecting some of this fine work in the > direction of testing and fixing problems with the PortAudio driver, > instead? No, depending on how PortAudio is implemented... -- Jussi Laako <[EMAIL PROTECTED]>
Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
>> contributor, and if the internal API changes (as has happened between >> 0.80 and 0.90) and the driver is not ported, it will be removed from >> the Makefiles. > >That may be clear to the driver writers, but it won't make any sense >to users filing bug reports in Mantis because one of our supported >features doesn't work on their hardware. what kinds of features are you thinking of? most of the hardware-related features derive from the ALSA driver, not JACK itself. > If you really want to wash >your hands of all responsibility for this code, it needs to come from >some other package, *not* from JACK CVS. that would be fine with me. we can package jack-audio-connection-kit with just the core supported drivers (whatever they may be) and then jack-audio-connection-kit- for other drivers. its a trivial change to the Makefiles that i know taybin will love to do :) --p
Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
Paul Davis <[EMAIL PROTECTED]> writes: > >But, I would much prefer to do that than to take on the extra > >maintenance load for yet another driver (we already have three). > > i welcome as many drivers as people can provide, on the understanding > that they will not necessarily be maintained by anyone except the > contributor, and if the internal API changes (as has happened between > 0.80 and 0.90) and the driver is not ported, it will be removed from > the Makefiles. That may be clear to the driver writers, but it won't make any sense to users filing bug reports in Mantis because one of our supported features doesn't work on their hardware. If you really want to wash your hands of all responsibility for this code, it needs to come from some other package, *not* from JACK CVS. -- joq
Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
>But, I would much prefer to do that than to take on the extra >maintenance load for yet another driver (we already have three). i welcome as many drivers as people can provide, on the understanding that they will not necessarily be maintained by anyone except the contributor, and if the internal API changes (as has happened between 0.80 and 0.90) and the driver is not ported, it will be removed from the Makefiles. --p
Re: [linux-audio-dev] [PATCH] oss support for jack
>I've written preliminary OSS driver for JACK. Patch for jack 0.80 >attached. laudable work jussi. just one problem. the biggest thing that has changed between 0.80 and now is the entire driver model. this patch won't apply or even work with the new design. you'll need to check out the code from CVS to see how it works now. its more like CoreAudio or PortAudio in that the engine doesn't assume that it has control of the thread in which audio is performed; that's handled by the driver, though we make it easier by providing library functions to run the thread for APIs that don't provide one (like ALSA or OSS). please update it and then i'd be happy to apply this. --p
Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
Jussi Laako <[EMAIL PROTECTED]> writes: > Of course I forgot something out of the patch. Here's additional patch > for drivers/oss/Makefile.am... I am *very* sorry that you went to all this work. Not only is its function mostly duplicated in the PortAudio driver, but the entire JACK driver interface has also undergone *major* changes since 0.80.0. We are about to release JACK 0.90.0 with these new interfaces. No one realized that anyone outside jackit-devel was working on drivers, or we would have warned you. (There *is* a warning in the README.developers.) The PortAudio driver has been used for the MacOSX port of JACK for quite a while. But, it is quite immature running on Linux with OSS. There may be bugs or missing features that will need to be fixed. But, I would much prefer to do that than to take on the extra maintenance load for yet another driver (we already have three). Would you mind terribly redirecting some of this fine work in the direction of testing and fixing problems with the PortAudio driver, instead? Regards, -- Jack O'Quin Austin, Texas
Re: [linux-audio-dev] [PATCH] oss support for jack
Jussi Laako <[EMAIL PROTECTED]> writes: > I've written preliminary OSS driver for JACK. Patch for jack 0.80 > attached. With current CVS you can just run `jackd -d portaudio'. -- Jack O'Quin Austin, Texas
Re: [linux-audio-dev] [PATCH] oss support for jack [UPDATE]
Of course I forgot something out of the patch. Here's additional patch for drivers/oss/Makefile.am... -- Jussi Laako <[EMAIL PROTECTED]> --- jack-audio-connection-kit-0.80.0/drivers/oss/Makefile.am 1970-01-01 02:00:00.0 +0200 +++ jackit/drivers/oss/Makefile.am 2003-11-14 21:04:01.0 +0200 @@ -0,0 +1,10 @@ +MAINTAINCLEANFILES = Makefile.in + +AM_CFLAGS = $(JACK_CFLAGS) -I/opt/oss/include + +plugindir = $(ADDON_DIR) + +plugin_LTLIBRARIES = jack_oss.la + +jack_oss_la_LDFLAGS = -module -avoid-version +jack_oss_la_SOURCES = oss_driver.c oss_driver.h
Re: [linux-audio-dev] [PATCH] oss support for jack
On 14 Nov 2003, Jussi Laako wrote: > I've written preliminary OSS driver for JACK. Patch for jack 0.80 [...] > If you are compiling with OSS Lite, please comment out the non-S16 > formats. Workaround for this: --cut-- #ifndef AFMT_S32_LE #define AFMT_S32_LE 0x1000 #endif #ifndef AFMT_S32_BE #define AFMT_S32_BE 0x2000 #endif --cut-- ... and so on. This should be added before committing this to CVS as most people have OSS-Lite. -- http://www.eca.cx Audio software for Linux!
[linux-audio-dev] [PATCH] oss support for jack
Hi, I've written preliminary OSS driver for JACK. Patch for jack 0.80 attached. This is by no means final, this is something pre-alpha, but seems to work at least with alsaplayer. It's likely to contains errors in jack driver implementation. All comments/patches/anything is welcome.. If you are compiling with OSS Lite, please comment out the non-S16 formats. RedHat RPMs and patch available at http://www.sonarnerd.net/linux/ , SuSE 9 packages coming. -- Jussi Laako <[EMAIL PROTECTED]> --- jack-audio-connection-kit-0.80.0/configure.in 2003-08-29 01:21:07.0 +0300 +++ jackit/configure.in 2003-11-14 00:43:54.0 +0200 @@ -112,8 +112,8 @@ JACK_CORE_CFLAGS="-I\$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall $SHM_FLAGS" -JACK_CFLAGS="$JACK_CORE_CFLAGS -g" -JACK_OPT_CFLAGS="$JACK_CORE_CFLAGS -O3 -fomit-frame-pointer -ffast-math -fstrength-reduce -funroll-loops -fmove-all-movables" +JACK_CFLAGS="$JACK_CORE_CFLAGS -g $CFLAGS" +JACK_OPT_CFLAGS="$JACK_CORE_CFLAGS -march=pentium2 -mcpu=pentium4 -O3 -ffast-math -funroll-loops -fprefetch-loop-arrays" AC_ARG_ENABLE(optimize, [ --enable-optimize ask the compiler for its best optimizations], @@ -295,6 +295,7 @@ drivers/Makefile drivers/alsa/Makefile drivers/dummy/Makefile +drivers/oss/Makefile example-clients/Makefile doc/Makefile doc/reference.doxygen --- jack-audio-connection-kit-0.80.0/drivers/Makefile.am2003-08-29 02:41:21.0 +0300 +++ jackit/drivers/Makefile.am 2003-11-14 00:43:54.0 +0200 @@ -6,6 +6,6 @@ ALSA_DIR = endif -SUBDIRS = dummy $(ALSA_DIR) +SUBDIRS = dummy $(ALSA_DIR) oss -DIST_SUBDIRS = dummy alsa +DIST_SUBDIRS = dummy alsa oss --- jack-audio-connection-kit-0.80.0/drivers/oss/oss_driver.h 1970-01-01 02:00:00.0 +0200 +++ jackit/drivers/oss/oss_driver.h 2003-11-14 20:40:04.0 +0200 @@ -0,0 +1,76 @@ +/* + + OSS driver for Jack + Copyright (C) 2003 Jussi Laako <[EMAIL PROTECTED]> + + 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_OSS_DRIVER_H__ +#define __JACK_OSS_DRIVER_H__ + +#include +#include +#include +#include + + +#define OSS_DRIVER_DEF_FS 44100 +#define OSS_DRIVER_DEF_BLKSIZE 1024 +#define OSS_DRIVER_DEF_BITS16 +#define OSS_DRIVER_DEF_INS 2 +#define OSS_DRIVER_DEF_OUTS2 +#define OSS_DRIVER_MAX_PORTS 16 + + +typedef jack_default_audio_sample_t jack_sample_t; + +typedef struct _oss_driver +{ + JACK_DRIVER_DECL + + jack_nframes_t sample_rate; + jack_nframes_t period_size; + int bits; + unsigned int capture_channels; + unsigned int playback_channels; + + char *indev; + char *outdev; + int infd; + int outfd; + int format; + + size_t indevbufsize; + size_t outdevbufsize; + size_t portbufsize; + void *indevbuf; + void *outdevbuf; + jack_sample_t *inportbufs[OSS_DRIVER_MAX_PORTS]; + jack_sample_t *outportbufs[OSS_DRIVER_MAX_PORTS]; + + JSList *capture_ports; + JSList *playback_ports; + + jack_engine_t *engine; + jack_client_t *client; +} oss_driver_t; + + +#endif + --- jack-audio-connection-kit-0.80.0/drivers/oss/oss_driver.c 1970-01-01 02:00:00.0 +0200 +++ jackit/drivers/oss/oss_driver.c 2003-11-14 22:13:40.0 +0200 @@ -0,0 +1,694 @@ +/* + + OSS driver for Jack + Copyright (C) 2003 Jussi Laako <[EMAIL PROTECTED]> + + 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 + +*/ + + +#include +#i