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.
Reset the software volume when initializing the device and when the
hardware volume is updated.
The software volume was set to 0 by default and if the session manager
did not change the volume enough to cause a software volume change,
it would remain 0 and there would be silence.
Also improve the debug a little.
See #1160#1167#1164#1049#1117
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")
When we start freewheeling, pause the device and resume when we
finish freewheel.
In freewheel mode, just discard samples in the sink and produce
silence in the source.
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.
Note that the order of the includes matters - that's how doxygen will sort
them. There is no specific structure other than the include order - one reason
why the headers are being changed. Without polluting the markdown files with
doxygen commands we cannot use \subpage, so all files convert to a regular
\page and are listed as flat hierarchy in the sidebar (and in Related Pages).
Changing the headers at least provides some visual grouping with comon
prefixes.
Keep all files as strings in an array so we can add them to the custom command
input list - this way meson will correctly rebuild documentation on changes.
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).
When allocating memory, just export the mmaped memory and mark the
memory as MemPtr, not MemFd. Set the fd to -1.
Otherwise we might send this fd to the client, making the complete
device accessible to the client.
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