Commit graph

11753 commits

Author SHA1 Message Date
Wim Taymans
6ab86209f2 1.0.3 2024-02-02 14:09:07 +01:00
Wim Taymans
0b6d763ed5 module-pipe: warn underrun only once 2024-02-02 14:06:45 +01:00
Wim Taymans
b147753554 alsa: always reevaluate matching when driver changed
Always reevaluate the rate matching even when we did not change the
follower state.

It is possible that we were a follower from some node with the same
clock and now become a follower of a node with a different clock. The
follower state doesn't change but we need to activate the rate matching
logic in that case.

Fixes rate matching in pro audio (playback) when capture and playback
are moved to another driver.
2024-02-02 14:06:45 +01:00
Michael Tretter
9996dfb791 conf: escape @DEFAULT_SINK@
Variables enclosed with @ are replaced with the value of the variable.
The sink.name should remain @DEFAULT_SINK@.

Escape the enclosing @ to prevent substitution of DEFAULT_SINK with an
empty string while generating pipewire.conf.
2024-02-02 14:06:45 +01:00
Wim Taymans
1e763b928f alsa: fix version check
See #3711
2024-02-01 21:43:39 +01:00
Wim Taymans
9ba18c15ae 1.0.2 2024-01-31 10:37:35 +01:00
Wim Taymans
1c9c3e3553 jack: fix version check 2024-01-31 10:37:09 +01:00
Wim Taymans
bf87fdbd70 filter-chain: connect atom ports to an empty atom
Or else the lv2 plugin might crash.

Fixes #3815
2024-01-30 18:43:34 +01:00
Wim Taymans
565f560722 module-raop: don't start record in state change
We first need to do the setup, which we start when setting the Format
param.

This causes the module to unload when starting pavucontrol because it
tries to start the record in the wrong state.

See #3778
2024-01-30 18:43:30 +01:00
Arun Raghavan
1f40695b69 node-driver: Log when we resync 2024-01-30 18:43:08 +01:00
Wim Taymans
c690aedc89 v4l2: probe EXPBUF and disable alloc_buffer flag
After we set the format, probe if we can do EXPBUF and enable/disable
the ALLOC_BUFFERS flag on the port.

This should gracefully handle the case where EXPBUF is not available.

Fixes #3821
2024-01-30 18:42:58 +01:00
Wim Taymans
18b112bcfe v4l2: clear support for alloc_buffers on failure
When we try to alloc buffers but EXPBUF is not supported, make sure to
clear the alloc_buffers flag so that the caller can try again with
allocated buffers instead.

See #3821
2024-01-30 18:42:53 +01:00
Wim Taymans
3e49e056ef module-netjack2: improve channel positions
If the manager gave us a different channel count than we had by
default or configured, assume everything is AUX channels.

Also handle the case where the manager is sending more than our
MAX_CHANNELS channels.
2024-01-30 18:42:07 +01:00
Dmitry Sharshakov
31a08028ee pipewire-aes67: resync when offset is more than 1.5 ms
2 ms is typically considered to be late for most AES67 implementations
2024-01-25 12:08:05 +01:00
Dmitry Sharshakov
73cda0c152 node-driver: allow fractional resync-ms 2024-01-25 12:07:11 +01:00
Wim Taymans
c28311fc97 support: add resync.ms option to node.driver
Move some of the tracking code for the DLL to where it is used.

Add resync.ms (default 10) option at which we give up rate adjusting
and instead do a hard resync. This results in a jump in the position
of the graph clock.
2024-01-25 12:06:50 +01:00
Mersad Jelacic
5f531e7fe6 thread: Change warning to info
Change warning to info in impl_acquire_rt() and impl_drop_rt().
2024-01-25 12:03:36 +01:00
Wim Taymans
13511e9295 jack: improve running check
When we get a node info about our own state, we can use the active state
of the node to decide if we are running or not.

Otherwise, we will try to hide ports from JACK clients that suspend
(while still active).

See #3794
2024-01-25 12:02:01 +01:00
Wim Taymans
c298d7faef pulse-server: the device changed when EnumRoute changes
We use EnumRoute of the card to fill in the ports of the device so when
EnumRoute changes, the associated devices also needs a change event.
2024-01-25 12:00:35 +01:00
Wim Taymans
6ee48f0562 alsa: increase buffers when using small buffer
We can increase the MAX_LATENCY again if we increase the amount of
buffers when we are using a small buffer.

Normally we ask for 4 * quantum-limit as the buffer. This should be good
to use 1 buffer and quantum-limit as the quantum with enough headroom
to not run out of buffers.

If we are however using less buffer-frames we need to be careful and
allocate an extra buffer. Imagine using a buffer of 4096 frames, we can
support a quantum of up to 2048 frames if we use 2 buffers.

See #3744
2024-01-22 16:05:52 +01:00
Wim Taymans
7e1e05f0da alsa: improve max-latency property
Half of the buffersize is not enough to support as a max-quantum, we
need to divide by (4 * frame_scale) to allow some headroom and account
for the DSD scaling. We do the same calculation to suggest a buffer size
using the quantum-limit.

See #3744
2024-01-22 16:04:38 +01:00
Wim Taymans
7775363d8e v4l2: improve filter with missing format
When the filter has no format property, just enumerate all possible
framerates. Handle error case where the filter has the wrong type.

Makes gst-launch gstpipewiresrc ! video/x-raw ! fakesink work.

See #1793
2024-01-22 16:00:37 +01:00
Wim Taymans
ef0674751f v4l2: fix format enum with unsupported framerate
Actually count the number of frame fractions we add. If we added 0, we
don't have any supported framerate that intersects with the filter and we
try the next frame size.

See #1793
2024-01-22 16:00:30 +01:00
Pauli Virtanen
0feb68fc07 bluez5: lc3: fix wrong enum_config
The rate is not a bitmask.
2024-01-22 16:00:05 +01:00
Wim Taymans
0a11281834 stream: delay emit param changes when inside emit_param_changed
When we are notifying the application of changed params, don't emit any
changes applied to the params from within the callback with
pw_stream_update_params(). This will be done after we complete the
callback.

This also avoids reseting the change counter so that we don't
accidentally think we updated the formats param when we simply changed
some other params.
2024-01-22 15:56:34 +01:00
Wim Taymans
b63230f805 impl-port: res > 0 means the param was modified
Only log the error when the res < 0, otherwise the param was accepted bu
modified.
2024-01-22 15:56:10 +01:00
Wim Taymans
9a9be2c2ed audioconvert: remove unnecessary casts 2024-01-22 15:54:19 +01:00
Dmitry Sharshakov
524edba9dd audioconvert: fix rare unaligned load exceptions
Supposed causes described in the issue. Also improve float semantics.

Fixes #3790
2024-01-22 15:54:07 +01:00
Pauli Virtanen
bae75e0d0b bluez5: add quirk for SoundCore mini2
AVRCP volume doesn't work properly with this device.

Closes #2927
2024-01-22 15:53:52 +01:00
Pauli Virtanen
46eb11051a bluez5: more informative warning with unknown transports
Unknown transports visible in DBus usually belong to a different
sound server instance that is talking to BlueZ.

Explain this in the warning message that we log, so that people can more
easily understand why things are not working.
2024-01-22 15:53:44 +01:00
Pauli Virtanen
c0716675e8 bluez5: add quirk for Rockbox Brick 2024-01-22 15:53:25 +01:00
Wim Taymans
469b7b0148 spa: small cleanups
Initialize result variable.
Use strncpy to avoid warnings about using non-NULL terminaded strings.
2024-01-12 12:14:06 +01:00
Barnabás Pőcze
01cb3fa862 spa: libcamera: bump minimum supported version to 0.2.0 2024-01-11 13:09:40 +01:00
Barnabás Pőcze
fd33d2d3bb spa: libcamera: use CameraConfiguration::orientation
libcamera commit cc65629b68d49d ("libcamera: camera: Introduce Orientation") [0]
introduced to the `CameraConfiguration::orientation` member to describe the
orientation of the image in the received memory buffers.

Then c65e40b8480ffb ("libcamera: Use CameraConfiguration::orientation") [1]
removed `CameraConfiguration::transform`, which broke the libcamera plugin.

Fix that by using the new `orientation` member.

[0]: https://git.linuxtv.org/libcamera.git/commit/?id=cc65629b68d49d5f2a4d61537584c56ba510a335
[1]: https://git.linuxtv.org/libcamera.git/commit/?id=c65e40b8480ffb5f50e01a4e6713164c7194a937
2024-01-11 13:09:32 +01:00
Wim Taymans
79b98884af 1.0.1 2024-01-10 13:30:27 +01:00
Wim Taymans
1733cc7fea support: fix freewheel timeout in node-driver
When freewheeling we will immediately schedule a new graph cycle when we
get a process call because the graph completed.

When the process call is not done, because of some xrun or
because some node was removed that causes the graph to fail completion,
The next cycle will happen after a timeout.

This timeout was calculated as the ideal wakeup time (after a quantum of
time) and would accumulate for each timeout. The result is that the
timeout ended up far in the future and would stall the freewheel driver
for a long time.

Fix this by always setting the next timeout to wakeup time + freewheel.timeout
seconds. Also add a config property for the timeout (10 seconds, like
jack2 by default).
2024-01-10 13:25:41 +01:00
Wim Taymans
5a596edd53 spa: small cleanups
Use snprint to ensure null terminated strings.
Initialize res, it would be uninitialized when setting a NULL Latency
param.
2024-01-10 13:25:35 +01:00
Wim Taymans
50096e2c76 doc: clarify rlimits conf file
Fixes #3760
2024-01-09 09:20:40 +01:00
Wim Taymans
2b7fa2ff5a spa: remove some references to unimplemented items
Fixes #3763
2024-01-09 09:20:16 +01:00
Barnabás Pőcze
beee7d1ce2 meson_options: pass proper boolean values to boolean options
Passing strings has been deprecated:
https://mesonbuild.com/Release-notes-for-1-1-0.html#coercing-values-in-the-option-function-is-deprecated
2024-01-09 09:19:58 +01:00
Mauro Carvalho Chehab
4dfd8b4497 bluez5: update bluez-hardware.conf to ignore sbc-mq on Primark earbud
Primark True Wireless earbud doesn't support sbc-xq. Having it
enabled causes bluez to enter into a loop enabling/disabling
the device dozens of times per minute, making it unusable.
2024-01-09 09:10:53 +01:00
Michael Tretter
16964b323f gst/pipewiresink: fix dts_offset
GStreamer uses a time stamp for the decoding time, but PipeWire uses an
offset to the presentation time. Thus, the pipewiresink must not use the
DTS as dts_offset, but has to calculate the offset.

If the buffer's DTS is invalid, assume that dts is pts.
2024-01-04 17:55:14 +01:00
Wim Taymans
917c6419b1 pulse-server: call update_object_info in manager_added
get_device_info() requires us to call update_object_info() in the added
and updated events.

Fixes a bug where the properties were invalid in the avahi txt record.
2024-01-04 17:54:23 +01:00
Wim Taymans
591330ab74 protocol: don't allow NULL event or command
If causes crashes when the handlers try to get the ID.
2024-01-04 17:54:14 +01:00
Barnabás Pőcze
4fd1f88a99 pipewire: module-loopback: fix delay buffer memory leak 2024-01-04 17:53:44 +01:00
George Kiagiadakis
0c99d37db2 gstpipewiresrc: break out of wait_started() also on STATE_UNCONNECTED
When the session manager sends an error to the client, it typically
also destroys the node after the error, which causes the stream to go
to STATE_UNCONNECTED via proxy_removed(). In that case, make sure
we exit the loop early, otherwise it will take 30 seconds to unblock
gst_element_set_state()

This is a revised version of the fix that was commited via !1763
and then reverted, as it was problematic. Now the code ensures
that it breaks out only if the state was previously CONNECTING
or higher.
2024-01-04 17:53:25 +01:00
Duncan Overbruck
c199611c89 pulse-server: fill in active port for monitors
The monitor sources also list the port of the sink and so the active
port needs to be collected as well so it doesn't fall back to the first
port (which might not be available).
2023-12-20 10:16:56 +01:00
Wim Taymans
67fde171a2 gst: keep track of node ports
Keep a list of ports for the node. When the node goes away, clear the
port links to the node. Handle the case where the port no longer has a
node.

This avoids a crash when, for example, the node permission is removed
and the port points to the now freed node_data.

Fixes #3708
2023-12-14 13:13:56 +01:00
Wim Taymans
705c977e9e gst: remove unused pending list 2023-12-14 13:13:51 +01:00
Wim Taymans
8d5e7749c2 jack: handle -ENOENT from the core
This means that we tried to do something on a proxy that was destroyed
on the server and we should just ignore the error.
2023-12-14 13:12:44 +01:00