Commit graph

6943 commits

Author SHA1 Message Date
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
Konstantin Kharlamov
dea1a0bee2 audiotestsrc: convert sizes to const size_t
`sizes` members participate in multiplication and subsequent assignment
into port->bpf, which has size_t. So LGTM rightfully complains, there's
a chance the multiplication will overflow before the assignment happens.

Should have no influence on performance since 64 bit multiplication is
as fast, and since the struct is constified, a wise compiler should make
sure it doesn't take excess space either.

Fixes LGTM warning:

    Multiplication result may overflow 'unsigned int' before it is converted to 'size_t'.
2021-07-05 23:30:45 +03:00
Konstantin Kharlamov
ab71d2c3cb audioconvert: fix potential NULL reference in resample_native_init
That was found by GCC fanalyze pass. Fixes warning:

    ../spa/plugins/audioconvert/resample-native.c: In function ‘resample_native_init’:
    ../spa/plugins/audioconvert/resample-native.c:385:9: warning: dereference of NULL ‘0B’ [CWE-476] [-Wanalyzer-null-dereference]
      385 |         spa_log_debug(r->log, "native %p: q:%d in:%d out:%d n_taps:%d n_phases:%d features:%08x:%08x",
2021-07-05 19:35:06 +03:00
Wim Taymans
0b758a2301 alsa-seq: fix off-by-one for event offset
The event offsets need to go from 0 to quantum-1 to be valid to the
current midi event buffer.

Fixes #1395
2021-07-05 16:25:11 +02:00
Wim Taymans
831fb9ea01 JACK: implement jack_recompute_total_latencies()
Still acts a little weird in Ardour sometimes as if ardour is not
getting the updates in time.

See #1388
2021-07-05 16:06:34 +02:00
Wim Taymans
4abcfcdfb9 improve some debug 2021-07-05 16:06:22 +02:00
Wim Taymans
c0b002689b impl-link: don't recalc latency on feedback links
Or else we might keep updating the latency in a loop.
2021-07-05 16:00:27 +02:00
Wim Taymans
dc5ed8f327 thread: add methods to get rt priority range 2021-07-05 11:35:27 +02:00
Peter Hutterer
488150fac6 modules: document roc ports to be TCP/UDP ports
Let's make this really obvious that we're not talking about a pipewire port
here.
2021-07-05 08:57:41 +00:00
Peter Hutterer
765bd417de doc: link the most recent modules as subpages
This sorts them correctly in the navigation bar
2021-07-05 08:57:41 +00:00
Peter Hutterer
d6bb69f2bd doc: add the configuration file format to the online documentation
Mostly copied from the man page but with a more applicable example.
2021-07-05 08:57:41 +00:00
Peter Hutterer
d51634a2f1 man: add --config to the pipewire man page 2021-07-05 08:57:41 +00:00
Evgeniy Khramtsov
91988acb6b utils: fix public API with consumers using _POSIX_C_SOURCE on FreeBSD
cb6dbd165a made public API incompatible with consumers using
_POSIX_SOURCE, _POSIX_C_SOURCE or _XOPEN_SOURCE: <sys/mount.h>
isn't standalone but depends on BSD-specific types in <sys/types.h>
which are hidden when POSIX compliance is requested.

xdg-desktop-portal-wlr passes -D_POSIX_C_SOURCE=200809L via meson.build
which works for its own code and all other dependencies.

In file included from ../src/core/main.c:7:
In file included from /usr/local/include/pipewire-0.3/pipewire/pipewire.h:35:
In file included from /usr/local/include/pipewire-0.3/pipewire/client.h:35:
In file included from /usr/local/include/pipewire-0.3/pipewire/proxy.h:108:
In file included from /usr/local/include/pipewire-0.3/pipewire/protocol.h:48:
In file included from /usr/local/include/pipewire-0.3/pipewire/utils.h:34:
In file included from /usr/include/sys/mount.h:38:
/usr/include/sys/ucred.h:99:2: error: unknown type name 'u_int'
        u_int   cr_version;             /* structure layout version */
        ^
In file included from ../src/core/main.c:7:
In file included from /usr/local/include/pipewire-0.3/pipewire/pipewire.h:35:
In file included from /usr/local/include/pipewire-0.3/pipewire/client.h:35:
In file included from /usr/local/include/pipewire-0.3/pipewire/proxy.h:108:
In file included from /usr/local/include/pipewire-0.3/pipewire/protocol.h:48:
In file included from /usr/local/include/pipewire-0.3/pipewire/utils.h:34:

Reported by: Jan Beich <jbeich@FreeBSD.org>
2021-07-05 08:49:14 +00:00
Wim Taymans
5e0c9199bd context: drop RT when freewheeling
When we are freewheeling, drop the RT priority so that we don't
lock up the system too much.
2021-07-05 10:41:57 +02:00