Commit graph

7917 commits

Author SHA1 Message Date
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
Wim Taymans 16665d74d2 pulse-server: don't clamp missing bytes to tlength
When we increase the quantum past the tlength, we need to be able to
ask for more bytes than the tlength or else we will never exit this
underrun state. Look at the last required bytes and use that if it's
larger then tlength.
2021-12-03 16:43:16 +01:00
Wim Taymans 1b94b66924 pulse-server: always asks for more data when underrun
Even when prebuffer is active, we need to ask for more data to
resolve the underrun.
2021-12-03 16:41:41 +01:00
Wim Taymans 97cad7284a latency: fix latency combine calculations
0 is a valid min latency so we can't use it as an unset value. Use
some large value instead and when nothing was configured, assume it
is 0.

Fixes #1839
2021-12-02 14:49:48 +01:00
Wim Taymans 401e56699d audioconvert: listen for merger and channelmix for params
List all the params of the merger and resampler.
2021-12-02 11:35:13 +01:00
Wim Taymans 5d85e85ba7 audioconvert: remove listener for resampler
When adding a listener, don't add a listener for the resampler because
it does not contribute to the result, we only listen for results from
the resampler.
2021-12-02 11:35:13 +01:00
Wim Taymans 73b5e7aec4 audioconvert: expose more config options
Use the PROP_param to list and configure additional config options.
2021-12-02 11:35:13 +01:00
Wim Taymans 385246f5a1 audioconvert: only update the arrays when valid
Only update our internal channelmap/volumes array when we actually
parsed something.
2021-12-02 11:35:13 +01:00
Wim Taymans 7b4b73ae5b channelmix: only remap volumes when we have a format
Or else we remap to 0 channels and lose all info.
2021-12-02 11:35:13 +01:00
Wim Taymans 77d66d73d1 audioadapter: return result from enum_param directly
There is no need to pass the result in an argument, just return the
value from the function.
2021-12-02 11:35:13 +01:00
Wim Taymans ebd2af612a settings: use default rate as allowed rates as fallback 2021-12-02 11:35:13 +01:00
Wim Taymans 57361ed0ee alsa: improve param log a bit 2021-12-02 11:35:13 +01:00
Wim Taymans fe547251da filter-chain: don't use id in PropInfo for params
One should use the name of the property in params to access the
property.
2021-12-02 11:35:12 +01:00
Wim Taymans e31f9aa0f2 alsa: don't set id in PropInfo for params
The id is useless when dealing with props params, we need to use the
name of the property as the key. Also the id can clash with other ids
of other plugins.
2021-12-02 11:35:12 +01:00
Wim Taymans e3ddcc3b19 audioadapter: also update the follower PropInfo flags
So that we can enumerate them.
2021-12-02 11:35:12 +01:00
Barnabás Pőcze 0680e249e5 test: test-logger: ignore some systemd journal error codes
Some errors from `sd_journal_get_data()` are not (and
should not be considered) fatal from the point of view of
the test. Ignore them.

See #1710
2021-12-01 11:13:50 +01:00
Barnabás Pőcze 3d152db758 test: null terminate output buffers
Previously, the standard i/o stream and daemon logs
were not properly null terminated, which could cause
issues in `print_lines()` inside `log_test_result()`.

See #1710
2021-12-01 11:12:58 +01:00
Julian Bouzas 921a9038e1 spa: audioadapter: check if follower supports enum params before requesting them
Some follower nodes don't support all audioadapter params (For example, param
SPA_PARAM_Props is not supported by 'support.null-sink'). This change adds a
check to avoid unsuported errors when requesting a param that is not supported
by the follower.
2021-11-30 17:33:17 +00:00