Commit graph

8827 commits

Author SHA1 Message Date
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
Wim Taymans
66e4334c92 channelmix: reuse more functions
Make some copy/vol functions and reuse them.
Reuse the 2->3p1 upmix code, tweak it a little to that the widen
param is always used.
2022-04-12 11:54:27 +02:00
Wim Taymans
e12e4295cf channelmix: only filter FC and LFE when upmixed
When we have an original source with LFE and FC, don't try to mix
it but pass it unmodified.

Fixes #2280
2022-04-12 11:51:01 +02:00
Wim Taymans
b97327e1f6 module: handle type register errors
Registering an export type can give an error when the type is already
registered. Handle those errors and refuse to load the module.

See #2281
2022-04-11 21:15:13 +02:00
Barnabás Pőcze
37fa911a72 pulse-server: module: rework registry
Move all module methods into the `module_info` struct, and place
all such structs into the "pw_mod_pulse_modules" section of
the executable. This way there is no need for an explicit
module registry, and all information about a module can
be declared in the module's source file in a single place.
2022-04-11 03:02:08 +02:00
Wim Taymans
6ad6300ec6 pw-reserver: add a -r option to RequestRelease
When we try to acquire a Device and things are busy, try to
RequestRelease the device if the -r option is given.
2022-04-08 12:12:58 +02:00
Wim Taymans
1547e5fd2b alsa: limit the buffer-size to quantum-limit * 4
We don't actually need to allocate the largest possible buffer. A buffer
that is near 4 times the quantum-limit is more than enough.

See #1995
2022-04-07 16:01:48 +02:00
Wim Taymans
0c97008291 impl-node: improve node_set_active for exported nodes
Exported nodes (streams, filter) are not registered in the local
context and notify the server when they change active state.

When the node becomes inactive, this triggers a message to the server to
make the node inactive, which then eventually results in a PAUSE request
on the node, which then removes the node from the processing loop.

Unfortunately, clients expect that after a node is set inactive, the
process function will not be called anymore and they might free any
resources immediately. Handle this by removing the node from the
data-loop and waiting for completion.

This should fix some crashes when streams are stopped.
2022-04-06 13:03:30 +02:00
columbarius
7155913553 Revert "spa: set _GNU_SOURCE"
This reverts commit a2e98e28c1.
2022-04-05 17:13:18 +00:00
columbarius
f36f673b3b spa: replace locale aware string functions with uselocale
Not all string functions have a POSIX compliant locale aware version
(eg. strtof_l). Instead uselocale [1] should be used, which allows
switching the locale of a thread to a welldefined one and restoring it
afterwards.

[1] https://man7.org/linux/man-pages/man3/uselocale.3.html
2022-04-05 17:13:18 +00:00
Wim Taymans
54f6f9293e channelmix: upmix disabled also disables FC and LFE generation
Don't generate FC and LFE when upmix is disabled.

Fixes #2266
2022-04-04 09:08:54 +02:00
muzena
64a09a73dc Update Croatian translation and pipewire.pot 2022-04-03 13:02:21 +02:00
Wim Taymans
5b01a2e738 jack: fix port sort
When the nodes are equal, sort playback ports befor monitor ports.
Then sort by system-id (port-id) and then by serial number.

See #2260
2022-04-02 09:42:22 +02:00
ErikMN
a2e98e28c1 spa: set _GNU_SOURCE
Set CFLAG _GNU_SOURCE in order to suppress warnings about implicit
declaration from strtof_l and strtod_l.
2022-04-02 09:32:40 +02:00
Wim Taymans
ecc9bc2524 man: add pw-link manpage
Fixes #2263
2022-04-02 09:16:13 +02:00
Wim Taymans
d19650178f docs: fix pw_deinit() docs
See #2238
2022-04-01 19:09:56 +02:00
Wim Taymans
617405e08c jack: don't sort ports on alias
The alias is not a good property to sort on, it contains the object
path and could sort playback_11 before playback_2.

Just group ports of the same node together, then sort by port_id and if
that fails, use the serial number.

See #2260
2022-04-01 17:29:39 +02:00
Wim Taymans
cc39644253 modules: add pid to unique name
So that modules loaded from different processes don't generate the
same node names.
2022-04-01 15:22:48 +02:00
Wim Taymans
2922b0e108 channelmix: make PSD the default again
We can't have a default that simply copies channels, that's just
wrong. So we enable PSD again.

PSD does a good job of moving the ambient sound to the back. It's
subtle and almost stereo like but it's better than plain stereo.

The stereo widen has been reduced to make it more like the simple
upmixing.

People that previously wanted the copy-channels-experience had to
manually enable this in pulseaudio so it's not too much to ask
to manually switch the algoritm to simple. I think this is a better
default.

Fixes #861
See #2219
2022-04-01 11:50:57 +02:00
Wim Taymans
f9e8e689d3 filter-chain: free descriptor
Fixes #2220
2022-04-01 10:10:22 +02:00