Commit graph

7934 commits

Author SHA1 Message Date
Wim Taymans
dbe61af543 impl-node: don't update rt.position directly
When moving a driver to another, move the quantum and rate to the
current_ fields so that they are applied when the next cycle starts
instead of during the cycle.
2021-12-14 17:05:38 +01:00
Wim Taymans
aefb527a0c Revert "module-echo-cancel: schedule source and playback last"
This reverts commit 0d422f00dd.

Fixes #1894
2021-12-14 16:52:16 +01:00
Barnabás Pőcze
e6e27fe74c pipewire: module-session-manager: harmonize type of change_mask
The `pw_*_info` structures in core pipewire all have 64-bit change
masks. Convert the change masks in the session manager extension
to 64-bit as the differing sizes can cause problems.

This introduces an API and ABI break unfortunately, but due to
the limited number of users of the session manager extension,
it was deemed safe.

See wireplumber#49
2021-12-14 15:15:55 +00:00
Torkel Niklasson
10755ff115 protocol-native: change some warnings to infos
Errors caused by EPIPE/Connection reset by peer should not cause an
error in the pipewire log, but rather an info.
2021-12-14 14:54:13 +00:00
Wim Taymans
1f4254b344 pulse-server: track quantum and update tlength
Keep track of the current quantum and recalculate the tlength in the
same way that pulseaudio does.

Send a bufferattr changed message to a client when we change the
parameters.

This fixes the case where the quantum is increased and there needs to be
more buffering to keep the stream going.
2021-12-14 15:48:54 +01:00
Wim Taymans
6b81be5ac3 pulse-server: update the in_prebuf state
Move out of prebuf when we reach the prebuf amount of data. Go back to
prebuf when we run empty.
2021-12-14 15:47:19 +01:00
Wim Taymans
fd4ea442d9 pulse-server: increase buffer size
Because we keep everything in a ringbuffer and provide exactly the
required amount of data, we can use 1/4 buffers.
Also increase the buffer size. We don't want to limit the buffer size
to the negotiated tlength because it can be increased later. Instead
scale it to the max quantum size (8192) with a max resample rate of 32.
2021-12-14 15:42:19 +01:00
Barnabás Pőcze
57dae3e2b3 spa: libcamera: call get() instead of fd()
libcamera commit 560f5cf998646ddc54a20dc1c7326012834d3204
renamed the `fd()` method on `SharedFD` to `get()`.

Adjust the libcamera plugin accordingly.
2021-12-14 09:52:05 +00:00
Wim Taymans
128f80dd6b doc: Add module-raop-discover 2021-12-14 10:47:41 +01:00
Wim Taymans
8caab44782 Revert "pulse-server: always ask for more data when underrun"
This reverts commit e1576c53d4.

This is not quite right, it seems to break orca and qemu audio.

See #1900
2021-12-14 10:27:01 +01:00
Wim Taymans
33f3a987ec module-raop: fix zeroconf copy and paste 2021-12-13 11:31:23 +01:00
Wim Taymans
717fb64e4e 0.3.41 2021-12-13 09:35:30 +01:00
Wim Taymans
4b21e996c8 pulse-server: fix sample pactl command 2021-12-13 09:35:04 +01:00
Pauli Virtanen
1e5f499ed3 bluez5: fix aptx-ll caps size
Ensure SEP exposed by Pipewire has the full aptx-LL caps also for duplex
profile.
2021-12-11 17:20:39 +02:00
Wim Taymans
bcd867f8eb filter-chain: disable lilv code when not available 2021-12-10 18:46:06 +01:00
Wim Taymans
597b332666 filter-chain: add support for lv2 plugins
Support lv2 plugins and their control values.
2021-12-10 17:44:28 +01:00
Wim Taymans
d86008cf8f support: set clock name for null-audio-sink 2021-12-10 12:43:03 +01:00
Wim Taymans
88987101ca bluez5: set clock name in SCO source and sink 2021-12-10 12:36:37 +01:00
Wim Taymans
b4d33843a6 bluez5: set clock name 2021-12-10 12:31:44 +01:00
Wim Taymans
c3bf07dff1 alsa-seq: make clock name configurable 2021-12-10 12:20:08 +01:00
Wim Taymans
3f2f1971c9 jack: debug driver id and clock name 2021-12-10 12:19:14 +01:00
Wim Taymans
53352c0c81 support: add property to configure clock name
Add a clock.name property on the driver node. By default this is
clock.system.monotonic for the monotonic system clock.
2021-12-10 11:22:23 +01:00
Wim Taymans
0648297fcb alsa: make it possible to configure the clock name
When nodes are synchronized to a common clock, the clock name can
be set to the same value on the alsa nodes and no resampling will
be done.
2021-12-10 11:04:38 +01:00
Wim Taymans
e1576c53d4 pulse-server: always ask for more data when underrun
Ask for more data when we are in underrun and not corked.

Fixes paplay and changing the quantum to something large.
2021-12-09 23:10:08 +01:00
Wim Taymans
3ab3157bf1 channelmix: don't use default map for mono
Keep the original channel map so that we can match the channels
properly when remixing.
2021-12-09 17:32:41 +01:00
Wim Taymans
22a210e798 channelmix: 1 channel MONO or FC should be handled the same.
They were handled the same, remove the wrong line to attempt to
make them different.
2021-12-09 17:19:22 +01:00
Wim Taymans
7e5a0849f6 Revert "pulse-server: always asks for more data when underrun"
This reverts commit 1b94b66924.

It causes problems with qemu.

Without this patch, paplay --latency-msec=1 /some.wav hangs when
forcing the quantum to 8192. A different fix will be needed.
2021-12-09 16:54:47 +01:00
Wim Taymans
6b34b8c44e audioconvert: fix mono channel mix test
When we have a single MONO channel, distribute and average. Otherwise,
use the logic to do proper mixing.

Adjust the unit test accordingly.
2021-12-09 16:51:40 +01:00
Wim Taymans
ce02c7d435 channelmix: always handle 1 channel as mono
Handle 1 channel as a mono channel, which gets copied to all outputs
or gets the average of all inputs.

Fixes the case where a mono channel is handled like a FRONT channel
and then gets attenuated when mixed into left and right.
2021-12-09 16:03:32 +01:00
Michael Olbrich
f5ec830cc2 v4l2: propagate vendor and device id to the node object
When pipewire is accessed through the portal camera API then only the
camera node objects are visible for the client.
However, chromium wants to know the vendor and device ids to identify
cameras. And those properties are currently only added to the device
object.
Fix this by propagating the ids to the node object.

Fixes #1879
2021-12-09 10:20:59 +01:00
Michael Olbrich
22d668a8a0 v4l2-device: remove unused member variable device_name
This variable was introduced in the initial commit but never used.
Just remove it.
2021-12-09 10:20:59 +01:00
Wim Taymans
0d422f00dd module-echo-cancel: schedule source and playback last
Use the new TRIGGER flag on the stream to ensure that the source and
playback streams only get scheduled after we process their input
streams, the sink and capture.
2021-12-08 22:28:34 +01:00
Wim Taymans
db77f6d37d stream: add TRIGGER stream flag
The trigger flag adds an extra dependency on the node so that it does
not automatically get scheduled. A manual scheduling is required with,
for example pw_stream_trigger_process().

This can be used to create an artificial dependency between a sink
stream and a source stream, like when using loopback or filter-chain.
Normally those streams are not linked in the graph but they have an
internal dependency. Without any such dependency, the source part of the
chain will be scheduled first and then the sink part and we get a
cycle of delay (with possible quantum change etc).

With this patch, the sink part will be scheduled first and its process
function will trigger the 'downstream' source stream explicitly. The
sink and source stream will stay in sync and will use the same quantum.
This reduces the latency and glitches because of quantum changes.

Fixes #1873
2021-12-08 20:29:15 +01:00
Wim Taymans
53dbfa79c3 settings: improve graph recalc reason 2021-12-08 20:28:27 +01:00
Wim Taymans
2e199eba43 node: update quantum and rate at beginning of cycle
Don't directly update the quantum and rate in the driver position
when recalculating the graph or else clients might see different values
during one cycle.

Instead update another variable and copy this into the position when
we start a new cycle.
2021-12-07 18:31:13 +01:00
Wim Taymans
c14e89a578 impl-core: require WX flags to destroy an object 2021-12-07 17:13:18 +01:00
Wim Taymans
a31bd26a42 impl-link: small cleanup 2021-12-07 15:33:01 +01:00
Wim Taymans
19b53e8dbe jack: fix loopback links to client
When a client produces output on a port and there is a link between the
output port and an input port of the client, make sure that the new
data appears on the input port.

We do this by keeping track of what links are between our ports and when
we get the peer id of a port input, we can related this to our port
again. Some mixer inputs will then fetch content from our own ports and
so we can prepare the output for them. This can be converting midi to
control messages or moving the output buffer id to the io area so that
the input mixer can pick up the new buffer.

Fixes #1839
2021-12-07 15:31:32 +01:00
Wim Taymans
35cec1cf23 jack: recompute latencies after graph changes 2021-12-07 15:31:32 +01:00
Wim Taymans
b71f47448c jack: always invoke buffer callback
Always pause processing until the main loop has processed the buffer
change callback. This makes it less likely for clients in the same
process to use a new buffersize before the other client has received
the callback.

In carla, one client is receiving the buffer size callback and the other
clients are expexted to be paused until the callback for the client is
completed.
2021-12-07 15:31:32 +01:00
Wim Taymans
fe417bd123 improve latency debug 2021-12-07 15:31:32 +01:00
Quantum
8bab9a18ec Add all 32-bit packed little endian 10-bit RGB colour formats
Given that 10-bit colour is now becoming supported on Wayland, PipeWire
should be able to represent all the possible colour formats in order
for screen capture to work.

This commit adds all possible orderings of 10-bit RGB channels and 2
extra bits used for nothing or alpha in little endian to enum
spa_video_format. Note that Wayland only uses little endian for its
10-bit colour formats, and these are not the same as the big endian
formats in reverse order.
2021-12-07 11:22:04 +00:00
Oğuz Ersen
539e1a8735 po: update turkish translation 2021-12-07 11:20:43 +00:00
Wim Taymans
30a78fe2b8 alsa: improve debug
Remove the rather useless dll values.
Add the threshold
2021-12-07 12:05:49 +01:00
Wim Taymans
dfb82f6f46 jack: refactor recompute_latencies 2021-12-07 11:21:24 +01:00
Wim Taymans
fbef731793 make some warnings into log
Move some warnings when a wakeup was missed to info messages. The
warning can repeat a lot and is otherwise quite useless and already
reported elsewhere.
2021-12-07 10:19:10 +01:00
Wim Taymans
c20f22466e jack: improve latency calculation
Don't do the default latency calculation, it might interfere with
the client latency values. Instead just use the client values and
fold multiples of quantum in the quantum latency field.
2021-12-03 17:59:56 +01:00
Wim Taymans
28370fc3cf jack: also call latency callback when buffersize changes 2021-12-03 17:58:25 +01:00
Wim Taymans
10e71264e7 resample: recalc rate match when out of buffers
When we don't have any input buffers, recalculate the rate match
size field so that we can know the size of the expected buffer.

We already do this when starting but it might have been done with
a different quantum.
2021-12-03 17:54:00 +01:00
Wim Taymans
a8139b7acf pulse-server: handle prebuf state better
When we have a prebuf value, we start in the prebuf state.
We go back to prebuf when we have a prebuf value and an empty
ringbuffer.
2021-12-03 17:49:59 +01:00