for all devices.
This is required for example for some adaptive sample rate converters
which are executed on top of JACK. These SRCs are using the time stamp to
calculate the buffer fill level between playback application and sound
card.
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Call JackAlsaDriver::Close() when alsa_driver_new() fails, to
release devices acquired just before that call. Otherwise
JackAlsaDriver::Open() will never succeed again, as re-acquiring the
same device will fail with "A handler is already registered" DBus error.
The parameter long description is used through the controlapi/dbus.
Now that jack_control displays the constraints, the dither parameter
long description servers no purpose.
The parameter long description is used through the controlapi/dbus.
Now that jack_control displays the constraints, the dither parameter
long description servers no purpose.
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.
The bug was present in the inital version of the code,
commit ebba58c8ee
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 enum constraints,
the last 240 (on 64bit) bytes are not used.
We recommend using symbolic names like hw:Live but when subdevices are used
regcomp() was failing to parse them. This changeset improves the algorithm
by using less assumptions.
* Don't attempt to use device reservation when card_to_num() mapping
has failed. In case of card_to_num() failures, "Audio-1" device
was reserved on start but not released on stop. This was causing
next start to fail with out of memory error, and since previous
commit, with "A handler is already registered for
/org/freedesktop/ReserveDevice1/Audio-1" error.
* In case of playback device reservation failure, release the
capture device
* Remove unused fReservedCaptureDevice and fReservedPlaybackDevice
data members of the JackAlsaDriver class
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.