Commit Graph

2207 Commits

Author SHA1 Message Date
Nedko Arnaudov f70e547614 Fix doxygen issues in jack API headers 2023-11-18 15:53:03 +02:00
Nedko Arnaudov 1073de3513 Merge branch jackaudio/develop into LADI/main 2023-11-05 12:58:53 +02:00
Nedko Arnaudov 028a21ecd6 common/JackControlAPI.cpp: Log positive errno values 2023-11-05 12:51:24 +02:00
Nedko Arnaudov 98eeca28f7 common/JackControlAPI.cpp: Replace fprintf(stderr) calls with jack_error() ones 2023-11-05 12:43:50 +02:00
Nedko Arnaudov cedeffca26 common/JackControlAPI.cpp: -1 is the invalid value for file descriptor, not 0.
Kudos to @imaami
2023-11-05 12:27:49 +02:00
falkTX 73a759b082
Make jack_get_descriptor internal client message a verbose log
Signed-off-by: falkTX <falktx@falktx.com>
2023-10-27 14:11:48 +02:00
falkTX 171ec33b58
Define metadata APIs on libjackserver too
Signed-off-by: falkTX <falktx@falktx.com>
2023-10-27 14:11:01 +02:00
Nedko Arnaudov ee831d045c Make jack_get_version_string() return libjackserver.so.0 mtime 2023-08-30 00:00:28 +03:00
Nedko Arnaudov 2de192bc81 common/jack/session.h: remove newsm recommendation
Jack-Session was bad idea from the start,
so its use was never encouraged in LADI project.

NonSM & NewSM OSC-RPC, as used over UDP only, was and still is
unrealiable in multi computer in a network scenarios because of the
UDP packet loss.

Jack-Session used to be another jackaudio.org recommendation,
which ended in deprecations. However, as loading JS sessions via
LADISH is a feature to be maintained and sensible warnings during
build are to be easy catched, the half-deprecated jack-session api is
now undeprecated for the compiler. Jack-Session is left documented as
deprecated.
2023-08-27 21:10:19 +03:00
Nedko Arnaudov 77a91edb60 Revert "Add support for internal session files"
This reverts commit 2ad48419a7.

libjackserver.so is not a half-baked session manager anymore
2023-08-27 20:18:02 +03:00
Nedko Arnaudov 5383f02c15 common/jack/control.h: Add jackctl_subgraph_XXX() functions 2023-08-26 20:48:36 +03:00
Nedko Arnaudov d9ead0da7a Remove jack_port_tie() and jack_port_untie() from libjack.so; undeprecate them in libjackserver.so 2023-08-26 19:51:28 +03:00
Nedko Arnaudov b524c27fd6 common/JackControlAPI.h: Fix ackctl_finish_signals() prototype 2023-07-28 04:25:15 +03:00
Nedko Arnaudov 00c12b1abf common/jack/control.h: Add jackctl_server_get_drivers_list() 2023-07-28 04:16:01 +03:00
Nedko Arnaudov 5aeddcbdc6 common/jack/control.h: Update with newer stuff 2023-07-26 05:51:21 +03:00
Nedko Arnaudov 93b19769bf common/JackConstants.h: Use JACK_VERSION supplied by build system instead of VERSION 2023-07-26 02:56:04 +03:00
Nedko Arnaudov 477e64afce JackDriverLoader: Only .so suffixed drivers
Loading of drivers with non-standard extensions like mydriver.something
is not allowed anymore. Such drivers are ignored.
2023-07-26 02:48:32 +03:00
Nedko Arnaudov d2e428e185 Split ADDON_DIR into JACK_DRIVER_DIR & JACK_INTERNAL_DIR and deprecate it.
It is better to have internal clients and drivers in different directories.

While prefixing the shared library names with "jack_" could be used for
distinguising between drivers and internal clients during load,
this was is not the case with current code.

Also, as neither drivers nor internal clients are supposed to be implicitly
loadable via ld.so as regular shared libraries, they now reside in

<PREFIX>/libexec/jack-driver/ and <PREFIX>/libexec/jack-internal/

The jack_ prefix for drivers is removed.

Windows specific code paths are not updated.
2023-07-26 02:13:35 +03:00
Nedko Arnaudov 93a613f066 common/JackDriverLoader.cpp: Make getenv() for internals consistent with that in common/JackTools.cpp 2023-07-26 01:55:21 +03:00
Nedko Arnaudov ae7b5d0dda control.h: Add jackctl_finish_signals()
Function to be used for cleaning,
after waiting on a signal set,
to undo the jackctl_setup_signals() and restore to previous state.
2023-07-25 23:23:11 +03:00
Nedko Arnaudov e81fc7038b jack/control.h: Adjust signal related functions to match those in JackControlAPI.h 2023-07-25 23:17:49 +03:00
Nedko Arnaudov d41863f6fd partial sync of jack/control.h and JackControlAPI.h
The copyright lines were synced but the still don't match reality,
see commens at 520dfa0ac5
2023-07-25 23:07:15 +03:00
Nedko Arnaudov 2e1be55bac Remove jackd sources
--dbus and --classic options are no more.

jackd is maintained at jackaudio.org

jackdbus is maintained in decicated LADI repo:

https://jackdbus.ladish.org/

See also commit 895472e250
2023-07-25 22:52:57 +03:00
Nedko Arnaudov cf8d44743b Merge miartad/adit-control-api-backports into LADI/jack2/main
https://github.com/jackaudio/jack2/pull/948
2023-07-25 20:55:23 +03:00
Laxmi Devi 1335d72497 JackControlAPI: Jack threads to notify failure to jackd by posting an event
On failure, currently the jack thread exits without notifying the jackd.
So jackd is just waiting for the signals, unaware of the failure.
With this implementation, on error threads can post an event to jackd
notifying it to to exit.

(cherry picked from adit commit c430be1e337f52aba8312f7d29990e190cad204a)

Change-Id: Ib484bb1e126f6bff0db76d44e6e036f92f5d8806
Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
2023-07-24 21:33:03 +02:00
Laxmi Devi 58ab7eea9a JackControlAPI: Replacing sigwait with signalfd and poll
This would be required so that the polling concept can be used to wait
on signals as well as wait for events from the other threads.

(cherry picked from adit)

Change-Id: Ic7b8d4c816d601d4b5467ec9c2519f3c547ae59f
Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
2023-07-24 21:32:35 +02:00
Nedko Arnaudov d104193996 Merge branch 'controlapi' 2023-06-06 05:06:13 +03:00
nedko 2efc9ea972 Add device reservation callbacks
cherry picked from commit 3aa9b525c38b37a4f6248c57a1f0c78976d6050d:

Move dbus device reservation code to jackdbus

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3579 0c269be4-1314-0410-8aa9-9f06e86f4224
2023-06-06 04:32:57 +03:00
nedko 14469f1fae Doxygen documentation for new functions of control API
(cherry picked from commit 5d586603df)

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2996 0c269be4-1314-0410-8aa9-9f06e86f4224
2023-06-06 04:23:20 +03:00
nedko 4f30bf4c33 control.h: Add strict and fake constraints
cherry picked from commit bfaf8988f0c05b5f6a63bb3e9555114216e3b9b3:

Transform range bool into flags

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2992 0c269be4-1314-0410-8aa9-9f06e86f4224
2023-06-06 04:22:06 +03:00
nedko 368a5ee1e7 Expose jackctl_parameter_get_enum_constraint_description() in control API
(cherry picked from commit bd40d3225f)

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2986 0c269be4-1314-0410-8aa9-9f06e86f4224
2023-06-06 04:22:06 +03:00
nedko c53e46a085 Expose parameter constraints in control API
partial cherry pick from commit
2eeaa3b8a5
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2985 0c269be4-1314-0410-8aa9-9f06e86f4224
2023-06-06 04:10:28 +03:00
Nedko Arnaudov 3edeab30b8 control.h: Remove duplicated content 2023-06-06 04:08:09 +03:00
Nedko Arnaudov 722b692ca3
Relicense control.h
Implementators and/or users of the JACK Control API interface header
file are hereby granted right to use my work in control API header file
under one of the licenses (pick any, pick one):

 * GPL-2.0-or-later
 * LGPL-2.1-or-later
 * MIT
 * AFL-2.1
2023-06-06 03:45:46 +03:00
Nedko Arnaudov b396b4ab6d Merge commit control api header licensing extension
An extended license from Nedko Anaudov follows:

JACK control API (GPL or LGPL or MIT or AFL, pick the license that suits you)

Implementators or users of this interface header file are granted rights
under one of the licenses (pick any, pick one):

* GPL-2.0-or-later
* LGPL-2.1-or-later
* MIT
* AFL-2.1
2023-06-04 13:02:32 +03:00
Stephane Letz 520dfa0ac5 Relicence of JackControlAPI.h and control.h after discussion with Nedko Arnaudov. 2023-06-04 11:48:54 +02:00
Nedko Arnaudov 0e984e37ae Bump version to 2.22.1 2023-02-18 10:17:21 +02:00
Nedko Arnaudov d1e755f557 Change default of self-connect-mode to 'e'
Ignore self connect requests to external ports only is now the default
mode.

In the default now 'e' mode, jack clients are still able to connect
their own ports. jack client attempts to connect its own ports to
other jack client ports, including "system", will be ignored in the
default configuration.

Despite still observable self-connect behaviour of firefox and other
jack clients, it is not desirable for jack (modular) setups.
2023-02-18 09:54:40 +02:00
Nedko Arnaudov 12da377204 jack_get_version_string() now reports GIT_VERSION 2023-02-02 18:01:09 +02:00
Nedko Arnaudov 126a9cf0d5 v1.9.22
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEYrEQQ9L262Zy2TEDzbqjerx0+6AFAmPbmQkSHGZhbGt0eEBm
 YWxrdHguY29tAAoJEM26o3q8dPugNXIQAJxJXOFmoVUavNbq8KHULvdqdUJJQ7s6
 7tdM3oksE5mZJbQUDsIICprCjYmxXaMnBZg/zJLxlcm016a8t/aI88Yj0PrGSgqm
 Zl3xoP8Kn9QUTDwyetPTQwelkaEaAEBVtNXroUJpXmqWDyxGGVSmyoT7G02MGDzW
 OA0IYFMPzNaT4RdGjAZyt7PhkPqlT7V7leEXq3kfqfFqVj4qNKvWVnptkV8Zu70h
 LOGolafhlMX6xf3uvoSe9M44r7X8/MffZaWeBQsUnZnoIcR22qLp9mAiiHJAolGu
 vLcqIA4y2NA/YveqPVdTiVgifD1QXFWF38gxiQFKovRLKljHViYT1H87GZJeuuVG
 kpRn0d6NQnTPqdNglewgiJPYxgviv83bFMz/OMnwivAydFlj19ubv8yiknIVG4O0
 R1SAasVQR6CBrOnWsaMmGM/3r00oTHrCKbPP4JFvSsWMbmHJ0atjQR5bxqlimr9p
 U/rI7o4YXwvaV8EnyhU1bLgYizWEdYxhUyYHvLajORZPApuYJo7UKXk1WfuIymJ3
 6yzpfHfUEFwqvX8t1qq8oNoS0KESYwPBpzSeE2Gnug80EEdKhzSZY3Hg/xaK5mxN
 s+XhXteiypwVYAmegnlBo2HSApP16+3cixJZ8Ii4T+KWDXfWhHU1EJcz+ahR6+fe
 lKvJHfcZtZyv
 =oh+G
 -----END PGP SIGNATURE-----

Merge tag 'v1.9.22' into LADI/main

v1.9.22
2023-02-02 16:45:51 +02:00
falkTX 1eff44a212 Update copyright year
Signed-off-by: falkTX <falktx@falktx.com>
2023-01-30 22:14:29 +01:00
falkTX f5a01999fa macOS: forcely ignore wait failures when closing down
Signed-off-by: falkTX <falktx@falktx.com>
2023-01-30 22:14:29 +01:00
luz paz ae9993bb34 Fix typos 2023-01-28 16:48:31 +01:00
K 75516ffe6d
Fix ringbuffer thread safety on ARM. Fix #715 #388 (#886)
* fix ringbuffer thread safety on ARM. fix #715 #388

This patch addresses the thread safety problem of `jack_ringbuffer_t`
mentioned in #715 and #388. The overbound read bug caused by this problem
is impossible to reproduce on x86 due to its strong memory ordering, but
it is a problem on ARM and other weakly ordered architectures.

Basically, the main problem is that, on a weakly ordered architecture,
it is possible that the pointer increment after `memcpy` becomes visible
to the other thread before `memcpy` finishes:

	memcpy (&(rb->buf[rb->write_ptr]), src, n1);
	// vvv can be visible to reading thread before memcpy finishes
	rb->write_ptr = (rb->write_ptr + n1) & rb->size_mask;

If this happens, the other thread can read the remaining garbage values
in `rb->buf` due to be overwritten by the unfinished `memcpy`.

To fix this, an explicit pair of release/acquire memory fences [1] is
used to ensure the copy on the other thread *happens after* the `memcpy`
finishes so no garbage values can be read.

[1]: https://preshing.com/20130922/acquire-and-release-fences/

* remove volatile qualifier on ringbuf r/w pointers

The volatile constraints are excess when compiler barriers are present.
It generates unnecessary `mov` instructions when pointers aren't going
to be updated.

* simplify read/write space calculations

This optimization is possible because the buffer size is always a power
of 2. See [1] for details.

[1]: https://github.com/drobilla/zix/pull/1#issuecomment-1212687196

* move acq fences to separate lines
2023-01-28 16:38:05 +01:00
Nedko Arnaudov 4651827c88 Adjust version to match the one in wscript 2023-01-28 02:05:05 +02:00
Nedko Arnaudov b6f3b326c5
Adjust my copyleft lines in wscripts
See https://github.com/jackaudio/jack2/pull/319
2022-09-10 15:13:29 +03:00
Karl Linden 69b04bee68 License the project clearly
This adds a LICENSE file that describes which licenses this project is
licensed under. This is very important, as the project is licensed under
three licenses.

Also added are copyright notices to the wscript files. I added myself as
copyright holder to them, but there are other people who have
contributed to these files which should have their name in the copyright
header. Clearly stating the license of the wscript files should have
been done long ago.
2022-09-10 13:33:46 +03:00
luz paz a8b7c6c85f Fix typos
(cherry picked from commit 10553de59b1d381b63a7c275f6cb6456029434f2)
2022-09-10 13:07:18 +03:00
Nedko Arnaudov 4f90ba09d4 Add pkg-config file for libjackserver 2022-08-27 21:31:25 +03:00
krasjet 4ab3b0744a simplify read/write space calculations
This optimization is possible because the buffer size is always a power
of 2. See [1] for details.

[1]: https://github.com/drobilla/zix/pull/1#issuecomment-1212687196
2022-08-27 18:07:35 +03:00