pipewire/spa/plugins/audiomixer
Torkel Niklasson 476d068738 audiomixer: allocate DSP mixer port buffers dynamically
Like the audioconvert node, the DSP mixer embedded a fixed
buffers[MAX_BUFFERS] array (MAX_BUFFERS == 64) in struct port, each
struct buffer holding datas[MAX_DATAS] (MAX_DATAS == 64), reserving
~37 KB per port regardless of the actual buffer/channel count. A DSP
mixer port is created for every link set that mixes into a port, so
this adds up.

Allocate the buffer table and the per-buffer data-pointer pool in a
single calloc in port_use_buffers(), sized to the real number of
buffers and their data blocks, and release it in clear_buffers().
remove_port() now clears the port before zeroing it so a pooled port
does not leak its allocation, and impl_clear() clears the input and
output ports on teardown. Mirrors the audioconvert dynamic-allocation
change.

Co-authored-by: Copilot copilot@github.com
Change-Id: I47286a36ae60cc10d520c0cd500fcd00d6d37657
2026-06-12 18:19:35 +00:00
..
audiomixer.c audiomixer: only add the input port to mix_list 2026-03-11 12:36:39 +01:00
benchmark-mix-ops.c spa: use the right AVX2 flags 2026-01-13 12:03:09 +01:00
meson.build spa: use the right AVX2 flags 2026-01-13 12:03:09 +01:00
mix-ops-avx2.c spa: use the right AVX2 flags 2026-01-13 12:03:09 +01:00
mix-ops-c.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
mix-ops-sse.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
mix-ops-sse2.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
mix-ops.c spa: use the right AVX2 flags 2026-01-13 12:03:09 +01:00
mix-ops.h spa: use the right AVX2 flags 2026-01-13 12:03:09 +01:00
mixer-dsp.c audiomixer: allocate DSP mixer port buffers dynamically 2026-06-12 18:19:35 +00:00
plugin.c spa: export log topic enumerations 2024-01-04 10:02:55 +00:00
test-mix-ops.c spa: use the right AVX2 flags 2026-01-13 12:03:09 +01:00