pipewire/spa/plugins/alsa/acp
Alper Nebi Yasak e726c5f6db alsa-ucm: Fix possible segfault from recursion due to too many devices
While trying to figure out device subsets that have aren't internally
contain conflicting devices, we walk through all possible subsets and
check each set if it satisfies ConflictingDevices/SupportedDevices
listed in UCM configuration. For a better user experience, we want to
skip subsets that are fully included in another valid subset we will
also generate.

The iterate_device_subsets() function that achieves the former is
intentionally in iterative form to avoid a stack overflow, since it will
walk through 2^n sets. However, the iterate_maximal_device_subsets()
function that skips incomplete sets is in recursive form, as I had
assumed tail-call optimization would take care of the potential problem.

Convert iterate_maximal_device_subsets() to an iterative form, because
the recursion seems to trigger a segfault with more than 16 devices on
PulseAudio. It doesn't seem to happen on PipeWire, but it's better to
not leave it to luck.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/838
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2024-12-04 20:40:16 +00:00
..
acp.c spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
acp.h spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
alsa-mixer.c Fix compilation with -Werror=float-conversion 2024-06-18 12:17:56 +02:00
alsa-mixer.h alsa-ucm: Let profiles know their associated UCM verb 2023-12-04 15:34:48 +00:00
alsa-ucm.c alsa-ucm: Fix possible segfault from recursion due to too many devices 2024-12-04 20:40:16 +00:00
alsa-ucm.h acp: Don't sync hardware volumes while UCM device is disabled 2023-12-04 15:34:48 +00:00
alsa-util.c spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
alsa-util.h spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
array.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
card.h acp: add api.alsa.disable-mixer-path 2024-09-24 13:14:17 +02:00
channelmap.h acp: don't mix non-AUX and AUX channels 2022-06-02 12:54:04 +02:00
compat.c spa: alsa: fix leaks in get_data_path() 2023-11-10 03:29:49 +01:00
compat.h acp: handle some errors better 2024-05-20 11:22:46 +02:00
conf-parser.c config.h is a local header, not a system one 2021-06-10 09:04:16 +10:00
conf-parser.h alsa-acp: Add libacp based card device 2020-07-06 12:20:09 +02:00
device-port.h Fix typos 2021-04-30 07:40:20 +00:00
dynarray.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
hashmap.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
idxset.h acp: Add idxset comparison and reverse search operations 2023-12-04 15:34:48 +00:00
llist.h alsa-acp: Add libacp based card device 2020-07-06 12:20:09 +02:00
meson.build treewide: meson.build: use dependency variable for SPA 2021-12-28 18:34:06 +01:00
proplist.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
volume.h alsa: get rid of non-portable isinf use 2023-08-31 10:37:22 +00:00