Add DSD support to the ALSA plugin.
You will need to manually enable the supported DSD formats for the
platform you are running on because we don't support any conversions or
probing for DSD:
PIPEWIRE_ALSA='{ alsa.format = "DSD_U32_BE" }' src/tools/pw-alsa-dsd somefile.dsf
Fixes#4160
We have various modules that set the priority higher than the dummy and
freewheel driver (ffado, netjack,...). This makes it impossible to use
the freewheel driver on them.
A new 'broadcasting' state is to be added in BlueZ. It is
functionally similar to 'pending', but for the Broadcast scenario.
Until now, on Broadcast sink side, the transports associated with a
scanned source would automatically be switched to pending. PipeWire
then acquired any transport that was pending.
This is to be changed, transports will now remain in 'idle' state
until the user calls transport.select on them from bluetoothctl.
This changes the state to 'broadcasting'. PipeWire will then acquire
these selected transports.
This way, the user can select to which sink he wishes to sync.
While the spec allows for 1ppm changes, our rate matching logic applies
these changes quite often, which can be spammy on USB. I haven't seen
hosts mind this, but it seems like it might be a problem at some point.
Additionally, if we also have bind ctls enabled, every pitch update is
also a wakeup for ourselves (whether or not we're listening for the
pitch ctls, since the mixer fd does not distinguish between ctls, those
are filtered after we wake up).
The 10ppm threshold is empirically tested as being not "too noisy" (i.e.
when updates happen, I can see them scroll by with `amixer events`).
If necessary, we can make this configurable in the future.
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.