pipewire/spa/plugins/alsa
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
..
acp acp: avoid assertion at alsa-lib mixer API when element removal 2022-06-27 10:17:30 +09:00
mixer alsa: Disable IEC958 on Audioengine HD3 2022-06-14 06:58:41 +00:00
90-pipewire-alsa.rules alsa: Disable IEC958 on Audioengine HD3 2022-06-14 06:58:41 +00:00
acp-tool.c treewide: mark things static and const 2021-06-30 14:44:08 +02:00
alsa-acp-device.c alsa: don't prefix NAME, log topics are enough 2021-10-03 08:05:40 +02:00
alsa-pcm-device.c alsa: don't prefix NAME, log topics are enough 2021-10-03 08:05:40 +02:00
alsa-pcm-sink.c alsa: handle driver bugs better 2022-06-23 10:20:49 +02:00
alsa-pcm-source.c alsa: handle driver bugs better 2022-06-23 10:20:49 +02:00
alsa-pcm.c alsa: simplify writing 2022-06-24 10:38:13 +02:00
alsa-pcm.h alsa-pcm: Do not log warning when resync was expected 2022-05-11 17:45:27 +02:00
alsa-seq-bridge.c spa: Improve PropInfo fields 2022-03-30 17:09:08 +02:00
alsa-seq.c alsa-seq: disable the running status 2022-06-20 16:18:42 +02:00
alsa-seq.h spa: mode dll to utils 2022-03-30 17:22:26 +02:00
alsa-udev.c spa/alsa-udev: ignore all errors in card busy check 2022-02-14 20:50:53 +02:00
alsa.c spa: implement a log topic for alsa 2021-09-28 09:35:39 +02:00
alsa.h spa: implement a log topic for alsa 2021-09-28 09:35:39 +02:00
meson.build spa: mode dll to utils 2022-03-30 17:22:26 +02:00
test-timer.c alsa-pcm: scale max_error with quantum size 2022-05-11 10:34:27 +02:00