Commit graph

6956 commits

Author SHA1 Message Date
Érico Nogueira
4c166709d0 modules: improve _gettid wrapper
- use meson to check for gettid() function, always use if available
- use syscall fallback on linux, if not
- restrict thr_self() fallback to *only* FreeBSD
- error out if there isn't any gettid impl
2021-07-20 15:51:50 +00:00
Wim Taymans
a4b8bd6d52 rtkit: use _gettid() instead of getpid() in fallback 2021-07-20 17:13:26 +02:00
Érico Nogueira
9160a127b5 modules: fix typo in module-rtkit
Was using the gettid() function directly instead of the _gettid()
wrapper.
2021-07-20 12:01:21 -03:00
Wim Taymans
41ce309275 0.3.32 2021-07-20 13:06:13 +02:00
Wim Taymans
cea8a95a59 jack: emit more graph_order callbacks
We should actually emit the graphorder callback whenever something
changed, also when a client or port was added/removed.

Also emit the graphorder callback right after a client is activated to
make jackdbus work.
2021-07-20 11:44:35 +02:00
Wim Taymans
cb3543e9b4 media-session: don't move nodes to same link-group
Refuse to move a node to a new target when they belong to the same
link-group to avoid loops.

Fixes #1376
2021-07-20 09:52:57 +02:00
Wim Taymans
6e44c081b0 modules: silence some useless warnings
Fixes #1423
2021-07-19 18:30:22 +02:00
Wim Taymans
bd98c6771e modules: make a default node.link-group property
When nothing else is specified, add a default node.link-group property
so that all the nodes from this echo-canceler are tagged as being linked
together in some way.

This allows the session manager to follow the relations between the
different streams and avoids linking those related nodes together, which
avoids playing or recording from itself in a loop.

Fixes #1376
2021-07-19 18:21:11 +02:00
Wim Taymans
587e9d5fb1 mem: remove unused global mempools list
The mempools list keeps track of all allocated mempools but is otherwise
not used. Because it is not protected with a lock, concurrent contexts
or thread loops can step on eachother and crash. Remove this for now
until we actually need it and implement it with some sort of lock.

Fixes #1416
2021-07-19 12:13:25 +02:00
Wim Taymans
1531f78965 jack: ensure transport frame_rate is not 0
Try harder to get the transport frame_rate from the position.
If we can't find an activation structure, use the configured frame_rate
instead of 0.

Fixes #1432
2021-07-19 11:50:28 +02:00
Wim Taymans
a91502b3e0 loop: improve invoke avail check
First calculate the size of the aligned payload and then check if
we can fit this aligned payload in the remaining space in the
ringbuffer.

Otherwise we might be able to fit the item + payload in the remaining
space but then place the alignment bytes at the begginning, which would
break alignment of the next invoke_item struct.
2021-07-19 10:12:15 +02:00
Wim Taymans
7f4fa64291 loop: Fix crash because of overflow
Also check if there is enough space to write the payload bytes.

We check if there is enough space for the invoke_item structure first.
Then we calculate how much bytes we need to use for the payload but we
fail to check if we can actually write that much data, risking
overwriting existing data from the ringbuffer and causing a crash later
when we try to jump to invalid memory.

Add some more comments.
2021-07-19 09:53:23 +02:00
Peter Hutterer
327ec4306f INSTALL: link to our CI pipeline for distributions-specific dependencies
We know these are up-to-date and they are based off a minimal base
system.
2021-07-14 12:25:17 +00:00
Peter Hutterer
257fd83f65 Replace Pipewire with PipeWire for consistency
And set up a CI job to check for that.
2021-07-14 16:56:54 +10:00
Julian Bouzas
4732aea0c6 spa: clear all devices when udev monitor stops
Otherwise the udev device leaks when restarting the monitor
2021-07-13 17:03:30 +00:00
Julian Bouzas
7bf50fd8ed spa: alsa: acp: free device name in add_pro_profile 2021-07-13 17:03:30 +00:00
Ден Иванов
e504ff8605 Update INSTALL.md - added info on Fedora dependencies 2021-07-12 08:10:53 +00:00
Arun Raghavan
3bde823e74 pipewire-pulse: Fix media.class setting on pipe sink/source
Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1407
2021-07-12 01:31:58 -04:00
Pauli Virtanen
0c9f0210ed bluez5: sco-io: start writing only after the packet size is known
The kernel-provided SCO write MTU is currently never the correct packet
size for writing, so don't try to use it. Some adapter firmware (eg.
BCM20702A0 0b05:17cb) appears in practice sensitive to the alignment of
the msbc frames, and writes with wrong packet size break things but only
on certain headsets. For other adapters, this doesn't appear to matter.
2021-07-11 16:14:03 +00:00
lsde
579481ab70 Use correct RTP payload type for aptX, LDAC,SBC
According to the A2DP spec, the payload type should be
set to a number between 96 and 127.
This is fixed for AAC codec, but not the rest.

Original PulseAudio issue: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/591
2021-07-11 16:10:20 +00:00
Julian Bouzas
2dcdc80030 spa: alsa: acp: fix memleak when destroying card profles 2021-07-08 11:08:00 -04:00
Wim Taymans
33e07cc984 pipewire-pulse: don't republish when object changes
Ignore changes to the object. Otherwise, we would remove and publish
the device again for each volume change.

Fixes #1406
2021-07-07 17:38:17 +02:00
Wim Taymans
33f90abfb5 impl-link: use loopvisited variable for loop checking
Don't reuse the visited variable for checking feedback loops because the
scheduler expects it to be false on entry. Use a different variable
instead.
2021-07-07 15:56:39 +02:00
Wim Taymans
afb7090ba0 media-session: reevaluate current profile only for its own routes
Only check the current active profile when some routes changed that are
part of the profile. If some other route changed, just ignore it.

Fixes #1403
2021-07-07 15:12:44 +02:00
Peter Hutterer
de394866e3 ci: hook up a valgrind run 2021-07-07 11:03:23 +00:00
Peter Hutterer
1bd43e8282 test: skip the endpoint test under valgrind
This test currently prevents us from running the test suite in valgrind but
it's not a straightforward fix. So in the meantime, skip this test when
running under valgrind.
2021-07-07 11:03:23 +00:00
Peter Hutterer
0f5e462909 tests: fix indentation issues in meson.build 2021-07-07 11:03:23 +00:00
Peter Hutterer
731888fcdd test: fix a memleak in the config tests
Fixes bba9edabee
2021-07-07 11:03:23 +00:00
Peter Hutterer
4f49e893c1 test: init the pod test buffer with a fixed value
Works around the valgrind complaints when we call spa_debug_mem() on the
buffer with various sizes.
2021-07-07 11:03:23 +00:00
Peter Hutterer
5ebfbccd16 pwtest: if a test expects a signal, skip it under valgrind
Running under valgrind enforces --no-fork so any signal will cause valgrind
to error out, failing the test abnormally. This prevents us from running
our test suite through valgrind, we'd have to mark every test specifically
whether it should run under valgrind or not.

Easier is just to automatically skip tests expecting signals.
2021-07-07 11:03:23 +00:00
Wim Taymans
6600d93d5d impl-link: improve feedback loop check
Mark peer nodes as visited and only visit them once. Reduces the
complexity a lot.
Limit the number of hops we check to 32 to avoid excessive work.
2021-07-07 12:54:09 +02:00
Jonas Holmberg
298dfa7da4 pipewire: make pw_get_prgname() thread safe
Make sure the string isn't overwritten while another thread is reading
it.

Fixes #1402
2021-07-06 19:29:16 +02:00
Wim Taymans
8184d4576a handle snprintf errors better 2021-07-06 17:56:04 +02:00
Wim Taymans
99b1ce96ed jack: avoid overflow in time calculations 2021-07-06 17:55:38 +02:00
Wim Taymans
d88e8edd11 avoid shadowing arguments 2021-07-06 17:55:16 +02:00
Wim Taymans
91f4e4d3c8 alsa: catch and handle some more errors 2021-07-06 17:54:08 +02:00
Wim Taymans
acad6b8f2b audioconvert: use the right variable
Keep the result of the follower in res2, fail if we could not set the
properties on both the follower and the converter.
2021-07-06 16:28:57 +02:00
Wim Taymans
9fa72f22cb thread: fix compilation 2021-07-06 16:20:05 +02:00
Wim Taymans
27fc430eff po: update russian
Fixes  #1374
2021-07-06 16:02:50 +02:00
Wim Taymans
1ff535e6eb spa: move thread to SPA support
It can be more generally useful eventually.
2021-07-06 15:48:20 +02:00
Wim Taymans
3a879e8b1a audioconvert: fix s24_32 to float
s24_32 needs to be sign extended before converting to float because the
upper bits are undefined and might be anything.

Fixes #1393
2021-07-06 12:42:39 +02:00
Wim Taymans
aab72ded6e jack: emit graph callbacks as well
When a link is added and removed, emit the graph callback.
2021-07-06 10:40:31 +02:00
Wim Taymans
a3549deb48 jack: remove a lock
The thread loop is already taken when calling port_update_latency.
Improve some debug, add some comments.
2021-07-06 10:40:31 +02:00
Peter Hutterer
bba9edabee conf: don't allow a NULL config name
No functional changes, this is enforced by the only in-tree callers of
pw_conf_load_conf() but let's enforce this properly.
2021-07-06 07:14:21 +00:00
Peter Hutterer
fb2d35895e conf: ignore the prefix if the config file name is an absolute path
Fixes:
$ export PIPEWIRE_CONFIG_PREFIX=/usr/share/pipewire
$ pipewire -c /etc/pipewire/bar.conf
[W][11925.530591][          conf.c:  253 conf_load()] config 0x560039ac6510: error loading config '/usr/share/pipewire//etc/pipewire/pipewire.conf': No such file or directory
[W][11925.530721][       context.c:  178 try_load_conf()] context 0x560039ac6190: can't load config /usr/share/pipewire//etc/pipewire/pipewire.conf: No such file or directory
2021-07-06 07:14:21 +00:00
Peter Hutterer
b1ac776ff0 test: remove duplicate test invocation 2021-07-06 07:14:21 +00:00
Konstantin Kharlamov
252816f757 bluez5: fix wrongly typed started field in spa_bt_sco_io
This is a bitfield, but it's unclear what it achieves since this is the
only member of a bitfield, so it may be more efficient to just make it a
bool.

Fixes a LGTM warning:

    Bit field started of type int should have explicitly unsigned integral, explicitly signed integral, or enumeration type.
2021-07-06 00:07:21 +03:00
Konstantin Kharlamov
64352dd256 gstpipewireformat: remove useless comparison in gst_caps_from_format
Fixes a LGTM warning:

    Empty block without comment
2021-07-06 00:07:17 +03:00
Konstantin Kharlamov
8c013b8183 modules: remove useless comparison in pw_properties_from_avahi_string
It doesn't do anything, let's just get rid of it.
2021-07-05 23:57:35 +03:00
Konstantin Kharlamov
6f39e13f11 module-zeroconf-discover: factor out pw_properties_from_avahi_string
This allows to get rid of the empty if block in comparison to
channel_map, and makes it clear that the comparison is useless. So in
the next commit we will remove it.

Fixes an LGTM warning:

    Empty block without comment
2021-07-05 23:53:46 +03:00