Commit graph

4208 commits

Author SHA1 Message Date
Arun Raghavan
8527b40060 pipewire: device: Add a send_command method
For now, useful for sending custom commands to devices. Using this from
the command line might look something like:

```sh
$ pw-cli send-command <device-id> VolumeControl '{"volumeUp": <route-id>}'
```
2026-06-05 07:11:14 -04:00
Wim Taymans
a5c7dd3127 avb: fix compilation
This thing was broken.. mismatched brackets and const missing.
2026-06-03 12:43:15 +02:00
Wang Yu
8c8bd150ad sendspin: reject unsupported receive codecs
Commit b1b565339 ("sendspin: negotiate the first raw format") says that
FLAC and Opus are not supported yet. The receiver also only advertises
PCM formats in its player support.

Reject non-PCM stream/start codecs in the receiver. Otherwise
parse_player() accepts FLAC or Opus without setting client->stride,
while the receive path later uses client->stride as a raw frame size.

Signed-off-by: Wang Yu <wangyu@uniontech.com>
2026-06-03 10:38:50 +00:00
sirmbcode
1a1cd8d743 added zero padding and utf8-validation to entity parser for first test 2026-06-03 10:37:53 +00:00
sirmbcode
925cea5822 fixed spacing issues 2026-06-03 10:37:53 +00:00
sirmbcode
4cacdfcdf9 added calls to entity-parser.h for entity struct 2026-06-03 10:37:53 +00:00
sirmbcode
8efbdcc022 added entity-parser.h 2026-06-03 10:37:53 +00:00
Wim Taymans
350eb9a041 midi: don't write trailing continuation 0xf0 for SysEx
Because our midi messages already have a size, we don't need the 0xf0
continuation terminator. Also having the terminator optionally requires
you to check and strip it if it's there.

The easiest algorithm is to check the first byte for start (0xf0) or
continuation (0xf7) and the last byte for end (0xf7) and that should be
enough to process the messages without having to ever stip the last
byte.
2026-06-01 13:08:11 +02:00
hackerman-kl
98ab3d73d4 milan-avb: es-builder: create and flag CRF input streams (fix NULL-server crash on activate) 2026-05-31 18:54:05 +02:00
hackerman-kl
9d08cb87c6 milan-avb: stream: do not wire CRF streams into the PipeWire audio graph 2026-05-31 18:54:05 +02:00
hackerman-kl
fc6245dca3 milan-avb: stream: flag CRF streams and ignore CRF packets by subtype in RX 2026-05-31 18:54:05 +02:00
Arun Raghavan
aef3d02173 module-rt: Use a sane timeout for DBus messages
The default of 30s (* 3 for the 3 lookups), makes the mainloop block for
a very long time if anything is wrong with RTKit.
2026-05-31 15:42:41 +02:00
Wim Taymans
7303a55b50 treewide: replace EBADFD with posix EBADF
EBADF was used in some places already, some other places used EBADFD
(with and without an #ifdef). EBADFD is linux specific.
2026-05-27 13:36:39 +02:00
Wim Taymans
784a9dd00f pulse: do all delay calculations when we need it
Just store the values for calculating the delay in the hot path. Then
compute the delay only when we need it.
2026-05-26 14:50:47 +02:00
Wim Taymans
3a9dbc6d99 pulse: add some SPA_LIKELY 2026-05-26 14:50:15 +02:00
Wim Taymans
753ed37ec5 pulse: inline the message check
Inline the resize check and then call the resize function when
necessary.
2026-05-26 14:48:47 +02:00
Torkel Niklasson
1066ec98a8 protocol-native: expose client supplementary GIDs
Retrieve the connecting client's supplementary group list via
SO_PEERGROUPS and store it as the "pipewire.sec.gids" property.
This allows access-control policies in wireplumber to match on
all groups and not just the primary.
2026-05-25 17:08:34 +00:00
Wim Taymans
4bde2415f9 scheduler: make active nodes go to IDLE
When a node is configured and supposed to be IDLE, set it to the IDLE
state, it does not matter if it is active or not.
2026-05-25 18:40:52 +02:00
Wim Taymans
63d824d35e scheduler: don't use & when && is wanted 2026-05-25 18:35:11 +02:00
Wim Taymans
22536600b8 pulse-server: use the new in-follow passive mode
A passive port is not automatically activated anymore by an active peer
node, it now needs the "follow" mode to follow the state of the peer without
activating it.
2026-05-25 18:19:12 +02:00
Wim Taymans
63eb53c1cb pulse-server: always set stream.capture.sink for monitor
Also set the stream.capture.sink when we find the sink by index, not
just by name when it ends with .monitor.
2026-05-25 18:17:51 +02:00
Wim Taymans
e0d7b37826 pulse-server: keep track of dont_inhibit_auto_suspend
Keep the flag dont_inhibit_auto_suspend around and use it do decide when
to send suspend messages to the client.

We don't always want to send suspend messages when the stream state changes
because that could happen because the stream was, for example, relinked.

The intention of the suspend message is mostly for monitor streams that
use the dont-inhibit flag and want to follow the suspend state of the
sink.

See #5273
2026-05-25 18:16:19 +02:00
Nils Tonnaett
c732df412c module-avb: add documentation to strings.c 2026-05-25 07:55:01 +00:00
Nils Tonnaett
4831ba60af module-avb: don't encode error as state 2026-05-25 07:55:01 +00:00
Nils Tonnaett
2dd60fdbc6 module-avb: fix types 2026-05-25 07:55:01 +00:00
Nils Tonnaett
3bde62bc1d module-avb: build strings.c 2026-05-25 07:55:01 +00:00
Nils Tonnaett
c9ba3ced91 module-avb: format strings.c 2026-05-25 07:55:01 +00:00
Nils Tonnaett
ef77d995cd module-avb: SET_NAME: check that string is valid utf8 and zero padded 2026-05-25 07:55:01 +00:00
Nils Tonnaett
14b1c4d3dd module-avb: add zero padding check function 2026-05-25 07:55:01 +00:00
Nils Tonnaett
b47c07b9cd module-avb: add UTF-8 validation function 2026-05-25 07:55:01 +00:00
Wim Taymans
753ce79c18 rtp: fix compilation 2026-05-20 09:09:38 +02:00
Wim Taymans
d56d5fa87a raop: implement retransmission
Keep the last relation between the sequence number and the timestamp
(ringbuffer position).

When a retransmission is requested for a given sequence number use the
relation to calculate the corresponding timestamp and retransmit the
packet from the ringbuffer again.

See #5276
2026-05-19 17:40:07 +02:00
Wim Taymans
a6fe6196d5 modules: remove redundant close
The close in the error path will never be called because the fd has been
stolen and will be -1.

Also make sure that when we free the source that we set it to NULL or
else the destroy function will try to free it again.
2026-05-18 16:58:20 +02:00
Wim Taymans
250260e18e modules: avoid double close when loop_add_io fails 2026-05-15 13:38:32 +02:00
Wim Taymans
894e97aaa5 modules: avoid double fd close
Now that loop_add_io, avoid double free on failures. Try to use
spa_autoclose and spa_steal_fd to make the error paths easier.
2026-05-15 13:34:48 +02:00
Wim Taymans
398f74571b module: check packet size for CK messages
Check that the CK packet is large enough before we start reading its
contents.
2026-05-15 10:45:14 +02:00
Wim Taymans
f3fc645496 connection: return error if too many fds in message
Check that the number of fds in the message doesn't exceed our max or
else we might overflow the fd buffer a little later.
2026-05-14 16:32:58 +02:00
Wim Taymans
79b4aba6cc pulse: also handle potential overflow in ROUND_UP 2026-05-14 16:27:20 +02:00
Wim Taymans
98fdedf348 filter-graph: relax LADSPA plugin loading
Make a new library.filter-path for the filter-graph that will filter and
restrict the dlopen filenames (used for the LADSPA plugin only).

By default this is false and so filter-chain can load from absolute
paths without extra checks.

Enable the extra checks for the pulse LADSPA modules and the
audioconvert filter graphs because these allow loading LADSPA plugins
into other processes.

Fixes #5222
2026-05-14 13:23:19 +02:00
Wim Taymans
4f975d0071 treewide: add error checking to spa_json_builder_close
There could have been a write error or allocation error while building
the json file that we can detect in spa_json_builder_close().

Error out instead of silently using a truncated JSON.

Use spa_autofree for the memory to make cleanup easier.
2026-05-13 18:14:44 +02:00
Wim Taymans
6d1c242433 pulse-server: implement more valid_args on modules
If the valid_args is NULL, reject all arguments.
2026-05-13 16:53:40 +02:00
Wim Taymans
5fa87d67a1 protocol-native: unref resource after logging the error 2026-05-13 11:12:17 +02:00
Wim Taymans
e5ff44910e pulse-server: improve module argument checking
Make the module valid_args a structure that includes the argument key,
description and some flags. Use this to enforce mandatory properties
in a more central place.

We should be able to generate the module usage from this as wel later to
have things a bit more structured.
2026-05-13 10:23:47 +02:00
Wim Taymans
b54bac1862 modules: make and use pw_net_is_multicast 2026-05-12 13:02:21 +02:00
Wim Taymans
6d998a9193 modules: use pw_net_get_ip
Make pw_net_get_ip also accept NULL ip to just get the port and ip
version. Make rtsp-client use pw_net_get_ip.

Make sure we initialize the iovec before logging in all cases.
2026-05-12 12:52:03 +02:00
Wim Taymans
8860dc809d pulse-server: use pw_net_get_ip instead of inet_ntop 2026-05-12 12:14:52 +02:00
Wim Taymans
62846acb3f modules: use pw_net_get_ip 2026-05-12 09:29:19 +02:00
Wim Taymans
0c193b2b82 modules: invert memcmp logic
memcmp returns 0 when the memory is equal. This function is not used
currently.
2026-05-12 09:18:56 +02:00
Wim Taymans
9843ee858f modules: use sockaddr_storage for socket address
sockaddr_in only works for ipv4, for ipv6, the address will be truncated
and then cause a stack overread in inet_ntop.
2026-05-12 09:15:46 +02:00
Niklas Carlsson
a9d7023ec3 filter-graph: add min plugin
Output the lowest sample value of a number of inputs.
2026-05-11 15:39:40 +00:00