Commit graph

6431 commits

Author SHA1 Message Date
Peter Hutterer
f3f915e897 pipewire-alsa: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
5596e350ea pipewire-jack: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
4dd886188a alsa: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
6d19dd0162 pulse-server: if all transport methods failed, fail server creation
No point in keeping a server running if it doesn't listen to anything.
2021-05-26 07:46:55 +00:00
modula t
3aacc719b2 fix floating point exception when s->clock.position' is less than s->offset` 2021-05-26 07:46:14 +00:00
Peter Hutterer
851a64d8c8 doc: add spa to doxygen output
This requires a helper script: doxygen doesn't differ between static methods
and static inline methods. EXTRACT_STATIC defines whether it parses *any*
static method but we're currently using all C files as input files as well. We
cannot convince doxygen to just parse static inline functions in header files
so for SPA we hack around this: meson passes the spa headers to a shell script
with simply copies those changed to `/* static */ inline void (foo)` and doxygen
then runs on those header files.

The result: we get all spa functions added to your doxygen output at the cost
of a few sed calls.
2021-05-26 07:44:55 +00:00
Peter Hutterer
07533cb708 spa: group the spa headers into doxygen modules
Subdirectories buffer, control, debug, monitor, pod, support and utils, others
are still missing. Headers are grouped either per subdirectory (e.g. buffer/
gets added to group spa_buffer) or per-file (e.g. spa_json is a separate
group), whatever seemed like the most sensible approach.
2021-05-26 07:44:55 +00:00
Peter Hutterer
d0aff793b7 spa: doxygenize the param/video comments 2021-05-26 07:44:55 +00:00
Johannes Wolf
799ba7de16 alsa-profiles: Add NI Komplete Audio 6 profile set 2021-05-26 07:35:25 +00:00
Georges Basile Stavracas Neto
f1cc525d7e Add channel paths to analog-surround-*
Motu M4 has four inputs (two line-in inputs, and two complete ones
with gain and XLR and whatnot), as well as four outputs (two monitor
pairs, and an unnaccounted headphone).

Sadly, like a few other interfaces, it wasn't being given an input
profile, since the matching code goes through default.conf testing
each config, and ends up selecting 'analog-surround-40', which does
not have input mapping. The inputs would fallback to 'multichannel-
input', which also doesn't have input paths.

Add input paths to all analog-surround-* mappings, and remove their
'direction=output' fields since they handle both out and in.
2021-05-25 18:41:22 -03:00
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