Use a memstream to collect the arguments so that it can dynamically
allocate as much memory as necessary.
Use a dynamic pod builder to construct the pods so that they can be of
arbitrary size.
Fixes#4166
Only set use the graph rate and duration when the ffado.sample-rate
and ffado.period-size properties are set to 0. Othersize use the
configure values.
Without this patch, it would just ignore the settings and always use the
graph rate.
Commit d04a28daef moved the configuration
of the IO_Position after we removed the node from the old driver but
forgot to move the code that updates the pending_state.
See #4094
Support the RFC 4695 sysex segmentation rules where a sysex packet can
be split into multiple chunks using the f0 and f7 patterns like:
begin f0 ... f0
continue f7 ... f0
end f7 ... f7
Add a unit test for the sysex UMP conversion.
The current situation is:
- The ALSA sequencer produces and consumes raw UMP only. Legacy input
is converted with the control mixer to UMP.
- All apps and plugins are made to consume and produce UMP.
- The control mixer can convert between UMP and MIDI when required.
- Legacy apps (pw-filter) will still receive MIDI1 events (converted by
the control mixer).
- Helper functions to convert UMP to and from MIDI can be used to ease
implementation when legacy MIDI is still required.
Using UMP natively over raw MIDI has some advantages:
- Transparent support for MIDI2 hardware and the new MIDI2 features
such as increased resolution for events, microtonal support, etc..
- Easy to convert between legacy MIDI and UMP
- Large SysEx can be fragmented properly.
- Fixed size messages are easier to parse and handle.
Add a type to the events, which can be MIDI1 or UMP.
Add debug functions for UMP messages.
midifile only supports saving MIDI1 format files for now. It will convert
to MIDI1 when asked to write an UMP message.
In pw-cat, convert the MIDI1 messages to UMP before sending into the
graph.
Use the new UMP alsa sequencer API to make it produce UMP packets.
Set the alsa sequencer to MIDI2.0, which will make it convert all
messages to MIDI-2.0 UMP automatically. We can copy this straight into
the control buffers.
This also solves some problems with large sysex messages that are now
nicely split into chunks with UMP.
Add OSC and UMP control types and make sure the mixer converts to the
selected format.
Mostly useful for legacy filters that use the old MIDI format, placing
the Midi control type in the format will make the mixer convert to it.
Add 2 new port format extensions, one for OSC and another for UMP.
Make sure we convert the events from UMP/OSC/MIDI to jack events
depending on the port type.
Try to produce UMP by default.
UMP (universal Midi Packet) is an improved version of transmitting MIDI
messages. It also has support for MIDI 2.0 and is backwards compatible
with MIDI 1.0.
Make sure we clear IO_Buffers on the port and mixer before we clear the
buffers or the format. The IO_Buffer is used to check if the port should
be processed or not and its update is synchronized with the data-thread.
Set IO_Buffers on the mixer and node only after we have configured the
buffers on the node.
See #4094
The IO_Buffers is used in the data thread to check if the port should be
scheduled or not. Make sure it is only set after we set buffers on the
port and cleared before the buffers are cleared.
Make sure we sync the port->io with the data thread.
See #4094
Collect the list of object properties into a single place.
Group properties in the index based on the object type. Consider
"Monitor" as a separate object type, as it's generally configured
separately.
Add something about Port, Link, and Client properties. Just explain some
of these as they're fairly technical, so just link to API docs.
Due to the how the kernel part of BlueZ computes the extended
advertising interval for a Broadcast Source, a sync_factor smaller
than 2 will result in an invalid interval value (too small).
We simply cannot schedule async nodes properly if we don't have the
async link. This change was done to make sure that driver sources don't
end up with async buffers and cause a unneccesary 1 cycle delay in
async clients. But we can fix this in a better way, like this:
Increment the cycle counter after we copy the output port buffers. This
ensures the async clients immediately pick up the new buffers (or the
output buffers from the previous cycle).
Also remove some old compatibility code that is no longer useful.
Fixes#4138
See #4133
Just disable the data socket when it errors out but stop the follower
when the setup socket is in error.
This makes shutdown work properly when the setup socket is stopped,
which is what actually happens eventually.
jack_port_get_buffer() can be called with 0 frames, This is to restrict
the available space in the returned midi buffer after mixdown. While we
mixdown, we should not check timestamps so that all midi events are
added to the mixdown buffer.
Fixes qsynth.
Unloading the module on stream errors is a bit too much because a
suspend can clear the stream error again (or the error might not be
fatal)
This can happen for example when negotiation fails on some stream ports
(wireplumber tries to link the midi ports to audio ports) and it's
better to not completely fail on that.
Fixes#4121
A remote node is prepared when the Start command sync reply has been
received.
If we however quickly switch from active to inactive, the
pending reply is cancelled but the remote node will have set the
FINISHED status and will be ready to be scheduled.
Make it so that we always set the INACTIVE status when the node is
canceled and unprepared, even if we didn't get the reply and the node
was not prepared.
Fixes#4122
dlopen() does not set errno on failure, rather you're supposed to call
dlerror() to get the latest error. dlerror() return a string so
instead return -ENOENT from weakjack_load_by_path().
Depending on errno weakjack_load() could think it successfully loaded
the library, and later module-jack-tunnel would crash because it call
a NULL function pointer.
When using Open Broadcaster Software with Pipewire and a libcamera
camera node, changing the ExposureTime doesn't work.
The commit introducing the camera control setting has commented out the
integer case: ef4b9745b2 ("libcamera: handle canceled requests")
But as it doesn't give a reson for the comment, it looks like an
oversight.
Therefore removing the comment to allow setting the ExposureTime integer.
Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
The Pipewire libcamera spa plugin exposes multiple camera properties.
Unlike v4l2, libcamera usually exposes these as normalized floating
point values. But as the SPA_PROP types are based on v4l2, they are
currently set to integers.
This causes a problem when using pw-cli to change the properties,
as the spa_json_to_pod_part function casts the properties according
to their spa_type_info. Other software that doesn't depend on the
spa_type_info can correctly set the properties, as the values are
encoded in the spa_pod type and therefore also carry a type.
As the limited range from switching integers to floats is likely not a
problem, the affected spa properties were changed to the Float type.
This will cause pw-cli to also generate spa_pod values of type float
when setting v4l2 properties. Therefore the v4l2 spa plugin is also
adapted to allow floating point properties and cast these to integers.
Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
With a large number of clients, some of them might be obscured by the
graph. Separate out the legend for now. We might be able to do better
formatting, but for now, this should do.