Commit graph

11519 commits

Author SHA1 Message Date
Wim Taymans
19b02003b0 context: relax quantum change conditions
We can change the quantum of a node while it is running just fine so
relax the check.

This was copied from the rate change logic, which is avoided while the
node is running.

This fixes a regression in dynamic quantum switching.

Fixes #3574
2023-10-16 16:29:01 +02:00
Wim Taymans
7ecea07a63 audioconvert: use alternative store to avoid ASAN errors
See #3572
2023-10-16 12:59:41 +02:00
Wim Taymans
16ad067cc9 audioconvert: use spa_write_unaligned
Use a macro to write out unaligned data to avoid ASAN errors.

See #3572
2023-10-16 12:21:33 +02:00
Wim Taymans
7d5b809b19 jack: make option to make input writable 2023-10-16 11:40:03 +02:00
Wim Taymans
d2b6a76798 modules: the combined streams are always async
We never trigger processing from their callbacks in all cases so they
need one extra buffer.
2023-10-16 10:42:39 +02:00
Wim Taymans
840a9487a4 alsa: don't try to link when prepare fails 2023-10-16 10:32:51 +02:00
Wim Taymans
8f2ee0a29c Revert "jack: use a private writable mapping on input"
This reverts commit 6fefd49a8a.

We can't use PRIVATE because mmap docs say that we then might not see
changes in the data anymore from other processes.

Fixes #3575
2023-10-16 09:36:16 +02:00
columbarius
886ca8f004 build: increase required vulkan version
We require VK_EXT_KHR_synchronization_2 to build, which seems to be
added to libvulkan at 2.1.170 [1].

[1] 1d99b835ec
2023-10-15 20:32:57 +00:00
columbarius
6064e5087e build: Restructure vulkan dependency handling and assert headers
vulkan_headers was a workaround for distributions providing pkg-config information
without the headers. Replacing it with a more conventional have_vulkan
and assert header availability if the option vulkan is enabled.
2023-10-15 20:32:57 +00:00
Wim Taymans
82b2515af3 test: avoid left shift on signed values
See #3572
2023-10-15 22:27:44 +02:00
Wim Taymans
2bef057428 audioconvert: avoid unaligned read
See #3572
2023-10-15 22:20:54 +02:00
Wim Taymans
fdc1391b19 audioconvert: avoid unaligned reads using memcpy
See #3572
2023-10-15 22:09:44 +02:00
Wim Taymans
cc109843e5 audioconvert: avoid unaligned writes and left shift of neagtives
See #3572
2023-10-15 21:12:23 +02:00
Wim Taymans
20b336b1d7 audioconvert: avoid unaligned writes
See #3572
2023-10-15 21:03:52 +02:00
Barnabás Pőcze
80572a6fbc audioconvert: don't left shift negative values
See #3572
2023-10-15 21:00:01 +02:00
Wim Taymans
b2c24f3435 audioconvert: fix unaligned writes
Avoid some optimizations that cause unaligned writes.

See #3572
2023-10-15 20:52:54 +02:00
Wim Taymans
bdd577c360 Revert "audioconvert: fix unaligned address"
This reverts commit ae3798abaa.
2023-10-15 20:49:31 +02:00
Wim Taymans
ae3798abaa audioconvert: fix unaligned address
See #3572
2023-10-15 20:40:30 +02:00
Wim Taymans
f3942fca29 audioconvert: fix unaligned writes
Use 16 bits writes for 16 bits samples or else we might be doing
unlaigned writes.

See #3572
2023-10-15 19:10:45 +02:00
Wim Taymans
9e547753ad Try to fix ci 2023-10-15 18:43:06 +02:00
Pauli Virtanen
44a166c288 bluez5: use bigger fallback SCO mtu if kernel doesn't tell us
Use bigger fallback maximum MTU, when kernel fails to tell us, which
shouldn't happen but apparently can. We choose the packet size based on
incoming data, so these values aren't usually needed so we can just bump
them.

Also report errors as necessary.
2023-10-15 16:31:17 +00:00
Pauli Virtanen
ca0e886159 spa: support: allow spa_log_xxx(NULL, ...) again with UBSan
Calling the spa_log_xxx macros with NULL log used to be allowed,
and it's used in some tests.

Write the NULL check in a way the compiler can understand and make UBSan
a happy UBSan.
2023-10-15 16:20:17 +00:00
Pauli Virtanen
960ca82552 spa: deduplicate test-helper.h 2023-10-15 16:20:17 +00:00
Barnabás Pőcze
c47df433f7 ci: set some ASan and UBSan options
This is needed in part for UBSan to make tests actually
fail on encountering undefined behaviour.
2023-10-15 16:19:30 +00:00
Hector Martin
fd969dab28 alsa: Ignore PCM devices with udev env ACP_IGNORE
When checking that a card has all of its PCM devices available, ignore
any specific device with the ACP_IGNORE udev environment variable. This
mirrors how we ignore whole cards, but specifically allows non-PipeWire
software to own specific PCM devices.

Note that this does not actually stop PipeWire from using those
subdevices right now, we assume UCM configs take care of that. This
should probably be implemented later to ensure PipeWire always stays
away from them, but for now this fixes the issue where it refuses to
probe the entire card.

Fixes: #3570

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-10-14 14:14:10 +09:00
Wim Taymans
6fefd49a8a jack: use a private writable mapping on input
See #3571
2023-10-14 12:23:39 +02:00
Wim Taymans
c94d5d9d34 audioconvert: improve allocation
Don't try to allocate each time port buffers are set but only once
before we start procesing.

Also allocate enough temp buffers are there are ports. This saves us
quite a bit of memory in the normal case.
2023-10-13 18:05:42 +02:00
Wim Taymans
11320cf203 tweak number of buffers
In most cases we can use just 1 buffer.

The alsa-pcm-source needs at least 2 buffers so increment the min
limit.
2023-10-13 14:00:29 +02:00
Wim Taymans
9163c419df audioadapter: alloc at least 2 buffers when async
When the follower is async, alloc at least 2 buffers.
2023-10-13 13:59:34 +02:00
Wim Taymans
8e95f1a575 module-ffado: remove hardcoded quantum_limit 2023-10-13 13:46:20 +02:00
Wim Taymans
4bb3e292c5 netjack2: remove hardcoded buffer size 2023-10-13 13:40:22 +02:00
Wim Taymans
01857b616c filter-chain: remove some hardcoded limits
Use the quantum_limit instead of a hardcoded value.
2023-10-13 13:32:12 +02:00
Wim Taymans
ac51fbfd1e buffer: remove some hardcoded buffer size limits
Use the quantum_limit as the max buffer size instead of the hardcoded
8192 value.
2023-10-13 13:07:48 +02:00
Wim Taymans
6eb17393bf jack: remove fixed buffer size limit
Use the quantum_limit as the max buffer frames and allocate the ports
with the right samples at the end.
2023-10-13 13:04:28 +02:00
Wim Taymans
8a9117567c 0.3.82 2023-10-13 10:08:20 +02:00
Wim Taymans
bafa890aef jack: schedule all jack clients in the same group
Always group the jack clients together to avoid them using different
drivers (and transport/timing).

See #3562
2023-10-13 09:43:00 +02:00
Hector Martin
89e9da8cc0 alsa: Do not attempt to prepare linked PCMs
All linked PCMs prepare together. If we prepare the secondaries, that
action clobbers the write pointer of every PCM every time, which then
causes playback to fail to start due to lack of data.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-10-12 21:38:55 +09:00
Sebastian Jaeckel
75fcbf1e6c aes67: add clock.interface example and update the documentation comment 2023-10-12 17:32:50 +00:00
Sebastian Jaeckel
be69f029ac node-driver: use interface name to get PHC index of PTP clock
The user may not know which is the active PHC index of a bonded
interface. We can now specify the interface name instead of a device
as the clock.interface property and query the interface about the
active PHC index.
2023-10-12 17:32:50 +00:00
Sebastian Jaeckel
f7fa7df3ee node-driver: warn if the specified clock can't be opened 2023-10-12 17:32:50 +00:00
Wim Taymans
ffa6a4083a conf: add new alsa option 2023-10-12 18:45:12 +02:00
Wim Taymans
e063cc38a9 alsa: add alsa.deny to fail init of the PCM
Handy to block audacity from probing the hardware.
2023-10-12 18:41:37 +02:00
Wim Taymans
e940361c94 alsa: don't check early wakeup when PCM stopped
When the PCM is stopped, don't check for early wakeup because if we
are early, we will never be on time in the next iteration either because the
PCM is stopped and doesn't advance.

Also don't try to align when stopped.

See #3565
2023-10-12 15:28:53 +02:00
Wim Taymans
0ca1acb3d5 alsa: don't resync capture when linked
We should be aligned correctly.
2023-10-12 15:28:21 +02:00
Wim Taymans
080c40d938 alsa: handle errors from get status
And skip a cycle.
2023-10-12 15:17:48 +02:00
Wim Taymans
162f90ac3a alsa-seq: set priority.driver to 1
So that nodes are moved to it as a fallback when nothing else is
running.

Fixes #3562
2023-10-12 11:57:14 +02:00
Wim Taymans
a8636b04cb alsa: always read/write follower samples
Ignore errors such as -EAGAIN, just write what we have.

See #3565
2023-10-12 11:40:50 +02:00
Barnabás Pőcze
15e14946fb spa: expose utils/cleanup.h for external users
Up until now, `spa/utils/cleanup.h` was not installed,
but 779f06865c ("pod: add spa_auto support for dynamic builder")
included it in a public header. So now `cleanup.h` also needs to
be installed like any other public header so as to not break
3rd party users.

For example, `xdg-desktop-portal-wlr` would break:
https://codesearch.debian.net/search?q=spa_pod_dynamic_builder_init&literal=1
2023-10-11 19:56:11 +02:00
Pauli Virtanen
bb120a070f pipewire: add PW_KEY_SEC_SOCKET and set it in protocol
Add client key PW_KEY_SEC_SOCKET that indicates which socket the client used
to connect to the server.

This can be used by other modules as an access control mechanism.
2023-10-11 19:08:18 +03:00
Pauli Virtanen
72462ebd07 module-protocol-native: add module argument 'sockets'
Add module argument 'sockets' for creating multiple sockets clients can
connect to.

Also allow setting socket file permissions.
2023-10-11 19:08:18 +03:00