Commit graph

3419 commits

Author SHA1 Message Date
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
Barnabás Pőcze
68f75bbd57 tools/pw-dump: fix parentheses around isatty() call
Previously,

  isatty(fileno(data.out) && getenv("NO_COLOR") == NULL))

would call `isatty()` with

  fileno(data.out) && getenv("NO_COLOR") == NULL

as its argument. This meant that, for example,

  NO_COLOR=1 pw-dump

would still produce colored output when run with
a TTY as its standard input.

Fix that by moving the parenthesis.

Fixes: af63d08453 ("tools/pw-dump: only print colors if we're connected to a terminal")
2021-05-08 03:57:34 +02:00
Wim Taymans
a80ec36ad5 node-driver: run as fast as possible in freewheel mode 2021-05-07 11:50:55 +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
Wim Taymans
888612dc0f conf: add freewheel driver
Add freewheel driver and enable freewheel mode on it.
2021-05-07 09:03:34 +02:00
Wim Taymans
efc497a38a spa: make a new FREEWHEEL clock flag
When freewheeling, the clock is going faster than real time.
When freewheeling, skip samples in alsa sink/source.
2021-05-07 09:03:34 +02:00
Wim Taymans
fab199d5b9 impl-node: make the group a string
We are currently using strings for the node group so actually store
this as a string or else all strings will end up in group 0.
2021-05-07 09:03:33 +02:00
Peter Hutterer
af63d08453 tools/pw-dump: only print colors if we're connected to a terminal
We don't want ansi escape codes in the output of `pw-dump > log`. And where
colors are needed after the fact, it's easy to just run `jq . $file`.
2021-05-07 06:57:31 +00:00
Davide Beatrici
65e14548a3 stream: include <pipewire/port.h> instead of <pipewire/pipewire.h>
<pipewire/pipewire.h> includes many headers, but we only need <pipewire/port.h>.
2021-05-07 06:57:06 +00:00
Peter Hutterer
4456fd3e18 doc: fix a few doxygen warnings about invalid arguments 2021-05-07 10:27:26 +10: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
Wim Taymans
2963d6e725 stream: improve fixup of dataType
Also handle choice flag types. Do some more error checking.
2021-05-06 10:03:37 +02:00
Wim Taymans
ec331f4e4c gst: enable DMABUF explicitly to avoid mmap issues
PipeWire does not give DMABUF anymore to clients unless they
explicitly ask for it. This results in v4l2 sending an fd and
the mmapoffset + size fields in the buffer.

GStreamer does not handle the mmapoffset in the fd allocator and
thus runs into mmap problems when using the memory.

Enable DMABuf explicitly to work around the problem until
GStreamer is fixed.

Fixes #1115
2021-05-05 11:23:44 +02:00
Huang-Huang Bao
b0a1ae172c media-session: set bluetooth sample rate to default sample rate in graph
The bluez handle is now loaded after core info (containing 'default.clock.rate') is received.
2021-05-03 10:07:42 +00:00
Huang-Huang Bao
9384ba5500 bluez5: add properties for A2DP codec sample rate & channel mode configuration
Those properties are set as reference sample rate and channels number for A2DP configuration selecting.
2021-05-03 10:07:42 +00:00
Wim Taymans
3c11b75e32 pw-cli: allow setting keys by their value.
Makes things like:

  pw-cli s 102 Props '{ 16777216: 1.2 }'

work. Useful when dealing with custom properties that don't have a name
in the type array.
2021-05-03 11:50:42 +02:00
Wim Taymans
9206fb019f stream: add support for Props param
Rework the node and port info management a little.
Make sure we emit a node info event when the Props param changed.
Implement enum_param on the node.
2021-05-03 11:50:36 +02:00
Wim Taymans
8bbb78d2bd filter: the node only has a Props param 2021-05-03 11:50:27 +02:00
Wim Taymans
e1fee18148 stream: support setting properties
Setting Props param will then be forwarded to the stream param_changed
signal and the stream can implement custom properties.
2021-05-03 11:50:18 +02:00
Andrea Gelmini
85b136d8ce Fix typos
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-30 16:27:34 +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
Wim Taymans
7145b2becf pw-cli: add support for creating Struct in pod
Support creating Struct as well. When an object property is marked as
Struct, use [] to start the struct and copy each item with its type into
the struct:

pw-cli s 0 Route '{ info = [ "foo": 0.1  "bar": null [ 0.1 10 "hat" ]] }'
2021-04-30 17:21:42 +02:00
Wim Taymans
c1ec10c252 i18n: install header 2021-04-30 10:03:49 +02:00
Wim Taymans
aea55f662a i18n: move to separate .h file
So that we can include it where needed and don't cause redefined _()
macros for other projects.

Fixes #1120
2021-04-30 09:57:30 +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
Sebastian Goth
379068c31d Clarify alsa device.profile-set setting
Missing the .conf changes the profile name reported by pactl
but has no effect
2021-04-29 16:27:58 +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
5bf2144438 spa: improve volume handling
Make a new softVolume property that contains only the soft volume
to apply.

In the case of HW/SW volume, we pass the real volume in the
channelVolume and the leftover volume in softVolume. We don't
use the monitorVolume for this anymore because it is a completely
separate volume handled by the merger node.

This way, channelVolume always represents the effective volume
set on routes, channelmix and merger and only the softVolume (when
available) is applied as software volume by channelmix.

This makes things map a bit better to what is actually happening with
the real volume and leftover software volumes after applying the
hardware volumes in the device.

With this change, the volume on the monitor is not affected by the
sink volume anymore and we can use the monitorVolume for this later.

This also means that the monitor volume in pavucontrol of the sinks
does not change when the sink volume changes. PulseAudio is inconsistent
here: If the volume is HW, the monitor volume is not affected, if the
volume is SW, it is. In PipeWire there is an option in merger to
let the volume affect the monitor with monitor.channel-volumes = true.
2021-04-29 12:46:29 +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
407489cd71 conf: remove X bit from config files
Fixes #1107
2021-04-27 15:38:59 +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