pipewire/spa/plugins
Mike Lothian 062f19b214 spa: alsa: acp-device: stop 100% CPU spin when a poll fd hangs up
handle_acp_poll() copies the poll revents into ACP and clears them, but
never actually looks at them. When one of the polled fds reports
POLLERR/POLLHUP - which happens when the ALSA card goes away, e.g. the
audio function of a USB dock being unplugged - the source is never
removed, and because that condition is level-triggered the loop just
keeps redispatching the handler.

The result is wireplumber pegged at 100% CPU, spinning on the card's
control fd:

    read(24, ..., 72) = -1 ENODEV (No such device)

with fd 24 pointing at a now-deleted /dev/snd/controlC<n>. It stays like
that until the card comes back or the service is restarted.

Accumulate the returned mask and, if anything reports SPA_IO_ERR or
SPA_IO_HUP, drop the poll sources so we stop hammering a dead descriptor.
The udev monitor still drives the real device removal and setup_sources()
re-arms the poll if the card reappears - the same teardown alsa-pcm.c
already does for its own control sources.

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
2026-07-07 14:33:06 +02:00
..
aec Please replace the comma operator with the correct semicolon when setting aec.name and aec.latency. This will help avoid syntax errors and improve readability. 2026-06-25 14:23:03 +02:00
alsa spa: alsa: acp-device: stop 100% CPU spin when a poll fd hangs up 2026-07-07 14:33:06 +02:00
audioconvert audioconvert: small cleanups 2026-07-07 14:28:09 +02:00
audiomixer audiomixer: rate limit the "out of buffers" debug 2026-04-28 12:11:42 +02:00
audiotestsrc audiotestsrc: Operate as follower too 2025-12-16 13:15:00 +01:00
avb treewide: make more file descriptors cloexec 2026-05-08 14:53:01 +02:00
bluez5 bluez5: Fix JSON parser iterator usage in bcast_source config 2026-07-07 14:32:58 +02:00
control mixer: handle control.ump property 2026-04-07 10:08:14 +02:00
ffmpeg spa: use log topics everywhere 2024-03-11 18:45:21 +02:00
filter-graph filter-graph: sync_volume initializes the control ports 2026-05-20 11:39:54 +02:00
jack *: don't include standard C headers inside of extern "C" 2025-05-30 09:48:28 +01:00
libcamera spa: libcamera: use std::span 2026-03-28 01:22:27 +01:00
support treewide: make more file descriptors cloexec 2026-05-08 14:53:01 +02:00
test spa: make the wave, pattern and ditherType Int 2025-06-13 10:06:09 +02:00
v4l2 security: add missing O_CLOEXEC flag to V4L2 device open 2026-05-08 13:53:17 +02:00
videoconvert spa: limit the number of buffer blocks 2026-05-08 12:17:50 +02:00
videotestsrc loop: spa_loop_invoke -> spa_loop_locked where possible 2025-05-30 11:59:35 +02:00
volume treewide: access the position information using helpers 2025-10-21 13:06:25 +02:00
vulkan treewide: make more file descriptors cloexec 2026-05-08 14:53:01 +02:00
meson.build filter-chain: move the filter-graph to plugins 2024-11-13 11:12:06 +01:00