Commit graph

6621 commits

Author SHA1 Message Date
Barnabás Pőcze
1e9442e6b8 pulse-server: fix memory issue
Previously, when `pw_protocol_pulse_new()` returned NULL,
the code would jump to the `error` label, which would
call `impl_free()`. At this point, however, `impl->module_listener`
is not initialized, which would lead to a SIGSEGV when
`spa_hook_remove()` is called from `impl_free()`.
2021-05-25 14:55:00 +02:00
Wim Taymans
8e36353311 pulse-server: module-combine-sink remove right property 2021-05-24 12:58:10 +02:00
Arun Raghavan
25f9765e9c pulse-server: Implement module-combine-sink 2021-05-24 08:34:23 +00:00
Fabrice Fontaine
fa64d93e64 fix linking with -latomic
Linking with -latomic has been added to pipewire-jack since
b8c58c74d8

However, this is not the right place to add this dependency, atomic_dep
should be added to pipewire_dep to avoid the following build failure:

/home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: src/pipewire/libpipewire-0.3.so.0.326.0.p/filter.c.o: in function `impl_node_process':
filter.c:(.text+0xf28): undefined reference to `__atomic_fetch_add_4'

Indeed, atomic operation such as __atomic_fetch_add is used in libcamera
as well as in ./spa/plugins/libcamera/libcamera_wrapper.cpp,
./spa/include/spa/utils/ringbuffer.h and ./spa/include/spa/graph/graph.h

Fixes:
 - http://autobuild.buildroot.org/results/b5305e8e7dd1a5e8bfaba72b06251056ba7d1af1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-05-24 08:33:50 +00:00
Barnabás Pőcze
22d874cdeb filter-chain: handle LADSPA_PATH as colon separated list of paths
Split up LADSPA_PATH at colons, and try to load the particular
plugin from each directory specified in LADSPA_PATH.

Fixes #1217.
2021-05-24 08:23:21 +00:00
Barnabás Pőcze
67e588f382 filter-chain: actually use ladspa_handle_list
Add successfully loaded handles to the list in `ladspa_handle_load()`,
and remove them when they are freed in `ladspa_handle_unref()`.
2021-05-24 08:23:21 +00:00
Barnabás Pőcze
a8a6def20f filter-chain: fix reference counting issue
Fix a reference counting issue that resulted in
ladspa_handle's refcount being equal to the
sum of the refcounts of its descriptors.

This would result in a memory leak when a descriptor
is loaded more than once from the same handle.
This cannot happen because `ladspa_handle_list` is
not  populated by `ladspa_handle_load()`.
The next commit implements exactly that, so
the fix is applied before the change that
would introduce the problem.
2021-05-24 08:23:21 +00:00
Barnabás Pőcze
e9ba0899c2 filter-chain: fix rnnoise example configuration
Other filter-chain configuration file examples do not prefix
the plugin key with 'ladspa/'. And in the absence of
the LADSPA_PATH environmental variable, this would lead
to "/usr/lib64/ladspa/ladspa/librnnoise_ladspa.so" being used
as the path, which is not correct.
2021-05-24 08:23:21 +00:00
Sjoerd Simons
d2e1b968af Let pipewire-pulse services conflict with their pulseaudio counterparts
You can only run either pulseaudio *or* the pipewire-pulse daemon at one
time. So make the pipewire-pulse units conflict with their pulseaudio
counterparts to avoid both running at the same time
2021-05-22 14:26:30 +02:00
Valentin David
6216de6ca0
alsa: Add support for SteelSeries Arctis 9 Wireless 2021-05-21 14:39:45 +02:00
columbarius
d735d32eb3 spa: respect mandatory properties while filtering 2021-05-21 10:41:34 +00:00
columbarius
da566c2865 spa: add property flag SPA_POD_PROP_FLAG_MANDATORY
This flag is used to announce that the respective key is mandatory and
therefore the object containing this key is not suitable to be merged
with other objects missing it.
2021-05-21 10:41:34 +00:00
Wim Taymans
39a2636c9b alsa: clean up port and node params 2021-05-21 11:08:52 +02:00
Wim Taymans
3c503ca240 impl-link: improve debug, log param name 2021-05-21 10:46:14 +02:00
Wim Taymans
36000ea508 stream: clean up the params
Use defines for the param index.
Fix params for filter. Make it possible to use Props params.
2021-05-21 10:45:19 +02:00
Wim Taymans
89c10dad70 spa: Clean up some of the param handling 2021-05-21 10:10:38 +02:00
Peter Hutterer
079b90bde5 doc: add a custom doxygen theme based on doxygen-awesome
Theme from doxygen-awesome-css with custom modifications based on the
pipewire.org website to use the same type of blue, grey, etc.

doxygen-awesome-css is MIT licensed, see
https://github.com/jothepro/doxygen-awesome-css
2021-05-21 16:08:46 +10:00
Peter Hutterer
cbe29c070c doc: switch doxygen to using groups instead of pages and classes
C code doesn't lend itself well to using classes and pages are best for prose.
A doxygen group is a set of related functions - which is exactly what we have
here, e.g. pw_context.

This patch basically adds the following lines to each header:
\defgroup pw_whatever
\addtogroup pw_whatever
\{
....  function declarations ....
\}

Doxygen is smart enough to merge documentation in the header with
documentation in the correspondin .c file where the function is implemented.
2021-05-21 15:05:30 +10:00
Peter Hutterer
4cf18c92f8 spa: fix few doxygen errors 2021-05-21 15:04:22 +10:00
Peter Hutterer
7c4bfe5a15 doc: use markdown ticks instead of escaped html for readability 2021-05-21 15:04:22 +10:00
Peter Hutterer
923e7c8b59 doc: doxygen can't document a nonexisting enum 2021-05-21 15:04:22 +10:00
Peter Hutterer
1567dd4e3a doc: fix some missing parameter warnings
Where both declaration and definition are documented, drop one and rely on the
other. Drop the obvious documentations where not needed, doxygen wants either
none or all parameters documented.
2021-05-21 15:04:22 +10:00
Peter Hutterer
ac9de03672 doc: document some missing parameters 2021-05-21 15:04:22 +10:00
Peter Hutterer
c9cab11a82 doc: drop two references to entities we don't include in doxygen 2021-05-21 15:04:22 +10:00
Peter Hutterer
f47f85bbcb doc: fix broken references
These pages never existed, let's not try to reference them.
2021-05-21 15:04:22 +10:00
Peter Hutterer
0c41f24401 doc: fix an outdated reference 2021-05-21 15:04:18 +10:00
Peter Hutterer
ef6528c513 doc: fix an obsolete reference to pw_fill_stream_properties
As of f724319e8a this happens automatically and
the function is no longer available.
2021-05-21 14:19:13 +10:00
Peter Hutterer
ff7675b142 doc: escape the use of <pid> and <username> with markdown
Doxygen complains about invalid HTML tags, let's mark them as code.
2021-05-21 14:18:50 +10:00
Peter Hutterer
2b626bc31a doc: add a missing endcond to the context 2021-05-21 14:18:50 +10:00
Peter Hutterer
1ce6db47e3 doc: drop meaningless cond/endcond 2021-05-21 14:18:50 +10:00
Wim Taymans
6df32666b4 filter-chain: check external ports only once
When we duplicate the pipeline to match the channels, only check
if a port was used only once for the first instance. Makes
demonic filter work again.
2021-05-20 11:24:34 +02:00
Peter Hutterer
9af86b7b76 man: specify the xdg and confdata dirs in the pipewire.conf man page 2021-05-20 07:34:17 +00:00
Peter Hutterer
59a8253047 man: fix the pipewire.conf man page
This still referred to a config file format prior to 49d11acde0. Reword
sections accordingly and try to explain the actual configuration file format.

xmltoman is quite limited in its supported tags, so we need to use wrong tags
to get some sensible formatting, notably <opt> to get a bold word.
2021-05-20 07:34:17 +00:00
Peter Hutterer
be4d6ef2b9 editorconfig: add xml files for the man pages 2021-05-20 07:34:17 +00:00
Peter Hutterer
71c6a175c4 Drop double semicolons 2021-05-20 07:24:22 +00:00
Jonas Holmberg
b1610d37fe modules: Add module-rt
Add a module to set thread priorities without using rtkit.
2021-05-19 17:39:17 +02:00
Wim Taymans
fb55cc4786 0.3.28 2021-05-19 10:11:36 +02:00
Peter Hutterer
cdfd50e166 spa: add spa_atob() to convert a string to a boolean
This replaces the manual check for "true" and some (inconsistent) return value
of atoi. All those instances now require either "true" or "1" to parse as
true, any other value (including NULL) is boolean false.
2021-05-18 22:18:56 +10:00
Peter Hutterer
4e70799922 treewide: drop strzcmp implementations in favor of spa_streq 2021-05-18 22:10:27 +10:00
Peter Hutterer
92514d57e4 treewide: replace plain strcmp() calls with spa_streq 2021-05-18 22:10:27 +10:00
Peter Hutterer
522f87d5ea treewide: replace strcmp() != 0 with !spa_streq
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
95a84e797a treewide: replace !strcmp() with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
d8a9534a9a spa/string: add spa_streq() and spa_strneq() for string equality
Easier to use than strcmp() since their return value matches expectations. And
they do what is expected with NULL strings, two NULL pointers are equal, one
NULL pointer is not equal.
2021-05-18 22:10:27 +10:00
Peter Hutterer
9bbe5c7517 bluez: add a helper function for checking the message signature
strcmp() is easier to get wrong (or lack consistency) so let's abstract all
these calls with a little helper.
2021-05-18 22:10:26 +10:00
Peter Hutterer
65f5f2a6f8 alsa/v4l2: convdert udev's VID/PID from hex to decimal
udev's ID_MODEL_ID and ID_VENDOR_ID are inconsistent: always 4-digit hex but
sound devices are prefixed with 0x, v4l devices are not. Depending on the
actual ID, the value will look like decimal (1234) or hex (a234).

pw-dump will then print those as either decimal integers (i.e. 0x1234 becomes
decimal 1234) or double (i.e. a234 becomes 41524.00).

Make this consistent by converting the string from hex do decimal where we
get it.
2021-05-18 07:35:00 +00:00
Peter Hutterer
5aa15d10e9 spa: add a new string helper with spa_strtol()
Most of the time when we convert a string to an integer we only care about
success. Let's wrap this with a helper function that sets the value to the
result and returns true on success.
2021-05-18 07:35:00 +00:00
Peter Hutterer
0504ebffeb spa: prefix SPA_*_LAST enum values with an underscore
These are not part of the ABI, prefixing them makes this a bit more obvious
that they shouldn't be used.
2021-05-18 10:41:26 +10:00
Peter Hutterer
2ff7a8fba7 spa: fix an indentation issue 2021-05-18 10:38:01 +10:00
Anders Jonsson
a8f2501f57 po: Update Swedish translation 2021-05-17 18:45:59 +02:00