pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/jack



Module Name:    pkgsrc
Committed By:   nia
Date:           Mon Dec  2 11:46:08 UTC 2019

Modified Files:
        pkgsrc/audio/jack: Makefile distinfo
Added Files:
        pkgsrc/audio/jack: MESSAGE.NetBSD
        pkgsrc/audio/jack/patches: patch-drivers_sun_sun__driver.c
Removed Files:
        pkgsrc/audio/jack: MESSAGE

Log Message:
jack: Fix Sun driver on NetBSD and default to it over OSS.

Update usage instructions.

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 pkgsrc/audio/jack/MESSAGE
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/jack/MESSAGE.NetBSD
cvs rdiff -u -r1.38 -r1.39 pkgsrc/audio/jack/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/audio/jack/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/jack/patches/patch-drivers_sun_sun__driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/jack/Makefile
diff -u pkgsrc/audio/jack/Makefile:1.38 pkgsrc/audio/jack/Makefile:1.39
--- pkgsrc/audio/jack/Makefile:1.38     Sat Nov  2 21:09:14 2019
+++ pkgsrc/audio/jack/Makefile  Mon Dec  2 11:46:08 2019
@@ -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}

Index: pkgsrc/audio/jack/distinfo
diff -u pkgsrc/audio/jack/distinfo:1.21 pkgsrc/audio/jack/distinfo:1.22
--- pkgsrc/audio/jack/distinfo:1.21     Wed Jun 19 11:43:04 2019
+++ pkgsrc/audio/jack/distinfo  Mon Dec  2 11:46:08 2019
@@ -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.i
 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

Added files:

Index: pkgsrc/audio/jack/MESSAGE.NetBSD
diff -u /dev/null pkgsrc/audio/jack/MESSAGE.NetBSD:1.1
--- /dev/null   Mon Dec  2 11:46:08 2019
+++ pkgsrc/audio/jack/MESSAGE.NetBSD    Mon Dec  2 11:46:08 2019
@@ -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.
+
+===========================================================================

Index: pkgsrc/audio/jack/patches/patch-drivers_sun_sun__driver.c
diff -u /dev/null pkgsrc/audio/jack/patches/patch-drivers_sun_sun__driver.c:1.1
--- /dev/null   Mon Dec  2 11:46:08 2019
+++ pkgsrc/audio/jack/patches/patch-drivers_sun_sun__driver.c   Mon Dec  2 11:46:08 2019
@@ -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;



Home | Main Index | Thread Index | Old Index