14601 Commits

Author SHA1 Message Date
Mengshi Wu
2d6a7d2186 bluez5: fix format string in sco_offload_btcodec log message 2026-01-25 17:26:15 +00:00
Mengshi Wu
db7c74a042 bluez5/backend-native: Add HFP/HSP hardware offload datapath configuration
Add support for configuring the SCO hardware offload data path for
HFP/HSP profiles using the Bluetooth SIG-specified procedure. This
enables vendor-specific SCO offload integrations.

Changes:
- Add `bluez5.hw-offload-datapath` configuration property (default: 0)
- Implement `sco_offload_btcodec()` to set BT_CODEC socket option
- Add `SPA_BT_FEATURE_HW_OFFLOAD` quirk feature flag
- Apply offload configuration when creating SCO sockets if quirk enabled
- Document new property in pipewire-props.7.md

The datapath ID is configurable via device parameters and only applied
when the hardware offload feature flag is set in quirks, allowing
platform-specific SCO offload implementations.
2026-01-25 17:26:15 +00:00
Wim Taymans
35817c0d85 pw-cat: support some more formats
So that you can give an .oga extension and --format=opus to get an
opus ogg file.
2026-01-22 17:14:41 +01:00
Jonas Ådahl
f2c4452e8d stream: Make capability device IDs an JSON object
Also change the encoding of the byte array to use hexadecimal encoding,
i.e. the byte array [100, 200] in becomes "64c8".
2026-01-22 16:08:19 +00:00
Jonas Ådahl
8600721de0 stream: Change PW_CAPABILITY_DEVICE_ID_NEGOTIATION to a version number
This allows easier evolvement of the negotiation protocol.
2026-01-22 16:08:19 +00:00
Arun Raghavan
04793138b5 alsa-card-profiles: Add config for a couple of JBL gaming headsets
Similar to the existing SteelSeries and Logitech ones, but the order of
the playback endpoints is reversed, and only mono input is supported.
2026-01-22 15:35:05 +00:00
Wim Taymans
f978b702b1 pw-cat: also look at simple formats for extension
The simple formats contain some common mappings for other extensions such
as mp3.

Makes pw-record test.mp3 actually write an mp3 instead of a wav file.
2026-01-22 13:08:06 +01:00
Wim Taymans
f82f4945b9 filter-graph: improve min/max checks for control
Clamp the control values to their min/max.

Remove the default_control array, we can just restore the default with
the port_set_control_value(). Do this when no value has been set on the
port when we set up the graph. The avantage is that we calculate the
default, min and max correctly when they depend on the graph rate.

Fixes #5088
2026-01-21 18:35:36 +01:00
Sven Ulland
c634ef9610 pipewiresrc: Fix video crop metadata not being set
Since commit a1f33a99df changed buffer handling to create new GstBuffers
instead of reusing pool buffers, the video crop metadata was silently
lost. The code used gst_buffer_get_video_crop_meta() which returns NULL
on a fresh buffer, so the crop values from PipeWire were never applied.

Change to gst_buffer_add_video_crop_meta() to actually attach the
metadata to the buffer.

Also remove the now-obsolete call in gst_pipewire_pool_wrap_buffer.

This was discovered when using the XDG Desktop Portal's RemoteDesktop
interface: the full desktop was being delivered instead of just the
selected window, because the crop region metadata was not being
propagated to the GStreamer buffer.

Fixes: a1f33a99df ("gst: dequeue a shared buffer instead of original
pool buffer"), from merge request !1258

CC: @jameshilliard
2026-01-21 15:26:57 +00:00
Wim Taymans
56a4ab5234 filter-chain: support no input or output streams
When the graph has no inputs and the channels is set to 0, don't create
a capture stream. Likewise, don't create a playback stream when there
are no graph outputs and the output channels is 0.

You can use this to make a sine source or a null sink.
2026-01-21 16:26:16 +01:00
Wim Taymans
7f2cce1021 filter-graph: add a null plugin
It discards all input.
2026-01-21 16:26:16 +01:00
Wim Taymans
a97c4d10af filter-graph: allow 0 input and output ports
There is no reason to fail when there is no input or output port.
We can simply run the graph with what there is. Even if there is no
input or output at all, running one instance of the plugins is
possible.

Add a busy builtin plugin that has no ports and keeps the CPU IDLE or
busy for the give percent.
2026-01-21 16:26:16 +01:00
Wim Taymans
ba3e564e34 filter-graph: notify about default numner of in/out
The filter graph has, after parsing, a default number of input and
output ports. This is based on the description or the first/last element
input and output ports. Pass this information in the properties when
we emit the info.

Don't use the number of configured input/output ports as the default
number of channels in filter-chain because this is only determined after
activating the graph. Instead, use the default input/output channels.

The result is that when you load filter-chain without any channel
layout, it will default to the number of input/outputs of the graph
instead of 0. This allows for the node to be visible in the pulseaudio
API.

Fixes #5084
2026-01-21 16:26:16 +01:00
Jonas Holmberg
39dd760c60 impl-port: Free capabilities
Free capabilities when destroying port.
2026-01-20 15:21:56 +01:00
Wim Taymans
0a27618cd4 1.5.85 1.5.85 2026-01-19 16:21:00 +01:00
Wim Taymans
e18c8ec224 doc: fix some typos 2026-01-19 13:30:15 +01:00
Carlos Martín Nieto
a858255ea2 doc: correct a copy-paste error in the pw-loopback manpage 2026-01-17 16:43:30 +01:00
Alexander Stephens
c74acf6c25 module-rtp: Fix timestamp integer overflow 2026-01-16 11:06:21 +00:00
Alexander Stephens
dcdc19238b module-rtp: Remove device_delay from timestamp math 2026-01-16 11:06:21 +00:00
Wim Taymans
b4b057196d resample: add bool to force inter resampler
Don't rely on the out_rate vs n_phases to decide on when to use the
inter resampler because the out_rate can change when we activate the
adaptive resampler.

Instead use a boolean that we can set at the start.
2026-01-16 11:03:43 +01:00
Wim Taymans
06e4772864 channelmix: add some more channelmix positions
Implement downmix of some top and rear channels as well.
2026-01-15 16:43:43 +01:00
Wim Taymans
c28a85ab34 zeroconf: use name+mode to detect duplicates
So that there can be a sink and source tunnel even when the name is the
same.

Based on patch by @kajusnau

Fixes #5079
2026-01-15 13:08:24 +01:00
Wim Taymans
9fdbe98330 resample: limit the amount of phases
If we have in and out rates with a very small GCD, we might end up with
a lot of phases. Limit the number of phases to 1024 and switch to
interpolating mode. 1024 phases is enough to accurately interpolate
from.

Together with the MAX_TAPS limit we will never create a filter
size that overflows 32 bits.

Fixes #5073
2026-01-15 12:05:07 +01:00
Jonas Ådahl
f055cf398d examples: Make fixate examples support device ID negotation
Things are structured in a way allowing testing falling back to
implicitly assumed device by defining/not defining macros.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
5481a235ed examples: Make fixate examples optionally stream DMA buffers
The video-play-fixate example will downgrade the stream to MemFd one
modifier at a time. Sometimes it's useful to test with not downgrading;
to avoid having to depend on actual DRM devices (real or virtual), fake
them by using memfd and mapping them in the sink.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
fc5b43a0b0 examples: Make fixate examples start inactive
The actual formats are sent just before activating. This is done in
preparation for supporting device ID negotiation.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
58b958860e stream: Add DRM device negotiation
A DMA buffer from a DRM device are typically accessed using API related
to a DRM device, e.g. Vulkan or EGL. To create such a context for using
with a PipeWire stream that passed DRM device DMA buffers applications
have so far usually guessed or made use of the same context as the
stream content will be presented. This has mostly been the Wayland
EGL/Vulkan context, and while this has most of the time worked, it's
somewhat by accident, and for reliable operation, PipeWire must be aware
of what DRM device a DMA buffer should be accessed using.

To address this, introduce device ID negotation, allowing sources and
sinks to negotiate what DRM device is supported, and what formats and
modifiers are supported by them.

This will allow applications to stop relying on luck or the windowing
system to figure out how to access the DMA buffers. It also paves the
way for being able to use multiple GPUs for different video streams,
depending on what the sources and sinks support.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
e615f17573 examples/video-src-fixate: Fake DmaBuf fd with memfd
Otherwise the stream will fail due to not being able to import fd.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
21217a1fad examples/video-play-fixate: Switch to RGBA
The video-src-fixate was previously changed from RGB to RGBA, so to be
able to resolve a format, switch here too.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
97976e4daf examples/video-play-fixate: Split out format param handler 2026-01-14 08:15:43 +00:00
Jonas Ådahl
01627e0367 examples/video-src-fixate: Split out format param handler 2026-01-14 08:15:43 +00:00
Wim Taymans
13131706aa spa: use the right AVX2 flags
Our AVX optimizations are really AVX2 so rename the files and functions
and use the right HAVE_AVX2 and cpu flags to compile and select the
right functions.

Fixes #5072
2026-01-13 12:03:09 +01:00
Pauli Virtanen
c1f7963c2a bluez5: fix crash due to debug_mono
Enabling bluez5.debug-iso-mono was in non-ISO branch and crashes. Fix
that.
2026-01-12 19:57:56 +02:00
Pauli Virtanen
f21c44751e bluez5: iso-io: resync if controller packet completion is out of sync
Add heuristic to resync streams if controller packet completion times
for different streams differ by too much.  This likely indicates
controller has lost sync between the streams, and we have to reset
playback.

There's no way to do this properly. The ISO-over-HCI transport is badly
specified in Bluetooth Core Specification.  Many controllers have broken
implementation of the current send timestamp read command, so packets
have no identifiers which ISO interval they belong to.

Controllers try to reconstruct the right interval based on
manufacturer-specific heuristics probably based on packet arrival times.
Kernel + USB introduce timing jitter, and playback sometimes desyncs and
packet from some streams are persistently sent some multiple of the SDU
interval off from the intended timing.

Try to determine this from packet completion latencies.  This is
somewhat manufacturer specific, tested on Intel & Realtek, hopefully
works on others too.
2026-01-11 17:55:26 +02:00
Pauli Virtanen
0003d7a2d0 bluez5: iso-io: add debug option for forcing same data in all streams
When debugging desync issues, it's useful to force same data be sent on
all ISO streams. Add option for that.
2026-01-11 17:55:26 +02:00
Pauli Virtanen
d0309b4e1e bluez5: deal with missing TX timestamps
There are known controller firmware bugs that cause packet completion
reports, mainly for ISO packets, to be missing.

To avoid getting stuck e.g. in ISO queue flushing, we should consider a
packet completed if sufficient time has passed even if controller (and
kernel) don't report it completed. Take 1 s as conservative timeout, the
expected values are some ms.

These firmware bugs also cause kernel to stop sending packets if too
many are left uncompleted, but we cannot detect that.
2026-01-11 17:55:26 +02:00
Wim Taymans
0869be11f8 avb: fix compilation 2026-01-11 11:27:15 +01:00
hackerman-kl
3597e09600 milan-avb: introducing SET/GET CONTROL, first IDENTIFY 2026-01-11 10:26:10 +00:00
hackerman-kl
8912090c4d milan-avb: add default AVB AECP MTU 2026-01-11 10:26:10 +00:00
hackerman-kl
1da30b545a milan-avb: now get/set may or not have a payload 2026-01-11 10:26:10 +00:00
hackerman-kl
2f3c0bc596 milan-avb: introducing aem control value units header 2026-01-11 10:26:10 +00:00
hackerman-kl
1d485d8bbc milan-avb: get entity-id rom the server, and not from a define 2026-01-11 09:00:36 +01:00
hackerman-kl
2fe254821c module-avb: milan: aecp-aem: introducing GET/SET_SAMPLING_RATE commands 2026-01-09 13:04:19 +00:00
hackerman-kl
f70fc7ea28 milan-avb: using pull and frequency as a union 2026-01-09 13:04:19 +00:00
hackerman-kl
e7f1a8f55d milan-avb: get-set name: removing unused var 2026-01-09 13:03:02 +00:00
hackerman-kl
d3a5b352b2 milan-avb: Make sure to get payload size not the packet size 2026-01-09 09:38:06 +01:00
Timon
aec99d2b6f format: Add support for sample rate of 1.536 Mhz 2026-01-09 01:16:30 +01:00
Wim Taymans
6ed9645465 profiler: keep per node last_profile_time
So that multiple drivers can get updated per interval when
profile.interval.ms is used.

Fixes #5061
2026-01-06 17:24:55 +01:00
Pauli Virtanen
c96e58af01 bluez5: handle BAP device set volume change notifications
Update volume state on device set volume notifications.

When one device sends volume notification, CAP specifies volume on other
devices shall be synchronized too.
2026-01-06 16:14:22 +00:00
Pauli Virtanen
260e8261d5 bluez5: add bluez5.autoswitch-routes option to indicate loopback nodes
When session manager emits loopback nodes for profile autoswitch, we
need to indicate them in the Routes.

Otherwise, the port information in Pulseaudio API doesn't account for
them, and some apps (eg GNOME) misbehave, as the loopback node sometimes
doesn't have valid ports.
2026-01-05 20:43:13 +02:00