Commit graph

13611 commits

Author SHA1 Message Date
Wim Taymans
9b316f6deb filter-graph: remove port check
Remove the port number check, we never call this with an invalid port
number and the check was wrong for the sofa_plugin.

Fixes #4700
2025-05-14 17:04:06 +02:00
Barnabás Pőcze
a0eb12e4be ci: specify explicit dependencies between jobs
Use `needs` to specify job dependencies explicitly instead of relying on
stages for ordering. This allows jobs from multiple stages to run concurrently
without having to wait for unrelated jobs in earlier stages.

See https://docs.gitlab.com/ci/yaml/#needs for more information.
2025-05-14 09:41:44 +00:00
Wim Taymans
b957d74eb6 doc: fix bad filename 2025-05-14 11:40:32 +02:00
Wim Taymans
26099f4c29 doc: add doc about Tag params 2025-05-14 11:28:16 +02:00
Wim Taymans
093b3eea21 audioconvert: implement graph latency reporting
Keep per graph latency. Sum all the graph latencies together and keep
this around as the process-latency.

Refactor the port latency setter. Make a function to recalculate the
latency of all other ports. Take into account the graph latencies.

Update the port latencies when the total graph latency changes.
2025-05-14 09:21:31 +02:00
Wim Taymans
c334bfb0bb audioconvert: do params after init of the node
First do the essential properties to set up the node, then set up the
node and then parse the params. The params might do some setup that
relies on a completely configured node, such as emit events.
2025-05-14 09:19:17 +02:00
Wim Taymans
37bf571db3 audioconvert: keep the graph latency around 2025-05-13 15:27:17 +02:00
Wim Taymans
ca032152b1 doc: improve formatting 2025-05-13 15:17:56 +02:00
Wim Taymans
b71216af70 doc: add document about latency handling 2025-05-13 15:01:00 +02:00
Wim Taymans
6b3681938b pw-dump: don't do raw mode when streaming
pw-dump | less -RS is a common thing and raw mode is not helpful.
2025-05-13 14:59:51 +02:00
Wim Taymans
08efc1171c pw-dump: disable indent in raw mode as well 2025-05-13 10:37:00 +02:00
Kirill
1f16f949ec Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Barnabás Pőcze <pobrn@protonmail.com>
2025-05-13 08:27:29 +00:00
dartvader316
d599936925 pw-dump: add raw json elements output option 2025-05-13 08:27:29 +00:00
Taruntej Kanakamalla
882542e001 gst: sink: minor type fix 2025-05-12 21:31:30 +00:00
Wim Taymans
b47d28bad6 profiler: use doubles in profiler.log
Don't truncate the measurements when we convert to usec but keep the
fractional part to get a more accurate graph.
2025-05-12 17:23:35 +02:00
Wim Taymans
4f53136891 netjack2: reverse send/recv roles in driver/manager
The params contain the send/recv streams from the point of view of the
manager (and not the driver as was assumed before). This means we need
to swap send/recv in the driver, not the manager.

This makes things interoperate with JACK/netjack2.

See #4666
2025-05-12 12:57:11 +02:00
Pauli Virtanen
1445843ced modules: get also instance id for flatpak apps
Add "pipewire.access.portal.instance_id" property for distinguishing
Flatpak application instances from each other.
2025-05-12 09:40:32 +00:00
Barnabás Pőcze
09a5b7ee35 ci: do not install libv4l
`libv4l` has not been necessary for a long time, so drop it.
2025-05-12 09:39:35 +00:00
Wim Taymans
2420c3a8c8 convert: refactor node_set_param functions
Move them to their own function to make the main function shorter.

Also make sure we emit the new ports first and then the node info.
2025-05-12 11:39:02 +02:00
Wim Taymans
8dfa086c3c audioconvert: refactor params
Move the param enumeration code out of the main enum function.

Emit node events after completion of the set_param functions to ensure
we only emit things once.
2025-05-12 11:39:02 +02:00
Pauli Virtanen
e5d0dd2020 bluez5: enable asha device set only if there's a device set
Now that ASHA uses device set, no need to special case here.
2025-05-11 16:14:40 +03:00
Wim Taymans
436195f05f control: only convert midi/UMP, pass other control types
We should only try to convert MIDI/UMP when the port doesn't support it
but let all the other control types pass through.

Fixes #4692
2025-05-09 09:34:34 +02:00
Taruntej Kanakamalla
608bf93f7a gst: sink: minor formatting fixes
follow up of !2337
2025-05-09 07:13:36 +00:00
Sanchayan Maity
a5a6973472 bluez5-dbus: Fix another build failure on 32-bit system 2025-05-09 07:09:26 +00:00
Wim Taymans
f068e4ba85 alsa: rework the channel params
Avoid adding a None choice, just add one single value without a choice
when the min == max. In that case we can also add a channel position.
2025-05-08 18:17:45 +02:00
Wim Taymans
2d8080cbde alsa: only use default rate and channels when valid
Check the user provided rate and channels and only use them to limit the
rate and channels when they are valid.
2025-05-08 18:16:53 +02:00
Wim Taymans
ff0d6d5677 alsa: clamp audio.channels to MAX_CHANNELS
So that we don't end up trying to use too many channels later on.
2025-05-08 18:14:02 +02:00
Wim Taymans
b2695f86cf alsa-pcm: handle and warn about a driver bug wrt channels
If the driver returns a larger min than max channel count, log a warning
and swap the two numbers.

See #4687
2025-05-08 16:01:18 +02:00
Taruntej Kanakamalla
d5e2cc94cd gst: sink: update clock before every trigger process
Get the clock pointer using the io_changed stream event.
and update the clock before triggering the process

The clock needs to be updated in the data loop thread
and before triggering the process so move the calls to
`pw_stream_trigger_process` from gstreamer thread context
into the data loop thread context by invoking a callback
and update the clock inside the data loop callback
before the trigger
2025-05-08 18:57:44 +05:30
Wim Taymans
bca83c8eee filter-graph: fix lv2 latency hint 2025-05-08 12:17:38 +02:00
Wim Taymans
68c5f41708 filter-graph: fix port find logic
We need both ports to be NULL (failed to find the ports as audio ports)
when we try to link control/notify ports.
2025-05-08 12:15:58 +02:00
Wim Taymans
46f5740604 filter-graph: warn about unaligned streams
Keep track of min/max latencies and warn when streams are unaligned.
2025-05-08 10:52:57 +02:00
Wim Taymans
8e4c211a80 filter-graph: add latency reporting to the sofa plugin 2025-05-07 17:19:38 +02:00
Wim Taymans
8bcf0460d1 filter-graph: add latency option to the convolver
Sometimes you want to use the convolver as a delay without adding
latency so add a latency option to tweak the automatic latency
reporting. Use this in the upmix rear delay filters.
2025-05-07 17:18:15 +02:00
Wim Taymans
8ee51cd88f filter-graph: add latency support for the delay plugin 2025-05-07 16:55:44 +02:00
Wim Taymans
dbca286de8 filter-graph: add latency reporting to the convolver 2025-05-07 16:37:14 +02:00
Wim Taymans
e545efdb6e filter-chain: implement filter-graph latency
Collect the latency of the graph in filter-chain. We do this by first
inspecting the LATENCY ports on the plugins and us the notify value as
the latency on the node.

We then walk the graph from source to sink and for each node take the
max latency of all linked upstream peer nodes. We end up with the max
latency of the graph and emit this in the graph properties.

We then listen for the graph latency property and use that to update the
process_latency of the filter-chain, which will then update the latency
on the filter-chain ports.

Fixes #4678
2025-05-07 16:00:41 +02:00
Wim Taymans
d277b3b62e filter-graph: add a LATENCY hint for control ports
Some ports can have latency information about the plugin, mark those
ports with the LATENCY HINT.

Also decouple the LADSPA hint flags from the SPA ones.
2025-05-07 16:00:41 +02:00
Wim Taymans
5a4e8bb45e filter-graph: ensure we can call setup_graph multiple times
We need to reset the fields used for sorting so that we can run the
setup_graph code multiple times.
2025-05-07 16:00:41 +02:00
Wim Taymans
a30a988606 filter-graph: remove useless check 2025-05-07 16:00:41 +02:00
Sanchayan Maity
42b9b0eb4c bluez5-dbus: Fix the audio channel position for ASHA
For stereo to work, we need to advertise the channel position based on
whether the side is left or right.
2025-05-07 18:29:01 +05:30
Wim Taymans
5bf3a0c454 filter-graph: add a debug node
Add a node that logs audio or control data to the log.
2025-05-07 10:44:57 +02:00
Guido Günther
958ae36717 spa: Add default: statements
This allows to use the library in projects that use `-Wswitch-default`
without any

 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wswitch-default"
 #pragma GCC diagnostic pop

This is useful as as the header is being pulled in via
pipewire/wireplumber headers into projects that might have this warning
enabled and would otherwise fail to build with -Werror.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-07 07:42:39 +00:00
Frédéric Danis
27fecd3c56 bluez5: backend-native: Fix hangup of waiting call
3-way incoming calls are created in waiting state. When those calls are
hang-up before being active, the +CIEV: (callsetup = 0) should also be
managed for waiting calls.
2025-05-07 07:41:28 +00:00
Sanchayan Maity
afa7ebc032 media-sink: Drop packet if send fails for ASHA
One of the ideas behind retrying the sending of a failed packet with the
poll callback was to make sure that we do not end up with missing seqnums
by missing received credit due to some jitter.

However, the rate matching behaviour for ASHA is not clear and we do not
seem to face problems in local testing by just dropping the packet.
2025-05-07 07:39:46 +00:00
Sanchayan Maity
e68111b4aa media-sink: Fix sequence number sync for ASHA
The two sides of a ASHA pair rarely if ever start together and the
sequence number was always a bit off due to the stateful nature of
reset_buffer and ASHA needing the sequence number to be matched to
the other side.

Simplify this by setting the sequence number for ASHA just before
flushing.
2025-05-07 07:39:46 +00:00
Sanchayan Maity
a419f69bbb bluez5-device: Refactor device_set_update for ASHA & BAP 2025-05-07 07:39:46 +00:00
Wim Taymans
445ca819ce bluez: fix format specifier
zu is for size_t, PRIu64 is for uint64_t
2025-05-07 09:38:24 +02:00
Sanchayan Maity
d96485190d bluez5: media-sink: Fix format specifier for log
This should fix the build on 32-bit systems.
2025-05-07 13:02:10 +05:30
Wim Taymans
8c8fd97698 filter-chain: support ProcessLatency
Allow setting ProcessLatency on the nodes and add this latency to the
reported Latency.

See #4678
2025-05-06 19:15:16 +02:00