Commit Graph

87 Commits

Author SHA1 Message Date
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
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 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
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
Stephane Letz 1f8883862e Fix jackctl_parameter_reset and jackctl_parameter_set_value return values. 2020-10-16 16:27:48 +02:00
falkTX f19176657c Fix blocking DBus device reservation, so it plays nice with others 2019-10-28 11:16:09 +01:00
Viktor Wilhelmsson 12cfd0e8b8 Fix memory leak of parameter constraints. 2019-03-26 15:46:20 +01:00
Filipe Coelho 59550f67ee
Fix client UUID gen, and some warnings (#440)
* Fix generation of client uuid

Signed-off-by: falkTX <falktx@falktx.com>

* Remove all client properties when removed; Cleanup a few things

Signed-off-by: falkTX <falktx@falktx.com>

* Make all uuid function arguments use jack_uuid_t type; Fix warnings

Signed-off-by: falkTX <falktx@falktx.com>

* Rework uuids to never be int, more cleanup

Signed-off-by: falkTX <falktx@falktx.com>
2019-03-18 08:33:50 +01:00
falkTX 2ad48419a7 Add support for internal session files
Thanks to Timo Wischer for the initial work
2017-08-10 17:44:21 +02:00
KimJeongYeon 695bbaeb57 up-to-date jack2_android from OSRC(SM-G9008W_CHN). 2014-06-19 22:45:22 +09:00
Nedko Arnaudov c9eed86280 report self-connect-mode on server start 2014-03-10 22:01:13 +02:00
Nedko Arnaudov 00f468fa29 use descriptors for initializing enum constraints
Descriptor initialization reduces risk of mismatch between array size
and element initialization. It also improves code readability by
separating the parameter descriptions separate from the code that
composes the enum constraint structures.

As a side effect this commit makes the self-connect-mode constraint
allocated in dedicated memory chunks, like others enum constraints.
2014-03-10 22:01:13 +02:00
Nedko Arnaudov c8cac65cad remove the JackSelfConnectMode enum type
It was introduced before the parameter was actually exposed.
The parameter is exposed through a char type in both jackd and
jackdbus, thus a mappnig was required.

This changeset removes the enum and makes the code simpler
at the expense of not allowing arbitrary chars as values.
As it is exposed and used in sessions, it is not arbitrary anyway.
2014-03-10 22:01:13 +02:00
Nedko Arnaudov e36662e243 fix allocation of rt priority constraint struct
The bug was present in the inital version of the code,
commit 606609f9b5

There was no memory corruption because while
jack_driver_param_value_enum_t is smaller by 72 bytes than
jack_driver_param_constraint_desc_t, for ranges of non-string values,
the last 124 bytes are not used.
2014-03-10 22:01:13 +02:00
Adrian Knoth f1a5a7dc43 Merge no-self-connect branch
Conflicts:
	common/JackEngine.cpp
	common/JackServer.cpp
2013-04-06 22:19:44 +02:00
Stephane Letz d3589cbc3c Use JackTools::DefaultServerName() everywhere needed. 2013-01-12 12:30:49 +01:00
Nedko Arnaudov 760e5477a4 Merge commit '1.9.9.5' into no-self-connect
Conflicts:
	common/JackControlAPI.cpp
2012-12-10 15:51:17 +02:00
Stephane Letz 50e793e74e Remove warning, renaming. 2012-09-10 23:16:53 +02:00
Nedko Arnaudov ee845d4633 controlapi: fix double free on master switch
Thanks to Robin Gareus.
https://github.com/jackaudio/jack2/issues/17
2012-09-10 22:15:58 +03:00
Nedko Arnaudov 3b9aab6bca Properly handle empty parameter lists 2012-07-18 23:11:45 +03:00
Nedko Arnaudov 13f7852c26 Merge branch 'master' into param-order
Conflicts:
	common/JackControlAPI.cpp
2012-06-19 01:26:47 +03:00
Nedko Arnaudov cf36c02aeb Control API: Enforce driver/internal parameter order.
This changeset is required for proper jackdbus handling of
parameters. jackd handling of parameters is improved by making
driver/internal parameters order on commandline irrelevant. E.g.
"jackd -d alsa -d hw:Intel,0 -P hw:Intel,3" should now give same
result as
"jackd -d alsa -P hw:Intel,3 -d hw:Intel,0".

The code used to create the driver parameter list in
jackctl_parameter_set_value(). Apart from the ordering problem,
the old implementation was not properly handling reset of
driver/internal parameters, because upon reset the parameter was not
removed from the set_parameters list which is supplied to
driver/internal.

This commit shifts driver/internal parameter list composition just
before it is needed. I.e master or slave driver open, switch master,
or internal load. The order of parameters is ensured to be the one
defined by the driver/internal.
2012-05-26 17:09:04 +03:00
Adrian Knoth 010461ad45 Merge branch 'master' into no-self-connect
Conflicts:
	common/JackEngine.cpp
2012-04-18 22:25:01 +02:00
sletz ec40ef2906 Compiles again on Windows.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4776 0c269be4-1314-0410-8aa9-9f06e86f4224
2012-02-10 08:49:55 +00:00
sletz a6a2d8f0e6 In control API, UNIX like sigset_t replaced by more abstract jackctl_sigmask_t * opaque struct.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4775 0c269be4-1314-0410-8aa9-9f06e86f4224
2012-02-09 17:04:51 +00:00
sletz fb8dde8d27 Code cleanup in Windows JackRouter.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4734 0c269be4-1314-0410-8aa9-9f06e86f4224
2012-01-25 21:55:36 +00:00
sletz 6b53ba1190 Cleanup drivers and internals loading code.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4672 0c269be4-1314-0410-8aa9-9f06e86f4224
2012-01-07 11:16:05 +00:00
Nedko Arnaudov 77fdffaf2f Merge branch 'master' into no-self-connect
Conflicts:
	common/JackControlAPI.cpp
2011-12-15 02:53:58 +02:00
sletz cf1cf045d9 Correct ressource leak in JackCoreMidiOutputPort.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4615 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-28 10:09:15 +00:00
sletz f7bcd227cc Memory locking now working on Windows.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4577 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-07 15:54:23 +00:00
sletz 7cef8825c5 CHECK_MLOCK updated for Windows.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4575 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-07 14:59:53 +00:00
sletz 57df5447e0 Add JackTools::InitOS.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4574 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-11-07 14:12:33 +00:00
sletz 08edac7982 Add jackctl_driver_get_type in Control API.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4529 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-08-26 14:36:40 +00:00
sletz eb3068107d More robust Control API implementation.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4528 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-08-26 13:39:24 +00:00
sletz b52ec65d7d Fix symbols export.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4506 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-07-24 12:53:59 +00:00
sletz 620e0b84d6 A bit more explicit debug messages.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4496 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-07-19 15:24:36 +00:00
sletz c83577f82c EXPORT macro renamed to LIB_EXPORT.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4492 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-07-16 20:44:01 +00:00
nedko 1d83004356 make jackdbus default realtime
jackd and jackdbus defaults values for parameters should match
realtime mode became default for jackd
in svn r3791 (git commit 2cbaece993)

this changeset moves the default to control api

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4461 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-06-16 16:40:13 +00:00
sletz 87af94ddfc Update WinMME driver for 64 bits compilation.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4289 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-04-08 12:15:17 +00:00
sletz 1683375295 Typo and warning.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4287 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-04-08 09:16:13 +00:00
sletz 8706763332 64 bits compilation on Windows.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4276 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-04-06 08:22:57 +00:00
sletz 59b39cad0e Improve jackctl_server_remove_slave.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4270 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-04-04 21:08:11 +00:00
sletz 4f5e3ecd37 Correct driver lifetime management.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4266 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-04-04 20:58:20 +00:00
Nedko Arnaudov 185f245aac Merge branch 'master' into no-self-connect
Conflicts:
	common/JackServer.cpp
2011-03-29 00:05:52 +03:00
sletz c8f9a50dfb Merge branch 'server-ctl-proposal'
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4219 0c269be4-1314-0410-8aa9-9f06e86f4224
2011-03-23 16:11:20 +00:00
Stephane Letz 17df184da2 jackctl_server_add_slave and jackctl_server_remove_slave now test if server is running. 2011-03-22 17:41:18 +01:00
Devin Anderson db132e1974 Update server control API with jackctl_server_open and jackctl_server_close (see http://trac.jackaudio.org/ticket/219 for rationale). Update drivers to support Start/Stop of slave drivers. Update dbus to use new jackctl_server_* functions. Freewheel driver is no longer an implicit slave of the master audio driver. Haven't tested freewheeling, and didn't update Solaris OSS driver. Tested slave addition by adding loopback driver, but don't have a slave driver in this branch on Linux platform to test with. 2011-03-20 22:39:31 -07:00