pipewire/spa/plugins/alsa/acp
Wim Taymans 8b20675ad1 alsa-ucm: Consider devices using the same PCM as incompatible
Although it's a valid UCM configuration to have multiple devices using
the same PlaybackPCM or CapturePCM, it's unclear how PulseAudio should
handle the cases where multiple of these devices are enabled. Some
options I can think of are:

- Merge all devices sharing the same PCM into the same mapping, open
  only one PCM substream for this mapping, and add 'combination ports'
  that enable combinations of the devices. This has been the case until
  recently, although the combination port logic was broken. A problem
  with this is that we can't independently control device volumes. We
  most likely cannot use hardware volumes either.

- Have one mapping for each device in the same profile, and open one PCM
  substream for each mapping. This is the current state, and it fails
  when there are fewer substreams than devices. Otherwise it works, but
  it's still confusing, as sound directed to a device-specific mapping
  might end up playing at multiple devices.

- Make multiple profiles each with combinations of upto-substream-count
  devices, and have one mapping/substream per device. This still causes
  the confusion mentioned above. And it's likely that the substream
  count will almost always be one, where this case degenerates into the
  last one.

- Have one mapping for each device in the same profile, but open only
  one PCM substream. I assume this is possible with software mixing, but
  it is still confusing like the above, and probably less performant.

- Generate multiple profiles each with one of the shared-PCM devices,
  again with one mapping/substream for that one device. The trade-off
  with this is that we can't use multiple of these devices at the same
  time. However, this doesn't have the output device confusion,
  combination port's volume problems, or the substream count limitation.

This patch takes a short-cut to achieve the last option, by considering
shared-PCM devices implicitly conflicting with each other.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-03-20 18:29:51 +01:00
..
acp.c alsa-util: Perform format and rate detection before setting HW params 2023-03-20 18:22:09 +01:00
acp.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
alsa-mixer.c alsa-util: Perform format and rate detection before setting HW params 2023-03-20 18:22:09 +01:00
alsa-mixer.h alsa-ucm: Let profiles know their associated UCM verb 2023-03-20 15:18:12 +01:00
alsa-ucm.c alsa-ucm: Consider devices using the same PCM as incompatible 2023-03-20 18:29:51 +01:00
alsa-ucm.h alsa-ucm: Make mapping UCM contexts have only one modifier 2023-03-20 17:31:31 +01:00
alsa-util.c alsa-util: Fix pa_alsa_get_supported_formats fallback. 2023-03-20 18:24:20 +01:00
alsa-util.h alsa-util: Perform format and rate detection before setting HW params 2023-03-20 18:22:09 +01:00
array.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
card.h acp: add option to set Pro Audio channels 2023-01-31 15:59:39 +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-util: Perform format and rate detection before setting HW params 2023-03-20 18:22:09 +01: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 alsa-ucm: Rewrite conformant device group generation with idxsets 2023-03-20 16:28:32 +01: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 acp: add support for soft volume 2020-07-06 17:22:42 +02:00