Commit graph

7630 commits

Author SHA1 Message Date
Peter Hutterer
696a4b22e9 module-rt{kit}: use spa_atoi32 instead of custom strtol
And duplicate the function into rtkit which had a similar but different
approach to it. Let's get both to do the same here.
2021-10-13 07:12:00 +00:00
Peter Hutterer
87a1e1534c daemon: let meson handle the uninstalled media-session path
If we build media-session before the daemon we have the executable
variable available and can rely on meson to fill in the path instead of
handling it manually.
2021-10-13 07:09:13 +00:00
Peter Hutterer
c81dcae683 media-session: rename the executable variable name in meson.build
Makes it more obvious to access the result from other meson.build
files.
2021-10-13 07:09:13 +00:00
Peter Hutterer
f4516e6745 media-session: decouple config from the pipewire daemon config
There are only two values we care about that are identical, we can
re-set those in a new configuration_data() object.

All the other values set by the pipewire daemon are related to how we
start the session manager which isn't applicable here.
2021-10-13 07:09:13 +00:00
AsciiWolf
81381b98d5 Update Czech translation 2021-10-12 14:18:52 +02:00
Wim Taymans
a5c64ffa3b impl-node: deactivate node in destroy
When pause-on-idle is false, the node can be destroyed without ever
being deactivated, which would crash. Make sure we deactivate in destroy
and remove the node from the graph.
2021-10-12 12:07:18 +02:00
Peter Hutterer
04d32ba794 test: fix a variable initialization
Technically valid since it's a null pointer but let's not do this.
2021-10-12 08:58:39 +00:00
Peter Hutterer
36c1917a16 test: use a function-specific token instead of a common one
This avoid false detections of the MARK token from other tetsts when
tests are run in parallel.
2021-10-12 08:58:39 +00:00
Peter Hutterer
e7ac8adaa5 test: wait up to a second for our MARK message to appear in the journal
The previous code exposed a race condition, it assumed that our MARK
message was in the next lot of messages by the journal. If something
else would write to the journal in the meantime and our message took
time to arrive, the test would fail.

Fixes #1710
2021-10-12 08:58:39 +00:00
Peter Hutterer
52e6f2883d ci: build the default no-options and the release build jobs with clang too
Just to make sure that works, all other jobs are built with gcc only.
2021-10-12 10:05:19 +10:00
Peter Hutterer
1f497f3248 test: call pw_deinit() at the end of the context tests 2021-10-12 09:45:33 +10:00
Peter Hutterer
ff85c2835f test: enable debug logging for the valgrind test
Valgrind tests are running under different conditions than normal tests,
specifically they all run in the same process rather than running one
fork per test. This means one test can affect another test's result if
the test doesn't clean up propertly.

This makes them harder to debug from the logs, so let's give us a
fighting chance by having debug logging enabled.
2021-10-12 09:45:33 +10:00
Peter Hutterer
12379a9a3c pipewire: fix error message if the DBus library load failed
If the handle is NULL, we'd print out the strerror with res at whatever
value it currently has, leading to confusion.
2021-10-12 09:45:33 +10:00
Peter Hutterer
5ac456f294 test: match the meson test names with the binary names
Easier to find this way what caused a test suite failure.
2021-10-12 09:45:33 +10:00
Peter Hutterer
c44d0a6bbc spa: declare a dependency for the dbus lib
When running meson test without a preceding ninja build, we end up with
missing libraries. This somehow happened to work until recently but now
it triggers an issue with libspa-dbus.so not being available during the
valgrind test run, causing a test case to fail.
2021-10-12 09:45:33 +10:00
Wim Taymans
9afb832d22 pulse-server: find the sink when doing monitor source lookup
When we do a lookup of a source with the monitor flag bits set in the
id, strip off the monitor bits se we can find the associated sink.

Fixes #1677
2021-10-11 17:02:13 +02:00
Wim Taymans
38981a4c8c filter-chain: biquad fequency is half the samplerate
See #1699
2021-10-11 16:07:13 +02:00
Wim Taymans
85d5c8cd6c cpu: add zero_denormals method
Add a method to enable/disable the denormals flush-to-zero and
denormals-as-zero CPU options.

Add a config option to make it possible to disable this again.

Fixes high CPU usage when dealing with denormals, which can happen
in many DSP functions.

Fixes #1681
2021-10-11 14:57:02 +02:00
Wim Taymans
036371c48f media-session: fix aux channels links
AUX channels can link to any other channel but when AUX channels are
linked, they must match exactly.

Fixes some issues with split devices with aux channels.
2021-10-11 11:35:29 +02:00
Wim Taymans
594f67ec04 a2dp: guard against transport NULL
The transport can become NULL so check that and don't try to
deref it.
2021-10-11 11:22:36 +02:00
Peter Hutterer
6df8ce3031 test: fix a race condition with the journal test
The docs are slightly ambiguous here but it appears a call to
sd_journal_next() is required at least once before the actual data
message.

journalctl positions the cursor with sd_journal_seek_tail() followed by
sd_journal_seek_previous(). The actual enty is then fetched with
sd_journal_next().

Let's do the same here and let's hope this fixes the current race
condition with the test sometimes failing.
2021-10-11 07:23:38 +00:00
Pauli Virtanen
4b831021fb bluez5: add a dummy AVRCP player as a workaround
Some devices (Bose Mini Soundlink II, Air 1 Plus, ...) don't enable
AVRCP volume control, or fail to enable it before a hardware button is
pressed.  However, these devices appear to enable it, if an AVRCP player
is present.

As a workaround, register a dummy AVRCP player for each adapter. It only
displays the current transport acquisition state as playing/stopped, but
just its presence appears to be enough to make devices behave.

Multiple AVRCP players interfere with each other, as BlueZ uses the one
registered earliest as the default player. So add also a config option
for disabling this. (It's not common to have mpris-proxy etc. running,
so defaulting to true should be OK.)

See pipewire#1157
2021-10-10 16:24:41 +03:00
Pauli Virtanen
336caa9db3 doc: add tutorials as Doxygen examples 2021-10-10 00:35:46 +03:00
Pauli Virtanen
98a0e54d5f doc: link examples to Doxygen docs
Include examples to the documentation, using Doxygen's example system.
2021-10-10 00:35:46 +03:00
Wim Taymans
f6d69f9bcd resample: avoid NULL deref
The function is NULL when the resampler was not initialized.

Fixes #1706
2021-10-09 15:53:40 +02:00
Piotr Drąg
2c4b27163d Update Polish translation 2021-10-09 15:36:22 +02:00
Wim Taymans
ffc5c49508 impl-link: cancel link operations in work_queue in destroy
Fixes #1705
2021-10-09 15:18:20 +02:00
columbarius
2aabc4610b gst: Don't reconnect gstpipewiresrc
Clients connecting via the gstreamer plugin can stall a stream when
reconnecting to it. Disable reconnection until the gstreamer plugin
has improved.
2021-10-09 13:12:06 +00:00
Pauli Virtanen
d28b36bb93 bluez5: fix HFP backend behavior when BlueZ goes away
Ensure unavailable backends get unregistered.

Don't log error-level messages on HFP unregistration failures.
2021-10-09 13:03:08 +00:00
Wim Taymans
5f7c4dec34 meson: make it possible to compile without dbus
Make an option to disable dbus and all the code that depends on
it.

Fixes #1685
2021-10-09 15:00:04 +02:00
Wim Taymans
caf0b2df19 jack: protect against removed ports
Check if the port object is really a port and that it still has
a client associated with it before unreffing the client.

Fixes #1694
2021-10-09 12:49:21 +02:00
Wim Taymans
04344dad20 spa: add mjpg and h264 format build helpers 2021-10-08 13:21:07 +02:00
Wim Taymans
cefcc2e874 alsa-plugin: store the right value in last_seq
last_seq needs to contain the last received seq, not the last one that
we requested to sync on.
2021-10-08 09:21:32 +02:00
Peter Hutterer
3f6521819f test: add a filter for iteration
Debugging is easier if we can explicitly run a single iteration only.
This filter could be a range but for now it's sufficient to be able to
run a single test only.
2021-10-08 07:06:42 +00:00
Peter Hutterer
82de0613d6 doc: document pw_map
Take some parts out of the public documentation, add a lot of internal
documentation to make it easier for the next person to figure out how
this works.

The use of static inline prevents doxygen from generating docs, put a
note in to link to the header file directly.
2021-10-08 12:55:34 +10:00
Peter Hutterer
626d30e4bd map: fix free_list corruption when re-using removed ids
Re-using an id after removing it is a bug in the caller but there are
two cases where we corrupt the free list without warning:

Removing an object twice:

   id = pw_map_insert_new(object);
   pw_map_remove(map, id);
   pw_map_remove(map, id);

And inserting an element at an index previously removed:

   id = pw_map_insert_new(object);
   pw_map_remove(map, id);
   pw_map_insert_at(map, id, new_object);

The latter is arguably valid code, or at least it'll look like it's
valid code.

For both cases, check if the id to remove/insert at is a free item and
handle that accordingly.
2021-10-08 12:40:23 +10:00
Peter Hutterer
5b9447c2a4 test: add some map tests 2021-10-08 12:40:23 +10:00
Björn Daase
492abccfe6 filter-chain: fix incorrect codespell fix
Fixes cf38b7bdc4
2021-10-07 21:31:01 +02:00
Björn Daase
cf38b7bdc4 fix codespell issues 2021-10-07 15:26:18 +00:00
Björn Daase
57eef39583 .codespell-ignore: update to current codebase 2021-10-07 15:26:18 +00:00
Björn Daase
10ededf5d4 bluez5: fix mSBC probing documentation 2021-10-07 15:25:29 +00:00
Nicolai Syvertsen
dea1755b68 pulse-tunnel: follow pulseaudio for default format 2021-10-07 15:39:11 +02:00
Nicolai Syvertsen
28c2e8ca56 pulse-tunnel: use format, channels and rate props 2021-10-07 13:00:24 +02:00
Wim Taymans
466715672e log: fix logger fallback
The logt function should fall back when both the logger implementation
version is too low or when the method is not implemented.

We can use the new spa_callback_call return value to efficiently
handle this.
2021-10-07 10:15:21 +02:00
Wim Taymans
2435f0d7ff hook: we can use the spa_callbacks_call return value now
instead of reimplementing the check.
2021-10-07 10:14:43 +02:00
Wim Taymans
68748895ea hook: add spa_callbacks_check
That does a version and method check on the callbacks.
2021-10-07 10:13:06 +02:00
Wim Taymans
bb950976da hook: make spa_callbacks_call return true
Make spa_callbacks_call return true when the method could be called
succesfully. This means the callbacks version was correct and the
method existed.

This can then be used to implement a fallback.
2021-10-07 10:10:53 +02:00
Peter Hutterer
e36183d3cf array: re-initialize the array in pw_array_clear()
Leaving the data nonzero is a use-after-free bug waiting to happen.
2021-10-07 15:08:57 +10:00
Pauli Virtanen
7123fadc37 doc: further Doxygen tweaks
Make Doxygen see also macros defined inside struct declarations,
and to include also opaque structs.

Keep members in the order they are in the .h file, since Doxygen's
case-insensitive sort by name jumbles things.
2021-10-06 19:06:42 +00:00
Wim Taymans
caced1f226 jack: finish statement with; and not , 2021-10-06 20:19:50 +02:00