pipewire/spa/plugins/alsa/acp
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.c alsa: force same clock only for pro audio profile 2022-06-08 17:03:50 +02:00
acp.h alsa: move codec config to acp-device 2021-09-02 10:27:59 +02:00
alsa-mixer.c handle open_memstream errors 2022-03-02 11:48:31 +01:00
alsa-mixer.h acp: sync with pulseaudio 2022-01-03 17:21:28 +01:00
alsa-ucm.c acp: sync with pulseaudio 2022-01-03 17:21:28 +01:00
alsa-ucm.h acp: sync with pulseaudio 2022-01-03 17:21:28 +01:00
alsa-util.c acp: avoid assertion at alsa-lib mixer API when element removal 2022-06-27 10:17:30 +09:00
alsa-util.h acp: update to latest 2021-01-05 10:08:31 +01:00
array.h alsa-acp: Add libacp based card device 2020-07-06 12:20:09 +02:00
card.h acp: use auto-profile and auto-port properties 2021-01-27 13:48:10 +01: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 build warning 2021-10-25 07:26:15 +00:00
compat.h alsa/acp: make pa_ato* functions behave as PA ones 2022-01-08 16:26:07 +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 alsa-acp: Add libacp based card device 2020-07-06 12:20:09 +02:00
hashmap.h Fix typos 2021-04-30 07:40:20 +00:00
idxset.h acp: sync with pulseaudio 2021-04-22 12:25:48 +02: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 acp: don't ignore return value 2020-07-21 15:42:04 +02:00
volume.h acp: add support for soft volume 2020-07-06 17:22:42 +02:00