Make supported codec checks to use profiles, not "is-a-sink" flag, to
determine which codecs can be used.
Fixes bluez5-device checking only source profiles, even when the local
device is only a sink.
The buffer io area is used to enable/disable a port and should be
synchronized with the processing loop. Use invoke to safely update the
mixer io area.
Keep track of the number of mixers on a port and clear the global mixer
buffer io when there are none. Check and use the global mixer io when
processing output to avoid using an inactive output without buffers and
crashing.
Fixes#3506
When we activate, emit the port registration events of our own port,
even when they were suppressed (and marked registered) when we created
them. This is what JACK2 does as well.
port_set_io with SPA_IO_Buffer can be used to enable/disable a port
when the node is running and so the node should make sure the io update
is synchronized with the processing loop.
Use spa_loop_invoke to make sure the mixers handle the port_io updates
correctly.
Setting buffers or a format also needs the port to be disabled so add
some checks for this in the mixers.
Don't just forward the tag and latency events to the follower but let
the audioconvert aggregate and emit the updated tag/latency event
that is then configured on the follower.
When using the DSP mode of the audioconvert, this results in an
accumulated latency/tag from all the DSP ports instead of just
the last DSP port param update.
Put properties with media. prefix in tags in pw-cat.
Always first clear the params before we start enumerating new ones.
Otherwise we only clear them when we see the first result and there
might not be a result.
Instead of watching /dev, use a separate watch for each device.
This is supposed to achieve the same result as the now reverted
88f0dbd6fc ("v4l2: don't set inotify on /dev"):
Doing inotify on /dev is not a good idea because we will be woken up by
a lot of unrelated events.
There is a report of a performance regression on some IO benchmark
because of lock contention within the fsnotify subsystem due to this.
Instead, just watch for attribute changes on the /dev/videoX files
directly. We are only interested in attribute changes, udev should
notify us when the file is added or removed.
Fixes#3439
`wpctl status` shows the description of device nodes. Therefore, the
videotestsrc and audiotestsrc are listed as "(null)" if the example
configuration of the sources is used.
Set the description in the example for how to configure the audiotestsrc
and the videotestsrc.
As part of this, in alsa-udev.c, certain structures and variables referred
to as "device" are renamed to "card". Otherwise, there is ambiguity, since
"device" can mean a udev device, an SPA device, a compress-offload device,
a PCM device etc.
Also, replace "card id" with "card number" to emphasize that these integers
are not actually SPA object IDs.
Prior to this commit, the man page for pipewire-pulse did not
make it clear that although pipewire-pulse is "integrated"
in a general sense with the pipewire system, it runs its own
pipewire process, that is, in some sense, independent. For
example, restarting the pipewire service does not restart
the pipewire-pulse service.
The aim of this commit is to improve people's understanding of the
relation between pipewire-pulse and pipewire in the most obvious
place where they would expect to find it.
We're missing the delay in samples plus all of the extra samples of
silence we use to restart the device. This is in the samplerate of
the device.
Convert this to the time domain of the graph before adding it to xrun.
The isinf function returns -1 for negative infinity on glibc, but
the standard guarantees no such behavior (e.g. in C++ it always
returns a bool, on musl libc it's a macro that expands to a bool
expression), saying just that it returns a non-zero value.
This was added in pulseaudio around 15 years ago, and was never
fixed; pipewire then got the code from it. However, we can portably
check against -INFINITY instead (from math.h, already included).
Ref 045c1d6