Commit graph

8846 commits

Author SHA1 Message Date
Wim Taymans
10af59bdc2 modules: update docs 2022-04-21 20:22:45 +02:00
Wim Taymans
75f4fca1d7 module-loopback: add docs 2022-04-21 20:12:26 +02:00
Antonio Larrosa
36060e375d Support creating links for all ports from a node to another
This commit allows to specify the port-ids as "*" in
create-link in order to connect all output ports from the
first node to all input ports from the second node (in
port-id order). For example, executing something like:

`create-link my-virtual-device * alsa_output.usb-headset *`
2022-04-21 17:06:46 +00:00
Wim Taymans
da6ab064d2 stream: add stream.rules and filter.rules 2022-04-21 16:28:08 +02:00
Wim Taymans
d63deb140c conf: fix typo 2022-04-21 13:15:12 +02:00
Wim Taymans
d1207422e0 make NODE_WANT_DRIVER=true the default
So that all nodes attach to some driver to be scheduled.

For the virtual sink/sources this is a normal thing and we can remove
the custom settings.

For normal stream, this now makes it possible to link pw-play directly
to pw-record and have it transport data.

Fixes #1761
2022-04-21 10:14:53 +02:00
Wim Taymans
9a5fbd26df filter-chain: make sink-eq stereo to avoid confusion 2022-04-21 09:39:04 +02:00
Wim Taymans
fed6f6d834 filter-chain: increase max gain for biquads 2022-04-21 09:38:35 +02:00
Wim Taymans
01a7d6709b modules: don't unload on stream errors
It's possible that the stream is sent an error when the session manager
can't link the node (because, for example, the sink/source is not
available yet). We should not stop but just log this error.

When the session manager actively kills the stream (when it is
reconnected while the DONT_RECONNECT flag is true) we will end up in the
UNCONNECTED state and that's when we can unload the module.
2022-04-21 09:02:02 +02:00
Wim Taymans
f205a09ade module: handle error and unconnected states
Unload the module on error/unconnected
2022-04-20 19:33:18 +02:00
Wim Taymans
26471ff2da module-loopback: unload the module on stream unconnect
When one of the streams is unconnected, unload the module. This is
what happens when the node was set as dont_reconnect with a node
target.

Fixes #1754
2022-04-20 19:25:42 +02:00
Wim Taymans
e353999028 channelmix: use average for center and LFE
Stops the LFE from clipping.
2022-04-20 16:09:39 +02:00
Wim Taymans
f6dbd75e61 context: rework node states some more
Make collect_nodes return a list of all nodes that are in some way
linked to the node and need to be scheduled as a group.
Move all the collected nodes to a driver, a fallback driver or away
from a driver.

This fixes some cases where nodes were moved quickly between drivers,
causing a lot of activation messages to be sent and fds to be dupped.
Nodes should now only move when needed with minimal amount of
changes to their state.

See #2309
2022-04-20 13:11:14 +02:00
Wim Taymans
cc7aadde8a connection: debug when we close fd
Also handle DUP failure.
2022-04-20 12:13:41 +02:00
Wim Taymans
a112446dab contect: also remove the original node passive state
When we have a non-driver node, also remove the passive state when
we find active links to another node.

Fixes #2309
2022-04-20 10:44:50 +02:00
Wim Taymans
e21efd40bb context: make sure we clear the visited flag
Do a separate pass to clear the visited flag of the nodes because
collect_nodes might set them after we cleared them.
2022-04-20 10:43:57 +02:00
Wim Taymans
d0886a16a2 resample: limit buffer input size to input maxsize
And not the output buffer maxsize.
2022-04-19 19:58:41 +02:00
Wim Taymans
df98c748b4 man: update pw-top man page 2022-04-19 19:50:08 +02:00
Wim Taymans
32b2377de3 pw-cat: don't start drain on 0 request size
When the stream requests a 0 size buffer, don't start the drain but
simply queue a 0 size buffer.

Sometimes, switching quantums and drivers might request a 0 buffer
async and this should not cause a drain operation.
2022-04-19 18:29:47 +02:00
Wim Taymans
96286fb8b1 resample: use a -1 buffer size to drain
Use the special -1 buffer size to start the drain so that we can
also handle 0 buffer sizes.
2022-04-19 18:28:59 +02:00
Wim Taymans
cbef4a601f pw-top: improve error output
Print +++ when the node was signal/awake but not awake/finish.
Print --- otherwise.
2022-04-19 17:49:46 +02:00
Wim Taymans
ee2b20a55c pw-top: handle invalid timings
Handle invalid signal, awake and finish timings by placing
*** instead of huge numbers.
2022-04-19 17:35:51 +02:00
Wim Taymans
7b225708e9 test: getopt_long returns an int
./spa/plugins/alsa/test-timer.c: In function ‘main’:
../spa/plugins/alsa/test-timer.c:224:79: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  224 |         while ((c = getopt_long(argc, argv, "hD:f:r:c:", long_options, NULL)) != -1) {
      |
2022-04-19 16:48:27 +02:00
Wim Taymans
1dcc81b260 man: improve pw-top man page 2022-04-19 15:20:10 +02:00
Wim Taymans
e3ff445d4b pw-top: clear errors when idle 2022-04-19 12:26:20 +02:00
Wim Taymans
be11da540a pw-top: clear measurements when idle 2022-04-19 12:23:48 +02:00
Wim Taymans
ae8c6f827b pw-top: remove nodes from driver when idle
When we detect that no new profiler info has arrived for a node, assume
it was removed from the driver.

This avoids having idle nodes seemingly attached to an idle driver
when there is no activity.
2022-04-19 12:06:53 +02:00
Wim Taymans
26db2f1ec9 module-pulse-tunnel: clear ringbuffer on cork 2022-04-19 10:51:45 +02:00
Wim Taymans
182b3c8798 context: rework state calculations
We can only call collect_nodes() once because it sets the visited state
to true.
So, move the unassigned nodes to the fallback driver but when they are
passive (nothing is linked), move them back to the NULL driver.

This fixes a case where when the fallback driver changes, only some
nodes are moved to the new driver (because the other ones were already
visited in the collect_nodes() check before).
2022-04-19 10:39:38 +02:00
Wim Taymans
4cc0082634 module-pulse-tunnel: move some info log to debug 2022-04-19 09:58:18 +02:00
Wim Taymans
cdbdcd6771 module-pulse-tunnel: improve error recovery
Track the end-to-end latency of the stream and use that to drive
the resampler.
Hard reset the ringbuffer when under/overflow happens so that we
can recover quickly.

See #2230
2022-04-19 09:41:28 +02:00
Wim Taymans
c73c852413 pulse-tunnel: improve debug 2022-04-18 16:48:10 +02:00
Wim Taymans
ae194b6fe7 context: don't move passive nodes to fallback driver
Don't move passive nodes to the fallback driver when !always_process.

When we have a fallback driver, check if the node we want to add to it
is not a passive node (by doing collect_nodes), if it's passive and
doesn't always need to be processed, remove it from the driver.

This fixes the issue where nodes that are maked as want_driver are
unconditionally moved to the fallback driver (and activated) even if
there is nothing linked to them (passive).

Fixes #2309
2022-04-18 16:40:40 +02:00
Wim Taymans
1809a84562 context: ignore inactive nodes some more
Don't try to follow inactive node links.
Don't assign inactive nodes to a fallback driver.
2022-04-18 15:27:09 +02:00
Wim Taymans
0b96b87331 thread: implement some properties
Make helper method to parse thread properties and add 2 new properties
to control name and stack-size of the thread.
Use properties when creating threads with the default utils.
Use the default thread utils instead of pthread_create so that the
properties are used.
2022-04-18 13:02:27 +02:00
Wim Taymans
5f7421b946 jack: remove some pthread attributes
JOINABLE and SCOPE_SYSTEM are defaults.
EXPLICIT_SCHED is not needed and causes qemu with resourcecontrol to
fail.

Fixes #2297
2022-04-18 11:52:22 +02:00
Quentin Wenger
d2250e9d1c Cleanup argument names in methods and events interfaces: object/data, 2nd pass. 2022-04-18 07:49:35 +00:00
Barnabás Pőcze
61594270f4 spa: utils: defs: parenthesize macro bodies
Parenthesize the body of the `SPA_CONTAINER_OF()`
and `SPA_PTR_ALIGN()` macros.
2022-04-18 07:49:05 +00:00
Anders Jonsson
4c24a85715 po: Update Swedish translation 2022-04-18 07:47:54 +00:00
Barnabás Pőcze
e28a052105 treewide: retain sections to prevent linker garbage collection
The linker may remove sections that are actually used when
"--gc-sections" and "-z start-stop-gc" is set. Add the `retain`
attribute to prevent that.

Furthermore, fix the alignment for `pwtest_suite_decl` objects.

See: #2292
See: https://lld.llvm.org/ELF/start-stop-gc.html
See: https://github.com/systemd/systemd/issues/21847
See: https://github.com/systemd/systemd/pull/21855
2022-04-15 23:58:05 +02:00
Quentin Wenger
22fc9eec35 Cleanup argument names in methods and events interfaces
First method argument is object, first event argument is data.

Closes !963
2022-04-15 10:11:49 +02:00
psykose
d3ea3142e1 spa: fix c90 header include
placing declarations after code is invalid under ISO c90

Fixes !1211
2022-04-14 12:38:11 +02:00
Wim Taymans
b0dcfa886d context: add some comments 2022-04-14 10:16:20 +02:00
Wim Taymans
2268d1838b context: re-evaluate quantum/rate for moved nodes
When a node is moved from one driver to another, recheck if the new
driver needs a quantum/rate change.

Because the node was running on the old driver, the locked flag was
checked and applied to the new driver, causing the new driver to keep
running with the old (possible wrong) quantum/rate.

Fixes #2293
2022-04-14 10:12:54 +02:00
Wim Taymans
339c22dce9 pw-cat: update man page 2022-04-13 16:04:35 +02:00
Wim Taymans
ecff225b11 pw-cat: remove code to list targets
Introspection of default devices should be done elsewhere.
2022-04-13 16:02:46 +02:00
Wim Taymans
64cf5e80e6 0.3.50 2022-04-13 12:41:34 +02:00
Wim Taymans
78b1c4c2e8 module-echo-cancel: put audio.position on properties
So that a default channel layout is set and the volume can be set before
the streams are negotiated.
2022-04-13 11:15:10 +02:00
David Weber
df6fb25e03 apply force-s16 quirk also to teams-insiders
teams-insiders is the test version of teams.
Unfortunately it still requires the force-s16 quirk
2022-04-12 10:24:05 +00:00
Wim Taymans
164361484f channelmix: tweak defaults a little.
Increase the FC filter frequency to 12KHz for better dialogs. This
filter is only applied when making the FC from FRONT channels so that
we keep the high frequency signal on the FRONT mostly.
Increase LFE filter frequency to make slightly more bass.
Disable widen filter by default.
Update config files with the correct defaults.
2022-04-12 12:04:55 +02:00