mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-07-05 00:06:16 -04:00
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>
|
||
|---|---|---|
| .. | ||
| acp | ||
| mixer | ||
| 90-pipewire-alsa.rules | ||
| acp-tool.c | ||
| alsa-acp-device.c | ||
| alsa-compress-offload-device.c | ||
| alsa-compress-offload-sink.c | ||
| alsa-pcm-device.c | ||
| alsa-pcm-sink.c | ||
| alsa-pcm-source.c | ||
| alsa-pcm.c | ||
| alsa-pcm.h | ||
| alsa-seq-bridge.c | ||
| alsa-seq.c | ||
| alsa-seq.h | ||
| alsa-udev.c | ||
| alsa.c | ||
| alsa.h | ||
| compress-offload-api-util.c | ||
| compress-offload-api-util.h | ||
| compress-offload-api.c | ||
| compress-offload-api.h | ||
| meson.build | ||
| test-hw-params.c | ||
| test-timer.c | ||