Commit graph

6922 commits

Author SHA1 Message Date
Peter Hutterer
5e76f39e9d meson.build: move -D_GNU_SOURCE to the other hardcoded args
No need for this to be on its own line
2021-06-25 08:25:02 +00:00
Barnabás Pőcze
887876bea8 pulse-server: add missing forward declarations
Part of !776.
2021-06-25 03:24:00 +02:00
Barnabás Pőcze
378ba0d51b pulse-server: clean up includes
* use <> for pipewire includes
* add missing includes
* move "manager.h"

Part of !776.
2021-06-25 03:23:54 +02:00
Barnabás Pőcze
0e48ae9f50 pulse-server: remove unnecessary struct member and includes
Part of !776.
2021-06-25 03:23:51 +02:00
Barnabás Pőcze
480fcbbba9 pulse-server: module-zeroconf-publish: use <> for system include
Part of !776.
2021-06-25 03:23:45 +02:00
Barnabás Pőcze
e966b1d6f2 pulse-server: split out message-handler
Part of !776.
2021-06-25 03:23:41 +02:00
Barnabás Pőcze
c9f5deb81d pulse-server: split out module handling
Part of !776.
2021-06-25 03:23:37 +02:00
Barnabás Pőcze
c49ae39888 pulse-server: split out extension handling
Part of !776.
2021-06-25 03:23:35 +02:00
Barnabás Pőcze
d366487116 pulse-server: split out server creation and socket handling
Part of !776.
2021-06-25 03:23:32 +02:00
Barnabás Pőcze
49d31ea0af pulse-server: split out reply, operation, client, stream
Part of !776.
2021-06-25 03:23:27 +02:00
Barnabás Pőcze
b2ec1fb60a pulse-server: split out message handling
Part of !776.
2021-06-25 03:23:24 +02:00
Barnabás Pőcze
5318c0eeca pulse-server: split out media roles
Part of !776.
2021-06-25 03:23:20 +02:00
Barnabás Pőcze
62832609c1 pulse-server: split out utils
Part of !776.
2021-06-25 03:23:18 +02:00
Barnabás Pőcze
8a0f52ab78 pulse-server: split out pending-sample
Part of !776.
2021-06-25 03:23:15 +02:00
Barnabás Pőcze
bee97b09e2 pulse-server: split out sample, sample-play
Part of !776.
2021-06-25 03:23:12 +02:00
Barnabás Pőcze
bc4370e195 pulse-server: split out D-Bus parts
Part of !776.
2021-06-25 03:23:09 +02:00
Barnabás Pőcze
acffe1b90b pulse-server: split out "collect" functions
Part of !776.
2021-06-25 03:23:04 +02:00
Barnabás Pőcze
4496c33751 pulse-server: split out volume handling
Part of !776.
2021-06-25 03:23:01 +02:00
Barnabás Pőcze
43e2c64307 pulse-server: split out format handling
Part of !776.
2021-06-25 03:22:59 +02:00
Barnabás Pőcze
8ac60cb0ae pulse-server: split out commands
Part of !776.
2021-06-25 03:22:56 +02:00
Barnabás Pőcze
738b764253 pulse-server: do not define NAME in header
Part of !776.
2021-06-25 03:22:54 +02:00
Barnabás Pőcze
8208e60b33 pulse-server: add include guard to defs.h
Part of !776.
2021-06-25 03:21:38 +02:00
Wim Taymans
5e9f6c8ecc jack: use system:monitor_ prefix for monitor ports 2021-06-24 20:31:55 +02:00
Niklāvs Koļesņikovs
d7cddbdb61 meson: changes meson switches for controlling session manager
Some distributions set --auto_features=enabled which messes with the
internal logic of the build system when features are used for other
purposes than pure dependency control. The only solution is to either
avoid the value auto or change the type of the option to non-feature.

This commit does the later by replacing -Dmedia-session, -Dwireplumber
and -Dsession-manager with the new -Dsession-managers array and
-Ddefault-session-manager combo options.

Fixes #1333
Fixes #1336
2021-06-24 14:22:13 +00:00
Wim Taymans
016f02616b json: don't escape / 2021-06-24 16:18:59 +02:00
Wim Taymans
2acf29a86c Revert "json: also escape '/' as required by JSON"
This reverts commit eb8546a682.

We don't need to escape the / according to  RFC7159
2021-06-24 16:12:47 +02:00
Wim Taymans
679df3f9d9 v4l2: implement latency get and set 2021-06-24 16:05:31 +02:00
Wim Taymans
7ef78b4464 jack: add extra object check
Make an invalid object type and mark removed objects as invalid.
Make sure we don't reference an invalid object for the various
callbacks and methods.

See #1265
2021-06-24 15:49:59 +02:00
Peter Hutterer
01c2cb3d45 test: shut up coverity complaints about side effects
CID 1457494:  Incorrect expression  (ASSERT_SIDE_EFFECT)
Assignment "ai = (void *)((uint8_t *)pod + 16)" has a side effect.  This code will work differently in a non-debug build.
550             spa_assert((ai = SPA_POD_ARRAY_VALUES(pod)) != NULL);

Patch generated with coccinelle snippet
	@@
	expression E1, E2;
	@@
	- spa_assert((E1 = E2) != NULL);
	+ E1 = E2;
	+ spa_assert(E1 != NULL);

And run again for == NULL
2021-06-24 11:14:27 +00:00
Sanchayan Maity
badb76147f module-protocol-pulse: Add module-roc-source 2021-06-24 11:04:23 +00:00
Sanchayan Maity
e60498df51 module-protocol-pulse: Add module-roc-sink 2021-06-24 11:04:23 +00:00
Peter Hutterer
50e015fa87 doc: add a reference to the PipeWire Under The Hood post
A good writeup that provides more details than our own documentation, so
let's at least link to it.
2021-06-24 10:54:13 +00:00
Peter Hutterer
0f0565175e doc: rework the SPA plugin documentation
Add more info to the main SPA page and split the design vs plugin pages up,
together with some more documentation to ideally lower make this easier to
understand on a glance.

Most of the actual plugin loading documentation are unmodified.
2021-06-24 10:54:13 +00:00
Peter Hutterer
8a25076c4e doc: define __USE_ISOC11 for doxygen to pick up the logger #defines
This way doxygen will pick up the #defines for spa_log_error, etc. Without
this define it uses the else part of the condition which uses macros to
construct function names.
2021-06-24 10:54:13 +00:00
Wim Taymans
17f02d8c6d filter: refactor function to fix the datatype 2021-06-24 12:50:37 +02:00
Wim Taymans
48e6e41d95 audioconvert: improve latency handling
When setting the Latency parameter on one side of the converter, set
it also on the other size. We should actually implement propagating
the latency through all the elements of the converter later.

Implement latency handling on fmtconvert.

merger and splitter change latency on all ports when on port changes.

All this makes the configured and exposed latencies visible on all
ports from adapter.
2021-06-24 12:20:44 +02:00
Wim Taymans
22fe0b293a audioconvert: add some more debug 2021-06-24 12:11:38 +02:00
Wim Taymans
8ee9a7b5e5 audioadapter: latency is writable 2021-06-24 12:07:06 +02:00
Wim Taymans
f03f1926e3 seq: track port latency 2021-06-24 10:04:19 +02:00
Wim Taymans
4c09eb227f alsa: rename indexes into port and node params 2021-06-24 10:03:41 +02:00
Wim Taymans
8cf5927e95 alsa: keep track of input and output latency
track and report both input and output latency.
2021-06-24 09:59:48 +02:00
Konstantin Kharlamov
ed9560fb03 alsa: fix "now.tv_sec maybe used uninitialized" warnings
Fixes a number of warnings that look like this:

    In file included from ../spa/include/spa/utils/result.h:37,
                     from ../spa/plugins/alsa/alsa-seq.c:35:
    In function ‘set_timers’,
        inlined from ‘do_reassign_follower’ at ../spa/plugins/alsa/alsa-seq.c:909:2:
    ../spa/include/spa/utils/defs.h:191:39: warning: ‘now.tv_sec’ may be used uninitialized [-Wmaybe-uninitialized]
      191 | #define SPA_TIMESPEC_TO_NSEC(ts) ((ts)->tv_sec * SPA_NSEC_PER_SEC + (ts)->tv_nsec)
          |                                   ~~~~^~~~~~~~
    ../spa/plugins/alsa/alsa-seq.c:840:28: note: in expansion of macro ‘SPA_TIMESPEC_TO_NSEC’
      840 |         state->next_time = SPA_TIMESPEC_TO_NSEC(&now);
          |                            ^~~~~~~~~~~~~~~~~~~~
    ../spa/plugins/alsa/alsa-seq.c: In function ‘do_reassign_follower’:
    ../spa/plugins/alsa/alsa-seq.c:836:25: note: ‘now’ declared here
      836 |         struct timespec now;
          |                         ^~~

The reason for these warnings is that spa_system_clock_gettime() may
fail if a version check fails, but the code in question didn't check for
the possible fail. If it failed, then execution would continue, and the
arguments that were passed to the macro will be used uninitialized.

Fix this by checking whether function succeeded.
2021-06-22 22:42:25 +03:00
Konstantin Kharlamov
252e798ece alsa: remove unused res variable in alsa_on_timeout_event 2021-06-22 22:42:25 +03:00
George Kiagiadakis
5ee9133b60 alsa plugin: allow specifying a media.role on the virtual device name
So that we can do:
  aplay -D pipewire:ROLE=Music music.wav
  aplay -D pipewire:ROLE=Notification notice.wav
2021-06-22 14:48:31 +00:00
Wim Taymans
575d4456e1 tests: fix test 2021-06-22 16:31:51 +02:00
Wim Taymans
f5f79cc0b9 filter: implement enum and set_param on the filter 2021-06-22 16:29:40 +02:00
Wim Taymans
79866a93cd Param: add process latency param and info 2021-06-22 16:29:29 +02:00
Wim Taymans
8c77713a7b jack: don't emit connect callback with unknown ports
Lookup of globals needs a thread lock or context lock. There is no
need to take the context lock when we already have the thread lock.

Make a new method to find an object of a type.

Check that link objects are referencing valid ports. Check that the
connect callback is referencing valid ports.

Only return connections with valid ports.

See #1265
2021-06-22 11:16:45 +02:00
Pauli Virtanen
b98b9e0e77 bluez5: deal with old libusb versions 2021-06-22 10:58:50 +03:00
Pauli Virtanen
9d38d375d2 bluez5: add and use quirk for broken mic HW volume
Some headsets emit AT+VGM even though +VGM commands do not actually
adjust the recording volume.
2021-06-22 10:58:50 +03:00