Commit graph

7963 commits

Author SHA1 Message Date
Wim Taymans
8630b8846c alsa: use position duration as period size
Use half of the configured quantum as the period size in batch mode.
This gives lower latency for USB devices depending on the quantum.
2021-12-17 16:08:08 +01:00
Jonas Holmberg
15ce86aff1 module-protocol-native: Fix errno check
handle_connection_error() takes errno as argument so check for positive
error codes.
2021-12-16 17:21:24 +01:00
Wim Taymans
c8fc79bad2 Revert "pulse-server: only try to increase the tlength"
This reverts commit 7f0255f4ce.

Doesn't work with small quant for some reason.
2021-12-16 17:10:38 +01:00
Wim Taymans
7f0255f4ce pulse-server: only try to increase the tlength
PulseAudio only tries to increase tlength, never decrease so let's
do the same.
2021-12-16 17:08:23 +01:00
Wim Taymans
68cd9ac738 alsa: only use graph rate when nothing else is fixed
Only fall back to suggest the graph rate when we don't have a forced
rate or the card was not already in a format.

See #1892
2021-12-16 15:32:36 +01:00
Wim Taymans
7ef2b27376 acp: sync with pulseaudio
Include the alsa-ucm fixes.

See #1849
2021-12-16 15:07:05 +01:00
Wim Taymans
de12e8dd2c pulse-server: improve fix_* handling
When we have a fix_* flag set, make an extra format description with the
wildcards. This makes it possible for the session manager to fall back
to something when selecting a target and format.

Also only advertize the valid pulseaudio formats for the wildcards.

Fixes #1912
2021-12-16 12:56:19 +01:00
Wim Taymans
12cc3b34b1 pulse-server: implement fix_* fields
Use wildcards for the format/rate/channels when the fix flags are
set in the client.

See #1912
2021-12-16 12:24:59 +01:00
Wim Taymans
ee0fcf05c1 context: apply new quantum and rate when driver is idle
When the driver is IDLE, apply the quantum and rate immediately
so that we can use the values when starting the driver.

See #1913
2021-12-16 11:39:46 +01:00
Wim Taymans
d2ec680d3d spa: fix initializer for old GCC
Older gcc versions seem to require the members to appear in the
designated initializer in the order they are in the definition of
the struct when compiling C++.

Fixes #1910
2021-12-16 11:08:07 +01:00
Wim Taymans
738cbcf789 alsa: fix rate for EAC3
EAC3 needs to be opened in 4x the rate of the EAC3 stream, which can be
32, 44.1 or 48 KHz. Some clients already multiply but others don't.
Check here what is the case and fix it up.

Fixes #1902
2021-12-16 11:02:39 +01:00
Wim Taymans
7b26384388 Merge tag '0.3.42' 2021-12-16 09:51:21 +01:00
Wim Taymans
3cac296ee0 0.3.42 2021-12-16 09:17:48 +01:00
Wim Taymans
079e9b4aa0 impl-node: update quantum/rate only when pending changes
Only update the quantum/rate when we have a pending change.

This works around a bug in sco-source that changes the quantum
by itself but in any case, this optimization is nice to have.

See #1905
2021-12-16 09:01:28 +01:00
Wim Taymans
2104ee585e impl-node: sync current rate and quantum with position 2021-12-16 09:01:22 +01:00
Wim Taymans
f163a67b9d impl-node: don't update rt.position directly
When moving a driver to another, move the quantum and rate to the
current_ fields so that they are applied when the next cycle starts
instead of during the cycle.
2021-12-16 09:01:13 +01:00
Wim Taymans
311210d005 Revert "module-echo-cancel: schedule source and playback last"
This reverts commit 0d422f00dd.

Fixes #1894
2021-12-16 09:01:06 +01:00
Barnabás Pőcze
03f0a7c9ba pipewire: module-session-manager: harmonize type of change_mask
The `pw_*_info` structures in core pipewire all have 64-bit change
masks. Convert the change masks in the session manager extension
to 64-bit as the differing sizes can cause problems.

This introduces an API and ABI break unfortunately, but due to
the limited number of users of the session manager extension,
it was deemed safe.

See wireplumber#49
2021-12-16 09:00:54 +01:00
Torkel Niklasson
8abd6b3fe4 protocol-native: change some warnings to infos
Errors caused by EPIPE/Connection reset by peer should not cause an
error in the pipewire log, but rather an info.
2021-12-16 09:00:01 +01:00
Wim Taymans
65b2405262 pulse-server: track quantum and update tlength
Keep track of the current quantum and recalculate the tlength in the
same way that pulseaudio does.

Send a bufferattr changed message to a client when we change the
parameters.

This fixes the case where the quantum is increased and there needs to be
more buffering to keep the stream going.
2021-12-16 08:59:43 +01:00
Wim Taymans
c468dbebbb pulse-server: update the in_prebuf state
Move out of prebuf when we reach the prebuf amount of data. Go back to
prebuf when we run empty.
2021-12-16 08:59:32 +01:00
Wim Taymans
d3e74a49e7 pulse-server: increase buffer size
Because we keep everything in a ringbuffer and provide exactly the
required amount of data, we can use 1/4 buffers.
Also increase the buffer size. We don't want to limit the buffer size
to the negotiated tlength because it can be increased later. Instead
scale it to the max quantum size (8192) with a max resample rate of 32.
2021-12-16 08:59:28 +01:00
Wim Taymans
774fd3d4c5 doc: Add module-raop-discover 2021-12-16 08:59:23 +01:00
Wim Taymans
cf1d09d0cc Revert "pulse-server: always ask for more data when underrun"
This reverts commit e1576c53d4.

This is not quite right, it seems to break orca and qemu audio.

See #1900
2021-12-16 08:59:17 +01:00
Wim Taymans
d79f9aa76e module-raop: fix zeroconf copy and paste 2021-12-16 08:59:05 +01:00
Hendrik Borghorst
205774f3ab jack: Disconnect owned links on jack_deactivate
As per JACK API description the call to jack_deactivate should
disconnect all ports because an inactive client can't have connections.

This disconnect is missing in the current API and results in left-over
links after the call and malfunction to clients (e.g. Music Player
Daemon).

To fix it this commit goes through the list of links to owned ports and
disconnect them.

Signed-off-by: Hendrik Borghorst <hendrikborghorst@gmail.com>
2021-12-15 15:44:28 +00:00
Jonas Holmberg
6aeb640e31 tests: Add pipewire-alsa stress test
Add test that opens, prepares and closes the alsa pcm device in several
threads simultaneously in an infinite loop.
2021-12-15 16:13:08 +01:00
Wim Taymans
c97d489929 impl-node: update quantum/rate only when pending changes
Only update the quantum/rate when we have a pending change.

This works around a bug in sco-source that changes the quantum
by itself but in any case, this optimization is nice to have.

See #1905
2021-12-15 10:45:48 +01:00
Wim Taymans
c903c2ca08 impl-node: sync current rate and quantum with position 2021-12-14 20:47:36 +01:00
Wim Taymans
dbe61af543 impl-node: don't update rt.position directly
When moving a driver to another, move the quantum and rate to the
current_ fields so that they are applied when the next cycle starts
instead of during the cycle.
2021-12-14 17:05:38 +01:00
Wim Taymans
aefb527a0c Revert "module-echo-cancel: schedule source and playback last"
This reverts commit 0d422f00dd.

Fixes #1894
2021-12-14 16:52:16 +01:00
Barnabás Pőcze
e6e27fe74c pipewire: module-session-manager: harmonize type of change_mask
The `pw_*_info` structures in core pipewire all have 64-bit change
masks. Convert the change masks in the session manager extension
to 64-bit as the differing sizes can cause problems.

This introduces an API and ABI break unfortunately, but due to
the limited number of users of the session manager extension,
it was deemed safe.

See wireplumber#49
2021-12-14 15:15:55 +00:00
Torkel Niklasson
10755ff115 protocol-native: change some warnings to infos
Errors caused by EPIPE/Connection reset by peer should not cause an
error in the pipewire log, but rather an info.
2021-12-14 14:54:13 +00:00
Wim Taymans
1f4254b344 pulse-server: track quantum and update tlength
Keep track of the current quantum and recalculate the tlength in the
same way that pulseaudio does.

Send a bufferattr changed message to a client when we change the
parameters.

This fixes the case where the quantum is increased and there needs to be
more buffering to keep the stream going.
2021-12-14 15:48:54 +01:00
Wim Taymans
6b81be5ac3 pulse-server: update the in_prebuf state
Move out of prebuf when we reach the prebuf amount of data. Go back to
prebuf when we run empty.
2021-12-14 15:47:19 +01:00
Wim Taymans
fd4ea442d9 pulse-server: increase buffer size
Because we keep everything in a ringbuffer and provide exactly the
required amount of data, we can use 1/4 buffers.
Also increase the buffer size. We don't want to limit the buffer size
to the negotiated tlength because it can be increased later. Instead
scale it to the max quantum size (8192) with a max resample rate of 32.
2021-12-14 15:42:19 +01:00
Barnabás Pőcze
57dae3e2b3 spa: libcamera: call get() instead of fd()
libcamera commit 560f5cf998646ddc54a20dc1c7326012834d3204
renamed the `fd()` method on `SharedFD` to `get()`.

Adjust the libcamera plugin accordingly.
2021-12-14 09:52:05 +00:00
Wim Taymans
128f80dd6b doc: Add module-raop-discover 2021-12-14 10:47:41 +01:00
Wim Taymans
8caab44782 Revert "pulse-server: always ask for more data when underrun"
This reverts commit e1576c53d4.

This is not quite right, it seems to break orca and qemu audio.

See #1900
2021-12-14 10:27:01 +01:00
Wim Taymans
33f3a987ec module-raop: fix zeroconf copy and paste 2021-12-13 11:31:23 +01:00
Wim Taymans
717fb64e4e 0.3.41 2021-12-13 09:35:30 +01:00
Wim Taymans
4b21e996c8 pulse-server: fix sample pactl command 2021-12-13 09:35:04 +01:00
Pauli Virtanen
1e5f499ed3 bluez5: fix aptx-ll caps size
Ensure SEP exposed by Pipewire has the full aptx-LL caps also for duplex
profile.
2021-12-11 17:20:39 +02:00
Wim Taymans
bcd867f8eb filter-chain: disable lilv code when not available 2021-12-10 18:46:06 +01:00
Wim Taymans
597b332666 filter-chain: add support for lv2 plugins
Support lv2 plugins and their control values.
2021-12-10 17:44:28 +01:00
Wim Taymans
d86008cf8f support: set clock name for null-audio-sink 2021-12-10 12:43:03 +01:00
Wim Taymans
88987101ca bluez5: set clock name in SCO source and sink 2021-12-10 12:36:37 +01:00
Wim Taymans
b4d33843a6 bluez5: set clock name 2021-12-10 12:31:44 +01:00
Wim Taymans
c3bf07dff1 alsa-seq: make clock name configurable 2021-12-10 12:20:08 +01:00
Wim Taymans
3f2f1971c9 jack: debug driver id and clock name 2021-12-10 12:19:14 +01:00