pipewire/spa/plugins/alsa
Alper Nebi Yasak d2046adcd1 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.

Link: 45509ff9bc
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-12-04 15:34:48 +00:00
..
acp alsa-ucm: Consider devices using the same PCM as incompatible 2023-12-04 15:34:48 +00:00
mixer alsa-card-profiles: simplify adding custom profiles 2023-08-23 10:06:16 +00:00
90-pipewire-alsa.rules Add support for GSX 1000 v2 2023-01-13 12:19:30 +00:00
acp-tool.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
alsa-acp-device.c acp: add support for hiding profiles and ports 2023-11-30 17:40:48 +01:00
alsa-compress-offload-device.c spa: alsa: compress-offload: use spa_assert_not_reached() 2023-11-06 19:01:20 +01:00
alsa-compress-offload-sink.c treewide: use spa_assert_not_reached() instead of assert(false) 2023-09-16 17:50:25 +02:00
alsa-pcm-device.c alsa-pcm-device: Minor logging improvements 2023-09-02 08:28:22 +00:00
alsa-pcm-sink.c alsa: Move ctl sources to a main loop 2023-11-22 16:00:25 +00:00
alsa-pcm-source.c alsa: Move ctl sources to a main loop 2023-11-22 16:00:25 +00:00
alsa-pcm.c alsa: clamp buffer_frames correctly 2023-11-30 13:28:16 +01:00
alsa-pcm.h alsa: Move ctl sources to a main loop 2023-11-22 16:00:25 +00:00
alsa-seq-bridge.c alsa-seq: set priority.driver to 1 2023-10-12 11:57:14 +02:00
alsa-seq.c plugins: simplify target_ handling 2023-03-24 11:36:15 +01:00
alsa-seq.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
alsa-udev.c alsa: Ignore PCM devices with udev env ACP_IGNORE 2023-10-14 14:14:10 +09:00
alsa.c spa: remove unnecessary indirection for some spa_log_topics 2023-10-06 13:08:24 +00:00
alsa.h spa: remove unnecessary indirection for some spa_log_topics 2023-10-06 13:08:24 +00:00
compress-offload-api-util.c alsa-compress-offload: Add device object and udev based autodetection 2023-09-02 08:28:22 +00:00
compress-offload-api-util.h alsa-compress-offload: Add device object and udev based autodetection 2023-09-02 08:28:22 +00:00
compress-offload-api.c alsa-compress-offload-sink: major sink rework 2023-02-24 14:15:13 +01:00
compress-offload-api.h alsa-compress-offload: Add device object and udev based autodetection 2023-09-02 08:28:22 +00:00
meson.build alsa-compress-offload: Add device object and udev based autodetection 2023-09-02 08:28:22 +00:00
test-hw-params.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
test-timer.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00