pipewire/spa/plugins/alsa/acp
Alper Nebi Yasak 507ec0b39a alsa-ucm: Set up hardware volumes again on duplicate port additions
While initializing ALSA cards with UCM, we call pa_alsa_ucm_add_port()
for each UCM device for each UCM verb. This checks if a port has been
already added by name and skips port initialization if it is already
done. Different UCM verbs can have devices with the same name, which
means their port names end up being the same. So, this port creation
step currently is only done for one UCM verb for both UCM devices.

Volume control setup is also part of this process. The UCM devices only
know about the volume mixer information from the UCM verb that they are
defined in, so the volume control setup is done for one UCM verb at a
time. Skipping this setup when a same-named port exists means only the
profiles belonging to the first initialized UCM verb have working
hardware volume control.

Move the volume control setup out of the port initialization block so
that we try to do it every time, therefore for every UCM verb. However,
check that we don't run it twice for the same UCM verb for a port.

In theory, the PlaybackVolume etc. value can be different per-verb
for the same device, so we can't simplify this code to a single volume
setup per port.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/840
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2024-12-07 18:32:48 +00:00
..
acp.c spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
acp.h spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
alsa-mixer.c Fix compilation with -Werror=float-conversion 2024-06-18 12:17:56 +02:00
alsa-mixer.h alsa-ucm: Let profiles know their associated UCM verb 2023-12-04 15:34:48 +00:00
alsa-ucm.c alsa-ucm: Set up hardware volumes again on duplicate port additions 2024-12-07 18:32:48 +00:00
alsa-ucm.h acp: Don't sync hardware volumes while UCM device is disabled 2023-12-04 15:34:48 +00:00
alsa-util.c spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
alsa-util.h spa: alsa: autodetect supported iec958 codecs via ELD info 2024-11-28 09:18:07 +01:00
array.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
card.h acp: add api.alsa.disable-mixer-path 2024-09-24 13:14:17 +02: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 leaks in get_data_path() 2023-11-10 03:29:49 +01:00
compat.h acp: handle some errors better 2024-05-20 11:22:46 +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 treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
hashmap.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
idxset.h acp: Add idxset comparison and reverse search operations 2023-12-04 15:34:48 +00: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 treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
volume.h alsa: get rid of non-portable isinf use 2023-08-31 10:37:22 +00:00