Commit graph

12501 commits

Author SHA1 Message Date
Wim Taymans 26c1993e8a snapcast-discover: add snapcast discover module
The module detects remote snapcast servers and creates a new sink
with protocol-simple for each server.

It sets up a new stream on the server for the sink with JSON-RPC.
2024-05-23 12:41:53 +02:00
Wim Taymans 59c4e7645f protocol-simple: remove old debug line 2024-05-23 11:51:32 +02:00
Wim Taymans 378b196738 impl-node: don't move unprepared nodes
If a node was unprepared and we're moving it to another driver, don't
try to unprepare and prepare it to the new driver because then we end up
with a prepare node that should not be scheduled.

Fixes #4017
2024-05-22 10:26:54 +02:00
Wim Taymans ccb9f89347 ffado: add priority.session property
It seems to be required to unselect it as default node in wireplumber.

Fixes #4023
2024-05-22 09:37:39 +02:00
Wim Taymans 7cfbd38cbb protocol-simple: handle IPv6
Handle ipv6 addresses.

Support 0 port, which uses a free port to listen on.

Place the list of addresses we listen on as a property of the module so
that dynamically allocated ports can be retrieved.
2024-05-22 09:23:31 +02:00
Diego Viola 7410755c03 Fix typos
found them with codespell.

Signed-off-by: Diego Viola <diego.viola@gmail.com>
2024-05-22 09:19:34 +02:00
Wim Taymans 8a24ad3073 acp: handle some errors better
Handle allocation failure and size overflow.
2024-05-20 11:22:46 +02:00
Pauli Virtanen a63aa6329b spa: fix integer overflows etc. in spa_pod_compare_value
Add macro SPA_CMP to do 3-way comparisons safely, and use it to avoid
signed integer overflows.

Fix also float/double comparisons (previously 0.1 == 0.8 since cast to
return type int).

Fix Id/Bool comparisons so they can return negative value.
2024-05-20 09:11:25 +00:00
Pauli Virtanen b94d6e53a1 bluez5: use initial SCO RX wait workaround only for USB controllers
Kernel-provided MTU does not work for USB controllers and the correct
packet size to send can be known currently only from RX. So we are
waiting for RX to get it.

The known problem is USB-specific, we shouldn't need the workaround for
other transport types.

Don't wait for POLLIN for non-USB controllers on connect, but ready
things on POLLOUT as usual.

For non-USB controllers, pick some sensible packet sizes to use
initially, before we switch to same size as for RX.
2024-05-18 13:53:45 +03:00
Barnabás Pőcze b3bd026699 pipewire: remove cleanup.h
Since `spa/utils/cleanup.h` is not a private header anymore, there is
no need for a separate `pipewire/cleanup.h` since the definitions of
the cleanup routines can now be moved into the respective headers.
2024-05-16 17:35:58 +02:00
Wim Taymans 80df1957bf NEWS: fix spelling mistake 2024-05-16 10:37:44 +02:00
Wim Taymans e37a1e25fc 1.1.81 2024-05-16 10:25:45 +02:00
Barnabás Pőcze 354387ca58 pipewire-v4l2: redirect to correct functions from fortified variants 2024-05-16 01:53:38 +02:00
Wim Taymans d2ca50399a modules: add options to discover local services as well
This makes it possible to discover a local RAOP, pulse or RTP services
and connect to them.

IPv6 addresses need the interface appended to local addresses to
make the connection work.
2024-05-15 15:39:27 +02:00
Jonas Holmberg d8a32e5272 impl-port: update added flag from rt thread
Avoid trying to remove a port before it has been added.
2024-05-15 09:27:33 +00:00
Wim Taymans bd4d61c83c raop: use pw_net utils to parse address 2024-05-15 11:26:12 +02:00
Barnabás Pőcze 46e4a33f27 pulse-server: message: use union to store event data
Store subscription event data in a union instead of
just an array for better readability.
2024-05-15 08:31:40 +00:00
Barnabás Pőcze d467f6fdc6 pulse-server: client_queue_subscribe_event(): check message allocation 2024-05-15 08:31:40 +00:00
Barnabás Pőcze 8e495a3a2c spa: libcamera: remove unused includes 2024-05-15 08:31:03 +00:00
Barnabás Pőcze 55fafe8f0b spa: libcamera: remove two unused members 2024-05-15 08:31:03 +00:00
Barnabás Pőcze 87368c8e4f spa: libcamera: remove wrong prefix from log message 2024-05-15 08:31:03 +00:00
Barnabás Pőcze b7ef5c92bc spa: libcamera: remove unnecessary snprintf() 2024-05-15 08:31:03 +00:00
Barnabás Pőcze 9eab76d862 spa: libcamera: don't calculate id twice 2024-05-15 08:31:03 +00:00
Silviu Florian Barbulescu bb1c2c3272 Fix review comments, added METADATA_VALUE_MAX_LEN and removed entry_key in configure_bis. 2024-05-15 08:11:50 +00:00
Pauli Virtanen 345131475c bluez5: cleanup bluez5.bcast_source.config parsing
Also fix doc.
2024-05-15 08:11:50 +00:00
Silviu Florian Barbulescu 44d96ed4b9 bluez: on metadata, parse remove the length field, and deduce the length from the value plus type 2024-05-15 08:11:50 +00:00
Silviu Florian Barbulescu be3e87f485 Add code to fix problem found at review 2024-05-15 08:11:50 +00:00
Silviu Florian Barbulescu 2bff4a9337 bluez: Configure the BlueZ broadcast source
This is the first draft where the configuration is done based on BIS information loaded from the config file.
2024-05-15 08:11:50 +00:00
Arun Raghavan db365ac855 impl-node: Expose driver id in node.props
Makes it easier for clients to track what the current driver of a node
is.
2024-05-14 20:04:13 +00:00
Wim Taymans 78fbe6f750 protocol-simple: add per stream properties and formats
Add capture.props and playback.props to configure the created streams
with arbitrary properties.

Improve format parsing, make it possible to have different formats peer
stream.

Improve some of the property handling.

This can now also be used to upload a stream to a snapcast server, add
an example of this to the docs.
2024-05-14 17:30:05 +02:00
Wim Taymans 37224ac84c alsa-seq: configure pool sizes better
The default kernel pool size on the input is 200 cells. A cell is
about 28 bytes long so the maximum message that can be received in one
go is about 5600 bytes. This causes problems when using amidi to upload
larger sysex messages because they simply can't be received by the
sequencer.

It if however possible to increase this limit with the set_client_pool()
function. Increase the pool size to at least the quantum_limit * 2.
This ensures we can receive and send at least 2 quantums of raw data,
which should be a fairly long sysex message.

Make a min and max value for the pool size. There is an upper limit of
2000 in the kernel but make this configurable and clamp the final
pool size to the min/max.

Make the MAX_EVENT_SIZE 256, because this is how the sequencer seems to
splits the input data as well and it results in less wasted space in the
output buffer.

See #4005
2024-05-13 15:25:52 +02:00
Wim Taymans ea0ba1162e alsa-seq: warn when receive fails
This can happen when allocation fails or the message is too long.
2024-05-13 15:17:21 +02:00
Wim Taymans cdc150a2c3 jack: copy events to right offset
The larger events need to be copied into the target buffer at the same
offset as the source buffer or else we overwrite the header and make
a corrupt buffer.
2024-05-10 12:15:36 +02:00
Wim Taymans 89edb9f6c5 control: use quantum_limit for midi buffer size
Instead of the arbitrary default.
2024-05-10 11:49:31 +02:00
Wim Taymans 7e87bd9b34 alsa-seq: try to not overflow the output buffer
Keep some room in the output buffer to store the worst case event
and save it for the next cycle.
2024-05-10 11:33:44 +02:00
Wim Taymans e897a8afc4 control: warn when we overflow the control buffer 2024-05-09 19:33:30 +02:00
Wim Taymans d7df3811e1 tools: queue the buffer again in all cases 2024-05-09 19:32:37 +02:00
Wim Taymans cb8330c798 alsa-seq: handle large control events
Handle the case where the control event is large and needs to be
encoded into multiple midi events.
2024-05-09 18:49:00 +02:00
Wim Taymans 7dcfe81690 alsa-seq: improve midi encode some more
snd_midi_event_encode() will reset the encoder when it returns an
encoded event. It is possible that the function returns with an encoded
event when the internal buffer is full, in that case we need to push the
event and continue encoding without reseting the encoder.

0 is not a snd_midi_event_encode() error, so don't handle it like
one.
2024-05-09 18:32:14 +02:00
Wim Taymans 1c056661b6 alsa-seq: handle fragmented midi messages
The messages, mostly sysex, can be split over multiple control message.

This happens when we read large messages from the sequencer, the
snd_seq_event_input function returns split messages that we transfer to
control messages directly.

When we send those messages out, however, the encoder wants the complete
message before it will return a valid event that we can send out. Keep
on calling the encoder with the control events until we get a complete
message that we can send out.

Fixes #4005
2024-05-09 16:18:29 +02:00
Wim Taymans 050976adf6 control: also handle ANY ports for enum_param 2024-05-09 15:23:50 +02:00
Wim Taymans 1c900707a8 v4l2: add bus_info in v4l2_capability if we have it 2024-05-08 17:48:00 +02:00
Wim Taymans b2844201c2 impl-node: update rt flags from rt threads
Update the added and prepared flags from the rt thread.

We also need to check if the node was prepared before we can schedule
it.
2024-05-08 17:14:32 +02:00
Wim Taymans 8b23a8a89e loop: flush items in the order they were added
Add a count to each invoke item that is updated with an increasing
loop atomic counter. Flush items from the queues based on their count
so that items are flushed in the order they were added even if they
were added to different queues.
2024-05-08 12:21:54 +02:00
Wim Taymans fac0d47c23 impl-port: swap io areas instead of doing cycle math
Instead of doing (cycle+1) & 1 for output ports, simply swap the io
areas depending on the port direction (0 = input, 1 = output) and
just to cycle&1 for all ports.
2024-05-08 10:45:53 +02:00
Wim Taymans 03d62dc756 impl-port: input ports read from io cycle & 1
Input ports read from the async buffer cycle & 1 and output ports write
to (cycle + 1) & 1
2024-05-08 10:45:53 +02:00
Sanchayan Maity 9d94db6646 parametric-equalizer: Use field widths in sscanf 2024-05-07 15:43:10 +05:30
Sanchayan Maity 6c6f944e53 Fix doc build pipeline failing with parametric-equalizer module 2024-05-07 09:04:15 +00:00
Wim Taymans dd84557bfb doc: update some more 2024-05-07 11:03:22 +02:00
lunks 722ad358d0 Apply 1 suggestion(s) to 1 file(s) 2024-05-07 08:57:24 +00:00