Commit graph

14937 commits

Author SHA1 Message Date
Charles
43b19e7668 gst: fix crop height typo in pipewiresink do_send_buffer
The crop region height was incorrectly set to meta->width instead of
meta->height when copying GstVideoCropMeta into the SPA buffer.
2026-04-21 20:19:24 +01:00
Wang Yu
2953f48d9b vulkan: fix wrong descriptor image info index
When streams are skipped via continue in updateDescriptors(),
the loop index i and descriptorSetLen diverge. The image info
is written at descriptorSetLen but pImageInfo was referencing
index i, pointing to uninitialized memory and causing incorrect
Vulkan descriptor updates.

Fix by using descriptorSetLen consistently.

Signed-off-by: Wang Yu <wangyu@uniontech.com>
2026-04-21 15:13:03 +00:00
Wim Taymans
da19aa4eb1 filter-chain: update virtual surround with convolver2 2026-04-21 17:03:55 +02:00
Wim Taymans
c6ae30593c filter-graph: use convolver2 for sofa
We don't need 2 convolvers anymore, we can use the same convolver with
2 outputs with the left and right ir.

Add latency option to the sofa plugin. I believe the latency of the
SOFA filters is by default 0, so use that.
2026-04-21 16:52:49 +02:00
Wim Taymans
9cae4ce7e7 filter-chain: add convolver2
Add support for multiple convolver outputs. This makes things more
efficient because we only need to do the input FFT once to produce the N
outputs.

Add convolver2 that can have multiple outputs.
2026-04-21 16:24:38 +02:00
Wim Taymans
2b96f694f7 convolver: rename some fields 2026-04-20 14:00:15 +02:00
Wim Taymans
d8db536d36 convolver: remove some useless loops 2026-04-20 14:00:04 +02:00
Wim Taymans
777851a7ec convolver: support more than 2 partitions
Currently wired up to only support 2 but it can be changed.
2026-04-20 13:59:08 +02:00
Wim Taymans
b9e62aad8a convolver: handle partial blocks 2026-04-20 13:57:47 +02:00
zhiwei zuo
c5e1a3eae3 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Barnabás Pőcze <pobrn@protonmail.com>
2026-04-20 10:06:31 +00:00
zuozhiwei
0a38fedeec conf: clamp pw_strv_insert_at invalid pos to [0, len]
Invalid pos was clamped to len+1, which could insert past the terminating NULL.
Clamp negative indices to 0 and values above len to len.
2026-04-20 10:06:31 +00:00
hackerman-kl
f0a33cddbd module-avb: es_builder: use the descriptor rather than a pointer to avoid overwriting it 2026-04-20 10:10:58 +02:00
zuozhiwei
2722d16303 audioadapter: remap port id for port_reuse_buffer on target
port_use_buffers and related port methods increment port_id when the
implicit output direction differs from the adapter's primary direction.
port_reuse_buffer only receives a port id but applies to output ports,
so apply the same offset before forwarding to this->target.

Also update videoadapter for the same mapping.
2026-04-20 07:55:54 +00:00
zuozhiwei
c3d16a39f5 audioconvert: fix tmp_datas[1] when scratch ports grow 2026-04-20 10:24:42 +08:00
Pauli Virtanen
cee1bdfb5a bluez5: more MT7925 quirks
The MT7925 chipset has several alternative USB ids recognized by kernel,
list them all.
2026-04-19 16:02:56 +00:00
hackerman-kl
e66a24dc5b modules-avb: legacy-avb: entity warnings 2026-04-19 08:15:55 +02:00
Pauli Virtanen
84e6845aa6 bluez5: add quirk for LC3-24kHz for HFP
MT7925 fails to setup a SCO connection that results to working LC3-24kHz
audio. Other controllers (Intel etc) appear to work OK.

Add quirk for disabling this codec, and disable it for this Mediatek
controller.
2026-04-17 22:10:32 +00:00
Pauli Virtanen
6e8e234e61 bluez5: fix disabling HFP codecs via bluez5.codecs
backend-native should not advertise disabled HFP codecs as available.
2026-04-17 19:35:43 +03:00
Wim Taymans
7df106bc25 filter-chain: deactivate when Format is unset
We need to deactivate the graph when the format was cleared on both the
input and output. This means we got suspended and we need to clear. We
can safely do this now because we take the right locks.
2026-04-17 13:05:28 +02:00
Wim Taymans
5f9811d085 convolver: clear the input buffer
The last part of the buffer needs to be 0 filled or else we get noise
from the FFT.
2026-04-17 12:47:32 +02:00
Wim Taymans
f210d93ea6 convolver: remove intermediate convolver
We can simply use the first one with more segments.
2026-04-17 10:39:36 +02:00
Wim Taymans
839e0a4aaf convolver: optimize loops
We can use a single loop with just one memcpy to implement the delay
buffer and feed the different FFTs.
2026-04-17 10:38:38 +02:00
Wim Taymans
37b648a3e0 convolver: convolver1 -> partition 2026-04-17 10:37:13 +02:00
zuozhiwei
d4b472d2e5 tools: fix realloc failure handling in midifile ensure_buffer
On realloc failure, the old mf->buffer pointer should be preserverd to avoid memory leaks.
2026-04-17 10:04:35 +08:00
Chiluka Rohith
61a9c78e1d pw-cat: Fix waveX format endian assign
SF_FORMAT_WAVEX is not supported to SF_ENDIAN_CPU. Due to that, unable
to record in .wav file (for > 2 channels).  Add case for SF_FORMAT_WAVEX
to get assign SF_ENDIAN_FILE.

Fixes #5233
2026-04-16 13:54:24 +02:00
Wim Taymans
c5d8113302 pipewire-jack: also ignore ports with other DSP type
The DSP port type needs to be something else than "other" for it
to become visible. This way we can also remove the IS_VISIBLE check
because we never add invisible ports to the object list.
2026-04-16 13:47:08 +02:00
Wim Taymans
9454c71a58 jack: don't emit "other" ports
When we see a non-dsp port, simply ignore it. This will make sure also
the links are ignored.

See #3512
2026-04-16 13:36:23 +02:00
Masum Reza
f76327e076 alsa: acp: don’t override user-selected port on availability changes
ACP was re-selecting the “best” port on every port availability event,
even when a port was already explicitly selected by the user. This
differs from PulseAudio’s behavior, where port switching decisions are
left to higher-level policy.

This caused issues on devices where Line Out (speakers) and Headphones
share the same analog interface: when headphones are plugged in, ACP
would immediately switch away from the user-selected Line Out, or end up
in a state where no sound is produced despite selecting speakers explicitly from
clients like pwvucontrol.

Fix this by only re-evaluating and switching ports when:
  - no active port is currently selected, or
  - the active port has become unavailable

This preserves manual user choices and prevents ACP from fighting client
port selections during route activation.

Additionally, adjust ALSA mixer paths to better separate Line Out and
Headphones behavior:
  - Disable Line Out controls in the headphones path
  - Add explicit Line Out and Auto-Mute Mode handling in the lineout path

Together, these changes align PipeWire’s behavior more closely with
PulseAudio and fix cases where selecting speakers while headphones are
plugged results in no audio output.

Signed-off-by: John Titor <masumrezarock100@gmail.com>
2026-04-16 10:45:01 +00:00
hackerman-kl
c551acf4d1 milan-avb: lock: make it lockable:
1. The period calls were added to handle timeouts.
2. Handle the case where lock must be unlocked after 60s if the
   controller owning the locked does not release it.
2026-04-16 12:42:23 +02:00
Wim Taymans
adad89dc0e add spa_memcpy to more places
Use spa_memcpy yo where we memcpy data so that when the debug option is
enabled we can see more.
2026-04-16 12:16:06 +02:00
Wim Taymans
54aba261d2 tools: add pw-audioconvert
Takes an input file, processes it with audioconvert and writes to an
output file. Can be used to test all audioconvert features such as
resample, channelmix, filter-graph, format conversion, dither, etc.

Boilerplate written by Claude.
2026-04-16 12:14:21 +02:00
zuozhiwei
b4457b871f core: use %u format specifier for uint32_t IDs
The object, node, client, factory, module, and link IDs are all uint32_t values but were being formatted with %d.
This would produce incorrect negative values if an ID ever exceeded INT_MAX
2026-04-16 08:54:15 +00:00
Wim Taymans
35cbd2e56a audioconvert: don't setup again in suspend
Remove the fallthrough in suspend, we don't want to do the setup that we
do in the paused mode, just reset the node and unset the started state.
2026-04-16 10:12:09 +02:00
Wim Taymans
e490c503fd pulse-server: update initial stream is_paused state
When the stream starts corked, we set the INACTIVE flag and we also need
to set the stream state as PAUSED or else uncork will not unpause
anything.
2026-04-15 18:25:28 +02:00
Wim Taymans
03fd89abea alsa-seq: add : between client and port name
The separator is important for applications to find the client name and
group ports.

Fixes #5229
2026-04-15 11:20:18 +02:00
zuozhiwei
3277f3acfb alsa: fix inverted port validity check in port_reuse_buffer
The CHECK_PORT condition in impl_node_port_reuse_buffer was inverted with a negation operator, causing the function to reject valid output ports and accept invalid ones.

Fixes the logic so that valid ports proceed to buffer recycling and invalid ports are properly rejected.
2026-04-15 09:17:49 +00:00
Wim Taymans
ae723a69f6 filter-graph: allow negative Gain in mixer
To allow for polarity changes.

Fixes #5228
2026-04-15 09:41:55 +02:00
Wim Taymans
823dcd8843 scheduler: make nodes move to IDLE when inactive
When a node is inactive but linked to a driver, the only reason it is
not being scheduled is because it is inactive.

We already set up the links and negotiate the format and buffers to
prepare going to RUNNING. This patch now also make the node go to IDLE,
which makes the adapter negotiate a forma and buffers with the internal
node.

This makes things more symetrical, when linking a node, it becomes IDLE,
when activating it becomes RUNNABLE, when inactive it goes back to IDLE.
The switch to RUNNING will also be faster when things are already set up
in the IDLE state.

The main advantage is that it allows us to implement the startup of
corked streams in pulseaudio better. Before this patch we had to set the
stream to active to make it go through the Format and buffer negotiation
and then quickly set it back to inactive, hopefully without skipping a
cycle. After this patch, the corked stream goes all the way to IDLE,
where it then waits to become active.

See #4991
2026-04-14 14:28:29 +02:00
Wim Taymans
474253719f alsa-seq: remove port from mix_list on destroy
When the port is destroyed we need to remove it from the mix_list or
else the process function will keep trying to use the invalid memory.

This is because the port logic does not want to call any functions on
the port (like clearing the IO or Format) after it emitted the destroy
signal and we need to clean up ourselves.

Fixes #5221
2026-04-14 11:09:29 +02:00
Wim Taymans
0cc3644e55 dlopen: support search path ending in /
When the search path is /usr/lib/, /usr/lib/foo.so fails to load because
there is no / after the search path. Fix this by requiring that either
the search path end with / or the following char is a /.
2026-04-13 10:26:33 +02:00
Julian Bouzas
14b74962d6 tools: connect to the manager socket by default
This gives the tools unrestricted access by default if access.socket is defined
in the configuration access module.
2026-04-13 07:39:45 +00:00
Wim Taymans
b12b7f785e pipewire: check init count before loading plugins
When pw_init() was not called and the init_count is 0, the plugin path
was not set and loading plugins will fail/segfault.

Avoid this and return en error early instead with a message that
pw_init() should be called first.

See !2784
2026-04-13 09:33:05 +02:00
zuozhiwei
11d28c661b Fix spelling errors in comments and log messages
- Fix durring → during in es-builder.c error message
- Fix capabilty → capability in impl-port.c debug log
- Fix supress → suppress in rate-control.h comment

Improve code readability
2026-04-13 07:20:11 +00:00
hackerman-kl
4b886d07f7 milan-avb: pw-avb-virtual: activate only when necessary 2026-04-13 07:15:39 +00:00
Марко М. Костић (Marko M. Kostić)
c3c74257fa
po: Update Serbian and add Serbian Latin translations 2026-04-11 15:14:16 +02:00
Марко М. Костић (Marko M. Kostić)
013bd12592
po: Alpha-sort LINGUAS 2026-04-11 15:14:06 +02:00
Wim Taymans
5075f27ea0 filter-graph: small convolver optimizations
Use FMA when we can, make sure FMA compilation is supported and the CPU
also supports it at runtime.

Avoid divisions by doing the modulo increment more explicitly.
2026-04-10 12:17:25 +02:00
Wim Taymans
c2f85ffc51 filter-chain: improve docs
Add the default values to the docs for some of the convolver config
variables.
2026-04-09 16:35:17 +02:00
Wim Taymans
b1a9bc966b tools: fix compiler error on older compilers
COLS could be very small and the statusbar array might overflow with
strcpy and strcat. Also initializing the variable array seems to cause
problems on older compilers.

Instead use a fixed array that is big enough to hold all possible
values we write into it.
2026-04-09 16:32:16 +02:00
Wim Taymans
1ed1349e7c test: fix some compiler warnings
be64toh returns a uint64_t so there is no need for casts in the test.
2026-04-09 13:04:35 +02:00