Commit graph

7901 commits

Author SHA1 Message Date
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
Julian Bouzas 84e210ded9 spa: test: remove port EnumFormat param info
Both fakesink and fakesrc nodes don't support it.
2021-11-30 17:33:17 +00:00
Wim Taymans befe7b13eb alsa: add position and format to props params 2021-11-30 18:19:08 +01:00
Wim Taymans d673158db1 alsa: expose all config options as params
Add PropInfo for all the params that we can configure at construct
time and also add them as PROP_params.

This way you can configure the headroom at runtime with this:

pw-cli s <id> Props '{ params = [ "api.alsa.headroom" 1024 ] }'
2021-11-30 17:43:07 +01:00
Wim Taymans 2f82661966 spa: add description to PropInfo 2021-11-30 17:40:56 +01:00
Wim Taymans f894a51eab protocol-native: keep reading messages after error
There is no reason to exit the message loop after receiveing an
error, we can just process the next message.
2021-11-30 12:25:33 +01:00
Wim Taymans c9264c9ce1 core: disable bind version checks
Allow clients to bind to different versions of the server object.

When the server object is newer, it will adapt to the older version.

If the server object is older and the client tries to call a newer
method, it will receive an error. The right thing for the client is to
then ignore this and not call the method again. It should also probably
first check the server version before calling newer methods.
2021-11-30 12:16:35 +01:00
Wim Taymans cc9fbe4375 pulse-server: add some debug 2021-11-30 09:22:58 +01:00
Wim Taymans 700a22b7f7 pulse-server: recover for underrun better
If we are underrun, don't update the read pointer and let the write
pointer catch up.
If we don't have enough data to fill a buffer, skip all the available
data and wait for the new request to arrive.

Fixes #1857
2021-11-29 20:22:05 +01:00
Wim Taymans 3df6e77996 jack: handle regcomp errors 2021-11-29 12:46:50 +01:00
Wim Taymans 11b8a2aad4 buffer: handle the case where only MemPtr is selected
When we need to allocate buffers with shared memory but only MemPtr is
allowed, make sure we change this to MemFd.
2021-11-29 11:23:32 +01:00
Wim Taymans a0bf0e0686 buffers: improve fallback memory allocation
If one of the link ports is remote, enforce shared memory for the
buffer data. We must not use MemPtr because it will not be possible
to transfer this to the remote client.

If none of the sides selected any buffer type but we need shared
memory for the data, select MemFd as the fallback. This avoids using
DmaBuf, that the client did not explicitly select.
2021-11-29 11:07:13 +01:00
Wim Taymans cff8ac0cab client-node: improve memory checks
For MemPtr memory, we use the fd of the buffer metadata and chunk
info. Check that the memory is also in this block.
Check that all the memory of the buffer fits in the memory block.

See #1859
2021-11-29 10:42:02 +01:00
Wim Taymans d3cd36ab54 mem: improve debug
Print unsigned values as unsigned.
2021-11-29 10:41:30 +01:00
Wim Taymans 1b06d4d7c4 settings: Add more runtime settings
Move settings defaults initialization to the settings file.
Expose clock.rate, clock.allowed-rates and clock.quantum as runtime
settings.
2021-11-26 16:47:43 +01:00
Wim Taymans 5cff20eba4 jack: handle chunk offset and size
Use offset and size in captured buffers and make sure we don't use more
than the allocated buffer size.
2021-11-25 15:17:42 +01:00
Wim Taymans e75282d0f5 alsa-plugin: clip offset and size in capture
Be a bit more careful with the offset and size in the buffer and make
sure we clip them according to the maxsize.
2021-11-25 12:32:24 +01:00