Commit graph

11490 commits

Author SHA1 Message Date
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
Wim Taymans
7a0b400c18 spa: use dynamic builder where we can
With the spa_auto support this becomes feasable and avoids problems when
the pod size is unknown and ends up larger than our stack buffer.
2023-10-11 18:04:17 +02:00
Wim Taymans
779f06865c pod: add spa_auto support for dynamic builder 2023-10-11 17:27:43 +02:00
Wim Taymans
5102e4cb8d pod: handle realloc failure
When realloc fails, the original pointer is untouched so store the
result of realloc somewhere else so that we don't cause a leak.
2023-10-11 17:26:40 +02:00
Wim Taymans
a9659d9dce alsa: add Tag set and enum support
So that we can see the tags on the sinks and sources.
2023-10-11 15:56:52 +02:00
Wim Taymans
7554bdea97 alsa: clean up some latency param handling 2023-10-11 15:55:57 +02:00
Wim Taymans
6d0613bc9a pulse-server: place stream media.* keys as Tag 2023-10-11 15:17:13 +02:00
Wim Taymans
b3f8df6dfc pw-cat: don't overrun our param array 2023-10-11 13:34:18 +02:00
Wim Taymans
77651e130e alsa: add extra checks
Check if the device is opened when doing _prepare or _start. When it was
a follower but failed to open, we might otherwise crash.

Fixes #3554
2023-10-11 11:39:45 +02:00
Wim Taymans
45bab72abc jack: fix midi events in destination buffer
Don't fix up the midi events in the (read only) input buffer but
after we have converted it into the JACK midi buffer.

See #3560
2023-10-11 10:56:19 +02:00
Wim Taymans
e90bf4701c filter-chain: fix typo 2023-10-11 09:39:06 +02:00
Wim Taymans
fcde479a82 env: PIPEWIRE_QUANTUM now uses FORCE_RATE and FORCE_QUANTUM
Make it force a RATE and QUANTUM on the graph. The non-force options
can already be done with PIPEWIRE_RATE and PIPEWIRE_LATENCY.
2023-10-10 15:10:19 +02:00
Wim Taymans
6c32b50ccd filter-chain: explain volumes a little better 2023-10-10 15:04:47 +02:00
Wim Taymans
4b940100b1 impl-node: rework resume after rate switch
We only need to resume the SUSPENDED node when it has !pause-on-idle.
So, set the need_resume flag when we suspend in that case.

Clear the flag in the next round and make sure we set the node to
running again. We don't need to clear any flags when the state change
completes anymore with this change.

This also fixes a case where strawberry would fail to configure the
correct sample rate. 44.1KHz would be used (the rate of the probe
stream) because the scheduler was thinking the node was still being
reconfigured because the reconfigure flag was only cleared when going
to the running state (an alsa sink has !pause_on_idle).

See #2929
2023-10-09 17:46:38 +02:00
Wim Taymans
2278dd1460 acp: only disable tsched when linking
Disable timer based scheduling only if we are going to link the devices
together.

See #3556
2023-10-09 12:28:46 +02:00
Wim Taymans
acbe75d9a1 rtp-stream: senum -> seqnum 2023-10-09 11:12:21 +02:00
Christian Glombek
60d0943c19 module-raop-sink: Port to rtp-module/stream 2023-10-09 10:52:25 +02:00
Christian Glombek
cbac8c9040 module-rtp/stream: Add support for RAOP 2023-10-09 10:52:25 +02:00
Christian Glombek
8704aaa044 module-rtp/stream: Add getter for pw_stream state 2023-10-09 10:52:25 +02:00
Christian Glombek
89d935c9f6 module-rtp/stream: Add setter for property 2023-10-09 10:52:25 +02:00
Christian Glombek
1200bd7d20 module-rtp/stream: Add getter for property 2023-10-09 10:52:25 +02:00
Christian Glombek
35330cf461 module-rtp/stream: Add param_changed method
This method can be used to access the param_changed method of the
underlying pw_stream.

Also adds new public functions rtp_stream_set_param and
rtp_stream_update_params which plum things through to pw_stream_set_param
and pw_stream_update_params respectively.
2023-10-09 10:52:25 +02:00
Christian Glombek
9eba60a635 module-rtp/stream: Add ability to set marker on first packet 2023-10-09 10:52:25 +02:00
Christian Glombek
98db54f55d module-raop-sink: Simplify rtp send functions
Reorganizes the rtp send functions.

Part of porting module-raop-sink towards the
module-rtp/stream facilities.
2023-10-09 10:52:25 +02:00
Christian Glombek
d063dbdb62 module-raop-sink: Drop the RTSP FLUSH request
The RTSP FLUSH request does not seem to be required.

This change also fixes an issue where another RECORD request is
erroneously sent when the stream switches back from paused to streaming
by only setting `impl->streaming = false` in `rtsp_do_teardown()`.
2023-10-09 08:51:10 +00:00
Wim Taymans
e8d6407c4e context: allow non-power-of-2 quantum when forced
When forcing a quantum allow non-power-of-2 as well.
2023-10-09 10:49:00 +02:00
Wim Taymans
945be16617 acp: only join and link when 1 capture and 1 playback
Only schedule nodes together when there is just 1 capture and 1 playback
device. Devices might be mutually exclusive or require special setup
that would break otherwise.

See #3556
2023-10-09 10:35:30 +02:00
Wim Taymans
063805ccb4 acp: fix compilation 2023-10-09 10:15:10 +02:00
Wim Taymans
896fea62c2 alsa: add api.alsa.auto-link option
Add an option to automatically use snd_pcm_link when the follower clock
is matching the driver. Only set this to true in pro-audio and when
nodes are scheduled together.

See #3556
2023-10-09 10:13:43 +02:00
Pauli Virtanen
0dfa05117b impl-client: fix client property update access check
The `pipewire.*` properties may be set by clients but not changed by
them.  However, how the checks are done now this allows e.g. connecting
clients to set `pipewire.access` themselves, which is not intended.

Fix the client property update check to not allow clients to set
pipewire.protocol/access, object.serial/id, pipewire.sec.* which are
supposed to be set by the server.
2023-10-08 18:42:24 +03:00