Commit graph

13633 commits

Author SHA1 Message Date
Wim Taymans
564c9b1ba5 Use "8 bit raw midi" for control ports again
There is no need to encode the potential format in the format.dsp of
control ports, this is just for legacy compatibility with JACK apps. The
actual format can be negotiated with the types field.

Fixes midi port visibility with apps compiled against 1.2, such as JACK
apps in flatpaks.
2025-05-23 16:46:13 +02:00
Wim Taymans
617f1b8a38 pod: add bytes start/append/end functions
Add functions to dynamically start and build a bytes pod.
2025-05-23 16:41:00 +02:00
Wim Taymans
d37f213236 docs: fix some typos 2025-05-23 16:40:20 +02:00
Wim Taymans
5e81ff8ede filter-chain: manage graph from source only
Only react to the capture stream state change and format changes. The
playback and capture streams change state somewhat concurrently and so
the graph state might not be consistent.

Because only the capture stream will trigger the playback stream and
start the processing, we can safely react to capture stream changes
only.
2025-05-21 15:23:00 +02:00
Wim Taymans
ccb7a51c3a filter-graph: add support for lv2 State
If the lv2 plugin supports State restore, use it to load state from the
config section in the lv2 plugin definition.
2025-05-21 15:19:23 +02:00
Wim Taymans
f7eab4172e client-node: let all events go to the node
Just pass all events to the node and only error out when they return an
error value.

Make sure we pass the result values of the command around.
2025-05-20 11:47:10 +02:00
Wim Taymans
12f8ca664b adapter: log command errors when no converter 2025-05-20 10:42:59 +02:00
Wim Taymans
7dc1d28b2c node: add User command and event
Add a User command and event id with a String property called 'extra' to
make it possible to send arbitrary User defined commands and events.
Also makes it possible to make User commands in pw-cli.

pw-cli c 86 User '{ extra="{ test: foo }" }'
2025-05-20 10:32:10 +02:00
Christian Glombek
5a54ecd8df daemon/pipewire.conf.avail: Add snippet enabling module-raop 2025-05-19 18:28:10 +02:00
Wim Taymans
b80189c3dd adapter: handle -ENOTSUP for commands
When using custom commands, the converter might return -ENOTSUP and
we should ignore this.
2025-05-19 17:23:30 +02:00
Wim Taymans
b9a8bb15a4 impl-link: fix feedback handling
If a link is a feedback link, we just need to swap the input/output
scheduling dependency.

Don't swap input/output nodes (without swapping ports) because then we
will be querying the wrong node/port pair when negotiating and cause
errors.

See #4706
2025-05-19 09:45:05 +02:00
Arun Raghavan
9ff1c93ab1 media-sink: Set up ASHA source after setting transport state
We need to make sure the state is available when the source starts, so
that it does not assert in flush_data()
2025-05-17 10:25:37 -04:00
Wim Taymans
e5afc939e8 libcemara: take care of index offset when enumerating controls
Add an index offset when enumerating controls. We insert 2 properties
before enumerating the controls so the index of the first control needs
to have an offset of 2.
2025-05-17 14:05:23 +02:00
Robert Mader
e387772dc2 v4l2: Re-enable first buffer skip for jpeg types
The workaround is typically needed with usb-cameras using jpeg streams.
Re-enabling the skip shouldn't affect what the commit was trying to do,
i.e. fix encoded streams like h264 etc.

Fixes: bcf0c0cf8 (v4l2: only skip buffer for raw formats)
2025-05-17 10:53:08 +00:00
Pauli Virtanen
1e18cded75 bluez5: iso-io: improve latency logic
If kernel socket queues for different streams get out of sync, it will
mess up time alignment of different streams. If that happens, flush to
resync.

If total latency becomes too large, flush queue.

Get accurate queue sizes from tx timestamping.
2025-05-17 10:51:37 +00:00
Pauli Virtanen
489e4b6bd2 bluez5: latency tracking also for A2DP, use it for unsent size
Use TX timestamping to figure out the accurate amount of unsent data,
including controller buffers.  SIOCOUTQ does not report accurate data
size as it includes overheads.
2025-05-17 10:51:37 +00:00
Pauli Virtanen
897748759e bluez5: update timestamping code to match kernel & bluez
Update code to match the final version landed in mainline Linux 6.15
2025-05-17 10:51:37 +00:00
Pauli Virtanen
e375364c87 bluez5: fix device set profile/route enumerations
Now that we have ASHA & BAP, this->device_set now refers to the device
set of the active profile.  It cannot be used to produce
EnumProfile/EnumRoute.

Fix this by computing the device set for given profile(s) as needed.
2025-05-17 10:50:15 +00:00
Barnabás Pőcze
01d1e29402 spa: vulkan: simplify kernel version parsing
Use a single `sscanf()` instead of multiple `strtok()`, `atoi()` calls.
After this change all three components are required to be present.
2025-05-14 18:37:54 +02:00
Wim Taymans
2771c435fd doc: fix end of page for tag doc 2025-05-14 18:23:41 +02:00
Wim Taymans
218f25088c convert: place the right id in the portconfig format 2025-05-14 18:21:39 +02:00
Barnabás Pőcze
6712d9c3db pipewire: module-raop-discover: fix typo in documentation
roap -> raop
2025-05-14 17:59:41 +02:00
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