diff options
author | nia <nia@pkgsrc.org> | 2019-12-02 11:46:08 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2019-12-02 11:46:08 +0000 |
commit | 18954a67226e2d87bf6b263d29180e79d50c63fb (patch) | |
tree | a7939be9a26f5dff5e64e2f962da879ee6145aa7 /audio | |
parent | 3cc1648b63994bb3bf24b56baacc25786e04d8c5 (diff) | |
download | pkgsrc-18954a67226e2d87bf6b263d29180e79d50c63fb.tar.gz |
jack: Fix Sun driver on NetBSD and default to it over OSS.
Update usage instructions.
Bump PKGREVISION
Diffstat (limited to 'audio')
-rw-r--r-- | audio/jack/MESSAGE | 24 | ||||
-rw-r--r-- | audio/jack/MESSAGE.NetBSD | 20 | ||||
-rw-r--r-- | audio/jack/Makefile | 14 | ||||
-rw-r--r-- | audio/jack/distinfo | 3 | ||||
-rw-r--r-- | audio/jack/patches/patch-drivers_sun_sun__driver.c | 80 |
5 files changed, 108 insertions, 33 deletions
diff --git a/audio/jack/MESSAGE b/audio/jack/MESSAGE deleted file mode 100644 index 8e7908f9eea..00000000000 --- a/audio/jack/MESSAGE +++ /dev/null @@ -1,24 +0,0 @@ -=========================================================================== -$NetBSD: MESSAGE,v 1.1 2008/07/31 03:58:05 bjs Exp $ - -NOTE: Unfortunately, JACK wants to use a linux /proc filesystem to -perform shared memory housekeeping tasks. Therefore, if your platform -supports a "Linux-compliant" proc filesystem, we recommend mounting one -prior to using jack. On NetBSD, this can be accomplished with the -following command: - - mount_procfs -orw,linux /proc <mount point> - -Conventionally, the mount point is /proc. If you wish to use a different -pathname for this filesystem, you may define the JACKD_PROCFS_PATH -variable in your build environment or mk.conf as shown below. - - JACKD_PROCFS_PATH= /emul/linux/proc - -ATTENTION: NetBSD-current users who wish to run jackd with real-time - scheduling will likely find that the loader fails to mmap - the driver module(s) when using -R. Until this issue is re- - solved, one may work around this problem by using the -m - (--no-mlock) option. - -=========================================================================== diff --git a/audio/jack/MESSAGE.NetBSD b/audio/jack/MESSAGE.NetBSD new file mode 100644 index 00000000000..b1a403b9e13 --- /dev/null +++ b/audio/jack/MESSAGE.NetBSD @@ -0,0 +1,20 @@ +=========================================================================== +$NetBSD: MESSAGE.NetBSD,v 1.1 2019/12/02 11:46:08 nia Exp $ + +Realtime support is currently problematic. When running jackd as non-root, +you need to pass -r to disable it, e.g: + +`jackd -r -d sun` + +If you have an external mic: + +`jackd -r -d sun -P /dev/audio -C /dev/audio1` + +When running jackd as root you need to use the no-mlock option instead: + +`jackd -m -d sun` + +Note that to use JACK on NetBSD you need procfs mounted. +This should be done by default. + +=========================================================================== diff --git a/audio/jack/Makefile b/audio/jack/Makefile index 9fc407ded3f..f9735006dba 100644 --- a/audio/jack/Makefile +++ b/audio/jack/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.38 2019/11/02 21:09:14 rillig Exp $ +# $NetBSD: Makefile,v 1.39 2019/12/02 11:46:08 nia Exp $ DISTNAME= jack-audio-connection-kit-0.125.0 -PKGREVISION= 1 +PKGREVISION= 2 PKGNAME= ${DISTNAME:S/audio-connection-kit-//} CATEGORIES= audio MASTER_SITES= http://jackaudio.org/downloads/ @@ -68,11 +68,9 @@ PLIST.coreaudio= yes .else CONFIGURE_ARGS+= --disable-coreaudio .endif -### -### XXX The sun driver is buggy on NetBSD right now. I hope to remedy -### this shortly. -### -.if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "SunOS" + +.if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "SunOS" || \ + exists(/usr/include/sys/audioio.h) CONFIGURE_ARGS+= --enable-sun PLIST.sunaudio= yes .else @@ -81,7 +79,7 @@ CONFIGURE_ARGS+= --disable-sun .include "../../mk/oss.buildlink3.mk" -.if ${OSS_TYPE} != "none" +.if ${OSS_TYPE} != "none" && ${OPSYS} != "NetBSD" && ${OPSYS} != "SunOS" CONFIGURE_ARGS+= --enable-oss PLIST.oss= yes MAKE_ENV+= LIBOSSAUDIO=${LIBOSSAUDIO} diff --git a/audio/jack/distinfo b/audio/jack/distinfo index 3d182737863..c2478d14f4e 100644 --- a/audio/jack/distinfo +++ b/audio/jack/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.21 2019/06/19 11:43:04 jperkin Exp $ +$NetBSD: distinfo,v 1.22 2019/12/02 11:46:08 nia Exp $ SHA1 (jack-audio-connection-kit-0.125.0.tar.gz) = 6b7516b442878ffd1ca875310084b33d0edee400 RMD160 (jack-audio-connection-kit-0.125.0.tar.gz) = 25f1baa1d8f03f0bbfc0b48c300b63d89d4e881b @@ -11,6 +11,7 @@ SHA1 (patch-drivers_coreaudio_Makefile.in) = 13f5e5914ae0304c93dca54518fecb19f5e SHA1 (patch-drivers_netjack_netjack__packet.c) = eb70ec5644e960e0cf0258a15d763be31c11bb02 SHA1 (patch-drivers_oss_oss__driver.c) = 302f20e82abde4a5b1678d2c3e9cbc8a63fad5ad SHA1 (patch-drivers_oss_oss__driver.h) = f23595db3fe80cae36ce222d89cdfbc37916e325 +SHA1 (patch-drivers_sun_sun__driver.c) = 0842e34e6190b8877ab7ac3d4d764a0de4cbfca8 SHA1 (patch-include_engine.h) = c58651bccc910131ffc9b263a75fa732a7a2b168 SHA1 (patch-jack_control.h) = 8d6f07fd226b68cacf170501f557503cd674249a SHA1 (patch-jack_types.h) = a58fcdafab7e014760287d763c944c8a77281f7f diff --git a/audio/jack/patches/patch-drivers_sun_sun__driver.c b/audio/jack/patches/patch-drivers_sun_sun__driver.c new file mode 100644 index 00000000000..374cdfbdafa --- /dev/null +++ b/audio/jack/patches/patch-drivers_sun_sun__driver.c @@ -0,0 +1,80 @@ +$NetBSD: patch-drivers_sun_sun__driver.c,v 1.1 2019/12/02 11:46:08 nia Exp $ + +NetBSD support changes: + +- Don't try to poll() /dev/audio +- Don't write silence to "prime" the driver +- Block size does not relate to period +- AUDIO_SETFD is deprecated + +--- drivers/sun/sun_driver.c.orig 2016-02-23 15:13:53.000000000 +0000 ++++ drivers/sun/sun_driver.c +@@ -383,7 +383,12 @@ sun_driver_run_cycle (sun_driver_t *driv + int wait_status; + float iodelay; + ++#ifdef __NetBSD__ ++ wait_status = 0; ++ nframes = driver->period_size; ++#else + nframes = sun_driver_wait (driver, &wait_status, &iodelay); ++#endif + + if (wait_status < 0) { + switch (wait_status) { +@@ -650,8 +655,10 @@ sun_driver_start (sun_driver_t *driver) + * be available to read before we can write. also helps to + * keep constant latency from the beginning. + */ ++#ifndef __NetBSD__ + sun_driver_write_silence (driver, + driver->nperiods * driver->period_size); ++#endif + } + + if (driver->infd >= 0) { +@@ -732,7 +739,7 @@ sun_driver_set_parameters (sun_driver_t + __FILE__, __LINE__); + return -1; + } +-#if defined(AUDIO_SETFD) ++#if defined(AUDIO_SETFD) && !defined(__NetBSD__) + if (ioctl (infd, AUDIO_SETFD, &s) < 0) { + jack_error ("sun_driver: failed to enable full duplex: " + "%s: %s@%i", strerror (errno), +@@ -797,15 +804,6 @@ sun_driver_set_parameters (sun_driver_t + audio_if_out.play.block_size = driver->playback_channels * + driver->period_size * driver->sample_bytes; + } +-#else +- if (driver->infd >= 0) { +- audio_if_in.blocksize = driver->capture_channels * +- driver->period_size * driver->sample_bytes; +- } +- if (driver->outfd >= 0) { +- audio_if_out.blocksize = driver->playback_channels * +- driver->period_size * driver->sample_bytes; +- } + #endif + if (infd == outfd) { + audio_if_in.play = audio_if_out.play; +@@ -871,9 +869,6 @@ sun_driver_set_parameters (sun_driver_t + #if defined(__OpenBSD__) + cap_period = audio_if_in.record.block_size / + driver->capture_channels / driver->sample_bytes; +-#elif defined(__NetBSD__) +- cap_period = audio_if_in.blocksize / +- driver->capture_channels / driver->sample_bytes; + #else + /* how is this done on Solaris? */ + cap_period = driver->period_size; +@@ -903,9 +898,6 @@ sun_driver_set_parameters (sun_driver_t + #if defined(__OpenBSD__) + play_period = audio_if_out.play.block_size / + driver->playback_channels / driver->sample_bytes; +-#elif defined(__NetBSD__) +- play_period = audio_if_out.blocksize / +- driver->playback_channels / driver->sample_bytes; + #else + /* how is this done on Solaris? */ + play_period = driver->period_size; |