pipewire/spa
Takashi Sakamoto e3b6534872 acp: avoid assertion at alsa-lib mixer API when element removal
PipeWire v0.3.7 or later hits assertion at alsa-lib mixer API due to
wrong handling of removal event for mixer element.

wireplumber: mixer.c:149: hctl_elem_event_handler: Assertion `bag_empty(bag)' failed.

The removal event is defined as '~0U', thus it's not distinguished from
the other type of event just by bitwise operator.

At the removal event, class implementator for mixer API should detach
mixer element from hcontrol element in callback handler since alsa-lib
has assertion to check the list of mixer elements for a hcontrol element
is empty or not after calling all of handlers. In detail, please refer to
MR to alsa-lib:

 * https://github.com/alsa-project/alsa-lib/pull/244

This commit fixes the above two issues. The issue can be regenerated by
`samples/ctl` Python 3 script of alsa-gobject.

 * https://github.com/alsa-project/alsa-gobject/

It adds some user-defined elements into sound card 0. When terminated by
SIGINT signal, it removes the elements. Then PulseAudio dies due to the
assertion.

Fixes: 1612f5e4d2 ("alsa-acp: Add libacp based card device")
2022-06-27 10:17:30 +09:00
..
examples examples: fix spelling mistake 2022-06-16 16:40:47 +02:00
include buffer: add EMPTY chunk flag 2022-06-24 11:09:01 +02:00
plugins acp: avoid assertion at alsa-lib mixer API when element removal 2022-06-27 10:17:30 +09:00
tests Add support for MidnightBSD 2022-06-19 18:22:47 +00:00
tools spa: tools: spa-inspect: clear and free handles 2022-06-16 16:59:40 +02:00
meson.build bluez5: use lc3plus.h instead of lc3.h 2022-05-03 00:29:47 +03:00