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.
Parameter order doesnt matter for jackd but does for jackdbus. jackd
sets parameters (via Control API) in the order they were specified at
commandline. Thus, the jackd user is expected to specify parameters in
correct order. This is not good solution for jackdbus though. jackdbus
settings persistence in ~/.config/jack/jack.xml stores parameter in
the order they are defined by the driver. OTOH the D-Bus interface
itself suggests no particular order. For example the user can change
only one parameter via the jack_control tool. Other parameters either
have their default values or the ones that were previously set are
used.
The particular ordering problem this changeset aims to fix is that when
user specifies capture/playback device and device, the first one(s)
is/are ignored. This happens because the device parameter is set after
the capture/playback device parameters. The alsa then uses the string
from the device parameter for both capture and playback devices,
despite the user wish to override one or both of them.
The code used to be in common/JackTools.h until it got moved to
JackTools.cpp in aabbb62282.
However, it is not possible to split a template implementation between
header and source file, so the code in JackTools.cpp was never compiled,
resulting in
Could not open component .so '/tmp/jacktest/lib/jack/jack_net.so':
/tmp/jacktest/lib/jack/jack_net.so: undefined symbol:
_ZN4Jack18JackGnuPlotMonitorIfED1E
See https://github.com/jackaudio/jack2/issues/4 for more.
Note that fill_n in JackTools.h needs additional modifications for
gcc-4.7.
fixes#4
In my case, the siginfo code was -6, causing the sigsegv handling
to crash on its own. This patch adds a range check for siginfo code.
BugLink: https://bugs.launchpad.net/bugs/983835
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
In-server components are called netmanager.so, inprocess.so and so on,
not libnetmanager.so.
The waf syntax for this purpose has been changed between waf-1.5 and
waf-1.6.