Commit graph

1340 commits

Author SHA1 Message Date
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
Wim Taymans
7d79c71178 module-loopback: parse node.latency 2021-04-22 15:46:09 +02:00
Wim Taymans
93d1c8f31d modules: improve loopback module
Handle error when loading and fix leaks.
Mark streams as virtual if nothing else is specified.
Try to reuse an existing core connection if possible.
unload the module when the core is in error or when it is destroyed.
2021-04-22 15:34:21 +02:00
Wim Taymans
3b021cc4ed modules: add module-loopback
Add a new loopback module that can also create virtual-sink and
virtual-source.
2021-04-22 13:08:20 +02:00
Wim Taymans
8294a4f42c Add vm.overrides property in pipewire and pulse-server
Apply vm.override properties when running in a VM. Increase the
default quantum to 1024 when running in a VM to cause less
dropouts.
2021-04-21 15:58:30 +02:00
Wim Taymans
fbd6a62b73 pulse-server: cancel items from work-queue
Make sure we cancel any pending work-queue items for the object before
we destroy the object.
2021-04-21 13:23:13 +02:00
Wim Taymans
639e6ea644 pulse-server: use the work-queue to unload modules
This avoids allocating an eventfd for each module.
2021-04-21 13:17:28 +02:00
Wim Taymans
fee8bf69dd pulse-server: make method to schedule module unload 2021-04-21 13:11:16 +02:00
Wim Taymans
cd224942c7 protocol-simple: use work-queue for client cleanup 2021-04-21 13:03:08 +02:00
Wim Taymans
c70a5de526 pulse-server: use a work-queue to schedule destroy
Use the context work queue to schedule destroys from callbacks.
This is better because we can pass the destroyed object around and
implement just the action we need to do on it.
2021-04-21 12:55:49 +02:00
Wim Taymans
5041c44937 link-factory: destroy lingering error links
When a link is lingering and in error, use a work queue to destroy it
automatically.
2021-04-21 12:17:53 +02:00
Wim Taymans
7031471807 pulse-server: add property to make virtual nodes
Make a property to mark virtual nodes and use it to hide the client
id from the sink-input/source-output info in pulse-server.
2021-04-20 21:05:59 +02:00
Wim Taymans
648c9b432c pulse-server: set monitor.channel-volumes=true by default
Make a null-sink with monitor.channel-volumes=true by default if not
defined otherwise. This ensures the volume of the null-sink is
always transfered to the monitor ports.

Also only set the object.linger flag when undefined.
2021-04-20 09:36:14 +02:00
Wim Taymans
575163e644 pulse-server: use args_to_audioinfo to parse channels 2021-04-19 16:49:25 +02:00
Wim Taymans
649d21ac02 pipewire-pulse: improve channels and channel_map parsing
If we have channels and channelmap, make sure they match.
If we have only channel_map, use this to derive channels instead of
taking the default number of channels and then ending up with a
mismatch.
If we have only channels, use this to generate a channelmap from
predefined maps or just unknown channels instead of taking the default
channel map.
If neither channels or channelmap is defined, use the defaults.
2021-04-19 16:41:14 +02:00
Arun Raghavan
74140abada pulse-server: Factor out module code to compile independently
This starts breaking up the giant monolith that is the pulse-server.c
code into more manageable chunks by trying to split the module code into
individual compilation units.
2021-04-15 19:37:15 -04:00