Commit graph

2305 commits

Author SHA1 Message Date
Wim Taymans
1bfde16a89 filter-chain: update properties on the right stream
The filter properties are on the input stream.
2021-05-10 11:29:43 +02:00
Wim Taymans
64f694c02f filter-chain: add ladspa header 2021-05-10 11:05:06 +02:00
Wim Taymans
d69673816f filter-chain: use more convenient param Props field
Is more convenient for custom properties without an id.
2021-05-10 11:01:13 +02:00
Wim Taymans
2414d3501c pulse-server: add ladspa sink and source
To make an rnnoise filtered source:

pactl load-module module-ladspa-source source_name=rnnoise_mic label=noise_suppressor_mono plugin=/usr/lib64/ladspa/ladspa/librnnoise_ladspa.so

To make an equalizer sink:

pactl load-module module-ladspa-sink sink_name=eq_out label=mbeq plugin=/usr/lib64/ladspa/mbeq_1197.so
2021-05-10 11:01:13 +02:00
Wim Taymans
b2053b9d49 filter-chain: support absolute plugin path 2021-05-10 11:01:13 +02:00
Wim Taymans
00e85a252c filter-chain: add builtin plugins
Add a simple mixer builtin plugin.
Free memory on module unload.
2021-05-10 11:01:13 +02:00
Wim Taymans
3c7222d84b filter-chain: fix setting control values
Add support for getting the control ports from a node. Use this to
configure the control port values.
2021-05-10 11:01:13 +02:00
Wim Taymans
aec4358d72 filter-chain: copy media name 2021-05-10 11:01:13 +02:00
Wim Taymans
a595f88cf1 filter-chain: add example
run with pipewire -c filter-chain/demonic.conf
2021-05-10 11:01:13 +02:00
Wim Taymans
f9a29c5424 filter-chain: use node name and port name for control
Address controls with node_name:port_name to access all properties
in the graph.
2021-05-10 11:01:13 +02:00
Wim Taymans
4d1fa14774 filter-chain: use the right index for notify ports 2021-05-10 11:01:13 +02:00
Wim Taymans
417a5779e7 filter-chain: use a port structure to hold port info 2021-05-10 11:01:13 +02:00
Wim Taymans
ca9225b5aa filter-chain: use the right description when linking 2021-05-10 11:01:13 +02:00
Wim Taymans
641e685d5b filter-chain: add more debug 2021-05-10 11:01:13 +02:00
Wim Taymans
8ec0f1eb4b filter-chain: parse and handle links 2021-05-10 11:01:13 +02:00
Wim Taymans
4d680a816f filter-chain: use dependencies to build scheduling plan 2021-05-10 11:01:13 +02:00
Wim Taymans
2714ba47ac filter-chain: control is just an object 2021-05-10 11:01:13 +02:00
Wim Taymans
1088f875d4 filter-chain: add some more debug 2021-05-10 11:01:13 +02:00
Wim Taymans
5df221cf9a filter-chain: implement inputs and outputs
When inputs/outputs are specified, find the node:port and link them.
Fall back to the first/last node for input/output if no node is given.
Fall back to all input/output ports when no ports are given.
2021-05-10 11:01:12 +02:00
Wim Taymans
aa0fdaf454 module-filter-chain: rename
This does not have to be ladspa specific so rename it.
2021-05-10 11:01:12 +02:00
Wim Taymans
eaeb9e9b5d module-ladspa-filter: expose controls 2021-05-10 11:01:12 +02:00
Wim Taymans
3f5ebdedca module-ladspa-filter: change to graph syntax
Expand the syntax to allow a graph of nodes and links later.
2021-05-10 11:01:12 +02:00
Wim Taymans
22373de5b4 module-ladspa-filter: use custom keys and propinfo
Use custom keys and propinfo to map the name to the key. This allows
us to specify ranges and other context for the properties.
2021-05-10 11:01:12 +02:00
Wim Taymans
97002a4451 module-ladspa-filter: update props when they change 2021-05-10 11:01:12 +02:00
Wim Taymans
69d36675d1 modules: ladspa-filter improvements
Parse initial control values
Reset to default when value is null
Implement port selection by name.
2021-05-10 11:01:12 +02:00
Wim Taymans
a36e5b2c0d modules: more ladspa improvements
Run multiple instances to fill requested channels.
Improve media name.
2021-05-10 11:01:12 +02:00
Wim Taymans
3272344df4 modules: parse and set control values 2021-05-10 11:01:12 +02:00
Wim Taymans
0a966d4637 modules: improvements 2021-05-10 11:01:12 +02:00
Wim Taymans
356c7ade1c modules: add begining of ladspa filter
Can be used to build chains or sink/source.
2021-05-10 11:01:12 +02:00
Wim Taymans
7c91be47fb module-profiler: stop when freewheeling 2021-05-07 10:12:16 +02:00
Wim Taymans
9ce87aacd2 module-profiler: avoid large stack alloc
If the profiler manages to fill the complete buffer, we would have 8MB
of data that we need to allocate on the stack. Don't do that and instead
use a preallocated buffer large enough to copy things into.
2021-05-07 09:58:10 +02:00
Peter Hutterer
2405f0942b spa/buffer: rename SPA_MEMBER to SPA_PTROFF
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Andrea Gelmini
36ebbfa71c
Removed duplicated includes
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-30 18:16:25 +02:00
Andrea Gelmini
f489e32e44 Fix typo in code 2021-04-30 07:40:20 +00:00
Andrea Gelmini
47ef2b6b09 Fix typos 2021-04-30 07:40:20 +00:00
Wim Taymans
620c863b6d pulse-server: track and set monitor volume on monitor sources 2021-04-29 15:25:04 +02:00
Wim Taymans
a76032a637 client-node: use the right port for io
To set the io on the mixer ports, we need to use the same id that
was used to add the port, not the id we use to identify the mixer
structure.

Fixes #759
2021-04-28 17:04:36 +02:00
Wim Taymans
b3d94bf019 improve debug 2021-04-28 17:04:16 +02:00
Wim Taymans
3496327e69 Add echo-cancel module
Only implement the null echo cancel implementation for now.
And skeleton webrtc echo cancel implementation

It uses 4 streams arranged as:

 input ---+---> source
          ^
	  |
 sink  ---+---> output

The output of the source is the filtered input of the input stream
(linked a master source) based on the data going from sink to
the output (linked to a master sink).

All streams are arranged in the same group so that the echo canceler
does not have to deal with clock drift. For echo cancelers that can
handle clock drift we might want place the source and sink chains
in different groups.
2021-04-27 09:56:54 +02:00
Wim Taymans
27d98478ab modules: set right library variable 2021-04-26 10:45:44 +02:00
Pauli Virtanen
20c8d7b29e pulse-server: keep track of seq in pw_*_enum_params
If multiple async enum param are running at the same time, take results
only from the latest one.
2021-04-25 20:56:57 +03:00
Wim Taymans
53cd601869 pulse-server: apply node.name to all streams
Pass properties as global properties so that they are applied
to both streams. Make sure node.name is set on both streams so that
they look good in tools like carla.
2021-04-25 10:37:51 +02:00
Wim Taymans
5d104994c0 pulse-server: mark remap source and sink passive
Make sure the links to the real source/sink are passive links so that
the virtual sink is suspended with the real sink when unused.
2021-04-24 19:46:06 +02:00
Wim Taymans
962d3b9127 modules: don't add CLIENT_ID when lingering
Because the object is not destroyed when the client is destroyed
and so the client.id might become invalid.
2021-04-23 11:19:25 +02:00
Wim Taymans
d560628e2a module-loopback: copy name and description
Also copy name and description to streams when speficified globally.
2021-04-23 11:00:47 +02:00
Wim Taymans
ab7bc6ed27 pulse-server: add remap sink and source modules 2021-04-22 20:44:55 +02:00
Jonas Holmberg
1e6b7b8a83 module-protocol-native: Handle pending connect
Do not return an error immediately if connect() fails with EAGAIN. Check
if it completed successfully with getsockopt() when the socket becomes
writable instead.

This is the way to handle non-blocking connect() by the book but after
testing it seems that the case when connect() fails with EAGAIN is when
the listen backlog is full on the server side and in that case the
server socket is closed. So even though connect() completes successfully
according to getsockopt() the client socket is no longer usable
(on_remote_data() will get both SPA_IO_OUT and SPA_IO_HUP in mask on the
first call after connect() returned EAGAIN).
2021-04-22 17:46:00 +00:00
Wim Taymans
330e694e63 module-loopback: handle per stream channels and positions
Make it possible to specify different channels and positions
per stream so that we can do remapping as well.
Make sure we only copy available input channels and set the remaining
channels empty.
2021-04-22 18:38:16 +02:00
Wim Taymans
74430871fb pulse-server: implement the loopback module with module-loopback 2021-04-22 17:26:04 +02:00
Wim Taymans
115be6d5fc module-loopback: cancel pending work items when destroying 2021-04-22 17:24:59 +02:00