Commit graph

5302 commits

Author SHA1 Message Date
Wim Taymans
6543899fe6 pulse-server: implement stream_buffer_attr 2022-01-28 17:34:36 +01:00
Wim Taymans
ce03fc7c15 pulse-server: increase maxlength to match tlength
When we need to increase tlength because of a quantum change, increase
maxlength as well, but clamp it to MAXLENGTH.

See #2069
2022-01-28 16:23:42 +01:00
Wim Taymans
1ac1f914e3 pulse-server: allows allocate MAXLENGTH for the ringbuffer
See #2069
2022-01-28 16:21:03 +01:00
Wim Taymans
5ead4507cc pulse-server: ensure tlength <= maxlength
See #2069
2022-01-28 16:15:26 +01:00
Wim Taymans
ead827d6cb modules: limit the max amount of items in the protocol
For now, put a limit on the amount of items we can send and receive
over the native protocol. A more complex way of allocating and freeing
can be implemented later when we really need to raise the limits.

Fixes #2070
2022-01-28 15:55:44 +01:00
Wim Taymans
36d78c41a0 modules: refactor permissions parsing 2022-01-28 10:51:09 +01:00
Wim Taymans
98aa2a04c7 modules: refactor param_info_parsing
To add more checks later.

See #2070
2022-01-28 10:35:14 +01:00
Wim Taymans
ef8fa3dc6f modules: refactory param parsing
So that we can add some more checks later.

See #2070
2022-01-28 10:25:30 +01:00
Wim Taymans
71a86877b7 modules: refactor parse_dict
Make a macro from parse_dict and move the n_items parsing and alloca
in it. This should make it easier to check the data.

See #2070
2022-01-28 10:01:12 +01:00
Wim Taymans
fd1112c4e2 modules: add latency and rate params to protocol-simple
See #2068
2022-01-27 16:56:22 +01:00
Wim Taymans
ee007eaf6c modules: improve simple-protocol arguments
Use the format parsing code to also parse the channel_map.
Improve serialization of the properties.

See #2068
2022-01-27 16:31:01 +01:00
Wim Taymans
0ba5aebf0b mem: add debug for new fd 2022-01-27 15:08:44 +01:00
Wim Taymans
5ab031b472 loop: remove the eventfd to stop the loop
We can just as well use _invoke to schedule a task in the context
of the loop.
2022-01-27 15:07:38 +01:00
Wim Taymans
3256c6e5e7 tools: fix compilation with musl 2022-01-27 14:59:11 +01:00
Wim Taymans
bb5c43b5ba pw-cli: add support for sending commands to a node
So that it can be suspended manually.
2022-01-27 12:34:54 +01:00
Wim Taymans
420d65fb38 pw-cli: add pattern matching lookups
ex:

pw-cli e alsa_card.usb-BEHRINGER_UMC404HD_192k-00 Profile
pw-cli ls alsa_input*
2022-01-26 16:32:35 +01:00
Wim Taymans
b7e0b5437b pw-dump: add pattern matching
Do pattern matching on object properties to also allow lookups on
type, object.path, object.serial and <type>.name.

ex:

  pw-dump alsa_card.usb-BEHRINGER_UMC404HD_192k-00
  pw-dump alsa_input*
  pw-dump Node
2022-01-26 16:31:38 +01:00
Wim Taymans
97d571d1e7 pw-cli: improve object lookup
Also allow object lookup with object.serial, and <type>.name
2022-01-26 15:12:27 +01:00
Wim Taymans
0538034ed3 context: move linked nodes when assigning a driver
When a node that requires a driver is moved to a driver, collect all
linked nodes and move them to the driver as well.

This fixes the case where a single jack node (zita-n2j) is linked to
paplay. The zita-n2j node is moved to the dummy driver but paplay is not
and so nothing happens before this patch.
2022-01-26 12:25:35 +01:00
Wim Taymans
3399d58e85 modules: compile rtkit module instead of using a symlink
The rpath is otherwise not right.

Fixes #2065
2022-01-25 16:42:27 +01:00
Wim Taymans
db2719f1f4 pulse-server: always advance the read pointer in underrun
We should always advance the read pointer when we are underrun and
not corked. This will request more bytes from the client to make
things advance.

Fixes #2041
2022-01-25 15:21:31 +01:00
Wim Taymans
b9c8f0f6b9 pulse-server: don't complete drain when corked
A corked stream should not complete a pending drain operation.
2022-01-25 15:20:27 +01:00
Wim Taymans
1b0252c267 Revert "pulse-server: don't ask data when corked"
This reverts commit 3b14afe317.

Breaks mpv..
2022-01-25 13:23:58 +01:00
Wim Taymans
3b14afe317 pulse-server: don't ask data when corked
Don't ask for data when we are corked. Some clients like telegram
don't send data when corked.

See #2041
2022-01-25 13:18:56 +01:00
Daniel Cousens
5c6e26fd0b fix pipewire-pulse typo and indentation 2022-01-25 04:44:26 +00:00
Wim Taymans
3a86ae0276 client-node: handle mix init errors better
Make sure we mark the port invalid when we can't allocate an id
for it. Also check that the id does not exceed the max amount of
areas we have allocated and release resources correctly.
2022-01-24 09:51:10 +01:00
Wim Taymans
7e387d842b impl-link: handle mixer failures better
It is possible that the mixer input can't be created because of hitting
the max limits of dsp mixer or client-node. Make sure we handle those
errors, destroy the link and clean up properly.
2022-01-24 09:39:52 +01:00
Wim Taymans
0bc3d1444a Add PIPEWIRE_QUANTUM env variable
That tries to both set the buffersize and the samplerate of the graph.
Document them in README.md
Also add the same env variables to pw-stream and pw-filter.
2022-01-23 11:21:18 +01:00
Wim Taymans
f4021c7f44 port: add some more warnings when unregister fails 2022-01-23 10:16:42 +01:00
Wim Taymans
4f57f3cdae pulse-server: allow per-application latency quirks
Make it possible to set latency and buffer parameters in the matching
rules.

Add a rule for speech-dispatcher and force it to some larger latency.
2022-01-22 16:17:09 +01:00
Wim Taymans
7f08cadca4 pulse-server: move quirks to config section
Make a pulse.rules section in the config file with match rules. Add
support for setting custom client properties and quirks.
2022-01-22 11:51:11 +01:00
Joakim Olsson
2e1a08edc2 module-echo-cancel: Configure buffersize and play delay
* Possible to set max buffer size from config
* New play buffer with possibility to set a delay sent to backend,
  orignal play buffer is still sent without delay to output

Change-Id: If787977305586a40cba4585ab6dad4b7163bee5a
2022-01-21 16:57:04 +00:00
Wim Taymans
000b448ba3 pulse-server: set the node.name on the input/output
Not on the global property because module-loopback does not read it
from there anymore in order to have unique names.
2022-01-21 17:55:32 +01:00
Wim Taymans
a72a877515 modules: improve node.name
Make sure the node name is something unique for the capture and playback
part of filter-chain and loopback so that volumes can be remembered
separately.

Fixes #1983
2022-01-21 17:42:29 +01:00
Wim Taymans
373432a4e7 pulse-server: implement module-x11-bell
Just load the x11-bell module into the pulse server.

See #1668
2022-01-21 17:01:18 +01:00
Wim Taymans
5c894c2283 modules: handle x11 sample fallback better 2022-01-21 16:47:42 +01:00
Wim Taymans
0cd0ef5912 modules: add x11-bell module
It listens for X11 bell events and plays a sample with libcanberra.

Fixes #1668
2022-01-21 16:30:02 +01:00
Robbert van der Helm
5d890435b4 module-rt: Handle realtime sched check edge cases
The policy can of course be higher than zero if the current thread uses
anything other than `SCHED_OTHER`, and `SCHED_RESET_ON_FORK` needs to be
set according to the old policy or we'll either run into errors or cause
unwanted side effects.
2022-01-21 14:17:29 +01:00
Robbert van der Helm
e60f62e69b module-rt: Don't explicitly check RLIMIT_RTPRIO
There are a couple other ways to allow a user/process to use realtime
priviliges like `CAP_SYS_NICE`. Instead of trying to check every
possible factor, just trying if setting realtime priviliges works is
going to be a much cleaner solution.
2022-01-21 14:17:29 +01:00
Barnabás Pőcze
cec9347864 pulse-server: iterate addresses correctly
When creating servers, actually iterate the addresses correctly instead
of only using the first address.

Fixes #2047
2022-01-21 10:25:46 +01:00
Wim Taymans
695f8dfdd9 roc: NODE_PASSIVE can only be on the streams
Don't put NODE_PASSIVE on sinks/sources because it will request passive
links to the linked node and thus not be activated.

Fixes #2045
2022-01-20 21:47:37 +01:00
Wim Taymans
5a72e2769a adapter: add adapter.auto-port-config property
This automatically configures the node in a supported format with the
highest amount of channels. Options are available to enable monitor
and to override the port channels as AUX or UNKNOWN.
2022-01-20 18:08:30 +01:00
Wim Taymans
aa128ed489 spa: make common function to find type from short name 2022-01-20 18:08:30 +01:00
Wim Taymans
ba7e5d619d audioconvert: add option to disable channelmix 2022-01-20 18:08:30 +01:00
Wim Taymans
9935f921c5 pulse-server: use TARGET_OBJECT with the target serial
Use a new TARGET_OBJECT property to ask to be linked to a target by name
or serial. This should deprecate NODE_TARGET later.
2022-01-19 17:09:55 +01:00
Wim Taymans
dec2b1b9a2 pulse-server: set serial to invalid on parse error 2022-01-19 16:57:17 +01:00
Wim Taymans
b3e7d2b72a settings: add an option to check quantum/rate in settings
Add an option to check if the rate and quantum configured with the
settings metadata is in the allowed range.

This is false by default, you can use metadata to set any rate/quantum
but in a minimal controlled setup you might want to restrict this.
2022-01-19 15:55:43 +01:00
Wim Taymans
6515553b7d node: add NODE_SUSPEND_ON_IDLE option
Makes the node suspend as soon as it goes to IDLE.
2022-01-18 20:35:00 +01:00
Wim Taymans
709d25f0c4 make key for node.transport.sync 2022-01-18 20:34:03 +01:00
Wim Taymans
18607ee5e3 resample: implement resample disable
Implement the option to completely disable the resampler.
2022-01-18 18:05:36 +01:00