pipewire/spa/plugins/alsa
Michael Olbrich e808875d60 alsa: improve audio output to multiple devices
There are currently several issues when multiple alsa devices are
involved.

For alsa devices that are followers, all data is written via
impl_node_process(). Currently spa_alsa_write() is only called if a new
buffer was queued.
It can happen that all buffers are in the ready list (queued by previous
calls but not yet written because there was no free space in the kernel
ring buffer). In this case writing stalls indefinitely.
To fix this, also call spa_alsa_write() if no new buffer is queued but
there are still buffers in the ready list.

If the ready list of the primary device is not empty then only this
device is handled because spa_alsa_write() is called directly. The other
devices make no progress during this interval.
The clock drift calculation works by comparing the alsa delay with the
expected delay since the last wakeup. This only work if the alsa
ringbuffer was filled completly. If the ready list contains a partial
buffer then the ringbuffer is not filled and the timing calculation
during the next wakeup is incorrect.

To fix all this, remove the special case for the non-empty ready list
and just call spa_node_call_ready() every time.
2023-06-22 09:28:44 +00:00
..
acp Revert "alsa-mixer: allow to re-attach the mixer control element" 2023-04-14 16:32:18 +02:00
mixer alsa-profiles: SB Audigy: stereo mixer paths 2023-04-09 12:20:26 -07: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 treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
alsa-compress-offload-sink.c plugins: simplify target_ handling 2023-03-24 11:36:15 +01:00
alsa-pcm-device.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
alsa-pcm-sink.c alsa: improve audio output to multiple devices 2023-06-22 09:28:44 +00:00
alsa-pcm-source.c alsa: Implement playback/capture rate control for USB gadgets 2023-06-17 08:56:41 +00:00
alsa-pcm.c alsa: improve audio output to multiple devices 2023-06-22 09:28:44 +00:00
alsa-pcm.h alsa: Implement playback/capture rate control for USB gadgets 2023-06-17 08:56:41 +00:00
alsa-seq-bridge.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00: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 treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
alsa.c treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
alsa.h treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +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-sink: major sink rework 2023-02-24 14:15:13 +01:00
meson.build alsa-compress-offload-sink: major sink rework 2023-02-24 14:15:13 +01: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